From 234a1cf81cb032b1e180e767fd7cf0dd56cc1cb3 Mon Sep 17 00:00:00 2001 From: wangdequan Date: Sat, 13 Jun 2026 08:21:36 +0800 Subject: [PATCH] Guard remap-io staging paths --- text6.txt | 49 +++++++++++++++++++ wasm-port/tests/browser/interp_smoke.html | 12 +++-- .../tests/wasm/node/verify_interp_wasm.mjs | 14 ++++-- 3 files changed, 69 insertions(+), 6 deletions(-) diff --git a/text6.txt b/text6.txt index 2c7ab2a..c42fa57 100644 --- a/text6.txt +++ b/text6.txt @@ -798,3 +798,52 @@ wasm-port/tests/host/verify_host_smokes.sh file list 与运行时生成的 `simpockets.tbl` 分开校验;`nested-remaps-oword` 也可处理, 但需先决定是否把未 staging 的 `testsub.ngc` 纳入 fixed manifest。继续避免 blocked runtime promotion、browser full inventory 扩面和 JS CNC 语义实现。 + +二十、2026-06-13 继续执行记录:remap-io staging path guard + +本批继续按“remap file-list staged path guard”推进,完成现有 Node/browser +`remap-io` coverage: + +- vendored staged files: + - `remap-io/test-ngc.ini` + - `remap-io/io_input_m66.ngc` + - `remap-io/io_output_m62.ngc` + - `remap-io/io_output_m63.ngc` + - `remap-io/io_output_m64.ngc` + - `remap-io/io_output_m65.ngc` + - `remap-io/io_output_m67.ngc` + - `remap-io/io_output_m68.ngc` +- runtime generated file: + - `remap-io/simpockets.tbl` + +完成内容: + +- Node 侧将 `remap-io` inline remap file list 提成 `remapIoFiles` fixed manifest; +- Node 侧复用 `assertRemapRegressionStaging(...)` 校验 vendored `.ini/.ngc` 文件清单 + 与 staged path; +- Node 侧单独检查运行时生成的 `simpockets.tbl` staged path; +- browser 侧复用同名 staged path guard; +- browser 侧同样单独检查运行时生成的 `simpockets.tbl` staged path; +- 明确区分 vendored file list 与运行时生成文件,不改变 remap-io 执行语义; +- 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 +``` + +结果:全部通过。 + +下一步建议: + +`nested-remaps-oword` 是剩余 remap 候选,但目录包含当前 smoke 未 staging 的 +`testsub.ngc`,下一步应先判断是否应扩展 file list;若不扩展,则需要专门记录 +“vendored extra fixture intentionally unstaged”的 guard。继续避免 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 b536fef..33006a0 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -6261,7 +6261,7 @@ ].join("\n"), ); - const remapIoDir = await writeRemapRegressionFiles(interp, "remap-io", [ + const remapIoFiles = [ "test-ngc.ini", "io_input_m66.ngc", "io_output_m62.ngc", @@ -6270,8 +6270,14 @@ "io_output_m65.ngc", "io_output_m67.ngc", "io_output_m68.ngc", - ]); - interp.writeTextFile(`${remapIoDir}/simpockets.tbl`, "T2 P2 Z0 ;remap-io tool\n"); + ]; + const remapIoDir = await writeRemapRegressionFiles(interp, "remap-io", remapIoFiles); + assertRemapRegressionStaging("remap-io", remapIoFiles, remapIoDir); + const remapIoGeneratedToolTablePath = `${remapIoDir}/simpockets.tbl`; + if (remapIoGeneratedToolTablePath !== "/work/browser-remap/remap-io/simpockets.tbl") { + throw new Error("browser_remap_remap_io_generated_tool_table_staging: path drift"); + } + interp.writeTextFile(remapIoGeneratedToolTablePath, "T2 P2 Z0 ;remap-io tool\n"); verifyExpectedOutput( "browser_remap_io_ngc_mdi", interp.runRemapIoMdiSequence(`${remapIoDir}/test-ngc.ini`), diff --git a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs index d9ac123..3040132 100644 --- a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs +++ b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs @@ -1233,7 +1233,7 @@ verifyExpectedOutput( ].join("\n"), ); -const remapIoDir = writeRemapRegressionFiles("remap-io", [ +const remapIoFiles = [ "test-ngc.ini", "io_input_m66.ngc", "io_output_m62.ngc", @@ -1242,8 +1242,16 @@ const remapIoDir = writeRemapRegressionFiles("remap-io", [ "io_output_m65.ngc", "io_output_m67.ngc", "io_output_m68.ngc", -]); -interp.writeTextFile(`${remapIoDir}/simpockets.tbl`, "T2 P2 Z0 ;remap-io tool\n"); +]; +const remapIoDir = writeRemapRegressionFiles("remap-io", remapIoFiles); +assertRemapRegressionStaging("remap-io", remapIoFiles, remapIoDir); +const remapIoGeneratedToolTablePath = `${remapIoDir}/simpockets.tbl`; +assert.equal( + remapIoGeneratedToolTablePath, + "/work/remap/remap-io/simpockets.tbl", + "remap remap-io generated tool table staging path drift", +); +interp.writeTextFile(remapIoGeneratedToolTablePath, "T2 P2 Z0 ;remap-io tool\n"); verifyExpectedOutput( "remap_io_ngc_mdi_wasm", interp.runRemapIoMdiSequence(`${remapIoDir}/test-ngc.ini`),