Guard m98m99 per-file staging paths

This commit is contained in:
2026-06-13 12:42:03 +08:00
parent 5b7f3fba8a
commit 6f95135093
3 changed files with 91 additions and 7 deletions

View File

@@ -1756,3 +1756,56 @@ wasm-port/tests/host/verify_host_smokes.sh
下一批可以决定是否继续把这些目录级 aggregate guard 拆成更细的 per-file staging
helper或仅提交一次 inventory 说明。继续避免 blocked runtime promotion、browser
full inventory 扩面和 JS CNC 语义实现。
四十一、2026-06-13 继续执行记录m98m99 per-file staging helper guard
本批继续按第 40 批建议处理固定 manifest 且已有 Node/browser coverage 的目录级
aggregate guard
- `m98m99/06-error-mixed-sub-styles`
- `m98m99/09-disable-fanuc-subs`
- `m98m99/11-main-program-oword`
完成内容:
- Node 侧新增 `assertInterpRegressionFilesCoverage(...)`,把 vendored
`.ini/.ngc/.tbl` manifest coverage 与 staged path 对账分离;
- Node 侧新增 `assertInterpRegressionFilesStaging(...)`,逐个文件复用
`assertInterpRegressionFileStaging(...)` 检查 staged path
- Node 侧将上述 3 个 `m98m99` 目录从 aggregate staged path 对账切换为
coverage helper 加 per-file staging helper
- browser 侧新增同名 per-file staging helper保留 fixed manifest duplicate-free
guard
- browser 侧同步将上述 3 个目录从 `assertInterpRegressionStaging(...)` 切换到
per-file helper
- browser 侧仍不枚举目录;
- 仅整理 host/filesystem staging guard不改变 Fanuc/Rs274NGC subroutine、
INI context、main-program oword 或 interpreter 语义。
已运行验证:
```bash
git diff --check
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_interp_wasm.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/host/verify_host_smokes.sh
```
结果:全部通过。
下一步建议:
继续收敛剩余 directory aggregate staging guard。当前可见候选
- `do-while-break`
- `cam-nisley`
- `g76`
- `m98m99/13-named-program`
建议下一批优先处理 `m98m99/13-named-program`,它只有 2 个 `.ngc` 文件,已经有
fixed manifest 和 Node/browser coverage适合直接切换到 per-file helper。其后再按
小批量处理 `do-while-break`、`cam-nisley`、`g76`。继续避免 blocked runtime promotion、
browser full inventory 扩面和 JS CNC 语义实现。

View File

@@ -4675,6 +4675,15 @@
}
}
function assertInterpRegressionFilesStaging(name, files, wasmDir) {
if (files.length === 0 || new Set(files).size !== files.length) {
throw new Error(`browser_interp_${name}_fixture_coverage: list drift`);
}
for (const file of files) {
assertInterpRegressionFileStaging(name, file, `${wasmDir}/${file}`);
}
}
function assertInterpIniContextNgcStaging(name, files, plan) {
const stagedNgcFiles = plan.files
.filter((file) => file.sourceRel.endsWith(".ngc"))
@@ -7897,7 +7906,7 @@
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
);
assertInterpRegressionStaging(
assertInterpRegressionFilesStaging(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
m98m99MixedSubStyleDir,
@@ -8046,7 +8055,7 @@
"m98m99/09-disable-fanuc-subs",
m98m99DisableFanucSubsFiles,
);
assertInterpRegressionStaging(
assertInterpRegressionFilesStaging(
"m98m99/09-disable-fanuc-subs",
m98m99DisableFanucSubsFiles,
m98m99DisableFanucSubsDir,
@@ -8176,7 +8185,7 @@
"m98m99/11-main-program-oword",
m98m99MainProgramOwordFiles,
);
assertInterpRegressionStaging(
assertInterpRegressionFilesStaging(
"m98m99/11-main-program-oword",
m98m99MainProgramOwordFiles,
m98m99MainProgramOwordDir,

View File

@@ -306,7 +306,7 @@ function writeInterpRegressionFiles(name, files) {
return wasmDir;
}
function assertInterpRegressionStaging(name, files, wasmDir) {
function assertInterpRegressionFilesCoverage(name, files) {
const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/interp", name);
assert.deepEqual(
readdirSync(sourceDir)
@@ -315,6 +315,16 @@ function assertInterpRegressionStaging(name, files, wasmDir) {
[...files].sort(),
`interp ${name} fixture coverage drift`,
);
}
function assertInterpRegressionFilesStaging(name, files, wasmDir) {
for (const file of files) {
assertInterpRegressionFileStaging(name, file, `${wasmDir}/${file}`);
}
}
function assertInterpRegressionStaging(name, files, wasmDir) {
assertInterpRegressionFilesCoverage(name, files);
assert.deepEqual(
files.map((file) => `${wasmDir}/${file}`),
files.map((file) => `/work/interp/${name}/${file}`),
@@ -2857,7 +2867,11 @@ const m98m99MixedSubStyleDir = writeInterpRegressionFiles(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
);
assertInterpRegressionStaging(
assertInterpRegressionFilesCoverage(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
);
assertInterpRegressionFilesStaging(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
m98m99MixedSubStyleDir,
@@ -2996,7 +3010,11 @@ const m98m99DisableFanucSubsDir = writeInterpRegressionFiles(
"m98m99/09-disable-fanuc-subs",
m98m99DisableFanucSubsFiles,
);
assertInterpRegressionStaging(
assertInterpRegressionFilesCoverage(
"m98m99/09-disable-fanuc-subs",
m98m99DisableFanucSubsFiles,
);
assertInterpRegressionFilesStaging(
"m98m99/09-disable-fanuc-subs",
m98m99DisableFanucSubsFiles,
m98m99DisableFanucSubsDir,
@@ -3119,7 +3137,11 @@ const m98m99MainProgramOwordDir = writeInterpRegressionFiles(
"m98m99/11-main-program-oword",
m98m99MainProgramOwordFiles,
);
assertInterpRegressionStaging(
assertInterpRegressionFilesCoverage(
"m98m99/11-main-program-oword",
m98m99MainProgramOwordFiles,
);
assertInterpRegressionFilesStaging(
"m98m99/11-main-program-oword",
m98m99MainProgramOwordFiles,
m98m99MainProgramOwordDir,