Start text9 and guard direct initial parameters
This commit is contained in:
297
text9.txt
Normal file
297
text9.txt
Normal file
@@ -0,0 +1,297 @@
|
||||
项目整体完成情况与后续执行计划
|
||||
|
||||
生成时间:2026-06-14 CST
|
||||
|
||||
本文件接替 `text8.txt`。后续工作按 `text9.txt` 执行;除非明确要求审计旧记录,
|
||||
不要再回到 `text1/text2/text3/text4/text5/text6/text7/text8` 扩展进度。
|
||||
`text8.txt` 作为历史归档保留。
|
||||
|
||||
一、续接状态与防重规则
|
||||
|
||||
1. 当前续接点。
|
||||
|
||||
`text8.txt` 已推进到:
|
||||
|
||||
```text
|
||||
三十八、2026-06-14 继续执行记录:browser OPFS direct session parameter value locals guard
|
||||
```
|
||||
|
||||
该批已提交并推送:
|
||||
|
||||
```text
|
||||
82f2c57 Guard browser OPFS direct session parameter values
|
||||
```
|
||||
|
||||
本文件从 `text9.txt` 重新开始记录后续进度。
|
||||
|
||||
2. 每轮开始前必须先执行。
|
||||
|
||||
```bash
|
||||
git status --short
|
||||
git log -5 --oneline
|
||||
tail -n 120 text9.txt
|
||||
awk '/^[一二三四五六七八九十百]+、/ {print}' text9.txt | sort | uniq -d
|
||||
```
|
||||
|
||||
执行规则:
|
||||
|
||||
- 如果 `git status --short` 是 clean,且最新提交已经包含当前建议工作,不要重复追加记录;
|
||||
- 每轮只追加一个新的中文编号记录;提交前再次检查标题唯一性;
|
||||
- `text9.txt` 只记录新的后续进度,不复制 `text8.txt` 的长历史;
|
||||
- 每批完成后,如果要写记录,先写 `text9.txt`,再提交该批代码和记录;
|
||||
- 如果发现重复记录,先做 dedupe 清理并提交,再继续新功能或新 guard;
|
||||
- `text8.txt` 不再追加新进度,除非明确要求审计或修正历史记录。
|
||||
|
||||
二、当前项目纪律
|
||||
|
||||
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. 当前工作树状态。
|
||||
|
||||
切换到 `text9.txt` 前已确认:
|
||||
|
||||
```text
|
||||
git status --short: clean
|
||||
text8.txt duplicate Chinese headings: none
|
||||
```
|
||||
|
||||
当前最近提交:
|
||||
|
||||
```text
|
||||
82f2c57 Guard browser OPFS direct session parameter values
|
||||
0cfe942 Guard browser OPFS direct session parameter seed
|
||||
9265825 Guard browser OPFS direct session load options
|
||||
e0f7ebe Guard browser OPFS explicit session file group
|
||||
ee4c4e1 Guard browser OPFS INI-named session file group
|
||||
```
|
||||
|
||||
2. WASM port 基础架构稳定。
|
||||
|
||||
`wasm-port` 仍按独立移植工作区组织,包含 vendor、runtime/core、runtime/sdk、
|
||||
runtime/opfs、runtime/ui、native/wasm/browser tests、docs 和 tools。
|
||||
|
||||
3. 关键基线保持稳定。
|
||||
|
||||
- `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`
|
||||
|
||||
4. 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
|
||||
```
|
||||
|
||||
5. `text8.txt` 最新收敛方向。
|
||||
|
||||
`text8.txt` 后半段继续沿 browser/OPFS boundary guard 小批量推进,最近完成的重点包括:
|
||||
|
||||
- OPFS saved text、save result、load result helper guard;
|
||||
- invalid INI lines/path helper guard;
|
||||
- OPFS default machine path、default filename、machine INI WASM path helper guard;
|
||||
- generated fixture WASM path helper guard;
|
||||
- direct browser session WASM path group helper guard;
|
||||
- custom session INI/WASM/path/load/save helper guard;
|
||||
- custom session parameter/tool-table seed、value、result/readback helper guard;
|
||||
- INI-named 与 explicit custom session file group helper guard;
|
||||
- direct browser session load options helper guard;
|
||||
- direct browser session parameter seed helper guard;
|
||||
- direct `browser-interp` saved parameter values/result/readback locals guard。
|
||||
|
||||
这些改动均只收敛 browser/OPFS test glue 与 boundary guard,未改变 OPFS bridge
|
||||
behavior、file-service、path-model、SDK planner、interpreter、INI、tool、parameter
|
||||
或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
四、当前必须保持通过的验证入口
|
||||
|
||||
每批后续改动至少运行:
|
||||
|
||||
```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. 当前第一候选批次。
|
||||
|
||||
继续小批量 browser OPFS test glue guard。优先扫描 direct `browser-interp` session 的
|
||||
initial parameter load result 与 backup readback expected lines 是否能复用
|
||||
`browserDirectParameterSeedLines(...)` 或现有 `opfsParameter*` helpers。
|
||||
|
||||
执行目标:
|
||||
|
||||
- 只处理 `wasm-port/tests/browser/interp_smoke.html` 内的 browser/OPFS test glue;
|
||||
- 优先让 initial parameter restore result 与 backup readback expected lines 复用已有
|
||||
helper 或局部常量;
|
||||
- helper 必须继续通过 `verifyExpectedOutput(...)` 间接或直接做精确文本校验;
|
||||
- 保持 `<_named_param> 123` 和 `absent=<_named_param>` 的语义边界外显;
|
||||
- 不改变参数值、OPFS path、WASM path 字符串、保存/读取/load 行为;
|
||||
- 不改变 OPFS bridge behavior、file-service、path-model、SDK planner、interpreter、
|
||||
INI、tool、parameter 或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
2. 第一候选批次验证。
|
||||
|
||||
执行:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
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_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 OPFS direct session initial parameters
|
||||
```
|
||||
|
||||
3. 后续候选。
|
||||
|
||||
如果 initial parameter load/backup 收益不明显,转向 direct `browser-interp`
|
||||
tool-table load/save/readback value groups,看是否能像 custom session 一样对齐为
|
||||
locals 或复用现有 `opfsToolTable*` helpers。
|
||||
|
||||
继续只选:
|
||||
|
||||
- 已有 Node/browser coverage;
|
||||
- 不依赖 HAL/task/tool DB/Python remap/user-M process;
|
||||
- direct-file、generated-file、OPFS boundary 或 staging helper 已成型;
|
||||
- 每批小范围收敛;
|
||||
- 只做 host/filesystem/browser/OPFS boundary 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 text9.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text9.txt | sort | uniq -d
|
||||
```
|
||||
|
||||
七、2026-06-14 继续执行记录:text9 handoff and direct session initial parameter guard
|
||||
|
||||
本轮先按用户要求完成 `text9.txt` 续接文件创建,后续进度改按 `text9.txt` 记录;
|
||||
随后按第一候选批次继续收敛 direct `browser-interp` session 的 initial parameter
|
||||
load/backup expected lines,范围仍只触及
|
||||
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
|
||||
|
||||
完成内容:
|
||||
|
||||
- 新建 `text9.txt`,完整承接 `text8.txt` 当前工作情况、纪律、验证入口、续接规则和
|
||||
下一步计划;
|
||||
- 明确 `text8.txt` 作为历史归档保留,后续不再追加新进度;
|
||||
- 为 direct `browser-interp` session 增加
|
||||
`browserInterpInitialParameterValues` 局部常量;
|
||||
- `opfs_restore_parameters` expected lines 改为复用既有
|
||||
`opfsParameterResultLines("restore", ...)`;
|
||||
- `opfs_saved_parameter_backup_text` expected lines 改为复用既有
|
||||
`opfsParameterTextLines(" ", ...)`,并继续显式保留 `<_named_param> 123`;
|
||||
- seed text 仍由 `browserDirectParameterSeedLines(true)` 生成,实际写入内容不变;
|
||||
- 未改变参数值、OPFS path、WASM path 字符串、save/read/load 行为;
|
||||
- 未改变 staging path 模型、OPFS bridge behavior、file-service、SDK planner、
|
||||
interpreter、INI、tool、parameter 或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
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_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
|
||||
browser_interp_smoke=ok
|
||||
vendor sync up to date
|
||||
standalone CNC semantics guard complete
|
||||
interp_wasm_node_smoke=ok
|
||||
sim_configs_wasm_node_inventory_executed=28
|
||||
sim_configs_wasm_node_inventory_passed=28
|
||||
sim_configs_wasm_node_inventory_skipped=131
|
||||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||||
host_wasm_opfs_browser_smokes=ok
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续小批量 browser OPFS test glue guard。优先扫描 direct `browser-interp` session 的
|
||||
tool-table load/save/readback value groups 是否能像 custom session 一样对齐为 locals
|
||||
或复用现有 `opfsToolTable*` helpers;只改测试胶水,不改变 tool-table 输入、OPFS path、
|
||||
WASM path 字符串或保存/读取行为。
|
||||
@@ -9322,6 +9322,7 @@
|
||||
|
||||
const browserInterpMachineId = "browser-interp";
|
||||
const browserInterpWasmPaths = opfsBrowserSessionWasmPaths("browser");
|
||||
const browserInterpInitialParameterValues = ["10.5", "20.25", "2.25", "44"];
|
||||
const browserInterpTextPaths = await saveMachineTextFiles(browserInterpMachineId, {
|
||||
ini: `[EMC]\nMACHINE = ${browserInterpMachineId}\n`,
|
||||
toolTable: "T2 P7 Z3.125 D1.5 I12 J34 Q4 ;browser finish tool\n",
|
||||
@@ -9348,13 +9349,7 @@
|
||||
verifyOpfsLoadResult(
|
||||
"opfs_restore_parameters",
|
||||
loadedSession.parameters,
|
||||
[
|
||||
"restore_parameters=0",
|
||||
"parameter_5161=10.5",
|
||||
"parameter_5162=20.25",
|
||||
"parameter_5221=2.25",
|
||||
"parameter_5399=44",
|
||||
],
|
||||
opfsParameterResultLines("restore", ...browserInterpInitialParameterValues),
|
||||
);
|
||||
verifyOpfsLoadResult(
|
||||
"opfs_load_tool_table",
|
||||
@@ -9406,10 +9401,7 @@
|
||||
"opfs_saved_parameter_backup_text",
|
||||
savedParameters.backupOpfsPath,
|
||||
[
|
||||
"5161 10.5",
|
||||
"5162 20.25",
|
||||
"5221 2.25",
|
||||
"5399 44",
|
||||
...opfsParameterTextLines(" ", ...browserInterpInitialParameterValues),
|
||||
"<_named_param> 123",
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user