项目整体完成情况与后续执行计划 生成时间:2026-06-13 CST 本文件接替 `text6.txt`。后续工作按 `text7.txt` 执行;除非明确要求审计旧记录, 不要再回到 `text1/text2/text3/text4/text5/text6` 扩展进度。`text6.txt` 作为历史 归档保留。 一、续接状态与防重规则 1. 当前续接点。 `text6.txt` 已推进到: ```text 四十九、2026-06-13 继续执行记录:remap generated-file staging helper inventory ``` 该批已提交: ```text bea8320 Guard remap generated file staging ``` 本文件从 `text7.txt` 重新开始记录后续进度。 2. 每轮开始前必须先执行。 ```bash git status --short git log -5 --oneline tail -n 120 text7.txt awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d ``` 执行规则: - 如果 `git status --short` 是 clean,且最新提交已经包含当前建议工作,不要重复追加记录; - 每轮只追加一个新的中文编号记录;提交前再次检查标题唯一性; - `text7.txt` 只记录新的后续进度,不复制 `text6.txt` 的长历史; - 每批完成后,如果要写记录,先写 `text7.txt`,再提交该批代码和记录; - 如果发现重复记录,先做 dedupe 清理并提交,再继续新功能或新 guard。 二、当前项目纪律 1. LinuxCNC 仍是唯一 CNC 语义来源。 G-code、remap、tool、parameter、planner、kinematics、user-M、tool DB、Python remap 等语义必须来自 LinuxCNC upstream 或 vendored LinuxCNC C/C++/配置/脚本源码。 2. 本项目允许实现的范围仍限于: - build; - source sync; - runtime shim; - filesystem staging; - OPFS; - WASM/browser boundary; - 测试胶水; - 文档; - 机器可读 gate/artifact。 3. 禁止事项继续有效: - 不在 JS 中重写 G-code 或 CNC 语义; - 不修改 vendored LinuxCNC 源文件来让测试通过; - 不把 full-process/HAL/UI/Python/tool DB 依赖伪装成 standalone pass; - 不把 expected failure 硬改成 pass,除非已有 LinuxCNC-owned runtime proof,并且 native、Node、browser gate 都按顺序通过; - browser 不能依赖目录枚举。 三、当前完成情况摘要 1. WASM port 基础架构稳定。 `wasm-port` 已按独立移植工作区组织,包含 vendor、runtime/core、runtime/sdk、 runtime/opfs、runtime/ui、native/wasm/browser tests、docs 和 tools。 2. 关键基线保持稳定。 - `linuxcnc/nc_files` native Layer 1: - `total 107` - `pass 101` - `expected_fail 6` - `unexpected_fail 0` - `linuxcnc/configs/sim` native Layer 2: - `total 159` - `pass 151` - `expected_fail 8` - `unexpected_fail 0` - Node sim-config inventory: - `executed=28` - `passed=28` - `skipped=131` - `unexpected_fail=0` 3. blocked runtime family 仍未 promotion。 仍 blocked,不允许 promotion: - `L4-USER-M-PROCESS` - `L4-TOOL-DB` - `L4-PYTHON-REMAP` 当前 host 仍按缺少 LinuxCNC host runtime 处理,不执行任何: ```bash ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1 bash wasm-port/tests/native/probe_millturn_user_m_runtime.sh ENABLE_TOOL_DB_RUNTIME_PROBE=1 bash wasm-port/tests/native/probe_tool_db_runtime.sh ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1 bash wasm-port/tests/native/probe_python_remap_runtime.sh ``` 4. staged path guard 当前收敛状态。 `text6.txt` 已完成并提交的主要收敛包括: - ordinary interp direct-file / multi-file staged path guard; - `oword-bug315`、`oword-bug315-p2`、`namedparam-bug424` 等 early direct-file guard; - `cam-nisley`、`cam-nisley-bare`、`flowsnake`、`inside-corners`、 `inverse-time-with-comp` 等 interp guard; - `bad`、`good`、`g33.1`、`g6164`、`g71`、`g72`、`g76`、rotation、INI-context fixture guard; - `m98m99` fixed `.ngc` manifest guard; - `g10` fixed `.ngc/.tbl` manifest guard; - `g52/g92` direct-file guard; - ccomp per-file staging helper guard; - remap aggregate staging helper 已收敛为 coverage helper + per-file staging helper; - `nested-remaps-oword` 保留 expected-unstaged overlap guard; - `remap-io/simpockets.tbl` 已切换为 generated-file staging helper; - Node/browser 侧已删除无调用的 remap aggregate helper。 5. 当前最近提交。 当前最近提交包括: ```text bea8320 Guard remap generated file staging e039cac Guard final special remap staging paths 76aa9fb Guard final simple remap staging paths fe07e2f Guard more remap per-file staging paths d7cd116 Guard initial remap per-file staging paths ``` 四、当前必须保持通过的验证入口 每批后续改动至少运行: ```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_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh wasm-port/tests/host/verify_host_smokes.sh ``` 涉及 native baseline 或大范围 source/staging 改动时,再运行: ```bash wasm-port/tests/native/verify_nc_files.sh wasm-port/tests/native/verify_sim_configs.sh wasm-port/tests/native/verify_native_probes.sh ``` 五、下一步执行计划 1. 当前第一候选批次。 继续 staged path guard inventory 第二轮,优先处理 INI-context helper 内的 inline prefix strip: ```text assertInterpIniContextNgcStaging(...) ``` 当前已知位置: ```text wasm-port/tests/wasm/node/verify_interp_wasm.mjs wasm-port/tests/browser/interp_smoke.html ``` 执行目标: - Node 侧将 `file.wasmPath.replace(`/work/interp/${name}/`, "")` 收敛为专用 helper; - browser 侧将 `file.wasmPath.replace(`/work/browser-interp/${name}/`, "")` 同步收敛; - helper 必须检查 staged path 确实带有期望前缀,避免普通 `replace(...)` 静默放过 错误路径; - 保持 browser 不枚举目录; - 只整理 host/filesystem staging guard,不改变 INI、O-word、parameter、remap 或 interpreter 语义。 2. 第一候选批次验证。 执行: ```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 ``` 如果通过,提交建议: ```text Guard staged prefix stripping ``` 3. 后续候选原则。 继续只选: - 已有 Node/browser coverage; - 不依赖 HAL/task/tool DB/Python remap/user-M process; - direct-file、generated-file 或 staging helper 已成型; - 每批小范围收敛; - 只做 host/filesystem staging guard,不新增 CNC 语义。 暂不推进: - blocked runtime promotion; - browser full 159 sim-config inventory; - full-process/HAL/UI/Python/tool DB 执行; - upstream intake 大批量扩面。 六、下一次开始执行时的第一条命令 从这里继续: ```bash git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d ``` 七、2026-06-13 继续执行记录:staged prefix stripping guard 1. 本批目标。 按本文件第一候选批次继续 staged path guard inventory 第二轮,收敛 INI-context helper 内的 inline prefix strip: ```text assertInterpIniContextNgcStaging(...) ``` 2. 已完成改动。 - Node 侧新增 `stripInterpIniContextStagingPrefix(...)`; - browser 侧新增 `stripInterpIniContextStagingPrefix(...)`; - 两侧均先检查 staged `wasmPath` 带有期望前缀,再用 `slice(...)` 取相对路径; - 删除两侧 `file.wasmPath.replace(...)` 的静默前缀剥离; - 保持 browser 不枚举目录; - 未修改 INI、O-word、parameter、remap 或 interpreter 语义。 涉及文件: ```text wasm-port/tests/wasm/node/verify_interp_wasm.mjs wasm-port/tests/browser/interp_smoke.html ``` 3. 本批建议验证。 ```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 ``` 如果通过,提交建议: ```text Guard staged prefix stripping ``` 4. 下一步工作建议。 继续 staged path guard inventory 第三轮,优先扫描剩余 `wasmPath` 字符串拼接、prefix strip 或 helper 旁路点,只选择已有 Node/browser coverage 且不依赖 HAL/task/tool DB/Python remap/user-M process 的小批次。 下一轮第一条命令仍保持: ```bash git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d ``` 八、2026-06-13 继续执行记录:fiveaxis staging manifest guard 1. 本批目标。 继续 staged path guard inventory 第三轮,收敛 fiveaxis 三组 helper 的 staged 文件写入: ```text writeFiveAxisTrtMachineFiles(...) writeFiveAxisTdrMachineFiles(...) writeFiveAxisBridgeMillMachineFiles(...) ``` 2. 已完成改动。 - Node 侧新增 fiveaxis 固定 manifest 写入 helper; - Node 侧为 `remap_subs` 和 `demos` 的 `.ngc` 子集增加 upstream coverage drift 断言; - Node 侧移除 fiveaxis helper 里的 ad hoc `readdirSync(remap_subs)` 写入; - browser 侧新增 fiveaxis 固定 manifest 写入 helper; - browser 侧增加 duplicate-free 和 staged root/path parity 断言; - browser 侧仍不枚举目录; - 未修改 INI、remap、kinematics、HAL 或 interpreter 语义。 涉及文件: ```text wasm-port/tests/wasm/node/verify_interp_wasm.mjs wasm-port/tests/browser/interp_smoke.html ``` 3. 已完成的目标验证。 ```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 ``` 4. 本批剩余建议验证。 ```bash 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 ``` 如果通过,提交建议: ```text Guard fiveaxis staging manifests ``` 5. 下一步工作建议。 继续 staged path guard inventory 第四轮,优先扫描 `verify_interp_wasm.mjs` 和 `interp_smoke.html` 中剩余的 direct literal `/work/...` 写入点,选择已有 Node/browser 成对覆盖、且可以用 fixed manifest 或 single-file staging helper 收敛的小批次。 下一轮第一条命令仍保持: ```bash git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d ``` 九、2026-06-13 继续执行记录:local gcode fixture staging guard 1. 本批目标。 继续 staged path guard inventory 第四轮,优先处理已有 Node/browser 成对覆盖的 local fixture direct `/work/...` 写入点: ```text coordinate_offsets.ngc position_params.ngc ``` 2. 已完成改动。 - 修正 `text7.txt` 中第七/第八条记录顺序,避免后续记录继续乱序; - Node 侧新增 `writeLocalGcodeFixture(...)`; - browser 侧新增 `writeLocalGcodeFixture(...)`; - `coordinate_offsets` 和 `position_params` 两侧均改为 helper 写入; - helper 显式检查 staged `wasmPath` 与期望路径一致; - browser 侧仍不枚举目录; - 未修改 G-code、canon expected、parameter、tool table 或 interpreter 语义。 涉及文件: ```text text7.txt wasm-port/tests/wasm/node/verify_interp_wasm.mjs wasm-port/tests/browser/interp_smoke.html ``` 3. 已完成的目标验证。 ```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 ``` 4. 本批剩余建议验证。 ```bash 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 ``` 如果通过,提交建议: ```text Guard local gcode fixture staging ``` 5. 下一步工作建议。 继续 staged path guard inventory 第五轮,优先处理 `runVendorNcFile(...)` / `runVendorNcFileWithToolTable(...)` 这类 vendor `nc_files` direct/context helper, 增加 single-file root parity 和 context file manifest guard;仍暂不碰 parameter/tool table runtime state tests。 下一轮第一条命令仍保持: ```bash git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d ``` 十、2026-06-13 继续执行记录:browser nc-files staging guard 1. 本批目标。 继续 staged path guard inventory 第五轮,处理 browser 侧 vendor `nc_files` helper: ```text runVendorNcFile(...) runVendorNcFileWithToolTable(...) ``` 2. 已完成改动。 - browser 侧新增 `assertVendorNcFileStaging(...)`; - browser 侧新增 `assertVendorNcFileContextStaging(...)`; - direct `nc_files` helper 增加 `/work/browser-nc-files/` root parity guard; - context helper 增加固定 manifest guard: - `` - `tool.tbl` - `nc_files_context.ini` - context helper 增加 staged root/path parity guard; - browser 侧仍不枚举目录; - 未修改 vendor `nc_files`、tool table 内容、INI 内容或 interpreter 语义。 涉及文件: ```text wasm-port/tests/browser/interp_smoke.html ``` 3. 已完成的目标验证。 ```bash git diff --check SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh ``` 4. 本批剩余建议验证。 ```bash 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_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh wasm-port/tests/host/verify_host_smokes.sh ``` 如果通过,提交建议: ```text Guard browser nc-files staging ``` 5. 下一步工作建议。 继续 staged path guard inventory 第六轮,优先处理 browser/Node 中剩余的单文件 direct `/work/...` 写入点,例如 `disable_fanuc_style_sub_m98.ngc` 或 spindle-orient INI fixture staging;继续避开 parameter/tool table runtime state tests 和 blocked runtime promotion。 下一轮第一条命令仍保持: ```bash git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d ```