Guard nested remaps oword staging paths

This commit is contained in:
2026-06-13 08:32:39 +08:00
parent 234a1cf81c
commit 035cd8fa68
3 changed files with 84 additions and 13 deletions

View File

@@ -847,3 +847,43 @@ wasm-port/tests/host/verify_host_smokes.sh
`testsub.ngc`,下一步应先判断是否应扩展 file list若不扩展则需要专门记录
“vendored extra fixture intentionally unstaged”的 guard。继续避免 blocked runtime
promotion、browser full inventory 扩面和 JS CNC 语义实现。
二十一、2026-06-13 继续执行记录nested remaps oword unstaged fixture guard
本批继续按“remap file-list staged path guard”推进完成剩余
`nested-remaps-oword` coverage 的 staged/unstaged 文件清单对账。
完成内容:
- Node 侧将 `nested-remaps-oword` inline remap file list 提成
`nestedRemapsOwordFiles` fixed manifest
- Node 侧新增 `expectedUnstagedFiles` 参数,用 upstream vendored `.ini/.ngc`
文件清单与 staged manifest 加 expected-unstaged manifest 精确对账;
- Node 侧显式记录 `testsub.ngc` 为 vendored extra fixture、当前 smoke 不 staging
- Node 侧检查 expected-unstaged 文件不得与 staged manifest 重叠;
- browser 侧新增同名 fixed manifest 与 expected-unstaged overlap guard
- browser 侧继续只校验 fixed staged path不依赖目录枚举
- 仅校验文件清单与 staging 路径,不改变 remap 执行语义。
已运行验证:
```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
```
结果:全部通过。
下一步建议:
remap file-list guard 的当前显性剩余项已基本收束。下一批建议回到
`write*RegressionFiles(...)` helper 扫描,优先选择已有 Node/browser coverage、
文件清单固定且不涉及 HAL/task/tool DB/Python remap/user-M process 的 2 到 3 个
fixture若没有合适小批次转向补齐 staging guard 的文档索引或生成一个
machine-readable fixture coverage manifest。继续避免 blocked runtime promotion、
browser full inventory 扩面和 JS CNC 语义实现。

View File

@@ -4647,10 +4647,13 @@
return wasmDir;
}
function assertRemapRegressionStaging(name, files, wasmDir) {
function assertRemapRegressionStaging(name, files, wasmDir, expectedUnstagedFiles = []) {
if (files.length === 0 || new Set(files).size !== files.length) {
throw new Error(`browser_remap_${name}_fixture_coverage: list drift`);
}
if (expectedUnstagedFiles.some((file) => files.includes(file))) {
throw new Error(`browser_remap_${name}_unstaged_fixture_overlap: list drift`);
}
const remapStagedRelativeFiles = files.map((file) => `${wasmDir}/${file}`.replace(`/work/browser-remap/${name}/`, ""));
if (remapStagedRelativeFiles.join(",") !== files.join(",")) {
throw new Error(`browser_remap_${name}_staging_manifest: list drift`);
@@ -6134,17 +6137,27 @@
].join("\n"),
);
const nestedRemapsOwordFiles = [
"test.ini",
"test.ngc",
"rm400.ngc",
"rm401.ngc",
"rm402.ngc",
"rm403.ngc",
];
const nestedRemapsOwordUnstagedFiles = [
"testsub.ngc",
];
const nestedRemapsOwordDir = await writeRemapRegressionFiles(
interp,
"nested-remaps-oword",
[
"test.ini",
"test.ngc",
"rm400.ngc",
"rm401.ngc",
"rm402.ngc",
"rm403.ngc",
],
nestedRemapsOwordFiles,
);
assertRemapRegressionStaging(
"nested-remaps-oword",
nestedRemapsOwordFiles,
nestedRemapsOwordDir,
nestedRemapsOwordUnstagedFiles,
);
verifyExpectedOutput(
"browser_nested_remaps_oword_remap",

View File

@@ -246,15 +246,20 @@ function writeRemapRegressionFiles(name, files) {
return wasmDir;
}
function assertRemapRegressionStaging(name, files, wasmDir) {
function assertRemapRegressionStaging(name, files, wasmDir, expectedUnstagedFiles = []) {
const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/remap", name);
assert.deepEqual(
readdirSync(sourceDir)
.filter((filename) => filename.endsWith(".ini") || filename.endsWith(".ngc"))
.sort(),
[...files].sort(),
[...files, ...expectedUnstagedFiles].sort(),
`remap ${name} fixture coverage drift`,
);
assert.deepEqual(
files.filter((file) => expectedUnstagedFiles.includes(file)),
[],
`remap ${name} unstaged fixture overlap drift`,
);
assert.deepEqual(
files.map((file) => `${wasmDir}/${file}`),
files.map((file) => `/work/remap/${name}/${file}`),
@@ -1110,14 +1115,27 @@ verifyExpectedOutput(
].join("\n"),
);
const nestedRemapsOwordDir = writeRemapRegressionFiles("nested-remaps-oword", [
const nestedRemapsOwordFiles = [
"test.ini",
"test.ngc",
"rm400.ngc",
"rm401.ngc",
"rm402.ngc",
"rm403.ngc",
]);
];
const nestedRemapsOwordUnstagedFiles = [
"testsub.ngc",
];
const nestedRemapsOwordDir = writeRemapRegressionFiles(
"nested-remaps-oword",
nestedRemapsOwordFiles,
);
assertRemapRegressionStaging(
"nested-remaps-oword",
nestedRemapsOwordFiles,
nestedRemapsOwordDir,
nestedRemapsOwordUnstagedFiles,
);
verifyExpectedOutput(
"nested_remaps_oword_remap_wasm",
interp.runRemapFile(