Files
cnc_wams/text26.txt
wangdequan ac52b48d62 先提交到云仓库
结论:已提交当前 Python-remap proof 链路、runtime/browser/UI/docs 相关变更;保持 L4-PYTHON-REMAP inventory baseline 不直接批量 PASS。
2026-06-20 00:06:10 +08:00

443 lines
11 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
项目接续文件L4-PYTHON-REMAP 53 rows 批量 PASS 方法与执行计划
生成时间2026-06-19 CST
本文件接替 `text25.txt`,专门回答:
```text
如何把 53 个 Python-remap inventory rows 从 SKIP L4-PYTHON-REMAP 批量提升为 PASS
以及下一批应按什么步骤推进。
```
重要边界:
```text
这里的“批量提升为 PASS”不能等价于删除 L4-PYTHON-REMAP skip reason。
必须是 proof-driven bulk promotion
1. LinuxCNC-owned Python remap runtime 真实执行;
2. 每个 row 的 INI / Python modules / remap declarations / prolog / epilog / NGC remap assets
都已 vendored 并 staged
3. native -> WASM/Node -> browser proof 全部通过;
4. promotion_allowed 由明确的 promotion artifact 置 1
5. inventory baseline 从 PASS=29 / SKIP=130 变为 PASS=82 / SKIP=77
6. 不新增 JS-owned G-code、planner、canonical motion、tool、parameter、kinematics、remap 语义。
```
当前禁止事项:
```text
- 不直接把 `recommendedBlockedKind === "L4-PYTHON-REMAP"` 改成 `-`
- 不把现有 stop-lookahead lifecycle fixture 当作 53 rows 全量 pass
- 不用 fake worker / contract-only runtime 作为 PASS 证据;
- 不把 Python import success 当作 remap execution pass
- 不把 NGC-only subroutine asset 当 standalone main program
- 不绕过 HAL/UI/HALUI/tool-change/TWP 等边界;
- 不手工改 summary.tsv 的 PASS/SKIP 数字。
```
一、当前状态
当前已经完成:
```text
L4-PYTHON-REMAP native / SDK / WASM / browser proof chain 已接入;
runtime/ui/simulation 已暴露 Python remap runtime 状态;
release artifact / URL workflow 能识别 python-remap-runtime-proof=ready
project release gate 通过;
```
当前仍未完成:
```text
53 个 L4-PYTHON-REMAP rows 仍保持 SKIP
promotion_allowed=0
execution_enabled=0
manual promotion lock 仍开启;
```
当前 inventory baseline
```text
total=159
pass=29
skip=130
fail=0
L4-PYTHON-REMAP=53
L4-USER-M-PROCESS=1
```
目标 bulk promotion baseline
```text
total=159
pass=82
skip=77
fail=0
L4-PYTHON-REMAP=0
L4-USER-M-PROCESS=1
```
二、53 rows 审计结果
来源:
```text
wasm-port/build/wasm/sim-configs-inventory/python-remap-boundary-summary.tsv
wasm-port/build/wasm/sim-configs-inventory/python-remap-family-summary.tsv
```
总量:
```text
rows=53
families=12
```
横向依赖统计:
```text
hal_process=53
ui_process=49
halui_mdi_process=5
prolog_rows=43
epilog_rows=43
python_remap_rows=9
ngc_only_subpath_rows=7
mixed_ngc_python_rows=6
```
family 分组:
```text
axis/laser rows=3 hal=1 ui=1 halui=0 prolog=0 epilog=0 pyremap=1 ngc_only=0
axis/remap/cycle/nc_files rows=1 hal=1 ui=0 halui=0 prolog=1 epilog=1 pyremap=1 ngc_only=0
axis/remap/extend-builtins/nc_files rows=1 hal=1 ui=1 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=1 mixed=1
axis/remap/getting-started/nc_files rows=1 hal=1 ui=0 halui=0 prolog=0 epilog=0 pyremap=0 ngc_only=1
axis/remap/manual-toolchange-with-tool-length-switch/nc_files rows=1 hal=1 ui=1 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=0
axis/remap/rack-toolchange/nc_files rows=1 hal=1 ui=1 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=0
axis/remap/stop-lookahead/nc_files rows=1 hal=1 ui=0 halui=0 prolog=0 epilog=0 pyremap=0 ngc_only=0
axis/vismach/5axis/table-rotary_spindle-rotary-nutating/demos rows=5 hal=1 ui=1 halui=1 prolog=0 epilog=0 pyremap=1 ngc_only=1 mixed=1
axis/vismach/VMC_toolchange rows=1 hal=1 ui=0 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=0
gmoccapy/lathe_configs rows=8 hal=1 ui=1 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=0
gmoccapy/macros rows=25 hal=1 ui=1 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=0
gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples rows=5 hal=1 ui=1 halui=0 prolog=1 epilog=1 pyremap=0 ngc_only=0
```
三、批量 PASS 的正确方法
方法不是“解锁一个 family id”而是新增一个 promotion pipeline
```text
python-remap-bulk-promotion-plan.tsv
-> python-remap-row-runtime-proof.tsv
-> python-remap-row-browser-proof.tsv
-> python-remap-bulk-promotion-gate.tsv
-> inventory rows promotion_allowed=1
-> summary baseline PASS=82 / SKIP=77
```
每个 row 至少要有这些字段:
```text
path
ini
family
main_or_macro_load_class
python_modules_staged
toplevel_executed
path_prepend_applied
python_remap_functions_bound
prolog_functions_bound
epilog_functions_bound
ngc_remap_assets_staged
ngc_only_subpaths_not_standalone
interpreter_state_binding_ready
canonical_events_ready
hal_state_boundary_ready
ui_process_boundary_ready
halui_mdi_boundary_ready
native_pass_ready
wasm_node_pass_ready
browser_pass_ready
execution_enabled
promotion_allowed
```
四、实现阶段
Phase 0冻结现状与审计
目标:
```text
确认当前 53 rows 分类、当前 proof 状态、当前 baseline。
```
验收:
```bash
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/browser/verify_python_remap_runtime_browser.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_real_simulation_browser.sh
git diff --check
```
状态:
```text
本文件创建时 Phase 0 已执行;
当前仍是 PASS=29 / SKIP=130 / L4-PYTHON-REMAP=53
不允许从 Phase 0 直接跳到 PASS=82。
```
Phase 1生成 row-level bulk promotion plan
新增 artifact
```text
wasm-port/build/wasm/sim-configs-inventory/python-remap-bulk-promotion-plan.tsv
```
生成逻辑:
```text
读取 python-remap-boundary-summary.tsv
按 row 输出 proof requirements
默认 promotion_allowed=0
把 blockers 拆成:
python_runtime
prolog_epilog
python_remap_callable
ngc_remap_asset
hal_process_boundary
ui_process_boundary
halui_mdi_boundary
tool_change_boundary
twp_boundary
```
验收:
```text
plan row count = 53
每个 L4-PYTHON-REMAP row 有且只有一条 plan row
所有 plan row promotion_allowed=0
```
Phase 2扩展 PythonRemapRuntimePort 为 row runtime
当前 port 只证明 stop-lookahead lifecycle。批量 PASS 需要变成 row-aware runtime
```text
createLinuxCncPythonRemapRowRuntimePort({
path,
iniPath,
machineRoot,
pythonPathPrepend,
topLevelPath,
sourceFiles,
remapDeclarations,
prologFunctions,
epilogFunctions,
ngcRemapFiles,
runtimeAdapter,
})
```
必须支持:
```text
INI [PYTHON] PATH_PREPEND
INI [PYTHON] TOPLEVEL
configured Python module import
LinuxCNC stdglue prolog/epilog
Python remap callable lookup
Python generator lifecycle
LinuxCNC interpreter state / sentinel binding
LinuxCNC emccanon / canonical event bridge
reload-on-change behavior
```
禁止:
```text
JS 解释 G-code
JS 计算 remap result
JS 伪造 prolog/epilog semantic state
```
Phase 3处理 HAL/UI/HALUI 边界
因为 53/53 rows 有 HAL 声明49/53 rows 有 UI 进程声明5/53 rows 有 HALUI MDI
```text
批量 PASS 必须复用 virtual HAL proof
UI process 不能按 native GUI 执行,只能证明 browser/standalone UI boundary sufficient
HALUI MDI 必须有 LinuxCNC-owned command/state boundary
```
新增 artifact
```text
python-remap-hal-ui-boundary-proof.tsv
```
每个 row 必须明确:
```text
hal_process_boundary_ready=<0|1>
ui_process_boundary_ready=<0|1>
halui_mdi_boundary_ready=<0|1>
arbitrary_native_gui_launched=0
arbitrary_native_hal_daemon_required=0
```
Phase 4按 family 做执行 proof
推荐顺序:
```text
1. axis/remap/stop-lookahead/nc_files rows=1
2. axis/remap/cycle/nc_files rows=1
3. axis/remap/getting-started/nc_files rows=1
4. axis/remap/extend-builtins/nc_files rows=1 mixed NGC/Python guard
5. axis/remap/manual-toolchange-with-tool-length-switch rows=1 tool-change prolog/epilog
6. axis/remap/rack-toolchange/nc_files rows=1 tool-change prolog/epilog
7. axis/vismach/VMC_toolchange rows=1 tool-change body
8. axis/laser rows=3 Python remap callable family
9. axis/vismach/5axis/table-rotary.../demos rows=5 TWP + HALUI + mixed NGC/Python
10. gmoccapy/lathe_configs rows=8 stdglue prolog/epilog
11. gmoccapy/non_trivial_kinematics/... rows=5 stdglue + kinematics context
12. gmoccapy/macros rows=25 macro bulk family
```
每个 family 完成定义:
```text
native row pass evidence exists
WASM/Node row pass evidence exists
browser row diagnostics exists
promotion_allowed remains 0 until family review
```
Phase 5bulk promotion gate
新增 artifact
```text
python-remap-bulk-promotion-gate.tsv
```
gate 规则:
```text
all 53 row proof rows ready
all family proof rows ready
no ngc_only_subpath standalone violations
no JS CNC semantics violations
no missing vendored source files
no native/browser result drift
manual_lock_review=approved
```
只有 gate 全部满足时:
```text
promotion_allowed=1
execution_enabled=1
```
Phase 6inventory promotion implementation
允许改动的位置:
```text
wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.mjs
wasm-port/runtime/sdk/src/sim-config-staging.js
wasm-port/runtime/sdk/src/project-release-readiness.js
相关 docs/tests expected baseline
```
禁止实现方式:
```text
if blocked === "L4-PYTHON-REMAP" return PASS
```
允许实现方式:
```text
if blocked === "L4-PYTHON-REMAP" &&
row proof exists &&
bulk promotion gate approved &&
promotion_allowed === "1"
then execute through LinuxCNC-backed row runtime and count PASS
```
Phase 7baseline 更新
成功后必须更新:
```text
summary.tsv expected:
pass=82
skip=77
fail=0
skip-summary.tsv expected:
ASSET-ONLY=65
L4-USER-M-PROCESS=1
NON_MAIN_CLASS=10
UPSTREAM-DEMO=1
```
必须删除/更新:
```text
L4-PYTHON-REMAP=53 的 hard-block summary assertions
host-runtime docs 中 Python-remap locked wording
release artifact hard-block rows
workflow overview locked detail rows
```
五、下一步立即执行
不要直接做 Phase 6/7。
下一批从 Phase 1 开始:
```text
1. 在 verify_sim_configs_inventory_wasm.mjs 里生成 python-remap-bulk-promotion-plan.tsv
2. 增加验证函数,确认 53 rows 全部进入 plan
3. 增加 docs 说明bulk PASS 需要 row proof不接受 direct unlock
4. 保持 PASS=29 / SKIP=130 不变;
5. 跑 inventory/browser/release gate。
```
建议验收命令:
```bash
git diff --check
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/browser/verify_python_remap_runtime_browser.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_real_simulation_browser.sh
wasm-port/tests/host/verify_project_release_gate.sh
```
六、本文件的执行状态
```text
已完成:
- 当前 53 rows 审计;
- bulk PASS 正确方法定义;
- Phase 1 目标和验收条件定义;
未完成:
- python-remap-bulk-promotion-plan.tsv 生成;
- row-aware PythonRemapRuntimePort
- per-family execution proof
- promotion_allowed=1
- PASS=82 / SKIP=77 baseline update。
```