From a6baa14ddf2409156d49d6dd8ba8633a48f59ce4 Mon Sep 17 00:00:00 2001 From: wangdequan Date: Sat, 13 Jun 2026 09:16:07 +0800 Subject: [PATCH] Guard small single-file staging --- text6.txt | 44 +++++++++++++++++++ wasm-port/tests/browser/interp_smoke.html | 23 +++------- .../tests/wasm/node/verify_interp_wasm.mjs | 26 +++-------- 3 files changed, 56 insertions(+), 37 deletions(-) diff --git a/text6.txt b/text6.txt index 25664a6..2c7263c 100644 --- a/text6.txt +++ b/text6.txt @@ -1341,3 +1341,47 @@ wasm-port/tests/host/verify_host_smokes.sh 这些都是小型 single-file case,适合复用 `assertInterpRegressionFileStaging(...)` 替换内联 staged path 对账。之后再处理 `g10` 初始/最终 aggregate guard。继续避免 blocked runtime promotion、browser full inventory 扩面和 JS CNC 语义实现。 + +三十二、2026-06-13 继续执行记录:small single-file staging guard + +本批处理 3 个小型 single-file fixture,复用 `assertInterpRegressionFileStaging(...)` +替换内联 staged path 对账: + +- `g33.1/g33.1.ngc` +- `g6164/test.ngc` +- `g52/g52-g92-interaction/g52-g92-interaction.ngc` + +完成内容: + +- Node 侧保留各 fixture 的 upstream `.ngc` manifest coverage check; +- Node 侧将 3 处内联 staged path `deepEqual` 替换为 single-file helper; +- browser 侧保留 fixed manifest duplicate-free guard; +- browser 侧将 3 处 `replace(...)` staged path 对账替换为 single-file helper; +- browser 侧仍不枚举目录; +- 仅整理 host/filesystem staging guard,不改变 rigid tap、G61/G64 或 G52/G92 语义。 + +已运行验证: + +```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 +``` + +结果:全部通过。 + +下一步建议: + +继续处理剩余 aggregate staged path guard。优先候选: + +- `g10` initial/final aggregate guard; +- 或继续收敛 earlier direct-file guards(如 `do-while-break`、`oword-bug315`、 + `exists`、`return-value` 等)。 + +建议先处理 `g10`,因为 fixed manifest 已存在,当前只需把 initial/final aggregate +path guard 拆到每个 `writeG10RegressionFiles(...)` 调用附近。继续避免 blocked +runtime promotion、browser full inventory 扩面和 JS CNC 语义实现。 diff --git a/wasm-port/tests/browser/interp_smoke.html b/wasm-port/tests/browser/interp_smoke.html index 1ff8067..1894b6a 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -7101,12 +7101,7 @@ if (g33_1NgcFiles.length !== 1 || new Set(g33_1NgcFiles).size !== g33_1NgcFiles.length) { throw new Error("browser_interp_g33_1_fixture_coverage: list drift"); } - const g33_1StagedNgcFiles = [ - g33_1Path, - ].map((path) => path.replace("/work/browser-interp/g33.1/", "")); - if (g33_1StagedNgcFiles.join(",") !== g33_1NgcFiles.join(",")) { - throw new Error("browser_interp_g33_1_staging_manifest: list drift"); - } + assertInterpRegressionFileStaging("g33.1", "g33.1.ngc", g33_1Path); verifyExpectedOutput( "browser_interp_g33_1", interp.runFile(g33_1Path), @@ -7198,12 +7193,7 @@ if (g6164NgcFiles.length !== 1 || new Set(g6164NgcFiles).size !== g6164NgcFiles.length) { throw new Error("browser_interp_g6164_fixture_coverage: list drift"); } - const g6164StagedNgcFiles = [ - g6164Path, - ].map((path) => path.replace("/work/browser-interp/g6164/", "")); - if (g6164StagedNgcFiles.join(",") !== g6164NgcFiles.join(",")) { - throw new Error("browser_interp_g6164_staging_manifest: list drift"); - } + assertInterpRegressionFileStaging("g6164", "test.ngc", g6164Path); verifyExpectedOutput( "browser_interp_g6164", interp.runFile(g6164Path), @@ -8578,12 +8568,11 @@ if (g52RegressionFiles.length !== 1 || new Set(g52RegressionFiles).size !== g52RegressionFiles.length) { throw new Error("browser_interp_g52_fixture_coverage: list drift"); } - const g52StagedNgcFiles = [ + assertInterpRegressionFileStaging( + "g52/g52-g92-interaction", + "g52-g92-interaction.ngc", g52G92InteractionPath, - ].map((path) => path.replace("/work/browser-interp/g52/", "")); - if (g52StagedNgcFiles.join(",") !== g52RegressionFiles.join(",")) { - throw new Error("browser_interp_g52_staging_manifest: list drift"); - } + ); verifyExpectedOutput( "browser_interp_g52_g92_interaction", interp.runFile(g52G92InteractionPath), diff --git a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs index 4a9b7a2..7ecb2c1 100644 --- a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs +++ b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs @@ -2068,13 +2068,7 @@ assert.deepEqual( interpRegressionNgcFilesRecursive("g33.1"), "interp g33.1 fixture coverage drift", ); -assert.deepEqual( - [ - g33_1Path, - ], - g33_1NgcFiles.map((file) => `/work/interp/g33.1/${file}`), - "interp g33.1 staging manifest drift", -); +assertInterpRegressionFileStaging("g33.1", "g33.1.ngc", g33_1Path); verifyExpectedOutput( "interp_g33_1_wasm", interp.runFile(g33_1Path), @@ -2170,13 +2164,7 @@ assert.deepEqual( interpRegressionNgcFilesRecursive("g6164"), "interp g6164 fixture coverage drift", ); -assert.deepEqual( - [ - g6164Path, - ], - g6164NgcFiles.map((file) => `/work/interp/g6164/${file}`), - "interp g6164 staging manifest drift", -); +assertInterpRegressionFileStaging("g6164", "test.ngc", g6164Path); verifyExpectedOutput( "interp_g6164_wasm", interp.runFile(g6164Path), @@ -3530,12 +3518,10 @@ assert.deepEqual( interpRegressionNgcFilesRecursive("g52"), "interp g52 fixture coverage drift", ); -assert.deepEqual( - [ - g52G92InteractionPath, - ], - g52RegressionFiles.map((file) => `/work/interp/g52/${file}`), - "interp g52 staging manifest drift", +assertInterpRegressionFileStaging( + "g52/g52-g92-interaction", + "g52-g92-interaction.ngc", + g52G92InteractionPath, ); const g52G92InteractionRun = runWithCapturedPrints(() => interp.runFile(g52G92InteractionPath),