Files
linuxcncWebWASM/nextTask.md

4.4 KiB
Raw Blame History

LinuxCNC Web/WASM 任务接续指针

这是恢复工作的唯一入口。它必须保持为小型、无历史的任务指针;完整日志、源码和旧交接记录均按路径按需读取。

Current

pointer_version: 3
updated: 2026-08-21
context_id: linuxcnc-2.10.0-pre0-wasm-m1-py-c1
milestone: K4
last_verified_checkpoint: K4-HEX-01-r01
task:
  id: K4-PENTA-01
  status: pending
  title: pentapod integration
  owner: WS-0
  profile: feature
next:
  id: K5-SWITCH-01
  status: pending
  title: switchkins integration
  owner: WS-0
  profile: feature

Read

启动只读取本文件的 Current、Task 和 Verify。随后读取 context-lock.json 的摘要和当前任务列出的直接输入;不要自动加载路线图、覆盖矩阵、完整日志或 coverage/*.jsonl。需要历史时按需读取 docs/task-history.md,需要完整产物时使用其中的路径、大小和哈希。

基线门禁(开始修改前必须通过):

python3 scripts/validate_baseline.py
python3 scripts/validate_download_index.py
python3 -m unittest discover -s scripts -p 'test_*.py' -v
python3 scripts/validate_task_pointer.py

生成 context packet 后,在实际模型调用前运行 python3 scripts/validate_model_budget.py packet.json --context-window <window> --overhead-tokens <current-request-overhead>;--overhead-tokens 只统计本次固定提示、工具 schema 和当前状态摘要,连续执行不得把上一轮对话累加进去。流式请求必须由 scripts/model_stream.py 消费;只有 response.completed 的 provider usage 通过 validate_provider_response 才能继续。断流、context overflow、usage 异常和 length/max_tokens/max_output_tokens 截断只保存 metadata-only checkpoint,并从更小的 packet 重新开始。

Task

目标:完成 pentapod 五腿并联运动学的统一 forward/inverse/mapping 集成。

直接输入:coverage/genhex-kinematics.report.json、coverage/kinematics-source-closure.report.json、linuxcnc/src/emc/kinematics/pentakins.c、linuxcnc/src/emc/kinematics/pentakins.h、linuxcnc/configs/sim/axis/vismach/hexapod-sim/hexapod.ini、wasm-core/src/sim_kinematics.c、context-lock.json。

必须产出:pentapod 真实/派生配置样本、五腿 FK/IK 与姿态约束、迭代收敛/不收敛/奇异/限位边界、native/WASM 对照和 blocked oracle 清单;更新迁移计划、manifest 和任务历史。

完成条件:配置候选;工作空间边界、姿态约束、奇异/无解、迭代上限、关节限位和 state hash 稳定;官方 oracle 缺失继续显式 blocked。

非目标:本任务不批准替代 oracle 契约、不实现完整运动学 ABI、不接入 UI 运行时和 Python、不把配置 smoke 当作数值 golden。

回滚点:删除本任务新增 pentapod runner/golden 扩展,保留 K4-HEX-01 报告和 M2-CORE-04 blocked 证据,并恢复本指针。

Next

完成本任务后,在同一变更中把 next 提升为 Current.task,更新 last_verified_checkpoint 和最近证据摘要,并重新运行 Read 中的门禁。不得跳过未完成依赖;同一时刻只允许一个 current task。

Verify

python3 scripts/generate_source_inventory.py
python3 scripts/generate_kinematics_closure_report.py
python3 scripts/generate_kinematics_config_graph.py
python3 scripts/generate_kinematics_oracle_report.py
cmake --build build-native && ctest --test-dir build-native --output-on-failure
python3 scripts/validate_baseline.py
python3 scripts/validate_task_pointer.py
python3 -m unittest discover -s scripts -p 'test_*.py' -v
find linuxcnc/src/emc/kinematics -maxdepth 1 -type f -print | sort
rg -n --glob '*.ini' --glob '*.hal' --glob '*.py' 'KINEMATICS|loadrt .*kins|switchkins|corexy_by_hal' linuxcnc/configs/sim linuxcnc/tests

最近证据:coverage/genhex-kinematics.report.json 已验证真实 hexapod-sim 配置、六腿闭式逆解、Newton 6x6 正解、alternate seed、迭代/奇异/限位边界、native/WASM 字节一致和 state hash 一致;缺失 linuxcnc/unit_tests/kinematics/** 官方 oracle 继续显式 blocked。下一任务处理 pentakins.c 五腿并联约束。

Stop

若 LinuxCNC 提交偏离 lock、必需输入缺失、需要未审查的 ABI/protocol/manifest schema 变化、索引无法确定性生成,或测试只能靠删样本/降低检查/伪装 REAL-EXCLUDED 才通过,立即记录为 blocked,不跳到下一个节点。