From c97f85237f9ddee37dea3c4828d9432a28ce3cb8 Mon Sep 17 00:00:00 2001 From: wangdequan Date: Sat, 13 Jun 2026 07:27:23 +0800 Subject: [PATCH] Guard oword/namedparam staging paths --- text6.txt | 40 +++++++++++++++++ wasm-port/tests/browser/interp_smoke.html | 36 +++++++++++++++ .../tests/wasm/node/verify_interp_wasm.mjs | 45 +++++++++++++++++++ 3 files changed, 121 insertions(+) diff --git a/text6.txt b/text6.txt index daeedb4..21048cf 100644 --- a/text6.txt +++ b/text6.txt @@ -246,3 +246,43 @@ awk '/^[一二三四五六七八九十百]+、/ {print}' text6.txt | sort | uniq ``` 如果输出显示工作区 clean 且 `text6.txt` 无重复标题,再执行第五部分第一候选批次。 + +七、2026-06-13 继续执行记录:oword/namedparam staging path guard + +本批按第五部分第一候选批次完成 3 个 early direct-file fixture 的 staged path guard: + +- `oword-bug315/test.ngc` +- `oword-bug315-p2/test.ngc` +- `namedparam-bug424/test.ngc` + +完成内容: + +- Node 侧为上述 3 个 fixture 增加 fixed `.ngc` manifest; +- Node 侧用 `interpRegressionNgcFilesRecursive(...)` 与 upstream vendored fixture + 精确对账; +- Node 侧检查 staged path 与 fixed manifest 一致; +- browser 侧增加 fixed-count 与 duplicate-free guard; +- browser 侧检查 staged path 去掉 `/work/browser-interp/.../` 前缀后与 fixed + manifest 一致; +- browser 仍不依赖目录枚举。 + +已运行验证: + +```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 +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 +``` + +结果:全部通过。 + +下一步建议: + +继续按“小批量 direct-file/staging helper guard”原则推进。优先从已有 Node/browser +coverage、且不依赖 HAL/task/tool DB/Python remap/user-M process 的 interp fixture 中, +再选择 2 到 3 个只需要 host/filesystem staging 对账的 case。不要推进 blocked runtime +promotion,也不要扩展 browser full 159 sim-config inventory。 diff --git a/wasm-port/tests/browser/interp_smoke.html b/wasm-port/tests/browser/interp_smoke.html index e8c2df7..3122364 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -6321,6 +6321,18 @@ "oword-bug315", "test.ngc", ); + const owordBug315NgcFiles = [ + "test.ngc", + ]; + if (owordBug315NgcFiles.length !== 1 || new Set(owordBug315NgcFiles).size !== owordBug315NgcFiles.length) { + throw new Error("browser_interp_oword_bug315_fixture_coverage: list drift"); + } + const owordBug315StagedNgcFiles = [ + owordBug315Path, + ].map((path) => path.replace("/work/browser-interp/oword-bug315/", "")); + if (owordBug315StagedNgcFiles.join(",") !== owordBug315NgcFiles.join(",")) { + throw new Error("browser_interp_oword_bug315_staging_manifest: list drift"); + } verifyExpectedOutput( "browser_interp_oword_bug315", interp.runFile(owordBug315Path), @@ -6340,6 +6352,18 @@ "oword-bug315-p2", "test.ngc", ); + const owordBug315P2NgcFiles = [ + "test.ngc", + ]; + if (owordBug315P2NgcFiles.length !== 1 || new Set(owordBug315P2NgcFiles).size !== owordBug315P2NgcFiles.length) { + throw new Error("browser_interp_oword_bug315_p2_fixture_coverage: list drift"); + } + const owordBug315P2StagedNgcFiles = [ + owordBug315P2Path, + ].map((path) => path.replace("/work/browser-interp/oword-bug315-p2/", "")); + if (owordBug315P2StagedNgcFiles.join(",") !== owordBug315P2NgcFiles.join(",")) { + throw new Error("browser_interp_oword_bug315_p2_staging_manifest: list drift"); + } verifyExpectedOutput( "browser_interp_oword_bug315_p2", interp.runFile(owordBug315P2Path), @@ -6581,6 +6605,18 @@ "namedparam-bug424", "test.ngc", ); + const namedparamBug424NgcFiles = [ + "test.ngc", + ]; + if (namedparamBug424NgcFiles.length !== 1 || new Set(namedparamBug424NgcFiles).size !== namedparamBug424NgcFiles.length) { + throw new Error("browser_interp_namedparam_bug424_fixture_coverage: list drift"); + } + const namedparamBug424StagedNgcFiles = [ + namedparamBug424Path, + ].map((path) => path.replace("/work/browser-interp/namedparam-bug424/", "")); + if (namedparamBug424StagedNgcFiles.join(",") !== namedparamBug424NgcFiles.join(",")) { + throw new Error("browser_interp_namedparam_bug424_staging_manifest: list drift"); + } verifyExpectedOutput( "browser_interp_namedparam_bug424", interp.runFile(namedparamBug424Path), diff --git a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs index a9a4d2c..377f054 100644 --- a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs +++ b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs @@ -1272,6 +1272,21 @@ verifyExpectedOutput( ); const owordBug315Path = writeInterpRegressionFile("oword-bug315", "test.ngc"); +const owordBug315NgcFiles = [ + "test.ngc", +]; +assert.deepEqual( + owordBug315NgcFiles, + interpRegressionNgcFilesRecursive("oword-bug315"), + "interp oword-bug315 fixture coverage drift", +); +assert.deepEqual( + [ + owordBug315Path, + ], + owordBug315NgcFiles.map((file) => `/work/interp/oword-bug315/${file}`), + "interp oword-bug315 staging manifest drift", +); verifyExpectedOutput( "interp_oword_bug315_wasm", interp.runFile(owordBug315Path), @@ -1287,6 +1302,21 @@ verifyExpectedOutput( ); const owordBug315P2Path = writeInterpRegressionFile("oword-bug315-p2", "test.ngc"); +const owordBug315P2NgcFiles = [ + "test.ngc", +]; +assert.deepEqual( + owordBug315P2NgcFiles, + interpRegressionNgcFilesRecursive("oword-bug315-p2"), + "interp oword-bug315-p2 fixture coverage drift", +); +assert.deepEqual( + [ + owordBug315P2Path, + ], + owordBug315P2NgcFiles.map((file) => `/work/interp/oword-bug315-p2/${file}`), + "interp oword-bug315-p2 staging manifest drift", +); verifyExpectedOutput( "interp_oword_bug315_p2_wasm", interp.runFile(owordBug315P2Path), @@ -1517,6 +1547,21 @@ verifyExpectedOutput( ); const namedparamBug424Path = writeInterpRegressionFile("namedparam-bug424", "test.ngc"); +const namedparamBug424NgcFiles = [ + "test.ngc", +]; +assert.deepEqual( + namedparamBug424NgcFiles, + interpRegressionNgcFilesRecursive("namedparam-bug424"), + "interp namedparam-bug424 fixture coverage drift", +); +assert.deepEqual( + [ + namedparamBug424Path, + ], + namedparamBug424NgcFiles.map((file) => `/work/interp/namedparam-bug424/${file}`), + "interp namedparam-bug424 staging manifest drift", +); verifyExpectedOutput( "interp_namedparam_bug424_wasm", interp.runFile(namedparamBug424Path),