Guard magic comments staging path

This commit is contained in:
2026-06-13 12:37:07 +08:00
parent 45ac3cb8b2
commit 5b7f3fba8a
3 changed files with 54 additions and 11 deletions

View File

@@ -1710,3 +1710,49 @@ wasm-port/tests/host/verify_host_smokes.sh
当前 Node 侧已有 fixed path manifest 对账browser 侧仍有本地数组 staged path 对账;
可小批量抽成 single-file 或 fixed-list helper继续检查 staged path 与 manifest 一致。
继续避免 blocked runtime promotion、browser full inventory 扩面和 JS CNC 语义实现。
四十、2026-06-13 继续执行记录magic comments single-file staging guard
本批继续收敛最后可见的 fixed `.ngc` staged path 对账:
- `magic_comments/param_format_printing/test.ngc`
完成内容:
- Node 侧将 `magic_comments` 的 inline staged path `deepEqual` 替换为
`assertInterpRegressionFileStaging(...)`
- browser 侧移除本地 `magicCommentsStagedNgcFiles` 数组与 `replace(...)` 对账,
改为同一个 single-file staging helper
- Node/browser 侧保留 fixed `.ngc` manifest coverage 和 browser duplicate-free guard
- browser 侧仍不枚举目录;
- 仅整理 host/filesystem staging guard不改变 magic comment、parameter formatting 或
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
```
结果:全部通过。
下一步建议:
先做 remaining staging guard inventory确认是否还存在非 helper 的 inline staged path
对账。当前可见的 `replace(...)` staged path 检查主要集中在通用 helper 内部;
如果继续做小步代码收敛,优先候选是固定 manifest 且已有 Node/browser coverage 的
目录级 helper case例如
- `m98m99/06-error-mixed-sub-styles`
- `m98m99/09-disable-fanuc-subs`
- `m98m99/11-main-program-oword`
下一批可以决定是否继续把这些目录级 aggregate guard 拆成更细的 per-file staging
helper或仅提交一次 inventory 说明。继续避免 blocked runtime promotion、browser
full inventory 扩面和 JS CNC 语义实现。

View File

@@ -7696,12 +7696,11 @@
if (magicCommentsRegressionFiles.length !== 1 || new Set(magicCommentsRegressionFiles).size !== magicCommentsRegressionFiles.length) {
throw new Error("browser_interp_magic_comments_fixture_coverage: list drift");
}
const magicCommentsStagedNgcFiles = [
assertInterpRegressionFileStaging(
"magic_comments/param_format_printing",
"test.ngc",
magicCommentsParamFormatPath,
].map((path) => path.replace("/work/browser-interp/magic_comments/", ""));
if (magicCommentsStagedNgcFiles.join(",") !== magicCommentsRegressionFiles.join(",")) {
throw new Error("browser_interp_magic_comments_staging_manifest: list drift");
}
);
verifyExpectedOutput(
"browser_interp_magic_comments_param_format",
interp.runFile(magicCommentsParamFormatPath),

View File

@@ -2677,12 +2677,10 @@ assert.deepEqual(
interpRegressionNgcFilesRecursive("magic_comments"),
"interp_magic_comments_fixture_coverage: upstream .ngc manifest",
);
assert.deepEqual(
[
magicCommentsParamFormatPath,
],
magicCommentsRegressionFiles.map((file) => `/work/interp/magic_comments/${file}`),
"interp_magic_comments_staging_manifest: staged .ngc manifest",
assertInterpRegressionFileStaging(
"magic_comments/param_format_printing",
"test.ngc",
magicCommentsParamFormatPath,
);
verifyExpectedOutput(
"interp_magic_comments_param_format_wasm",