Guard fiveaxis staging manifests
This commit is contained in:
66
text7.txt
66
text7.txt
@@ -236,6 +236,72 @@ Guard staged prefix stripping
|
||||
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
||||
```
|
||||
|
||||
八、2026-06-13 继续执行记录:fiveaxis staging manifest guard
|
||||
|
||||
1. 本批目标。
|
||||
|
||||
继续 staged path guard inventory 第三轮,收敛 fiveaxis 三组 helper 的 staged 文件写入:
|
||||
|
||||
```text
|
||||
writeFiveAxisTrtMachineFiles(...)
|
||||
writeFiveAxisTdrMachineFiles(...)
|
||||
writeFiveAxisBridgeMillMachineFiles(...)
|
||||
```
|
||||
|
||||
2. 已完成改动。
|
||||
|
||||
- Node 侧新增 fiveaxis 固定 manifest 写入 helper;
|
||||
- Node 侧为 `remap_subs` 和 `demos` 的 `.ngc` 子集增加 upstream coverage drift
|
||||
断言;
|
||||
- Node 侧移除 fiveaxis helper 里的 ad hoc `readdirSync(remap_subs)` 写入;
|
||||
- browser 侧新增 fiveaxis 固定 manifest 写入 helper;
|
||||
- browser 侧增加 duplicate-free 和 staged root/path parity 断言;
|
||||
- browser 侧仍不枚举目录;
|
||||
- 未修改 INI、remap、kinematics、HAL 或 interpreter 语义。
|
||||
|
||||
涉及文件:
|
||||
|
||||
```text
|
||||
wasm-port/tests/wasm/node/verify_interp_wasm.mjs
|
||||
wasm-port/tests/browser/interp_smoke.html
|
||||
```
|
||||
|
||||
3. 已完成的目标验证。
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||||
```
|
||||
|
||||
4. 本批剩余建议验证。
|
||||
|
||||
```bash
|
||||
wasm-port/tools/verify_vendor_sync.sh
|
||||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||||
wasm-port/tests/host/verify_host_smokes.sh
|
||||
```
|
||||
|
||||
如果通过,提交建议:
|
||||
|
||||
```text
|
||||
Guard fiveaxis staging manifests
|
||||
```
|
||||
|
||||
5. 下一步工作建议。
|
||||
|
||||
继续 staged path guard inventory 第四轮,优先扫描 `verify_interp_wasm.mjs` 和
|
||||
`interp_smoke.html` 中剩余的 direct literal `/work/...` 写入点,选择已有
|
||||
Node/browser 成对覆盖、且可以用 fixed manifest 或 single-file staging helper
|
||||
收敛的小批次。
|
||||
|
||||
下一轮第一条命令仍保持:
|
||||
|
||||
```bash
|
||||
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
||||
```
|
||||
|
||||
七、2026-06-13 继续执行记录:staged prefix stripping guard
|
||||
|
||||
1. 本批目标。
|
||||
|
||||
@@ -4520,120 +4520,108 @@
|
||||
return plan;
|
||||
}
|
||||
|
||||
function assertFiveAxisMachineFilesStaging(name, files, wasmDir, expectedWasmDir) {
|
||||
if (wasmDir !== expectedWasmDir) {
|
||||
throw new Error(`browser_fiveaxis_${name}_staging_root: path drift`);
|
||||
}
|
||||
if (files.length === 0 || new Set(files).size !== files.length) {
|
||||
throw new Error(`browser_fiveaxis_${name}_staging_manifest: list drift`);
|
||||
}
|
||||
for (const file of files) {
|
||||
if (`${wasmDir}/${file}` !== `${expectedWasmDir}/${file}`) {
|
||||
throw new Error(`browser_fiveaxis_${name}_${file}_staging_manifest: path drift`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function writeFiveAxisMachineFiles(interp, name, sourceDir, wasmDir, expectedWasmDir, files) {
|
||||
assertFiveAxisMachineFilesStaging(name, files, wasmDir, expectedWasmDir);
|
||||
for (const file of files) {
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/${file}`, `${wasmDir}/${file}`);
|
||||
}
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
async function writeFiveAxisTrtMachineFiles(interp) {
|
||||
const sourceDir =
|
||||
"../../vendor/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting";
|
||||
const wasmDir = "/work/browser-fiveaxis/table-rotary-tilting";
|
||||
const remapFiles = [
|
||||
"428remap.ngc",
|
||||
"429remap.ngc",
|
||||
"430remap.ngc",
|
||||
"centering.ngc",
|
||||
"helix_ac.ngc",
|
||||
"helix_bc.ngc",
|
||||
"xyzac_switchkins_sub.ngc",
|
||||
"xyzbc_switchkins_sub.ngc",
|
||||
const files = [
|
||||
"xyzac-trt.ini",
|
||||
"xyzbc-trt.ini",
|
||||
"xyzac-trt.tbl",
|
||||
"xyzbc-trt.tbl",
|
||||
"remap_subs/428remap.ngc",
|
||||
"remap_subs/429remap.ngc",
|
||||
"remap_subs/430remap.ngc",
|
||||
"remap_subs/centering.ngc",
|
||||
"remap_subs/helix_ac.ngc",
|
||||
"remap_subs/helix_bc.ngc",
|
||||
"remap_subs/xyzac_switchkins_sub.ngc",
|
||||
"remap_subs/xyzbc_switchkins_sub.ngc",
|
||||
"demos/xyzac_switchkins.ngc",
|
||||
"demos/xyzbc_switchkins.ngc",
|
||||
"demos/xyzac_switchkins_test_1.ngc",
|
||||
"demos/xyzac_switchkins_test_2.ngc",
|
||||
"demos/xyzac_switchkins_test_3.ngc",
|
||||
"demos/boat-xyzac.ngc",
|
||||
"demos/boat-xyzbc.ngc",
|
||||
"demos/impeller-7bl-xyzac.ngc",
|
||||
];
|
||||
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/xyzac-trt.ini`, `${wasmDir}/xyzac-trt.ini`);
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/xyzbc-trt.ini`, `${wasmDir}/xyzbc-trt.ini`);
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/xyzac-trt.tbl`, `${wasmDir}/xyzac-trt.tbl`);
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/xyzbc-trt.tbl`, `${wasmDir}/xyzbc-trt.tbl`);
|
||||
|
||||
for (const filename of remapFiles) {
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/remap_subs/${filename}`,
|
||||
`${wasmDir}/remap_subs/${filename}`,
|
||||
);
|
||||
}
|
||||
|
||||
await writeFetchedTextFile(
|
||||
return writeFiveAxisMachineFiles(
|
||||
interp,
|
||||
`${sourceDir}/demos/xyzac_switchkins.ngc`,
|
||||
`${wasmDir}/demos/xyzac_switchkins.ngc`,
|
||||
"table-rotary-tilting",
|
||||
sourceDir,
|
||||
wasmDir,
|
||||
"/work/browser-fiveaxis/table-rotary-tilting",
|
||||
files,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/xyzbc_switchkins.ngc`,
|
||||
`${wasmDir}/demos/xyzbc_switchkins.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/xyzac_switchkins_test_1.ngc`,
|
||||
`${wasmDir}/demos/xyzac_switchkins_test_1.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/xyzac_switchkins_test_2.ngc`,
|
||||
`${wasmDir}/demos/xyzac_switchkins_test_2.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/xyzac_switchkins_test_3.ngc`,
|
||||
`${wasmDir}/demos/xyzac_switchkins_test_3.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/boat-xyzac.ngc`,
|
||||
`${wasmDir}/demos/boat-xyzac.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/boat-xyzbc.ngc`,
|
||||
`${wasmDir}/demos/boat-xyzbc.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
`${wasmDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
);
|
||||
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
async function writeFiveAxisTdrMachineFiles(interp) {
|
||||
const sourceDir =
|
||||
"../../vendor/linuxcnc/configs/sim/axis/vismach/5axis/table-dual-rotary";
|
||||
const wasmDir = "/work/browser-fiveaxis/table-dual-rotary";
|
||||
const remapFiles = ["428remap.ngc", "429remap.ngc"];
|
||||
const files = [
|
||||
"xyzab-tdr.ini",
|
||||
"xyzab-tdr.tbl",
|
||||
"remap_subs/428remap.ngc",
|
||||
"remap_subs/429remap.ngc",
|
||||
"demos/xyzab-tdr-demo.ngc",
|
||||
];
|
||||
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/xyzab-tdr.ini`, `${wasmDir}/xyzab-tdr.ini`);
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/xyzab-tdr.tbl`, `${wasmDir}/xyzab-tdr.tbl`);
|
||||
for (const filename of remapFiles) {
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/remap_subs/${filename}`,
|
||||
`${wasmDir}/remap_subs/${filename}`,
|
||||
);
|
||||
}
|
||||
await writeFetchedTextFile(
|
||||
return writeFiveAxisMachineFiles(
|
||||
interp,
|
||||
`${sourceDir}/demos/xyzab-tdr-demo.ngc`,
|
||||
`${wasmDir}/demos/xyzab-tdr-demo.ngc`,
|
||||
"table-dual-rotary",
|
||||
sourceDir,
|
||||
wasmDir,
|
||||
"/work/browser-fiveaxis/table-dual-rotary",
|
||||
files,
|
||||
);
|
||||
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
async function writeFiveAxisBridgeMillMachineFiles(interp) {
|
||||
const sourceDir =
|
||||
"../../vendor/linuxcnc/configs/sim/axis/vismach/5axis/bridgemill";
|
||||
const wasmDir = "/work/browser-fiveaxis/bridgemill";
|
||||
const remapFiles = ["428remap.ngc", "429remap.ngc", "430remap.ngc"];
|
||||
const files = [
|
||||
"5axis.ini",
|
||||
"5axis.tbl",
|
||||
"remap_subs/428remap.ngc",
|
||||
"remap_subs/429remap.ngc",
|
||||
"remap_subs/430remap.ngc",
|
||||
"5axisgui.ngc",
|
||||
];
|
||||
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/5axis.ini`, `${wasmDir}/5axis.ini`);
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/5axis.tbl`, `${wasmDir}/5axis.tbl`);
|
||||
for (const filename of remapFiles) {
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/remap_subs/${filename}`,
|
||||
`${wasmDir}/remap_subs/${filename}`,
|
||||
);
|
||||
}
|
||||
await writeFetchedTextFile(interp, `${sourceDir}/5axisgui.ngc`, `${wasmDir}/5axisgui.ngc`);
|
||||
|
||||
return wasmDir;
|
||||
return writeFiveAxisMachineFiles(
|
||||
interp,
|
||||
"bridgemill",
|
||||
sourceDir,
|
||||
wasmDir,
|
||||
"/work/browser-fiveaxis/bridgemill",
|
||||
files,
|
||||
);
|
||||
}
|
||||
|
||||
async function writeRemapRegressionFiles(interp, name, files) {
|
||||
|
||||
@@ -131,61 +131,78 @@ function stageInterpIniContext(name, programFile = "test.ngc") {
|
||||
return plan;
|
||||
}
|
||||
|
||||
function assertFiveAxisMachineNgcCoverage(name, sourceDir, subdir, files) {
|
||||
const expectedFiles = files
|
||||
.filter((file) => file.startsWith(`${subdir}/`) && file.endsWith(".ngc"))
|
||||
.map((file) => file.slice(subdir.length + 1))
|
||||
.sort();
|
||||
assert.deepEqual(
|
||||
readdirSync(resolve(sourceDir, subdir))
|
||||
.filter((filename) => filename.endsWith(".ngc"))
|
||||
.sort(),
|
||||
expectedFiles,
|
||||
`fiveaxis ${name}/${subdir} fixture coverage drift`,
|
||||
);
|
||||
}
|
||||
|
||||
function assertFiveAxisMachineFilesStaging(name, files, wasmDir, expectedWasmDir) {
|
||||
assert.equal(wasmDir, expectedWasmDir, `fiveaxis ${name} staging root drift`);
|
||||
assert.equal(new Set(files).size, files.length, `fiveaxis ${name} staging manifest duplicate`);
|
||||
for (const file of files) {
|
||||
assert.equal(
|
||||
`${wasmDir}/${file}`,
|
||||
`${expectedWasmDir}/${file}`,
|
||||
`fiveaxis ${name}/${file} staging manifest drift`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function writeFiveAxisMachineFiles(name, sourceDir, wasmDir, expectedWasmDir, files) {
|
||||
assertFiveAxisMachineFilesStaging(name, files, wasmDir, expectedWasmDir);
|
||||
for (const file of files) {
|
||||
writeVendorTextFile(resolve(sourceDir, file), `${wasmDir}/${file}`);
|
||||
}
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
function writeFiveAxisTrtMachineFiles() {
|
||||
const sourceDir = resolve(
|
||||
rootDir,
|
||||
"vendor/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting",
|
||||
);
|
||||
const wasmDir = "/work/fiveaxis/table-rotary-tilting";
|
||||
const files = [
|
||||
"xyzac-trt.ini",
|
||||
"xyzbc-trt.ini",
|
||||
"xyzac-trt.tbl",
|
||||
"xyzbc-trt.tbl",
|
||||
"remap_subs/428remap.ngc",
|
||||
"remap_subs/429remap.ngc",
|
||||
"remap_subs/430remap.ngc",
|
||||
"remap_subs/centering.ngc",
|
||||
"remap_subs/helix_ac.ngc",
|
||||
"remap_subs/helix_bc.ngc",
|
||||
"remap_subs/xyzac_switchkins_sub.ngc",
|
||||
"remap_subs/xyzbc_switchkins_sub.ngc",
|
||||
"demos/xyzac_switchkins.ngc",
|
||||
"demos/xyzbc_switchkins.ngc",
|
||||
"demos/xyzac_switchkins_test_1.ngc",
|
||||
"demos/xyzac_switchkins_test_2.ngc",
|
||||
"demos/xyzac_switchkins_test_3.ngc",
|
||||
"demos/boat-xyzac.ngc",
|
||||
"demos/boat-xyzbc.ngc",
|
||||
"demos/impeller-7bl-xyzac.ngc",
|
||||
];
|
||||
|
||||
writeVendorTextFile(resolve(sourceDir, "xyzac-trt.ini"), `${wasmDir}/xyzac-trt.ini`);
|
||||
writeVendorTextFile(resolve(sourceDir, "xyzbc-trt.ini"), `${wasmDir}/xyzbc-trt.ini`);
|
||||
writeVendorTextFile(resolve(sourceDir, "xyzac-trt.tbl"), `${wasmDir}/xyzac-trt.tbl`);
|
||||
writeVendorTextFile(resolve(sourceDir, "xyzbc-trt.tbl"), `${wasmDir}/xyzbc-trt.tbl`);
|
||||
|
||||
for (const filename of readdirSync(resolve(sourceDir, "remap_subs"))) {
|
||||
if (filename.endsWith(".ngc")) {
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "remap_subs", filename),
|
||||
`${wasmDir}/remap_subs/${filename}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/xyzac_switchkins.ngc"),
|
||||
`${wasmDir}/demos/xyzac_switchkins.ngc`,
|
||||
assertFiveAxisMachineNgcCoverage("table-rotary-tilting", sourceDir, "remap_subs", files);
|
||||
assertFiveAxisMachineNgcCoverage("table-rotary-tilting", sourceDir, "demos", files);
|
||||
return writeFiveAxisMachineFiles(
|
||||
"table-rotary-tilting",
|
||||
sourceDir,
|
||||
wasmDir,
|
||||
"/work/fiveaxis/table-rotary-tilting",
|
||||
files,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/xyzbc_switchkins.ngc"),
|
||||
`${wasmDir}/demos/xyzbc_switchkins.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/xyzac_switchkins_test_1.ngc"),
|
||||
`${wasmDir}/demos/xyzac_switchkins_test_1.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/xyzac_switchkins_test_2.ngc"),
|
||||
`${wasmDir}/demos/xyzac_switchkins_test_2.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/xyzac_switchkins_test_3.ngc"),
|
||||
`${wasmDir}/demos/xyzac_switchkins_test_3.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/boat-xyzac.ngc"),
|
||||
`${wasmDir}/demos/boat-xyzac.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/boat-xyzbc.ngc"),
|
||||
`${wasmDir}/demos/boat-xyzbc.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/impeller-7bl-xyzac.ngc"),
|
||||
`${wasmDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
);
|
||||
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
function writeFiveAxisTdrMachineFiles() {
|
||||
@@ -194,23 +211,23 @@ function writeFiveAxisTdrMachineFiles() {
|
||||
"vendor/linuxcnc/configs/sim/axis/vismach/5axis/table-dual-rotary",
|
||||
);
|
||||
const wasmDir = "/work/fiveaxis/table-dual-rotary";
|
||||
const files = [
|
||||
"xyzab-tdr.ini",
|
||||
"xyzab-tdr.tbl",
|
||||
"remap_subs/428remap.ngc",
|
||||
"remap_subs/429remap.ngc",
|
||||
"demos/xyzab-tdr-demo.ngc",
|
||||
];
|
||||
|
||||
writeVendorTextFile(resolve(sourceDir, "xyzab-tdr.ini"), `${wasmDir}/xyzab-tdr.ini`);
|
||||
writeVendorTextFile(resolve(sourceDir, "xyzab-tdr.tbl"), `${wasmDir}/xyzab-tdr.tbl`);
|
||||
for (const filename of readdirSync(resolve(sourceDir, "remap_subs"))) {
|
||||
if (filename.endsWith(".ngc")) {
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "remap_subs", filename),
|
||||
`${wasmDir}/remap_subs/${filename}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/xyzab-tdr-demo.ngc"),
|
||||
`${wasmDir}/demos/xyzab-tdr-demo.ngc`,
|
||||
assertFiveAxisMachineNgcCoverage("table-dual-rotary", sourceDir, "remap_subs", files);
|
||||
assertFiveAxisMachineNgcCoverage("table-dual-rotary", sourceDir, "demos", files);
|
||||
return writeFiveAxisMachineFiles(
|
||||
"table-dual-rotary",
|
||||
sourceDir,
|
||||
wasmDir,
|
||||
"/work/fiveaxis/table-dual-rotary",
|
||||
files,
|
||||
);
|
||||
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
function writeFiveAxisBridgeMillMachineFiles() {
|
||||
@@ -219,20 +236,23 @@ function writeFiveAxisBridgeMillMachineFiles() {
|
||||
"vendor/linuxcnc/configs/sim/axis/vismach/5axis/bridgemill",
|
||||
);
|
||||
const wasmDir = "/work/fiveaxis/bridgemill";
|
||||
const files = [
|
||||
"5axis.ini",
|
||||
"5axis.tbl",
|
||||
"remap_subs/428remap.ngc",
|
||||
"remap_subs/429remap.ngc",
|
||||
"remap_subs/430remap.ngc",
|
||||
"5axisgui.ngc",
|
||||
];
|
||||
|
||||
writeVendorTextFile(resolve(sourceDir, "5axis.ini"), `${wasmDir}/5axis.ini`);
|
||||
writeVendorTextFile(resolve(sourceDir, "5axis.tbl"), `${wasmDir}/5axis.tbl`);
|
||||
for (const filename of readdirSync(resolve(sourceDir, "remap_subs"))) {
|
||||
if (filename.endsWith(".ngc")) {
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "remap_subs", filename),
|
||||
`${wasmDir}/remap_subs/${filename}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
writeVendorTextFile(resolve(sourceDir, "5axisgui.ngc"), `${wasmDir}/5axisgui.ngc`);
|
||||
|
||||
return wasmDir;
|
||||
assertFiveAxisMachineNgcCoverage("bridgemill", sourceDir, "remap_subs", files);
|
||||
return writeFiveAxisMachineFiles(
|
||||
"bridgemill",
|
||||
sourceDir,
|
||||
wasmDir,
|
||||
"/work/fiveaxis/bridgemill",
|
||||
files,
|
||||
);
|
||||
}
|
||||
|
||||
function writeRemapRegressionFiles(name, files) {
|
||||
|
||||
Reference in New Issue
Block a user