Initial LinuxCNC WebAssembly workspace snapshot
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/build-wasm/
|
||||||
|
/build-native/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "linuxcnc"]
|
||||||
|
path = linuxcnc
|
||||||
|
url = https://gitee.com/linuxcnc/linuxcnc.git
|
||||||
33
README.md
Normal file
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# LinuxCNC Web/WASM
|
||||||
|
|
||||||
|
本仓库的目标是将 LinuxCNC `2.10.0~pre0` 的仿真行为移植到浏览器。当前提交完成的是实施前 M0/M1 骨架,不是 LinuxCNC 功能完成声明。
|
||||||
|
|
||||||
|
恢复或开始工作时,首先读取 [`nextTask.md`](nextTask.md)。它是当前任务节点、下一任务节点、验证证据和切换规则的唯一接续入口。
|
||||||
|
|
||||||
|
## 当前状态
|
||||||
|
|
||||||
|
- LinuxCNC 来源基线:`linuxcnc/VERSION` 与 `context-lock.json`。
|
||||||
|
- 来源索引:`coverage/source-index.jsonl`,由 `scripts/generate_source_inventory.py` 生成。
|
||||||
|
- 覆盖种子:`coverage/manifest.jsonl`。所有条目初始为 `planned/needs_owner`,没有来源会被静默忽略。
|
||||||
|
- WASM ABI 骨架:`wasm-core/include/sim_api.h`;当前实现只验证生命周期、固定 tick、快照和状态导入导出。
|
||||||
|
- 前端、Worker、HAL、解释器、TP、Python、OPFS 和 UI 功能仍须按文档里程碑实现。
|
||||||
|
|
||||||
|
## 重建 M0
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 scripts/generate_source_inventory.py
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
```
|
||||||
|
|
||||||
|
## 编译 ABI 骨架
|
||||||
|
|
||||||
|
需要 Emscripten。该命令同时运行原生 ABI 单测并生成 `build-wasm/linuxcnc-sim-core.js`/`.wasm`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scripts/build-wasm.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
完整路线、功能完整性和退出门禁见 [`docs/linuxcnc-web-wasm-implementation-readiness.md`](docs/linuxcnc-web-wasm-implementation-readiness.md)。专项设计仍分别位于 `docs/` 下的 roadmap、source map、coverage、communication、execution 和 playbook 文档。
|
||||||
|
|
||||||
|
依赖下载允许使用中国大陆镜像;请先阅读 `context-lock.json` 的 `downloads` 策略。镜像只改变传输位置,不能改变版本、文件字节或校验记录。
|
||||||
91
context-lock.json
Normal file
91
context-lock.json
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"context_id": "linuxcnc-2.10.0-pre0-wasm-m1-py-c1",
|
||||||
|
"lock_format": "context-lock.v1",
|
||||||
|
"linuxcnc_version": "2.10.0~pre0",
|
||||||
|
"linuxcnc_source_sha": "239dcf4284762ad7e9c65d390bc5524d855c2f8e",
|
||||||
|
"linuxcnc_version_sha256": "afc5dc60d029cb477a28f476599249ba353d0164f8991d7b8326371998ac59a1",
|
||||||
|
"roadmap_revision": "docs-baseline-2026-08-20",
|
||||||
|
"coverage_revision": "coverage-seed-v1",
|
||||||
|
"emscripten_version": "3.1.6",
|
||||||
|
"compiler": {
|
||||||
|
"frontend": "Ubuntu clang 15.0.7",
|
||||||
|
"cmake": "3.28.3",
|
||||||
|
"ninja": "1.11.1",
|
||||||
|
"target": "wasm32-unknown-emscripten"
|
||||||
|
},
|
||||||
|
"compiler_flags": [
|
||||||
|
"-O3",
|
||||||
|
"-std=c11",
|
||||||
|
"-sMODULARIZE=1",
|
||||||
|
"-sEXPORT_ES6=1",
|
||||||
|
"-sENVIRONMENT=web,worker",
|
||||||
|
"single-threaded-bootstrap"
|
||||||
|
],
|
||||||
|
"python_runtime": {
|
||||||
|
"name": "Pyodide",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"python_version": "3.13.2",
|
||||||
|
"abi_version": "2025_0",
|
||||||
|
"platform": "emscripten_4_0_9",
|
||||||
|
"status": "pinned-for-m1-py-01",
|
||||||
|
"pin_required_by": "PY-01",
|
||||||
|
"reason": "Worker-only allowlist runtime; LinuxCNC compatibility modules are virtual and host capabilities are denied.",
|
||||||
|
"manifest_sha256": "sha256:1740e0f87d7b4e82954c51643c916afd7ce9ddcfd808e5d6b170cb2283689acf",
|
||||||
|
"artifact_index_sha256": "be531c8cb5af55f9527b6b6b3955ff908a748fae0e37952fa699aecf1a44b399"
|
||||||
|
},
|
||||||
|
"schema_versions": {
|
||||||
|
"sim_abi": 1,
|
||||||
|
"protocol": 1,
|
||||||
|
"snapshot": 1,
|
||||||
|
"event": 1,
|
||||||
|
"workspace": 1,
|
||||||
|
"manifest": 1
|
||||||
|
},
|
||||||
|
"browser_matrix": {
|
||||||
|
"status": "planned-for-m4",
|
||||||
|
"minimum": {
|
||||||
|
"chromium": "TBD",
|
||||||
|
"firefox": "TBD",
|
||||||
|
"safari": "TBD"
|
||||||
|
},
|
||||||
|
"cross_origin_isolation": false
|
||||||
|
},
|
||||||
|
"downloads": {
|
||||||
|
"policy": "mirror-allowed-checksum-required",
|
||||||
|
"preferred_source": "china-mirror-when-available",
|
||||||
|
"official_source_allowed": true,
|
||||||
|
"artifact_cache": "vendor/downloads",
|
||||||
|
"required_metadata": ["name", "version", "source_url", "sha256", "bytes", "license"],
|
||||||
|
"unverified_artifacts_allowed": false,
|
||||||
|
"runtime_pin_rule": "Changing mirror URL without changing bytes does not change context; changing bytes or version creates a new context_id."
|
||||||
|
},
|
||||||
|
"inventory_counts": {
|
||||||
|
"total": 8020,
|
||||||
|
"source_index": 8020,
|
||||||
|
"manifest_seed": 8020,
|
||||||
|
"document_capabilities": 2868,
|
||||||
|
"source_symbols": 23983,
|
||||||
|
"config_resources": 16093,
|
||||||
|
"test_entries": 321,
|
||||||
|
"normalized_sources": 51285,
|
||||||
|
"dependency_edges": 37160
|
||||||
|
},
|
||||||
|
"source_index_sha256": "843e35bb7b4c086453c4d370bbd2d1f20445b13a1a56f7273d4eb13079bae41d",
|
||||||
|
"manifest_seed_sha256": "1a64bedd3629e665411fb87abb6b5de94eed11456acab305fade6bdec18076fd",
|
||||||
|
"document_capabilities_sha256": "fa5140bd4995224406381e4190e76bf81f64bd24dbf93a2fd10421c45aee4316",
|
||||||
|
"source_symbols_sha256": "5fc72e6a268d2220b6335f7f6834c925f13c5c35461fa399a400e6621958875a",
|
||||||
|
"config_resources_sha256": "d4d02cb13f2f9cb58404630d4de8ac0226e02075166fe30f2b03a6abca4be5bc",
|
||||||
|
"test_entries_sha256": "86449838257a7aab7c9219e641a14d4493208b35d8c0cc092d1fa149352c7c37",
|
||||||
|
"normalized_sources_sha256": "ae800441cafb54bd7fbba872bf3b4af361041a14b9dee20fdc210204a433aff8",
|
||||||
|
"workspace_recovery_report_sha256": "88dd1d851d487730edc6beb034a934ba1c19346312ed3cd4d4893c7259c431de",
|
||||||
|
"runtime_mapping_report_sha256": "f4be10828fda8201ff9e69de95bc68e5def42fc7206a851b37474c21b4da0a17",
|
||||||
|
"python_runtime_manifest_sha256": "340faa6ef5bedcaeb0583f463e6b89cb442ddf1d83d7e6ee8d96cee438fe4213",
|
||||||
|
"python_runtime_report_sha256": "be531c8cb5af55f9527b6b6b3955ff908a748fae0e37952fa699aecf1a44b399",
|
||||||
|
"hal_runtime_report_sha256": "70b99118ae6957456e592512d752aa137f59cae897ec546509ff26456879dd90",
|
||||||
|
"posemath_runtime_report_sha256": "26b04fb285b5d085a980856fffe5707c2e2ccaeddc08c06f2da2491e76256a39",
|
||||||
|
"dependency_closure_sha256": "39ab6b831f4eb53347dbb509855ca05bc557e25abc5d76837c45ce037a3e44a9",
|
||||||
|
"golden_schema_sha256": "5513535b9480d7100ef3ef59ac933c4040bd7198dc419693a7ee68098171c423",
|
||||||
|
"native_runner_report_sha256": "6f2105f154d12b99f4e1cd4af3cdb5df4a462f3665f1447d5959384be5d4fae2",
|
||||||
|
"generated_by": "inventory-and-coverage-generators",
|
||||||
|
"generated_at": "2026-08-20T15:52:00+08:00"
|
||||||
|
}
|
||||||
16093
coverage/config-resources.jsonl
Normal file
16093
coverage/config-resources.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
243
coverage/config-resources.report.json
Normal file
243
coverage/config-resources.report.json
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
{
|
||||||
|
"entrypoint_paths": [
|
||||||
|
"linuxcnc/configs/sim/axis/anglejog/anglejog.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/axis.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/axis_9axis.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/axis_mm.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/canterp.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/classicladder/demo_sim_cl.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/corexy/corexy_by_hal.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/corexy/corexy_by_kins.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/db_demo/db_nonran.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/db_demo/db_ran.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/external_offsets/dynamic_offsets.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/external_offsets/eoffsets.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/external_offsets/jwp_z.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/external_offsets/opa.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/extrajoints/12extrajoints.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/extrajoints/1extrajoint.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/extrajoints/2extrajoints.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/foam/axis_foam.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gantry/gantry.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gantry/gantry_jjog.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gantry/gantry_mm.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/geometry/xyzc.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/geometry/xyzc_origin.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gladevcp/gladevcp_panel.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gladevcp/gladevcp_panel_tester.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gladevcp/gladevcp_tab.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gladevcp/probe.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/gladevcp/set-param-from-ini.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/halui_pyvcp/halui.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/histogram_demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/historical_lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ini_hal_demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ini_with_includes/includes_demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/iocontrolv2/axis-iocontrolv2-demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/iocontrolv2/g8812.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/iocontrolv2/m66track.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/iocontrolv2/owordm6-ui-ns.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/iocontrolv2/owordm6-ui.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xyzb_locking_indexer/xyyzb.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xyzb_locking_indexer/xyzb.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xyzx_mpg/xyzx-xhc-hb04.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xyzx_mpg/xyzx.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xz/xz.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xz/xz_both.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ja_tests/xz/xz_both_auto.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/laser/laser.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/lathe-fanucy/lathe-fanucy.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/lathe_multispindle/lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ldelta.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ldelta_demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/minimal_xyz.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/1_onpause_local.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/2_onpause_external.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/3_always_local.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/4_always_external.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/5_no_gui.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/6_zretract.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/7_pyvcp.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/moveoff/8_gladevcp.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ngcgui/ngcgui.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ngcgui/ngcgui_gcmc.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ngcgui/ngcgui_lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ngcgui/ngcgui_simple.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/ngcgui/pyngcgui_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/orphans/acc_test.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/orphans/axis_noio.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/orphans/iocontrol-removed/iocontrol-removed.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/orphans/medium.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/panelui-demo/_panelui.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/panelui-demo/panelui-demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/pentapod/pentapod.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/plasma/imperial.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/plasma/metric.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/profile_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/qtvcp/qtvcp_tab.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/qtvcp/qtvismach_tab.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/random_tc.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/rdelta.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/remap/cycle/cycle.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/remap/getting-started/demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/remap/manual-toolchange-with-tool-length-switch/manualtoolchange.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/remap/rack-toolchange/racktoolchange.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/remap/stop-lookahead/demo.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/rose_engine/rose_engine.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/simtcl/twopass_basic.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/simtcl/twopass_compat.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/spindle_orient/orient.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/twopass/twopass.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/3axis-tutorial/3axis-tutorial.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/5axis/bridgemill/5axis.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/5axis/max5/max5kins.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/5axis/max5/max5triv.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/VMC_toolchange/vmc_graycode.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/VMC_toolchange/vmc_index.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/hbm/hbm.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/hexapod-sim/hexapod.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/melfa-sim/melfa.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/millturn/millturn.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/puma/puma.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/puma/puma560.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/puma/puma560_uvw.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/puma/puma_cube.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/rolfmill/rolfmill.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/vismach/scara/scara.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/wrapped_rotary/wrapped_rotary.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/xhc-hb04/xhc-hb04-layout1.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini",
|
||||||
|
"linuxcnc/configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini",
|
||||||
|
"linuxcnc/configs/sim/craftsman/cnc_settings.ini",
|
||||||
|
"linuxcnc/configs/sim/craftsman/craftsmancnc-axis.ini",
|
||||||
|
"linuxcnc/configs/sim/craftsman/craftsmancnc.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/6_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/7_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/7_axis_tool.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/8_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/9_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_4_axis.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_XYZAB.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_XYZAC.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_XYZCW.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_left_panel.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_messages.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_pedant.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_plasma/gmoccapy_plasma.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_right_panel.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/lathe_configs/lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/lathe_configs/lathe_C.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/lathe_configs/lathe_CW.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/lathe_configs/lathe_backtool.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/lathe_configs/lathe_imperial.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/lathe_configs/lathe_macros.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/non_trivial_kinematics/Gantry/gantry_mm.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/non_trivial_kinematics/scara/scara.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/xyzac-trt.ini",
|
||||||
|
"linuxcnc/configs/sim/gmoccapy/plasma_config/gmoccapy_plasma.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_custom/9axis.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_custom/gaxis_no_plot.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_custom/gscreen_gaxis.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_custom/industrial.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_custom/tester.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_custom/tester_metric.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/gscreen_mm.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/industrial_lathe_wear/industrial_lathe_wear.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/ngcgui/pyngcgui_gscreen.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/ngcgui/pyngcgui_gscreen_popupkeyboard.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/silverdragon/silverdragon.ini",
|
||||||
|
"linuxcnc/configs/sim/gscreen/spartan/spartan.ini",
|
||||||
|
"linuxcnc/configs/sim/pyvcp_demo/pyvcp_bottom_panel.ini",
|
||||||
|
"linuxcnc/configs/sim/pyvcp_demo/pyvcp_demo1.ini",
|
||||||
|
"linuxcnc/configs/sim/pyvcp_demo/pyvcp_embed_tab.ini",
|
||||||
|
"linuxcnc/configs/sim/qtaxis/gantry/qt_gantry.ini",
|
||||||
|
"linuxcnc/configs/sim/qtaxis/non-trivial/scara/scara.ini",
|
||||||
|
"linuxcnc/configs/sim/qtaxis/xyz/qtaxis.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyz.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzy.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzya.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_tool_probe/qtdragon_auto_tool_probe.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_xyz/qtdragon_inch.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_xyz/qtdragon_xyza.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyza.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzab.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzac.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyza.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzab.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzac.ini",
|
||||||
|
"linuxcnc/configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/qtdragon_hd_z_compensation.ini",
|
||||||
|
"linuxcnc/configs/sim/qtplasmac/qtplasmac_l_imperial.ini",
|
||||||
|
"linuxcnc/configs/sim/qtplasmac/qtplasmac_l_metric.ini",
|
||||||
|
"linuxcnc/configs/sim/qtplasmac/qtplasmac_p_imperial.ini",
|
||||||
|
"linuxcnc/configs/sim/qtplasmac/qtplasmac_p_metric.ini",
|
||||||
|
"linuxcnc/configs/sim/qtplasmac/qtplasmac_s_imperial.ini",
|
||||||
|
"linuxcnc/configs/sim/qtplasmac/qtplasmac_s_metric.ini",
|
||||||
|
"linuxcnc/configs/sim/qttouchy/qttouchy.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/blender.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/industrial_lathe_wear/industrial_lathe_wear.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/non-trivial/scara/scara.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qt_800x600.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qt_gantry.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtaxis.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtaxis_lathe/qtaxis_lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtaxis_mpg.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdefault.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdefault_9axis.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdefault_gantry.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdefault_mm.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_auto_tool_probe.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_hd.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_inch.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_xyyz.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_xyz.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_xyza.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_xyzy.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon_xyzya.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtvcp_custom/qtdefault_ngc.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtvcp_experimental/gremlin.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtvcp_experimental/qtdefault_gladevcp.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtvcp_experimental/qtdefault_ngc.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/qtx1mill.ini",
|
||||||
|
"linuxcnc/configs/sim/qtvcp_screens/tester.ini",
|
||||||
|
"linuxcnc/configs/sim/tklinuxcnc/ldelta.ini",
|
||||||
|
"linuxcnc/configs/sim/tklinuxcnc/servo_sim.ini",
|
||||||
|
"linuxcnc/configs/sim/tklinuxcnc/tklinuxcnc.ini",
|
||||||
|
"linuxcnc/configs/sim/tklinuxcnc/tripod.ini",
|
||||||
|
"linuxcnc/configs/sim/tklinuxcnc/trivkins/xz.ini",
|
||||||
|
"linuxcnc/configs/sim/tklinuxcnc/trivkins/xz_both.ini",
|
||||||
|
"linuxcnc/configs/sim/touchy/gladevcp/gladevcp_touchy.ini",
|
||||||
|
"linuxcnc/configs/sim/touchy/gladevcp/touchy.ini",
|
||||||
|
"linuxcnc/configs/sim/touchy/ngcgui/pyngcgui_touchy.ini",
|
||||||
|
"linuxcnc/configs/sim/touchy/ngcgui/pyngcgui_touchy_lathe.ini",
|
||||||
|
"linuxcnc/configs/sim/touchy/ngcgui/pyngcgui_touchy_moveoff.ini",
|
||||||
|
"linuxcnc/configs/sim/touchy/touchy.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker_auto_tool_probe.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker_xyz.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker_xyza.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker_xyzab.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker_xyzy.ini",
|
||||||
|
"linuxcnc/configs/sim/woodpecker/woodpecker_xyzya.ini"
|
||||||
|
],
|
||||||
|
"entrypoints": 233,
|
||||||
|
"missing": 997,
|
||||||
|
"output_sha256": "d4d02cb13f2f9cb58404630d4de8ac0226e02075166fe30f2b03a6abca4be5bc",
|
||||||
|
"resources": 16093,
|
||||||
|
"schema": "config-resources-report.v1",
|
||||||
|
"unresolved": 91
|
||||||
|
}
|
||||||
37160
coverage/dependency-closure.jsonl
Normal file
37160
coverage/dependency-closure.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
38188
coverage/dependency-closure.report.json
Normal file
38188
coverage/dependency-closure.report.json
Normal file
File diff suppressed because it is too large
Load Diff
2868
coverage/document-capabilities.jsonl
Normal file
2868
coverage/document-capabilities.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
392
coverage/document-capabilities.report.json
Normal file
392
coverage/document-capabilities.report.json
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
{
|
||||||
|
"documents": 120,
|
||||||
|
"duplicate_ids": [],
|
||||||
|
"empty_documents": [
|
||||||
|
"linuxcnc/docs/src/common/overleaf.adoc"
|
||||||
|
],
|
||||||
|
"headings": 2868,
|
||||||
|
"missing_includes": [
|
||||||
|
{
|
||||||
|
"document": "linuxcnc/docs/src/hal/components.adoc",
|
||||||
|
"include": "components_gen.adoc",
|
||||||
|
"resolved_path": "linuxcnc/docs/src/hal/components_gen.adoc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"document": "linuxcnc/docs/src/drivers/mb2hal.adoc",
|
||||||
|
"include": "mb2hal_HOWTO.ini",
|
||||||
|
"resolved_path": "linuxcnc/docs/src/drivers/mb2hal_HOWTO.ini"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"output_sha256": "fa5140bd4995224406381e4190e76bf81f64bd24dbf93a2fd10421c45aee4316",
|
||||||
|
"schema": "document-capabilities-report.v1",
|
||||||
|
"unclassified": [
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#getting-started-and-configuration",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#getting-started-with-linuxcnc",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#general-user-information",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#configuration-wizards",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#configuration",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#hal-hardware-abstraction-layer",
|
||||||
|
"domain": "real_hardware"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#hardware-drivers",
|
||||||
|
"domain": "real_hardware"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#hardware-examples",
|
||||||
|
"domain": "real_hardware"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#classicladder",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#advanced-topics",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#usage",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#user-interfaces",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#virtual-control-panels",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#user-interface-programming",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#glossary-copyright-and-history",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#overleaf",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#copyright",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/Master_Documentation.adoc#linuxcnc-history",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#cha:linux-faq",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#automatic-login-automatic-login",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#debian",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#ubuntu",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#automatic-startup",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#faq:terminal",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#faq:man-pages",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#list-modules",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#editing-a-root-file",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#the-command-line-way",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#the-gui-way",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#root-access",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#terminal-commands",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#working-directory",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#faq:cd",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#listing-files-in-a-directory",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#finding-a-file",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#searching-for-text",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#diagnostic-messages",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#convenience-items",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#terminal-launcher",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#hardware-problems",
|
||||||
|
"domain": "real_hardware"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#hardware-info",
|
||||||
|
"domain": "real_hardware"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#monitor-resolution",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/linux-faq.adoc#paths",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/code/rs274.adoc#cha:rs274",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/code/rs274.adoc#usage",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/code/rs274.adoc#example",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/overleaf.adoc#overleaf",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/glossary.adoc#glossary",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/gpld-copyright.adoc#legal-section",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/gpld-copyright.adoc#copyright-terms",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/gpld-copyright.adoc#gnu-free-documentation-license",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/emc-history.adoc#cha:linuxcnc-history",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/emc-history.adoc#name-change",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:linuxcnc/docs/src/common/emc-history.adoc#additional-info",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#linuxcnc-web-wasm",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#1",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#2",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#3-hal-plc",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#4-python-ui",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#5",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#5-1",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-source-map.md#6",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#linuxcnc-web-wasm",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#1",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#2",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#2-1",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#3",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#4-1",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#4-4-remap-python",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#5",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#6",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#7-hal-i-o",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#7-1-hal",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#7-2-manifest",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#7-3",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#8-classicladder-modbus-plc",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#9-io",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#10-gui-vcp",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#11-api",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#11-1",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#12-opfs",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#13",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#13-1-golden",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#13-2",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#13-3",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#14",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#a",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#b",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#c-hal-plc-io",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#d-web-ui",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#e",
|
||||||
|
"domain": "unclassified"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capability_source_id": "doc:docs/linuxcnc-web-wasm-simulation-coverage.md#15",
|
||||||
|
"domain": "unclassified"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
27
coverage/golden-schema.json
Normal file
27
coverage/golden-schema.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "linuxcnc-web-wasm/native-golden.v1",
|
||||||
|
"title": "LinuxCNC Web/WASM native runner golden",
|
||||||
|
"type": "object",
|
||||||
|
"required": ["schema", "context_id", "test_source_id", "expected"],
|
||||||
|
"properties": {
|
||||||
|
"schema": {"const": "native-golden.v1"},
|
||||||
|
"context_id": {"type": "string", "minLength": 1},
|
||||||
|
"test_source_id": {"type": "string", "minLength": 1},
|
||||||
|
"command_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
||||||
|
"expected": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Exact canonical result fields. Missing golden fields never pass.",
|
||||||
|
"properties": {
|
||||||
|
"status": {"enum": ["passed", "failed", "timeout"]},
|
||||||
|
"exit_code": {"type": "integer"},
|
||||||
|
"stdout_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
||||||
|
"stderr_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
||||||
|
"result_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
||||||
|
},
|
||||||
|
"additionalProperties": true
|
||||||
|
},
|
||||||
|
"tolerances": {"type": "object", "additionalProperties": {"type": "number", "minimum": 0}}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
9
coverage/hal-runtime.report.json
Normal file
9
coverage/hal-runtime.report.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"schema": "hal-runtime-report.v1",
|
||||||
|
"status": "passed",
|
||||||
|
"supported_types": ["BIT", "S32", "U32", "FLOAT"],
|
||||||
|
"fixed_tick_scheduler": true,
|
||||||
|
"max_period_ticks": 1000000,
|
||||||
|
"native_tests": ["sim_hal_test"],
|
||||||
|
"real_excluded": ["hardware_driver", "linux_realtime_kernel", "host_device_access"]
|
||||||
|
}
|
||||||
8020
coverage/manifest.jsonl
Normal file
8020
coverage/manifest.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
11
coverage/native-runner.report.json
Normal file
11
coverage/native-runner.report.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"exit_code": 0,
|
||||||
|
"expected_stdout_sha256": "02b233422f896228f77f9039b60755b23658c51190e121e519b3aae11ab15700",
|
||||||
|
"stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||||
|
"stdout_sha256": "02b233422f896228f77f9039b60755b23658c51190e121e519b3aae11ab15700"
|
||||||
|
},
|
||||||
|
"schema": "native-runner-report.v1",
|
||||||
|
"self_test": true,
|
||||||
|
"status": "passed"
|
||||||
|
}
|
||||||
51285
coverage/normalized-sources.jsonl
Normal file
51285
coverage/normalized-sources.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
56
coverage/normalized-sources.report.json
Normal file
56
coverage/normalized-sources.report.json
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"collisions": [
|
||||||
|
{
|
||||||
|
"occurrence": 2,
|
||||||
|
"origin_index": "resource",
|
||||||
|
"origin_source_id": "resource:linuxcnc/configs/sim/axis/ini_hal_demo.ini:93:ini:APPLICATIONS:APP:linuxcnc/configs/sim/axis/sim_pin \\",
|
||||||
|
"source_id": "src:resource:linuxcnc/configs/sim/axis/ini_hal_demo.ini:93:ini:APPLICATIONS:APP:linuxcnc/configs/sim/axis/sim_pin "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"occurrence": 2,
|
||||||
|
"origin_index": "resource",
|
||||||
|
"origin_source_id": "resource:linuxcnc/configs/sim/axis/ldelta_demo.ini:52:ini:APPLICATIONS:APP:linuxcnc/configs/sim/axis/sim_pin >/dev/null \\",
|
||||||
|
"source_id": "src:resource:linuxcnc/configs/sim/axis/ldelta_demo.ini:52:ini:APPLICATIONS:APP:linuxcnc/configs/sim/axis/sim_pin >/dev/null "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"occurrence": 2,
|
||||||
|
"origin_index": "resource",
|
||||||
|
"origin_source_id": "resource:linuxcnc/configs/sim/qtvcp_screens/qtaxis_lathe/qtaxis_lathe.ini:60:ini:HAL:POSTGUI_HALFILE:linuxcnc/configs/sim/qtvcp_screens/qtaxis_lathe/qtvcp_postgui.hal",
|
||||||
|
"source_id": "src:resource:linuxcnc/configs/sim/qtvcp_screens/qtaxis_lathe/qtaxis_lathe.ini:60:ini:HAL:POSTGUI_HALFILE:linuxcnc/configs/sim/qtvcp_screens/qtaxis_lathe/qtvcp_postgui.hal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hash_conflicts": {},
|
||||||
|
"input_summary": {
|
||||||
|
"document": {
|
||||||
|
"path": "coverage/document-capabilities.jsonl",
|
||||||
|
"rows": 2868,
|
||||||
|
"sha256": "fa5140bd4995224406381e4190e76bf81f64bd24dbf93a2fd10421c45aee4316"
|
||||||
|
},
|
||||||
|
"resource": {
|
||||||
|
"path": "coverage/config-resources.jsonl",
|
||||||
|
"rows": 16093,
|
||||||
|
"sha256": "d4d02cb13f2f9cb58404630d4de8ac0226e02075166fe30f2b03a6abca4be5bc"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"path": "coverage/source-index.jsonl",
|
||||||
|
"rows": 8020,
|
||||||
|
"sha256": "843e35bb7b4c086453c4d370bbd2d1f20445b13a1a56f7273d4eb13079bae41d"
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"path": "coverage/source-symbols.jsonl",
|
||||||
|
"rows": 23983,
|
||||||
|
"sha256": "5fc72e6a268d2220b6335f7f6834c925f13c5c35461fa399a400e6621958875a"
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"path": "coverage/test-entries.jsonl",
|
||||||
|
"rows": 321,
|
||||||
|
"sha256": "86449838257a7aab7c9219e641a14d4493208b35d8c0cc092d1fa149352c7c37"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"missing_paths": [],
|
||||||
|
"orphan_related_ids": 8126,
|
||||||
|
"output_sha256": "ae800441cafb54bd7fbba872bf3b4af361041a14b9dee20fdc210204a433aff8",
|
||||||
|
"records": 51285,
|
||||||
|
"schema": "normalized-sources-report.v1",
|
||||||
|
"unique_source_ids": 51285
|
||||||
|
}
|
||||||
10
coverage/posemath-runtime.report.json
Normal file
10
coverage/posemath-runtime.report.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"schema": "posemath-runtime-report.v1",
|
||||||
|
"status": "passed",
|
||||||
|
"implementation": "linuxcnc/src/libnml/posemath",
|
||||||
|
"linked_sources": ["_posemath.c", "gomath.c", "sincos.c", "posemath.cc"],
|
||||||
|
"adapter_operations": ["normalize", "dot", "line_point", "is_finite"],
|
||||||
|
"error_boundaries": ["nonfinite", "degenerate", "range"],
|
||||||
|
"native_and_wasm": true,
|
||||||
|
"golden_tolerance": "exact_for_adapter_inputs"
|
||||||
|
}
|
||||||
23
coverage/python-runtime.report.json
Normal file
23
coverage/python-runtime.report.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"schema": "python-runtime-report.v1",
|
||||||
|
"status": "passed",
|
||||||
|
"runtime": "Pyodide",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"manifest_sha256": "sha256:1740e0f87d7b4e82954c51643c916afd7ce9ddcfd808e5d6b170cb2283689acf",
|
||||||
|
"artifacts": [
|
||||||
|
{
|
||||||
|
"name": "pyodide-lock.json",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"bytes": 122027,
|
||||||
|
"sha256": "14d2c2dba101277999e17135e653d8f15389ad1437f53eae213bf0c3cdff723d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pyodide.js",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"bytes": 18597,
|
||||||
|
"sha256": "7be9e63eddf6bd8786a5ab71c8689c35731d187e3415fe58d7cb95423b50421a"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"virtual_modules": 4,
|
||||||
|
"denied_capabilities": 12
|
||||||
|
}
|
||||||
8
coverage/runtime-mapping.report.json
Normal file
8
coverage/runtime-mapping.report.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"schema": "runtime-mapping-report.v1",
|
||||||
|
"status": "passed",
|
||||||
|
"mapped_error_codes": 18,
|
||||||
|
"commands": 10,
|
||||||
|
"limits": 6,
|
||||||
|
"real_exclusions": 3
|
||||||
|
}
|
||||||
8020
coverage/source-index.jsonl
Normal file
8020
coverage/source-index.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
23983
coverage/source-symbols.jsonl
Normal file
23983
coverage/source-symbols.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
5759
coverage/source-symbols.report.json
Normal file
5759
coverage/source-symbols.report.json
Normal file
File diff suppressed because it is too large
Load Diff
321
coverage/test-entries.jsonl
Normal file
321
coverage/test-entries.jsonl
Normal file
@@ -0,0 +1,321 @@
|
|||||||
|
{"command":"meson test -C build-native --suite unit_tests","config_refs":[],"expected":[],"inputs":["linuxcnc/.gitattributes","linuxcnc/.gitignore","linuxcnc/COPYING","linuxcnc/COPYING.more","linuxcnc/ISSUE_TEMPLATE.md","linuxcnc/README.md","linuxcnc/TODO","linuxcnc/VERSION","linuxcnc/linuxcnc-wizard.gif","linuxcnc/linuxcnc.gif","linuxcnc/linuxcnc.xcf","linuxcnc/linuxcncicon.png","linuxcnc/meson.build"],"meson_targets":["test_interp"],"parse_status":"parsed","path":"linuxcnc/meson.build","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"20d7572868f63f0fb4875fcea212ae95e93e9e1c758c779388323cf327c87c11","test_kind":"unit_test_build","test_source_id":"test:linuxcnc/meson.build"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/feed-rate/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/abort/feed-rate/.gitignore","linuxcnc/tests/abort/feed-rate/README","linuxcnc/tests/abort/feed-rate/core_sim.hal","linuxcnc/tests/abort/feed-rate/test-ui.py","linuxcnc/tests/abort/feed-rate/test.ini","linuxcnc/tests/abort/feed-rate/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/abort/feed-rate/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/abort/feed-rate/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/feed-rate/test.sh","config_refs":["linuxcnc/tests/abort/feed-rate/sim.var","linuxcnc/tests/abort/feed-rate/test.ini"],"expected":[],"inputs":["linuxcnc/tests/abort/feed-rate/.gitignore","linuxcnc/tests/abort/feed-rate/README","linuxcnc/tests/abort/feed-rate/checkresult","linuxcnc/tests/abort/feed-rate/core_sim.hal","linuxcnc/tests/abort/feed-rate/test-ui.py","linuxcnc/tests/abort/feed-rate/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/abort/feed-rate/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c7904d36dcd3842ae2153fb00517f20aec6c71d77d2e6c97148ae391c1295fdd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/abort/feed-rate/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/g64/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/abort/g64/.gitignore","linuxcnc/tests/abort/g64/README","linuxcnc/tests/abort/g64/motion-test.hal","linuxcnc/tests/abort/g64/test-ui.py","linuxcnc/tests/abort/g64/test.ini","linuxcnc/tests/abort/g64/test.ngc","linuxcnc/tests/abort/g64/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/abort/g64/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/abort/g64/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/g64/test.sh","config_refs":["linuxcnc/tests/abort/g64/test.ini"],"expected":[],"inputs":["linuxcnc/tests/abort/g64/.gitignore","linuxcnc/tests/abort/g64/README","linuxcnc/tests/abort/g64/checkresult","linuxcnc/tests/abort/g64/motion-test.hal","linuxcnc/tests/abort/g64/test-ui.py","linuxcnc/tests/abort/g64/test.ini","linuxcnc/tests/abort/g64/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/abort/g64/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"35c1ed150bf5b3e40a8d20aa0ae5ad59eac54ea686561e1dbbab66f9248b94bc","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/abort/g64/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/on_abort_command-crazy-move/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/abort/on_abort_command-crazy-move/.gitignore","linuxcnc/tests/abort/on_abort_command-crazy-move/3D_Chips.ngc","linuxcnc/tests/abort/on_abort_command-crazy-move/README.md","linuxcnc/tests/abort/on_abort_command-crazy-move/mock-motion.hal","linuxcnc/tests/abort/on_abort_command-crazy-move/postgui.hal","linuxcnc/tests/abort/on_abort_command-crazy-move/simpockets.tbl","linuxcnc/tests/abort/on_abort_command-crazy-move/test-ui.py","linuxcnc/tests/abort/on_abort_command-crazy-move/test.ini","linuxcnc/tests/abort/on_abort_command-crazy-move/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/abort/on_abort_command-crazy-move/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0720f6d0753e64de4e4822560c012a83dd466508de8bf6a10a40a0e3d549e518","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/abort/on_abort_command-crazy-move/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/on_abort_command-crazy-move/test.sh","config_refs":["linuxcnc/tests/abort/on_abort_command-crazy-move/test.ini"],"expected":[],"inputs":["linuxcnc/tests/abort/on_abort_command-crazy-move/.gitignore","linuxcnc/tests/abort/on_abort_command-crazy-move/3D_Chips.ngc","linuxcnc/tests/abort/on_abort_command-crazy-move/README.md","linuxcnc/tests/abort/on_abort_command-crazy-move/checkresult","linuxcnc/tests/abort/on_abort_command-crazy-move/mock-motion.hal","linuxcnc/tests/abort/on_abort_command-crazy-move/postgui.hal","linuxcnc/tests/abort/on_abort_command-crazy-move/simpockets.tbl","linuxcnc/tests/abort/on_abort_command-crazy-move/test-ui.py","linuxcnc/tests/abort/on_abort_command-crazy-move/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/abort/on_abort_command-crazy-move/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"72d568b401b401377edeaf30db76c636e75b58eeff02ac7899768e024a97d531","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/abort/on_abort_command-crazy-move/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/stop-button-crazy-move/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/abort/stop-button-crazy-move/.gitignore","linuxcnc/tests/abort/stop-button-crazy-move/3D_Chips.ngc","linuxcnc/tests/abort/stop-button-crazy-move/README.md","linuxcnc/tests/abort/stop-button-crazy-move/mock-motion.hal","linuxcnc/tests/abort/stop-button-crazy-move/postgui.hal","linuxcnc/tests/abort/stop-button-crazy-move/simpockets.tbl","linuxcnc/tests/abort/stop-button-crazy-move/test-ui.py","linuxcnc/tests/abort/stop-button-crazy-move/test.ini","linuxcnc/tests/abort/stop-button-crazy-move/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/abort/stop-button-crazy-move/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0720f6d0753e64de4e4822560c012a83dd466508de8bf6a10a40a0e3d549e518","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/abort/stop-button-crazy-move/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/abort/stop-button-crazy-move/test.sh","config_refs":["linuxcnc/tests/abort/stop-button-crazy-move/test.ini"],"expected":[],"inputs":["linuxcnc/tests/abort/stop-button-crazy-move/.gitignore","linuxcnc/tests/abort/stop-button-crazy-move/3D_Chips.ngc","linuxcnc/tests/abort/stop-button-crazy-move/README.md","linuxcnc/tests/abort/stop-button-crazy-move/checkresult","linuxcnc/tests/abort/stop-button-crazy-move/mock-motion.hal","linuxcnc/tests/abort/stop-button-crazy-move/postgui.hal","linuxcnc/tests/abort/stop-button-crazy-move/simpockets.tbl","linuxcnc/tests/abort/stop-button-crazy-move/test-ui.py","linuxcnc/tests/abort/stop-button-crazy-move/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/abort/stop-button-crazy-move/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"72d568b401b401377edeaf30db76c636e75b58eeff02ac7899768e024a97d531","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/abort/stop-button-crazy-move/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/abs.0/runstreamer","config_refs":[],"expected":["linuxcnc/tests/abs.0/expected"],"inputs":["linuxcnc/tests/abs.0/expected","linuxcnc/tests/abs.0/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/abs.0/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"151e0fbeed24d027bcaa1c0f3b184428c91d46be019531ce73d8c26349c577df","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/abs.0/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/and-or-not-mux.0/runstreamer","config_refs":[],"expected":["linuxcnc/tests/and-or-not-mux.0/expected"],"inputs":["linuxcnc/tests/and-or-not-mux.0/README","linuxcnc/tests/and-or-not-mux.0/expected","linuxcnc/tests/and-or-not-mux.0/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/and-or-not-mux.0/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0e2912dfab08f1c5964caef946780639fd2a45933a3f29d473216189cbddef18","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/and-or-not-mux.0/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/biquad/runstreamer","config_refs":[],"expected":["linuxcnc/tests/biquad/expected"],"inputs":["linuxcnc/tests/biquad/expected","linuxcnc/tests/biquad/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/biquad/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"6c4a21b8ab8d78527f2da75f7b1d0ad6dcf032af7f97b26efcea0e7ae729eee5","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/biquad/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/build/header-sanity/test.sh","config_refs":[],"expected":["linuxcnc/tests/build/header-sanity/expected"],"inputs":["linuxcnc/tests/build/header-sanity/expected"],"parse_status":"parsed","path":"linuxcnc/tests/build/header-sanity/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"40764d0b1ddcd523150d727ee521b1009d2e4e48eaeee7322bc2e833a1d7e453","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/build/header-sanity/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/build/ui/test.sh","config_refs":[],"expected":["linuxcnc/tests/build/ui/expected"],"inputs":["linuxcnc/tests/build/ui/expected","linuxcnc/tests/build/ui/nml-position-logger.cc"],"parse_status":"parsed","path":"linuxcnc/tests/build/ui/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"f1d111c0b5ebeae05fbfa182c2de4f9c7301df2a987d1cb2601c9b4323bea327","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/build/ui/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/ccomp/early-exit/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/ccomp/early-exit/.gitignore","linuxcnc/tests/ccomp/early-exit/README","linuxcnc/tests/ccomp/early-exit/core_sim.hal","linuxcnc/tests/ccomp/early-exit/test-ui.py","linuxcnc/tests/ccomp/early-exit/test.ini","linuxcnc/tests/ccomp/early-exit/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/ccomp/early-exit/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/ccomp/early-exit/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/ccomp/early-exit/test.sh","config_refs":["linuxcnc/tests/ccomp/early-exit/sim.var","linuxcnc/tests/ccomp/early-exit/test.ini"],"expected":[],"inputs":["linuxcnc/tests/ccomp/early-exit/.gitignore","linuxcnc/tests/ccomp/early-exit/README","linuxcnc/tests/ccomp/early-exit/checkresult","linuxcnc/tests/ccomp/early-exit/core_sim.hal","linuxcnc/tests/ccomp/early-exit/test-ui.py","linuxcnc/tests/ccomp/early-exit/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/ccomp/early-exit/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c7904d36dcd3842ae2153fb00517f20aec6c71d77d2e6c97148ae391c1295fdd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/ccomp/early-exit/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/ccomp/lathe-comp/test.sh","config_refs":["linuxcnc/tests/ccomp/lathe-comp/test.ngc","linuxcnc/tests/ccomp/lathe-comp/test.tbl"],"expected":["linuxcnc/tests/ccomp/lathe-comp/expected"],"inputs":["linuxcnc/tests/ccomp/lathe-comp/expected","linuxcnc/tests/ccomp/lathe-comp/test.ngc","linuxcnc/tests/ccomp/lathe-comp/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/ccomp/lathe-comp/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c4cdf48c29a804fca52ee48af05551f523ee7ab775a5e4f6f8f9f1e26f691ed7","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/ccomp/lathe-comp/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/ccomp/mill-g90g91g92/test.sh","config_refs":["linuxcnc/tests/ccomp/mill-g90g91g92/test.ngc","linuxcnc/tests/ccomp/mill-g90g91g92/test.tbl"],"expected":["linuxcnc/tests/ccomp/mill-g90g91g92/expected"],"inputs":["linuxcnc/tests/ccomp/mill-g90g91g92/expected","linuxcnc/tests/ccomp/mill-g90g91g92/test.ngc","linuxcnc/tests/ccomp/mill-g90g91g92/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/ccomp/mill-g90g91g92/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c4cdf48c29a804fca52ee48af05551f523ee7ab775a5e4f6f8f9f1e26f691ed7","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/ccomp/mill-g90g91g92/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/ccomp/mill-line-arc-entry/test.sh","config_refs":["linuxcnc/tests/ccomp/mill-line-arc-entry/test.ngc","linuxcnc/tests/ccomp/mill-line-arc-entry/test.tbl"],"expected":["linuxcnc/tests/ccomp/mill-line-arc-entry/expected"],"inputs":["linuxcnc/tests/ccomp/mill-line-arc-entry/expected","linuxcnc/tests/ccomp/mill-line-arc-entry/test.ngc","linuxcnc/tests/ccomp/mill-line-arc-entry/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/ccomp/mill-line-arc-entry/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c4cdf48c29a804fca52ee48af05551f523ee7ab775a5e4f6f8f9f1e26f691ed7","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/ccomp/mill-line-arc-entry/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/ccomp/mill-zchanges/test.sh","config_refs":["linuxcnc/tests/ccomp/mill-zchanges/test.ngc","linuxcnc/tests/ccomp/mill-zchanges/test.tbl"],"expected":["linuxcnc/tests/ccomp/mill-zchanges/expected"],"inputs":["linuxcnc/tests/ccomp/mill-zchanges/expected","linuxcnc/tests/ccomp/mill-zchanges/test.ngc","linuxcnc/tests/ccomp/mill-zchanges/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/ccomp/mill-zchanges/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c4cdf48c29a804fca52ee48af05551f523ee7ab775a5e4f6f8f9f1e26f691ed7","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/ccomp/mill-zchanges/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/classicladder/estop/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/classicladder/estop/classicladder-estop-ui.py","linuxcnc/tests/classicladder/estop/classicladder-estop.clp","linuxcnc/tests/classicladder/estop/classicladder-estop.hal","linuxcnc/tests/classicladder/estop/classicladder-estop.ini","linuxcnc/tests/classicladder/estop/skip","linuxcnc/tests/classicladder/estop/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/classicladder/estop/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"583883dc785e6aab0f1313cfc20ed86e9c362082b5c47514264abbbbf973c80e","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/classicladder/estop/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/classicladder/estop/test.sh","config_refs":["linuxcnc/tests/classicladder/estop/$0)/classicladder-estop.ini"],"expected":[],"inputs":["linuxcnc/tests/classicladder/estop/checkresult","linuxcnc/tests/classicladder/estop/classicladder-estop-ui.py","linuxcnc/tests/classicladder/estop/classicladder-estop.clp","linuxcnc/tests/classicladder/estop/classicladder-estop.hal","linuxcnc/tests/classicladder/estop/classicladder-estop.ini","linuxcnc/tests/classicladder/estop/skip"],"parse_status":"parsed","path":"linuxcnc/tests/classicladder/estop/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c84df79ae64ca9d8c5e5604699d47303874e76c4b0a484379ae7249bf83e754c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/classicladder/estop/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/edge/both-starting-high/runstreamer","config_refs":[],"expected":["linuxcnc/tests/edge/both-starting-high/expected"],"inputs":["linuxcnc/tests/edge/both-starting-high/expected","linuxcnc/tests/edge/both-starting-high/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/edge/both-starting-high/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"32af5fe16d496abf3eb4556dabaeed2ae75d0b02037b6fa0c1ea0ffa2ac5753d","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/edge/both-starting-high/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/edge/both/runstreamer","config_refs":[],"expected":["linuxcnc/tests/edge/both/expected"],"inputs":["linuxcnc/tests/edge/both/expected","linuxcnc/tests/edge/both/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/edge/both/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9050862c504258ae9e9efbda915f85328fad0eafb6e8d091ea72719842ea42f9","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/edge/both/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/edge/falling-starting-high/runstreamer","config_refs":[],"expected":["linuxcnc/tests/edge/falling-starting-high/expected"],"inputs":["linuxcnc/tests/edge/falling-starting-high/expected","linuxcnc/tests/edge/falling-starting-high/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/edge/falling-starting-high/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"32af5fe16d496abf3eb4556dabaeed2ae75d0b02037b6fa0c1ea0ffa2ac5753d","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/edge/falling-starting-high/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/edge/falling/runstreamer","config_refs":[],"expected":["linuxcnc/tests/edge/falling/expected"],"inputs":["linuxcnc/tests/edge/falling/expected","linuxcnc/tests/edge/falling/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/edge/falling/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9050862c504258ae9e9efbda915f85328fad0eafb6e8d091ea72719842ea42f9","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/edge/falling/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/edge/rising-starting-high/runstreamer","config_refs":[],"expected":["linuxcnc/tests/edge/rising-starting-high/expected"],"inputs":["linuxcnc/tests/edge/rising-starting-high/expected","linuxcnc/tests/edge/rising-starting-high/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/edge/rising-starting-high/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"155f95b322419a8af76f6fd6603e046ab86a3f9a2157f038534c2e2f9706eca0","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/edge/rising-starting-high/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/edge/rising/runstreamer","config_refs":[],"expected":["linuxcnc/tests/edge/rising/expected"],"inputs":["linuxcnc/tests/edge/rising/expected","linuxcnc/tests/edge/rising/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/edge/rising/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"af124719c1a9d1065c2b1c6fcb24cd3565d8875e9d91cbcdeac189cf1081370d","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/edge/rising/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/flipflop.0/runstreamer","config_refs":[],"expected":["linuxcnc/tests/flipflop.0/expected"],"inputs":["linuxcnc/tests/flipflop.0/expected","linuxcnc/tests/flipflop.0/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/flipflop.0/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"1a0158f4a0fcde432f2e769edb804ba90bf97fc5b704852217e194d6a43a3dfc","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/flipflop.0/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/hal-link-unlink/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/hal-link-unlink/hallink.py","linuxcnc/tests/hal-link-unlink/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/hal-link-unlink/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/hal-link-unlink/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/hal-link-unlink/test.sh","config_refs":["linuxcnc/tests/hal-link-unlink/hallink.py"],"expected":[],"inputs":["linuxcnc/tests/hal-link-unlink/checkresult","linuxcnc/tests/hal-link-unlink/hallink.py"],"parse_status":"parsed","path":"linuxcnc/tests/hal-link-unlink/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"e0246a53348b5359b34962acb2d5cd62b37f188823880a38d20e9d009df247a6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/hal-link-unlink/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/command_line_flags/test.sh","config_refs":[],"expected":["linuxcnc/tests/halcompile/command_line_flags/expected"],"inputs":["linuxcnc/tests/halcompile/command_line_flags/expected","linuxcnc/tests/halcompile/command_line_flags/flags.c"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/command_line_flags/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"1574aea72f900f71775c1671a1ef0e764fe6ac0543820c1cb4300e98a530dbad","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/command_line_flags/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/extralib/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/extralib/.gitignore","linuxcnc/tests/halcompile/extralib/extralib_test.comp","linuxcnc/tests/halcompile/extralib/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/extralib/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"ea0f5f6bbd74ad48400953d9bd671d42c203b7b0911556e44f455c483c4e0113","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/extralib/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/extralib/test.sh","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/extralib/.gitignore","linuxcnc/tests/halcompile/extralib/checkresult","linuxcnc/tests/halcompile/extralib/extralib_test.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/extralib/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"54de985ad5b01ce320842d6f3467908ee331797f2ee59d42e8a28f77b40eab62","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/extralib/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/names/test.sh","config_refs":[],"expected":["linuxcnc/tests/halcompile/names/expected"],"inputs":["linuxcnc/tests/halcompile/names/.gitignore","linuxcnc/tests/halcompile/names/expected","linuxcnc/tests/halcompile/names/names_dont_match.comp","linuxcnc/tests/halcompile/names/names_match.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/names/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9e51df39c0f19ed7bdb71deea9e2bba84bbb9550d07670bd799c209c45f8aab2","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/personalities_mod/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/personalities_mod/.gitignore","linuxcnc/tests/halcompile/personalities_mod/4count_2pers.expected","linuxcnc/tests/halcompile/personalities_mod/4count_2pers.hal","linuxcnc/tests/halcompile/personalities_mod/4names_2pers.expected","linuxcnc/tests/halcompile/personalities_mod/4names_2pers.hal","linuxcnc/tests/halcompile/personalities_mod/README","linuxcnc/tests/halcompile/personalities_mod/bitslice_test.comp","linuxcnc/tests/halcompile/personalities_mod/control","linuxcnc/tests/halcompile/personalities_mod/lincurve_test.comp","linuxcnc/tests/halcompile/personalities_mod/logic_test.comp","linuxcnc/tests/halcompile/personalities_mod/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/personalities_mod/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"81fd01e5fcd7c5075d6056c47f3af8ee00511c6bcad824f4edb92077d23ae6b2","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/personalities_mod/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/personalities_mod/test.sh","config_refs":["linuxcnc/tests/halcompile/personalities_mod/*.hal"],"expected":[],"inputs":["linuxcnc/tests/halcompile/personalities_mod/.gitignore","linuxcnc/tests/halcompile/personalities_mod/4count_2pers.expected","linuxcnc/tests/halcompile/personalities_mod/4count_2pers.hal","linuxcnc/tests/halcompile/personalities_mod/4names_2pers.expected","linuxcnc/tests/halcompile/personalities_mod/4names_2pers.hal","linuxcnc/tests/halcompile/personalities_mod/README","linuxcnc/tests/halcompile/personalities_mod/bitslice_test.comp","linuxcnc/tests/halcompile/personalities_mod/checkresult","linuxcnc/tests/halcompile/personalities_mod/control","linuxcnc/tests/halcompile/personalities_mod/lincurve_test.comp","linuxcnc/tests/halcompile/personalities_mod/logic_test.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/personalities_mod/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"125b9363df7722f159b62e4551462381cde9e65259f7b5e8360372b497fa23af","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/personalities_mod/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/relative-header-user/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/relative-header-user/.gitignore","linuxcnc/tests/halcompile/relative-header-user/control","linuxcnc/tests/halcompile/relative-header-user/local.h","linuxcnc/tests/halcompile/relative-header-user/relative_header.comp","linuxcnc/tests/halcompile/relative-header-user/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/relative-header-user/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"4adf25615cb05a3b7fbc4a6e995b083ae9975e38a674a87dbeccd5b8e415c6e3","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/relative-header-user/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/relative-header-user/test.sh","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/relative-header-user/.gitignore","linuxcnc/tests/halcompile/relative-header-user/checkresult","linuxcnc/tests/halcompile/relative-header-user/control","linuxcnc/tests/halcompile/relative-header-user/local.h","linuxcnc/tests/halcompile/relative-header-user/relative_header.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/relative-header-user/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"3e042361c89e3a595ffdc4d336fbaa3fcc781d5f3f7a1ff6f6c98b85dfbdefcc","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/relative-header-user/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/relative-header/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/relative-header/.gitignore","linuxcnc/tests/halcompile/relative-header/local.h","linuxcnc/tests/halcompile/relative-header/relative_header.comp","linuxcnc/tests/halcompile/relative-header/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/relative-header/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"943f82a615ec0a69017f39c789cb3310ea2dee034bfe780ba69445b39dd436d0","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/relative-header/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/relative-header/test.sh","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/relative-header/.gitignore","linuxcnc/tests/halcompile/relative-header/checkresult","linuxcnc/tests/halcompile/relative-header/local.h","linuxcnc/tests/halcompile/relative-header/relative_header.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/relative-header/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"11b0cc0404485fd9687a25a005f7e3c307b3a51c61e8ef46050137046e7013c9","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/relative-header/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/serial-out-of-tree/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/serial-out-of-tree/.gitignore","linuxcnc/tests/halcompile/serial-out-of-tree/mesa_uart_test.comp","linuxcnc/tests/halcompile/serial-out-of-tree/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/serial-out-of-tree/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"e9e8255fe47a2fda2687078affaa77dc5263d105477e9215f2af2b302955f0f5","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/serial-out-of-tree/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/serial-out-of-tree/test.sh","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/serial-out-of-tree/.gitignore","linuxcnc/tests/halcompile/serial-out-of-tree/checkresult","linuxcnc/tests/halcompile/serial-out-of-tree/mesa_uart_test.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/serial-out-of-tree/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"00d6553a8508b35cd63738f7d48bb100651d2f82536f7573af2e4a62e496b636","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/serial-out-of-tree/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/userspace-count-names/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/userspace-count-names/.gitignore","linuxcnc/tests/halcompile/userspace-count-names/both.expected","linuxcnc/tests/halcompile/userspace-count-names/both.hal","linuxcnc/tests/halcompile/userspace-count-names/count-and-extra-args.expected","linuxcnc/tests/halcompile/userspace-count-names/count-and-extra-args.hal","linuxcnc/tests/halcompile/userspace-count-names/count=3.expected","linuxcnc/tests/halcompile/userspace-count-names/count=3.hal","linuxcnc/tests/halcompile/userspace-count-names/names-and-extra-args.expected","linuxcnc/tests/halcompile/userspace-count-names/names-and-extra-args.hal","linuxcnc/tests/halcompile/userspace-count-names/names.expected","linuxcnc/tests/halcompile/userspace-count-names/names.hal","linuxcnc/tests/halcompile/userspace-count-names/no-args.expected","linuxcnc/tests/halcompile/userspace-count-names/no-args.hal","linuxcnc/tests/halcompile/userspace-count-names/test.sh","linuxcnc/tests/halcompile/userspace-count-names/userspace_count_names.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/userspace-count-names/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"39a9312018e559f62ba2816e6c561a56d993a79d89f31e307a4150bbe6401dc3","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/userspace-count-names/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/userspace-count-names/test.sh","config_refs":["linuxcnc/tests/halcompile/userspace-count-names/*.hal"],"expected":[],"inputs":["linuxcnc/tests/halcompile/userspace-count-names/.gitignore","linuxcnc/tests/halcompile/userspace-count-names/both.expected","linuxcnc/tests/halcompile/userspace-count-names/both.hal","linuxcnc/tests/halcompile/userspace-count-names/checkresult","linuxcnc/tests/halcompile/userspace-count-names/count-and-extra-args.expected","linuxcnc/tests/halcompile/userspace-count-names/count-and-extra-args.hal","linuxcnc/tests/halcompile/userspace-count-names/count=3.expected","linuxcnc/tests/halcompile/userspace-count-names/count=3.hal","linuxcnc/tests/halcompile/userspace-count-names/names-and-extra-args.expected","linuxcnc/tests/halcompile/userspace-count-names/names-and-extra-args.hal","linuxcnc/tests/halcompile/userspace-count-names/names.expected","linuxcnc/tests/halcompile/userspace-count-names/names.hal","linuxcnc/tests/halcompile/userspace-count-names/no-args.expected","linuxcnc/tests/halcompile/userspace-count-names/no-args.hal","linuxcnc/tests/halcompile/userspace-count-names/userspace_count_names.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/userspace-count-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"9efc72e95db53104da939ebd0d24073c23d3911e85ea31030ea9fc97a999d36b","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/userspace-count-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/userspace/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/userspace/.gitignore","linuxcnc/tests/halcompile/userspace/rand_test.comp","linuxcnc/tests/halcompile/userspace/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/userspace/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"59f2b62a4a33e0c6ff685a9c719e5bc8c8307ed53305adc0e4ea36e43c8806f7","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halcompile/userspace/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halcompile/userspace/test.sh","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halcompile/userspace/.gitignore","linuxcnc/tests/halcompile/userspace/checkresult","linuxcnc/tests/halcompile/userspace/rand_test.comp"],"parse_status":"parsed","path":"linuxcnc/tests/halcompile/userspace/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"97bdd3f730f499ba059c7016903d7706344d495c58779312e361c1154d9e464c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halcompile/userspace/test.sh"}
|
||||||
|
{"command":"python3 linuxcnc/tests/halmodule.0/test.py","config_refs":[],"expected":["linuxcnc/tests/halmodule.0/expected"],"inputs":["linuxcnc/tests/halmodule.0/README","linuxcnc/tests/halmodule.0/expected","linuxcnc/tests/halmodule.0/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halmodule.0/test.py","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d7a81d742b8cb99b3dff44bee07f6976a35e5571cc570c458c512af3491ea6b7","test_kind":"python_test","test_source_id":"test:linuxcnc/tests/halmodule.0/test.py"}
|
||||||
|
{"command":"bash linuxcnc/tests/halmodule.0/test.sh","config_refs":["linuxcnc/tests/halmodule.0/test.py"],"expected":["linuxcnc/tests/halmodule.0/expected"],"inputs":["linuxcnc/tests/halmodule.0/README","linuxcnc/tests/halmodule.0/expected","linuxcnc/tests/halmodule.0/test.py"],"parse_status":"parsed","path":"linuxcnc/tests/halmodule.0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"cf56a773e7ef4aaa87bf1befaf3b1d50552ff4f6da846568e331cbeeb7adb564","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halmodule.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halrun-lock/test.sh","config_refs":["linuxcnc/tests/halrun-lock/halrun.hal"],"expected":["linuxcnc/tests/halrun-lock/expected"],"inputs":["linuxcnc/tests/halrun-lock/README","linuxcnc/tests/halrun-lock/expected","linuxcnc/tests/halrun-lock/halrun.hal"],"parse_status":"parsed","path":"linuxcnc/tests/halrun-lock/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"d39cdfe53c7682f83d1ac770bd8db341e6070f7f9b2e6acc7a9ec387841f2d53","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halrun-lock/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halui/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halui/.gitignore","linuxcnc/tests/halui/shared-test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halui/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"71d507e8d3af8b367c949b33e8fefca20c4453c6591a60f3132a6a16a412b553","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halui/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halui/jogging/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halui/jogging/halui.ini","linuxcnc/tests/halui/jogging/postgui.hal","linuxcnc/tests/halui/jogging/test-ui.py","linuxcnc/tests/halui/jogging/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halui/jogging/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"71d507e8d3af8b367c949b33e8fefca20c4453c6591a60f3132a6a16a412b553","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halui/jogging/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halui/jogging/test.sh","config_refs":["linuxcnc/tests/halui/jogging/halui.ini"],"expected":[],"inputs":["linuxcnc/tests/halui/jogging/checkresult","linuxcnc/tests/halui/jogging/halui.ini","linuxcnc/tests/halui/jogging/postgui.hal","linuxcnc/tests/halui/jogging/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/halui/jogging/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"290e2ba7a55c82e624283fe0fffd32fb0adf086fd20141bd2bce2e6fad688c65","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halui/jogging/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/halui/mdi/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/halui/mdi/halui.ini","linuxcnc/tests/halui/mdi/postgui.hal","linuxcnc/tests/halui/mdi/test-ui.py","linuxcnc/tests/halui/mdi/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/halui/mdi/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"71d507e8d3af8b367c949b33e8fefca20c4453c6591a60f3132a6a16a412b553","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/halui/mdi/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/halui/mdi/test.sh","config_refs":["linuxcnc/tests/halui/mdi/halui.ini"],"expected":[],"inputs":["linuxcnc/tests/halui/mdi/checkresult","linuxcnc/tests/halui/mdi/halui.ini","linuxcnc/tests/halui/mdi/postgui.hal","linuxcnc/tests/halui/mdi/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/halui/mdi/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"290e2ba7a55c82e624283fe0fffd32fb0adf086fd20141bd2bce2e6fad688c65","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/halui/mdi/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/hard-limits/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/hard-limits/.gitignore","linuxcnc/tests/hard-limits/README","linuxcnc/tests/hard-limits/hard-limits.hal","linuxcnc/tests/hard-limits/hard-limits.ini","linuxcnc/tests/hard-limits/test-ui.py","linuxcnc/tests/hard-limits/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/hard-limits/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"928f7d32ba9bd32b991ffd9de98a75e824f8523a8cc38f69774065a929e33897","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/hard-limits/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/hard-limits/test.sh","config_refs":["linuxcnc/tests/hard-limits/hard-limits.ini","linuxcnc/tests/hard-limits/rs274ngc.var"],"expected":[],"inputs":["linuxcnc/tests/hard-limits/.gitignore","linuxcnc/tests/hard-limits/README","linuxcnc/tests/hard-limits/checkresult","linuxcnc/tests/hard-limits/hard-limits.hal","linuxcnc/tests/hard-limits/hard-limits.ini","linuxcnc/tests/hard-limits/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/hard-limits/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"bb5ddfad3ddc8437fe82d28ec0a3c0fe83e85b0fb6e7899c7bad2c419f1afed8","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/hard-limits/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/hm2-idrom/test.sh","config_refs":["linuxcnc/tests/hm2-idrom/broken-load-test.hal","linuxcnc/tests/hm2-idrom/check-dmesg.py"],"expected":["linuxcnc/tests/hm2-idrom/expected"],"inputs":["linuxcnc/tests/hm2-idrom/.gitignore","linuxcnc/tests/hm2-idrom/README","linuxcnc/tests/hm2-idrom/broken-load-test.hal","linuxcnc/tests/hm2-idrom/check-dmesg.py","linuxcnc/tests/hm2-idrom/expected"],"parse_status":"parsed","path":"linuxcnc/tests/hm2-idrom/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"765d43ec4fe81625683e9f8b17cf36ad8f7656f26b63b0d4aeb2e0722d058c13","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/hm2-idrom/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/abort-hot-comment/test.sh","config_refs":["linuxcnc/tests/interp/abort-hot-comment/test.ini","linuxcnc/tests/interp/abort-hot-comment/test.ngc"],"expected":["linuxcnc/tests/interp/abort-hot-comment/expected"],"inputs":["linuxcnc/tests/interp/abort-hot-comment/README","linuxcnc/tests/interp/abort-hot-comment/expected","linuxcnc/tests/interp/abort-hot-comment/test.ini","linuxcnc/tests/interp/abort-hot-comment/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/abort-hot-comment/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"749983b80dde71c12f4fea1ce8146d421263d0faa56fde710d1a09907b0f5eb5","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/abort-hot-comment/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/bad/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/interp/bad/README","linuxcnc/tests/interp/bad/README.arc-radius-tolerance","linuxcnc/tests/interp/bad/a-in-canned-cycle.ngc","linuxcnc/tests/interp/bad/a-in-canned-cycle2.ngc","linuxcnc/tests/interp/bad/bad-arc.big.imperial.center-format.ngc","linuxcnc/tests/interp/bad/bad-arc.big.metric.center-format.ngc","linuxcnc/tests/interp/bad/bad-arc.medium.imperial.center-format.ngc","linuxcnc/tests/interp/bad/bad-arc.medium.metric.center-format.ngc","linuxcnc/tests/interp/bad/bad-arc.small.imperial.center-format.ngc","linuxcnc/tests/interp/bad/bad-arc.small.metric.center-format.ngc","linuxcnc/tests/interp/bad/ccomp-arcexit.ngc","linuxcnc/tests/interp/bad/ccomp-gouging.ngc","linuxcnc/tests/interp/bad/exists-1.ngc","linuxcnc/tests/interp/bad/exists-2.ngc","linuxcnc/tests/interp/bad/exists-3.ngc","linuxcnc/tests/interp/bad/exists-4.ngc","linuxcnc/tests/interp/bad/exists-5.ngc","linuxcnc/tests/interp/bad/exists-6.ngc","linuxcnc/tests/interp/bad/exists-7.ngc","linuxcnc/tests/interp/bad/nested.ngc","linuxcnc/tests/interp/bad/no-feed-rate.ngc","linuxcnc/tests/interp/bad/no-ijr.ngc","linuxcnc/tests/interp/bad/probe-no-axes.ngc","linuxcnc/tests/interp/bad/test"],"parse_status":"parsed","path":"linuxcnc/tests/interp/bad/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9ab8fabc8c72bfa0416414631e26bd71b01f9dfae98dcf4656b1e2d78307876a","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/bad/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/cam-nisley/test.sh","config_refs":["linuxcnc/tests/interp/cam-nisley/cam.ngc","linuxcnc/tests/interp/cam-nisley/test.tbl"],"expected":["linuxcnc/tests/interp/cam-nisley/expected"],"inputs":["linuxcnc/tests/interp/cam-nisley/cam.ngc","linuxcnc/tests/interp/cam-nisley/expected","linuxcnc/tests/interp/cam-nisley/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/interp/cam-nisley/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"bc2469597df5fdffd52d81ad90ba092d88fcc2d674f6983526de2ff2220b8650","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/cam-nisley/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/compile/test.sh","config_refs":[],"expected":["linuxcnc/tests/interp/compile/expected"],"inputs":["linuxcnc/tests/interp/compile/.gitignore","linuxcnc/tests/interp/compile/README","linuxcnc/tests/interp/compile/expected","linuxcnc/tests/interp/compile/use-rs274.cc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/compile/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"6eaedec9160729bf5ebeb2e3d911cf0897abe1231c95c5cf75204225d08b9425","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/compile/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/crazy-paths/test.sh","config_refs":["linuxcnc/tests/interp/crazy-paths/test.ngc"],"expected":["linuxcnc/tests/interp/crazy-paths/expected"],"inputs":["linuxcnc/tests/interp/crazy-paths/README","linuxcnc/tests/interp/crazy-paths/expected","linuxcnc/tests/interp/crazy-paths/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/crazy-paths/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/crazy-paths/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/do-while-break/test.sh","config_refs":["linuxcnc/tests/interp/do-while-break/test.ngc"],"expected":["linuxcnc/tests/interp/do-while-break/expected"],"inputs":["linuxcnc/tests/interp/do-while-break/README","linuxcnc/tests/interp/do-while-break/bug.ngc","linuxcnc/tests/interp/do-while-break/expected","linuxcnc/tests/interp/do-while-break/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/do-while-break/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/do-while-break/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/exists/test.sh","config_refs":["linuxcnc/tests/interp/exists/test.ngc"],"expected":["linuxcnc/tests/interp/exists/expected"],"inputs":["linuxcnc/tests/interp/exists/README","linuxcnc/tests/interp/exists/expected","linuxcnc/tests/interp/exists/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/exists/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/exists/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/flowsnake/test.sh","config_refs":["linuxcnc/tests/interp/flowsnake/flowsnake.ngc"],"expected":["linuxcnc/tests/interp/flowsnake/expected"],"inputs":["linuxcnc/tests/interp/flowsnake/README","linuxcnc/tests/interp/flowsnake/expected","linuxcnc/tests/interp/flowsnake/flowsnake.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/flowsnake/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"ce6fe9e92a3bc730af1f89a30c1f00c6018fc988c11038ff4c287679522dad32","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/flowsnake/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/fractional-linenumbers/test.sh","config_refs":["linuxcnc/tests/interp/fractional-linenumbers/test.ngc"],"expected":["linuxcnc/tests/interp/fractional-linenumbers/expected"],"inputs":["linuxcnc/tests/interp/fractional-linenumbers/README","linuxcnc/tests/interp/fractional-linenumbers/expected","linuxcnc/tests/interp/fractional-linenumbers/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/fractional-linenumbers/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/fractional-linenumbers/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g10/g10-l1-l10/test.sh","config_refs":["linuxcnc/tests/interp/g10/g10-l1-l10/test.ngc","linuxcnc/tests/interp/g10/g10-l1-l10/test.tbl"],"expected":["linuxcnc/tests/interp/g10/g10-l1-l10/expected"],"inputs":["linuxcnc/tests/interp/g10/g10-l1-l10/expected","linuxcnc/tests/interp/g10/g10-l1-l10/test.ngc","linuxcnc/tests/interp/g10/g10-l1-l10/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g10/g10-l1-l10/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"54d456c1e9a725bae24d3ec11e6a7ada254b56e9d0f9d2aec577a348b8bf7782","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g10/g10-l1-l10/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g10/g10-l11/test.sh","config_refs":["linuxcnc/tests/interp/g10/g10-l11/test.ngc","linuxcnc/tests/interp/g10/g10-l11/test.tbl"],"expected":["linuxcnc/tests/interp/g10/g10-l11/expected"],"inputs":["linuxcnc/tests/interp/g10/g10-l11/expected","linuxcnc/tests/interp/g10/g10-l11/test.ngc","linuxcnc/tests/interp/g10/g10-l11/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g10/g10-l11/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"54d456c1e9a725bae24d3ec11e6a7ada254b56e9d0f9d2aec577a348b8bf7782","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g10/g10-l11/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g10/g10-l2-while-active/test.sh","config_refs":["linuxcnc/tests/interp/g10/g10-l2-while-active/test.ngc"],"expected":["linuxcnc/tests/interp/g10/g10-l2-while-active/expected"],"inputs":["linuxcnc/tests/interp/g10/g10-l2-while-active/expected","linuxcnc/tests/interp/g10/g10-l2-while-active/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g10/g10-l2-while-active/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g10/g10-l2-while-active/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g10/g10-l20-while-active/test.sh","config_refs":["linuxcnc/tests/interp/g10/g10-l20-while-active/test.ngc"],"expected":["linuxcnc/tests/interp/g10/g10-l20-while-active/expected"],"inputs":["linuxcnc/tests/interp/g10/g10-l20-while-active/expected","linuxcnc/tests/interp/g10/g10-l20-while-active/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g10/g10-l20-while-active/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"bff38e1ad4022743cf27419ccb5c8916287facb20640ad6994e38e9181e1921b","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g10/g10-l20-while-active/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g10/g10-with-g92/test.sh","config_refs":["linuxcnc/tests/interp/g10/g10-with-g92/test.ngc","linuxcnc/tests/interp/g10/g10-with-g92/test.tbl"],"expected":["linuxcnc/tests/interp/g10/g10-with-g92/expected"],"inputs":["linuxcnc/tests/interp/g10/g10-with-g92/expected","linuxcnc/tests/interp/g10/g10-with-g92/test.ngc","linuxcnc/tests/interp/g10/g10-with-g92/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g10/g10-with-g92/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"1bc2e21a86174e97e37c6deb82849d7a555c5be238cd0a12fde0ac9818dcdb54","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g10/g10-with-g92/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g33.1/test.sh","config_refs":["linuxcnc/tests/interp/g33.1/g33.1.ngc"],"expected":["linuxcnc/tests/interp/g33.1/expected"],"inputs":["linuxcnc/tests/interp/g33.1/expected","linuxcnc/tests/interp/g33.1/g33.1.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g33.1/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"28ad7d3124475d9249b1867695005afb5126cc5eb3a1c3ca7cf4da4c4954cbdd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g33.1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g52/g52-g92-interaction/test.sh","config_refs":["linuxcnc/tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc"],"expected":["linuxcnc/tests/interp/g52/g52-g92-interaction/expected"],"inputs":["linuxcnc/tests/interp/g52/g52-g92-interaction/expected","linuxcnc/tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g52/g52-g92-interaction/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"1d7ec0d18379b16b21172b8b5012b80fa7120aae74b1d100367662fdf883e25f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g52/g52-g92-interaction/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g52/g92-offset-persistence/test.sh","config_refs":["linuxcnc/tests/interp/g52/g92-offset-persistence/g92_offsets.ngc","linuxcnc/tests/interp/g52/g92-offset-persistence/g92_offsets.var","linuxcnc/tests/interp/g52/g92-offset-persistence/persistent_g92_offset_false.ini","linuxcnc/tests/interp/g52/g92-offset-persistence/persistent_g92_offset_true.ini"],"expected":["linuxcnc/tests/interp/g52/g92-offset-persistence/expected"],"inputs":["linuxcnc/tests/interp/g52/g92-offset-persistence/expected","linuxcnc/tests/interp/g52/g92-offset-persistence/g92_offsets.ngc","linuxcnc/tests/interp/g52/g92-offset-persistence/g92_offsets.var.template","linuxcnc/tests/interp/g52/g92-offset-persistence/persistent_g92_offset_false.ini","linuxcnc/tests/interp/g52/g92-offset-persistence/persistent_g92_offset_true.ini"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g52/g92-offset-persistence/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"fe2413bc9561aae2581479fc361c20de8820698ba4ec2328963349b2596aeb3f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g52/g92-offset-persistence/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g6164/test.sh","config_refs":["linuxcnc/tests/interp/g6164/test.ngc"],"expected":["linuxcnc/tests/interp/g6164/expected"],"inputs":["linuxcnc/tests/interp/g6164/expected","linuxcnc/tests/interp/g6164/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g6164/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g6164/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g71-endless-loop/test.sh","config_refs":["linuxcnc/tests/interp/g71-endless-loop/g71-endless-loop.ngc"],"expected":["linuxcnc/tests/interp/g71-endless-loop/expected"],"inputs":["linuxcnc/tests/interp/g71-endless-loop/expected","linuxcnc/tests/interp/g71-endless-loop/g71-endless-loop.ngc","linuxcnc/tests/interp/g71-endless-loop/skip","linuxcnc/tests/interp/g71-endless-loop/xfail"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g71-endless-loop/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"f5fe1f5b7d374808d3cb4ec9c6b6ec4ac754847281cebc9623fa46effa798da6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g71-endless-loop/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g76/test.sh","config_refs":["linuxcnc/tests/interp/g76/g76only.ngc","linuxcnc/tests/interp/g76/test.tbl"],"expected":["linuxcnc/tests/interp/g76/expected"],"inputs":["linuxcnc/tests/interp/g76/README","linuxcnc/tests/interp/g76/expected","linuxcnc/tests/interp/g76/g76only.ngc","linuxcnc/tests/interp/g76/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g76/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"b79a75b64db0d82dc5fa4b7fb2a655bfdb46e5519415e537271223935244928e","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g76/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g81/g17/g98/test.sh","config_refs":["linuxcnc/tests/interp/g81/g17/g98/g17-g98-g81.ngc"],"expected":["linuxcnc/tests/interp/g81/g17/g98/expected"],"inputs":["linuxcnc/tests/interp/g81/g17/g98/expected","linuxcnc/tests/interp/g81/g17/g98/g17-g98-g81.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g81/g17/g98/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"44d6fd24caabc95e3a53aab87686b9ec71b52d423ad03a417912c0fc3e7f33cd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g81/g17/g98/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g81/g17/g99/test.sh","config_refs":["linuxcnc/tests/interp/g81/g17/g99/g17-g99-g81.ngc"],"expected":["linuxcnc/tests/interp/g81/g17/g99/expected"],"inputs":["linuxcnc/tests/interp/g81/g17/g99/expected","linuxcnc/tests/interp/g81/g17/g99/g17-g99-g81.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g81/g17/g99/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7e25cc0fb500decca8e8d36c13598a317ccc12a35245ba71c14d4b984bea5a43","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g81/g17/g99/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g81/g18/g98/test.sh","config_refs":["linuxcnc/tests/interp/g81/g18/g98/g18-g98-g81.ngc"],"expected":["linuxcnc/tests/interp/g81/g18/g98/expected"],"inputs":["linuxcnc/tests/interp/g81/g18/g98/expected","linuxcnc/tests/interp/g81/g18/g98/g18-g98-g81.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g81/g18/g98/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"2413e36e0561057cf296a152562d5a59932464bc32c74fbe712cfaba11e1fc80","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g81/g18/g98/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g81/g18/g99/test.sh","config_refs":["linuxcnc/tests/interp/g81/g18/g99/g18-g99-g81.ngc"],"expected":["linuxcnc/tests/interp/g81/g18/g99/expected"],"inputs":["linuxcnc/tests/interp/g81/g18/g99/expected","linuxcnc/tests/interp/g81/g18/g99/g18-g99-g81.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g81/g18/g99/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7bad29dad116053d7f941e8afcd1b2fed29cc130f6ea8186a4c2459210620a46","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g81/g18/g99/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g81/g19/g98/test.sh","config_refs":["linuxcnc/tests/interp/g81/g19/g98/g19-g98-g81.ngc"],"expected":["linuxcnc/tests/interp/g81/g19/g98/expected"],"inputs":["linuxcnc/tests/interp/g81/g19/g98/expected","linuxcnc/tests/interp/g81/g19/g98/g19-g98-g81.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g81/g19/g98/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"6153a8838dd9632d2fb27ab704abd0e6bf8fcaec4fc4eab6adc77eb223fa1817","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g81/g19/g98/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g81/g19/g99/test.sh","config_refs":["linuxcnc/tests/interp/g81/g19/g99/g19-g99-g81.ngc"],"expected":["linuxcnc/tests/interp/g81/g19/g99/expected"],"inputs":["linuxcnc/tests/interp/g81/g19/g99/expected","linuxcnc/tests/interp/g81/g19/g99/g19-g99-g81.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g81/g19/g99/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d382113fbe0ab118fe03c00dadc5b3b62bcc4f7f61e2de460df9a06ae813c216","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g81/g19/g99/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g84/g17/g98/test.sh","config_refs":["linuxcnc/tests/interp/g84/g17/g98/g17-g98-g84.ngc"],"expected":["linuxcnc/tests/interp/g84/g17/g98/expected"],"inputs":["linuxcnc/tests/interp/g84/g17/g98/expected","linuxcnc/tests/interp/g84/g17/g98/g17-g98-g84.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g84/g17/g98/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d7d42c35f0677354c2c04f87e45843af4fef22111099e5884df1d0fd0be6b72a","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g84/g17/g98/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g84/g17/g99/test.sh","config_refs":["linuxcnc/tests/interp/g84/g17/g99/g17-g99-g84.ngc"],"expected":["linuxcnc/tests/interp/g84/g17/g99/expected"],"inputs":["linuxcnc/tests/interp/g84/g17/g99/expected","linuxcnc/tests/interp/g84/g17/g99/g17-g99-g84.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g84/g17/g99/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"56904d12b65dfebff573c453c41406c7b17ffa4f0239484925df11875ce0ab52","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g84/g17/g99/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g84/g18/g98/test.sh","config_refs":["linuxcnc/tests/interp/g84/g18/g98/g18-g98-g84.ngc"],"expected":["linuxcnc/tests/interp/g84/g18/g98/expected"],"inputs":["linuxcnc/tests/interp/g84/g18/g98/expected","linuxcnc/tests/interp/g84/g18/g98/g18-g98-g84.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g84/g18/g98/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"a8c992142c52470311617ed27815251ae22527e7d9569a65e3115806c7627543","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g84/g18/g98/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g84/g18/g99/test.sh","config_refs":["linuxcnc/tests/interp/g84/g18/g99/g18-g99-g84.ngc"],"expected":["linuxcnc/tests/interp/g84/g18/g99/expected"],"inputs":["linuxcnc/tests/interp/g84/g18/g99/expected","linuxcnc/tests/interp/g84/g18/g99/g18-g99-g84.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g84/g18/g99/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5ef700347989695b12879eb66bd25031c56c645e72f93a44efc3ab44af057136","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g84/g18/g99/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g84/g19/g98/test.sh","config_refs":["linuxcnc/tests/interp/g84/g19/g98/g19-g98-g84.ngc"],"expected":["linuxcnc/tests/interp/g84/g19/g98/expected"],"inputs":["linuxcnc/tests/interp/g84/g19/g98/expected","linuxcnc/tests/interp/g84/g19/g98/g19-g98-g84.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g84/g19/g98/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"b90a5f9497de9405f235087a27381709061d22c915172526fe092e7c73fa2b8d","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g84/g19/g98/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/g84/g19/g99/test.sh","config_refs":["linuxcnc/tests/interp/g84/g19/g99/g19-g99-g84.ngc"],"expected":["linuxcnc/tests/interp/g84/g19/g99/expected"],"inputs":["linuxcnc/tests/interp/g84/g19/g99/expected","linuxcnc/tests/interp/g84/g19/g99/g19-g99-g84.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/g84/g19/g99/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"519080e86e3a2a29a8d5c198e7c5ae051426009f024f1802bf7fcfe6854200fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/g84/g19/g99/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/good/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/interp/good/.gitignore","linuxcnc/tests/interp/good/README","linuxcnc/tests/interp/good/good-arc.big.imperial.center-format.ngc","linuxcnc/tests/interp/good/good-arc.big.imperial.center-format.ngc.expected","linuxcnc/tests/interp/good/good-arc.big.metric.center-format.ngc","linuxcnc/tests/interp/good/good-arc.big.metric.center-format.ngc.expected","linuxcnc/tests/interp/good/good-arc.medium.imperial.center-format.ngc","linuxcnc/tests/interp/good/good-arc.medium.imperial.center-format.ngc.expected","linuxcnc/tests/interp/good/good-arc.medium.metric.center-format.ngc","linuxcnc/tests/interp/good/good-arc.medium.metric.center-format.ngc.expected","linuxcnc/tests/interp/good/good-arc.small.imperial.center-format.ngc","linuxcnc/tests/interp/good/good-arc.small.imperial.center-format.ngc.expected","linuxcnc/tests/interp/good/good-arc.small.metric.center-format.ngc","linuxcnc/tests/interp/good/good-arc.small.metric.center-format.ngc.expected","linuxcnc/tests/interp/good/test"],"parse_status":"parsed","path":"linuxcnc/tests/interp/good/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9ab8fabc8c72bfa0416414631e26bd71b01f9dfae98dcf4656b1e2d78307876a","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/good/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/iniparam-failassign/test.sh","config_refs":["linuxcnc/tests/interp/iniparam-failassign/test.ini","linuxcnc/tests/interp/iniparam-failassign/test.ngc"],"expected":["linuxcnc/tests/interp/iniparam-failassign/expected"],"inputs":["linuxcnc/tests/interp/iniparam-failassign/README","linuxcnc/tests/interp/iniparam-failassign/expected","linuxcnc/tests/interp/iniparam-failassign/test.ini","linuxcnc/tests/interp/iniparam-failassign/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/iniparam-failassign/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"2d679c926ef1c529a08ef8cc9c68a09dd4f7dd27a5ca09cc57d475dfcd785f9d","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/iniparam-failassign/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/iniparam/test.sh","config_refs":["linuxcnc/tests/interp/iniparam/test.ini","linuxcnc/tests/interp/iniparam/test.ngc"],"expected":["linuxcnc/tests/interp/iniparam/expected"],"inputs":["linuxcnc/tests/interp/iniparam/README","linuxcnc/tests/interp/iniparam/expected","linuxcnc/tests/interp/iniparam/test.ini","linuxcnc/tests/interp/iniparam/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/iniparam/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"4ccc75069dbf3670dc4ee22c5067b8de044fe78610a504004f144e9b7aab6e7f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/iniparam/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/inside-corners/test.sh","config_refs":["linuxcnc/tests/interp/inside-corners/test.ngc"],"expected":["linuxcnc/tests/interp/inside-corners/expected"],"inputs":["linuxcnc/tests/interp/inside-corners/README","linuxcnc/tests/interp/inside-corners/expected","linuxcnc/tests/interp/inside-corners/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/inside-corners/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/inside-corners/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/inverse-time-with-comp/test.sh","config_refs":["linuxcnc/tests/interp/inverse-time-with-comp/inverse.ngc"],"expected":["linuxcnc/tests/interp/inverse-time-with-comp/expected"],"inputs":["linuxcnc/tests/interp/inverse-time-with-comp/README","linuxcnc/tests/interp/inverse-time-with-comp/expected","linuxcnc/tests/interp/inverse-time-with-comp/inverse.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/inverse-time-with-comp/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"2da5b7c1a3504c476017b7d4d6752b05470dee638179e8bff7e46bbc5cc52630","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/inverse-time-with-comp/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m19/test.sh","config_refs":["linuxcnc/tests/interp/m19/test.ini","linuxcnc/tests/interp/m19/test.ngc"],"expected":["linuxcnc/tests/interp/m19/expected"],"inputs":["linuxcnc/tests/interp/m19/README","linuxcnc/tests/interp/m19/expected","linuxcnc/tests/interp/m19/test.ini","linuxcnc/tests/interp/m19/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m19/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"87e1fedef3a3fee58cc16e01091dab30d0d69fd74e4812d37ee31f64e8d16af6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m19/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/01-basics/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/01-basics/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/01-basics/expected"],"inputs":["linuxcnc/tests/interp/m98m99/01-basics/expected","linuxcnc/tests/interp/m98m99/01-basics/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/01-basics/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/01-basics/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/02-variables/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/02-variables/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/02-variables/expected"],"inputs":["linuxcnc/tests/interp/m98m99/02-variables/expected","linuxcnc/tests/interp/m98m99/02-variables/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/02-variables/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/02-variables/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/expected"],"inputs":["linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/expected","linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"88346262f786c82742ef4a5432de0468f6cf9d7d656aa7651eea882a1c1356a8","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/expected"],"inputs":["linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/expected","linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"dc552dc1a2e2d88207c7a70367d81092d5f590da108472b3b598f5eec3cc2823","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/05-M98-loops/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/05-M98-loops/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/05-M98-loops/expected"],"inputs":["linuxcnc/tests/interp/m98m99/05-M98-loops/expected","linuxcnc/tests/interp/m98m99/05-M98-loops/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/05-M98-loops/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/05-M98-loops/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc"],"expected":["linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/expected"],"inputs":["linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc","linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/expected"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"17702ac5458e9075c252aba8cfe0d2980c4e5a77762257644c86870ac8834541","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/07-nested-subs/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/07-nested-subs/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/07-nested-subs/expected"],"inputs":["linuxcnc/tests/interp/m98m99/07-nested-subs/expected","linuxcnc/tests/interp/m98m99/07-nested-subs/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/07-nested-subs/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/07-nested-subs/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/08-sub-follows-main/expected"],"inputs":["linuxcnc/tests/interp/m98m99/08-sub-follows-main/expected","linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc"],"expected":["linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/expected"],"inputs":["linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/expected","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini","linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7781192f4457278b18b3347a328fd288aab7f65a2cda0bb5874e6abb86f7df06","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/10-M98-P001/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/10-M98-P001/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/10-M98-P001/expected"],"inputs":["linuxcnc/tests/interp/m98m99/10-M98-P001/expected","linuxcnc/tests/interp/m98m99/10-M98-P001/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/10-M98-P001/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/10-M98-P001/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/11-main-program-oword/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-${t}.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-${t}.ngc"],"expected":["linuxcnc/tests/interp/m98m99/11-main-program-oword/expected"],"inputs":["linuxcnc/tests/interp/m98m99/11-main-program-oword/expected","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc","linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/11-main-program-oword/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"8c9aa3bdda48c6ad9ebb83cd27729d0bf2f80ed338faf1e1b324ee47bba67546","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/11-main-program-oword/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/checkresult","config_refs":[],"expected":["linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected.motion-logger"],"inputs":["linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/.gitignore","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected.motion-logger","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/mock-motion.hal","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/motion-logger.ini","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test-ui.py","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.ngc","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.sh","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/xfail"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"177380330f4a079d4e5e5198b43be508ccf9f335f5e3fe114dccb6c2dfc45fe6","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/motion-logger.ini","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected.motion-logger"],"inputs":["linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/.gitignore","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/checkresult","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/expected.motion-logger","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/mock-motion.hal","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/motion-logger.ini","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test-ui.py","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.ngc","linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/xfail"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"8fbdde490eea9db9e34ac9cbd76ae3e9721534cb048b57242f5477edf070adc1","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/12-M99-endless-main-program/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/13-named-program/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/13-named-program/test-named.ngc","linuxcnc/tests/interp/m98m99/13-named-program/test-numbered.ngc"],"expected":["linuxcnc/tests/interp/m98m99/13-named-program/expected"],"inputs":["linuxcnc/tests/interp/m98m99/13-named-program/expected","linuxcnc/tests/interp/m98m99/13-named-program/test-named.ngc","linuxcnc/tests/interp/m98m99/13-named-program/test-numbered.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/13-named-program/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"733517af42d1a70957dd11bd7c78e9d73b26f5e0c85f7e13544766724385146f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/13-named-program/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/m98m99/14-o-expression-call/test.sh","config_refs":["linuxcnc/tests/interp/m98m99/14-o-expression-call/test.ngc"],"expected":["linuxcnc/tests/interp/m98m99/14-o-expression-call/expected"],"inputs":["linuxcnc/tests/interp/m98m99/14-o-expression-call/expected","linuxcnc/tests/interp/m98m99/14-o-expression-call/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/m98m99/14-o-expression-call/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"257c4d324cd7de618da34c90bef487b57756ffd2c880f6745c7934bcd9353df7","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/m98m99/14-o-expression-call/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/magic_comments/param_format_printing/test.sh","config_refs":["linuxcnc/tests/interp/magic_comments/param_format_printing/test.ngc"],"expected":["linuxcnc/tests/interp/magic_comments/param_format_printing/expected"],"inputs":["linuxcnc/tests/interp/magic_comments/param_format_printing/expected","linuxcnc/tests/interp/magic_comments/param_format_printing/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/magic_comments/param_format_printing/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/magic_comments/param_format_printing/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/mdi-oword-m66/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/interp/mdi-oword-m66/.gitignore","linuxcnc/tests/interp/mdi-oword-m66/interp.ini","linuxcnc/tests/interp/mdi-oword-m66/simpockets.tbl","linuxcnc/tests/interp/mdi-oword-m66/test-ui.py","linuxcnc/tests/interp/mdi-oword-m66/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/interp/mdi-oword-m66/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/mdi-oword-m66/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/mdi-oword-m66/test.sh","config_refs":["linuxcnc/tests/interp/mdi-oword-m66/interp.ini"],"expected":[],"inputs":["linuxcnc/tests/interp/mdi-oword-m66/.gitignore","linuxcnc/tests/interp/mdi-oword-m66/checkresult","linuxcnc/tests/interp/mdi-oword-m66/interp.ini","linuxcnc/tests/interp/mdi-oword-m66/simpockets.tbl","linuxcnc/tests/interp/mdi-oword-m66/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/interp/mdi-oword-m66/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0ac5e2ce1d8b4649413f11943cbfcd55296e28c0d407533e88dedbc0776c2b75","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/mdi-oword-m66/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/namedparam-bug424/test.sh","config_refs":["linuxcnc/tests/interp/namedparam-bug424/test.ngc"],"expected":["linuxcnc/tests/interp/namedparam-bug424/expected"],"inputs":["linuxcnc/tests/interp/namedparam-bug424/README","linuxcnc/tests/interp/namedparam-bug424/expected","linuxcnc/tests/interp/namedparam-bug424/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/namedparam-bug424/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/namedparam-bug424/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/oword-bug315-p2/test.sh","config_refs":["linuxcnc/tests/interp/oword-bug315-p2/test.ngc"],"expected":["linuxcnc/tests/interp/oword-bug315-p2/expected"],"inputs":["linuxcnc/tests/interp/oword-bug315-p2/README","linuxcnc/tests/interp/oword-bug315-p2/expected","linuxcnc/tests/interp/oword-bug315-p2/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/oword-bug315-p2/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/oword-bug315-p2/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/oword-bug315/test.sh","config_refs":["linuxcnc/tests/interp/oword-bug315/test.ngc"],"expected":["linuxcnc/tests/interp/oword-bug315/expected"],"inputs":["linuxcnc/tests/interp/oword-bug315/README","linuxcnc/tests/interp/oword-bug315/expected","linuxcnc/tests/interp/oword-bug315/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/oword-bug315/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/oword-bug315/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/oword-mdi-sub-update/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/interp/oword-mdi-sub-update/.gitignore","linuxcnc/tests/interp/oword-mdi-sub-update/README","linuxcnc/tests/interp/oword-mdi-sub-update/edit.sh","linuxcnc/tests/interp/oword-mdi-sub-update/interp.ini","linuxcnc/tests/interp/oword-mdi-sub-update/simpockets.tbl","linuxcnc/tests/interp/oword-mdi-sub-update/test-ui.py","linuxcnc/tests/interp/oword-mdi-sub-update/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/interp/oword-mdi-sub-update/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9bea1356236619704e627d8ac1ded2a502c2887757014794abcb8077ff020ac2","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/oword-mdi-sub-update/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/oword-mdi-sub-update/test.sh","config_refs":["linuxcnc/tests/interp/oword-mdi-sub-update/interp.ini"],"expected":[],"inputs":["linuxcnc/tests/interp/oword-mdi-sub-update/.gitignore","linuxcnc/tests/interp/oword-mdi-sub-update/README","linuxcnc/tests/interp/oword-mdi-sub-update/checkresult","linuxcnc/tests/interp/oword-mdi-sub-update/edit.sh","linuxcnc/tests/interp/oword-mdi-sub-update/interp.ini","linuxcnc/tests/interp/oword-mdi-sub-update/simpockets.tbl","linuxcnc/tests/interp/oword-mdi-sub-update/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/interp/oword-mdi-sub-update/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0ac5e2ce1d8b4649413f11943cbfcd55296e28c0d407533e88dedbc0776c2b75","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/oword-mdi-sub-update/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/oword-unwind/test.sh","config_refs":["linuxcnc/tests/interp/oword-unwind/test.ini","linuxcnc/tests/interp/oword-unwind/test.ngc"],"expected":["linuxcnc/tests/interp/oword-unwind/expected"],"inputs":["linuxcnc/tests/interp/oword-unwind/README","linuxcnc/tests/interp/oword-unwind/expected","linuxcnc/tests/interp/oword-unwind/fail.ngc","linuxcnc/tests/interp/oword-unwind/test.ini","linuxcnc/tests/interp/oword-unwind/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/oword-unwind/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"87e1fedef3a3fee58cc16e01091dab30d0d69fd74e4812d37ee31f64e8d16af6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/oword-unwind/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/plug/absolute/test.sh","config_refs":[],"expected":["linuxcnc/tests/interp/plug/absolute/expected"],"inputs":["linuxcnc/tests/interp/plug/absolute/canon","linuxcnc/tests/interp/plug/absolute/expected"],"parse_status":"parsed","path":"linuxcnc/tests/interp/plug/absolute/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"384517db0ae74556124ad25dbe247376224d1b0b70d5eab81c587378084b0c12","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/plug/absolute/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/plug/filename/test.sh","config_refs":[],"expected":["linuxcnc/tests/interp/plug/filename/expected"],"inputs":["linuxcnc/tests/interp/plug/filename/canon","linuxcnc/tests/interp/plug/filename/expected"],"parse_status":"parsed","path":"linuxcnc/tests/interp/plug/filename/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"2d13f4182f1f13063aa587affe7ab9af914a68f306e117f41973b0dc2e2aabf6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/plug/filename/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/plug/relative/test.sh","config_refs":[],"expected":["linuxcnc/tests/interp/plug/relative/expected"],"inputs":["linuxcnc/tests/interp/plug/relative/canon","linuxcnc/tests/interp/plug/relative/expected"],"parse_status":"parsed","path":"linuxcnc/tests/interp/plug/relative/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"ad773293aaead91284da3c2239f875a85338da4e59eca8cef1481ad03b01f5a3","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/plug/relative/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/pymove/test.sh","config_refs":["linuxcnc/tests/interp/pymove/test.ini","linuxcnc/tests/interp/pymove/test.ngc"],"expected":["linuxcnc/tests/interp/pymove/expected"],"inputs":["linuxcnc/tests/interp/pymove/README","linuxcnc/tests/interp/pymove/expected","linuxcnc/tests/interp/pymove/oword.py","linuxcnc/tests/interp/pymove/subs.py","linuxcnc/tests/interp/pymove/test.ini","linuxcnc/tests/interp/pymove/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/pymove/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"961b4e1d635375db6229e8b9d25d06ea89c3ded9da611fd233ac47525b47c3a2","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/pymove/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/python-self/test.sh","config_refs":["linuxcnc/tests/interp/python-self/test.ini","linuxcnc/tests/interp/python-self/test.ngc"],"expected":["linuxcnc/tests/interp/python-self/expected"],"inputs":["linuxcnc/tests/interp/python-self/README","linuxcnc/tests/interp/python-self/expected","linuxcnc/tests/interp/python-self/oword.py","linuxcnc/tests/interp/python-self/subs.py","linuxcnc/tests/interp/python-self/test.ini","linuxcnc/tests/interp/python-self/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/python-self/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d876552b1a78afaac6cd0c0c2ad3a7f1b70549dc2839d4085aba23c2782ce70f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/python-self/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/python/error/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/interp/python/error/canon.py","linuxcnc/tests/interp/python/error/error.ngc","linuxcnc/tests/interp/python/error/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/interp/python/error/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c8e247a9c32330dbbb0efa7189e8ed4febd6d311bc6858d72b6cf39cc389c985","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/python/error/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/python/error/test.sh","config_refs":["linuxcnc/tests/interp/python/error/error.ngc"],"expected":[],"inputs":["linuxcnc/tests/interp/python/error/canon.py","linuxcnc/tests/interp/python/error/checkresult","linuxcnc/tests/interp/python/error/error.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/python/error/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"b9e41f53da359cc1f4f58f2093db61de8b0be3a46e9c21d64cc6214243eba4aa","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/python/error/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/return-value/test.sh","config_refs":["linuxcnc/tests/interp/return-value/test.ngc"],"expected":["linuxcnc/tests/interp/return-value/expected"],"inputs":["linuxcnc/tests/interp/return-value/expected","linuxcnc/tests/interp/return-value/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/return-value/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/return-value/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/rotation/abs-pts/test.sh","config_refs":["linuxcnc/tests/interp/rotation/abs-pts/test.ngc","linuxcnc/tests/interp/rotation/abs-pts/test.tbl"],"expected":["linuxcnc/tests/interp/rotation/abs-pts/expected"],"inputs":["linuxcnc/tests/interp/rotation/abs-pts/expected","linuxcnc/tests/interp/rotation/abs-pts/test.ngc","linuxcnc/tests/interp/rotation/abs-pts/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/interp/rotation/abs-pts/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9fae0f0e3499fbace0a308804d99fccbd08089fef8ae20ce4651166e7afc8c97","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/rotation/abs-pts/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/rotation/g28/test.sh","config_refs":["linuxcnc/tests/interp/rotation/g28/g28.ngc"],"expected":["linuxcnc/tests/interp/rotation/g28/expected"],"inputs":["linuxcnc/tests/interp/rotation/g28/expected","linuxcnc/tests/interp/rotation/g28/g28.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/rotation/g28/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7c4e14e821165744924bda1bb187d9c08f526dc0f59fdefb8f63fcce925c0ff3","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/rotation/g28/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/rotation/g53/test.sh","config_refs":["linuxcnc/tests/interp/rotation/g53/g53.ngc"],"expected":["linuxcnc/tests/interp/rotation/g53/expected"],"inputs":["linuxcnc/tests/interp/rotation/g53/expected","linuxcnc/tests/interp/rotation/g53/g53.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/rotation/g53/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"8958caf8bcc555d5ea9721cc96eb0c86c6befccd8ff60ccd1e28c19340c6861b","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/rotation/g53/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/sequence-number/test.sh","config_refs":["linuxcnc/tests/interp/sequence-number/test.ini","linuxcnc/tests/interp/sequence-number/test.ngc"],"expected":["linuxcnc/tests/interp/sequence-number/expected"],"inputs":["linuxcnc/tests/interp/sequence-number/README","linuxcnc/tests/interp/sequence-number/expected","linuxcnc/tests/interp/sequence-number/rm400.ngc","linuxcnc/tests/interp/sequence-number/test.ini","linuxcnc/tests/interp/sequence-number/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/sequence-number/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"535038cbdd815beb8a8fdf3878a4a2246039b19975791e4e8fa6a5a8103aaf34","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/sequence-number/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/subroutine-return/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/interp/subroutine-return/.gitignore","linuxcnc/tests/interp/subroutine-return/interp.ini","linuxcnc/tests/interp/subroutine-return/orig.ngc","linuxcnc/tests/interp/subroutine-return/simpockets.tbl","linuxcnc/tests/interp/subroutine-return/test-ui.py","linuxcnc/tests/interp/subroutine-return/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/interp/subroutine-return/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/interp/subroutine-return/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/subroutine-return/test.sh","config_refs":["linuxcnc/tests/interp/subroutine-return/interp.ini","linuxcnc/tests/interp/subroutine-return/orig.ngc","linuxcnc/tests/interp/subroutine-return/subs/orig-sub.ngc","linuxcnc/tests/interp/subroutine-return/subs/sub.ngc","linuxcnc/tests/interp/subroutine-return/test.ngc"],"expected":[],"inputs":["linuxcnc/tests/interp/subroutine-return/.gitignore","linuxcnc/tests/interp/subroutine-return/checkresult","linuxcnc/tests/interp/subroutine-return/interp.ini","linuxcnc/tests/interp/subroutine-return/orig.ngc","linuxcnc/tests/interp/subroutine-return/simpockets.tbl","linuxcnc/tests/interp/subroutine-return/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/interp/subroutine-return/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"493273c17fc85446a874b15a5b586664fba62841ba612223320ad5fcec8348cf","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/subroutine-return/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/subs-follow-main/test.sh","config_refs":["linuxcnc/tests/interp/subs-follow-main/test.ngc"],"expected":["linuxcnc/tests/interp/subs-follow-main/expected"],"inputs":["linuxcnc/tests/interp/subs-follow-main/expected","linuxcnc/tests/interp/subs-follow-main/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/subs-follow-main/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/subs-follow-main/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/interp/value-returned/test.sh","config_refs":["linuxcnc/tests/interp/value-returned/test.ini","linuxcnc/tests/interp/value-returned/test.ngc"],"expected":["linuxcnc/tests/interp/value-returned/expected"],"inputs":["linuxcnc/tests/interp/value-returned/README","linuxcnc/tests/interp/value-returned/expected","linuxcnc/tests/interp/value-returned/oword.py","linuxcnc/tests/interp/value-returned/subs.py","linuxcnc/tests/interp/value-returned/test.ini","linuxcnc/tests/interp/value-returned/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/interp/value-returned/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"961b4e1d635375db6229e8b9d25d06ea89c3ded9da611fd233ac47525b47c3a2","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/interp/value-returned/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/io-startup/.gitignore","linuxcnc/tests/io-startup/postgui.hal","linuxcnc/tests/io-startup/shared-test.sh","linuxcnc/tests/io-startup/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/io-startup/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/checkresult","config_refs":[],"expected":["linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/test.ini","linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/test.sh","linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/test.sh","config_refs":["linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/tool.tbl","linuxcnc/tests/io-startup/nonrandom/test.ini"],"expected":["linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/checkresult","linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/test.ini","linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e96aefc914933c4aa51d0c94c642a9698c404f6a9863d05fa4073cb98956e006","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/io-startup/nonrandom/no-tool-in-P0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/nonrandom/tool-in-P0/checkresult","config_refs":[],"expected":["linuxcnc/tests/io-startup/nonrandom/tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/nonrandom/tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/test.ini","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/test.sh","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/nonrandom/tool-in-P0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/io-startup/nonrandom/tool-in-P0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/nonrandom/tool-in-P0/test.sh","config_refs":["linuxcnc/tests/io-startup/nonrandom/test.ini","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/tool.tbl"],"expected":["linuxcnc/tests/io-startup/nonrandom/tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/nonrandom/tool-in-P0/checkresult","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/test.ini","linuxcnc/tests/io-startup/nonrandom/tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/nonrandom/tool-in-P0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e96aefc914933c4aa51d0c94c642a9698c404f6a9863d05fa4073cb98956e006","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/io-startup/nonrandom/tool-in-P0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/random/no-tool-in-P0/checkresult","config_refs":[],"expected":["linuxcnc/tests/io-startup/random/no-tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/random/no-tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/random/no-tool-in-P0/test.ini","linuxcnc/tests/io-startup/random/no-tool-in-P0/test.sh","linuxcnc/tests/io-startup/random/no-tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/random/no-tool-in-P0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/io-startup/random/no-tool-in-P0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/random/no-tool-in-P0/test.sh","config_refs":["linuxcnc/tests/io-startup/random/no-tool-in-P0/tool.tbl","linuxcnc/tests/io-startup/random/test.ini"],"expected":["linuxcnc/tests/io-startup/random/no-tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/random/no-tool-in-P0/checkresult","linuxcnc/tests/io-startup/random/no-tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/random/no-tool-in-P0/test.ini","linuxcnc/tests/io-startup/random/no-tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/random/no-tool-in-P0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e96aefc914933c4aa51d0c94c642a9698c404f6a9863d05fa4073cb98956e006","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/io-startup/random/no-tool-in-P0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/random/tool-in-P0/checkresult","config_refs":[],"expected":["linuxcnc/tests/io-startup/random/tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/random/tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/random/tool-in-P0/test.ini","linuxcnc/tests/io-startup/random/tool-in-P0/test.sh","linuxcnc/tests/io-startup/random/tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/random/tool-in-P0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/io-startup/random/tool-in-P0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/io-startup/random/tool-in-P0/test.sh","config_refs":["linuxcnc/tests/io-startup/random/test.ini","linuxcnc/tests/io-startup/random/tool-in-P0/tool.tbl"],"expected":["linuxcnc/tests/io-startup/random/tool-in-P0/expected-startup-tool-number"],"inputs":["linuxcnc/tests/io-startup/random/tool-in-P0/checkresult","linuxcnc/tests/io-startup/random/tool-in-P0/expected-startup-tool-number","linuxcnc/tests/io-startup/random/tool-in-P0/test.ini","linuxcnc/tests/io-startup/random/tool-in-P0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/io-startup/random/tool-in-P0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e96aefc914933c4aa51d0c94c642a9698c404f6a9863d05fa4073cb98956e006","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/io-startup/random/tool-in-P0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/lathe/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/lathe/.gitignore","linuxcnc/tests/lathe/lathe.ini","linuxcnc/tests/lathe/test-ui.py","linuxcnc/tests/lathe/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/lathe/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/lathe/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/lathe/test.sh","config_refs":["linuxcnc/tests/lathe/lathe.ini"],"expected":[],"inputs":["linuxcnc/tests/lathe/.gitignore","linuxcnc/tests/lathe/checkresult","linuxcnc/tests/lathe/lathe.ini","linuxcnc/tests/lathe/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/lathe/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7eb572de3d6f67c4dd1ec5fcbeae73ecdd21cf3fc05ae06220be57f1834cf160","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/lathe/test.sh"}
|
||||||
|
{"command":"python3 linuxcnc/tests/limit3/checkresult","config_refs":["linuxcnc/tests/limit3/test.hal"],"expected":[],"inputs":[],"parse_status":"parsed","path":"linuxcnc/tests/limit3/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"059a90ea5405718de637aaffad487eeb801dff5672ae90c98aaa43f2cdeb7619","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/limit3/checkresult"}
|
||||||
|
{"command":"python3 linuxcnc/tests/limit3/constraints/checkresult","config_refs":["linuxcnc/tests/limit3/constraints/test.hal"],"expected":[],"inputs":["linuxcnc/tests/limit3/constraints/README.md","linuxcnc/tests/limit3/constraints/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/limit3/constraints/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"059a90ea5405718de637aaffad487eeb801dff5672ae90c98aaa43f2cdeb7619","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/limit3/constraints/checkresult"}
|
||||||
|
{"command":"python3 linuxcnc/tests/limit3/lock-on-input-and-limits/checkresult","config_refs":["linuxcnc/tests/limit3/lock-on-input-and-limits/test.hal"],"expected":[],"inputs":["linuxcnc/tests/limit3/lock-on-input-and-limits/README","linuxcnc/tests/limit3/lock-on-input-and-limits/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/limit3/lock-on-input-and-limits/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"059a90ea5405718de637aaffad487eeb801dff5672ae90c98aaa43f2cdeb7619","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/limit3/lock-on-input-and-limits/checkresult"}
|
||||||
|
{"command":"python3 linuxcnc/tests/limit3/min-max-overshoot/checkresult","config_refs":["linuxcnc/tests/limit3/min-max-overshoot/test.hal"],"expected":[],"inputs":["linuxcnc/tests/limit3/min-max-overshoot/README","linuxcnc/tests/limit3/min-max-overshoot/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/limit3/min-max-overshoot/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"059a90ea5405718de637aaffad487eeb801dff5672ae90c98aaa43f2cdeb7619","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/limit3/min-max-overshoot/checkresult"}
|
||||||
|
{"command":"python3 linuxcnc/tests/limit3/runaway/checkresult","config_refs":["linuxcnc/tests/limit3/runaway/test.hal"],"expected":[],"inputs":["linuxcnc/tests/limit3/runaway/README","linuxcnc/tests/limit3/runaway/input","linuxcnc/tests/limit3/runaway/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/limit3/runaway/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"059a90ea5405718de637aaffad487eeb801dff5672ae90c98aaa43f2cdeb7619","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/limit3/runaway/checkresult"}
|
||||||
|
{"command":"python3 linuxcnc/tests/limit3/sunny-day/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/limit3/sunny-day/README","linuxcnc/tests/limit3/sunny-day/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/limit3/sunny-day/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"65d7ae153acdf173078e4df7ef3976ffcfa18a631a6c70ba62ee9ea39065f301","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/limit3/sunny-day/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/linuxcncrsh-tcp/checkresult","config_refs":[],"expected":["linuxcnc/tests/linuxcncrsh-tcp/expected-gcode-output"],"inputs":["linuxcnc/tests/linuxcncrsh-tcp/.gitignore","linuxcnc/tests/linuxcncrsh-tcp/expected-gcode-output","linuxcnc/tests/linuxcncrsh-tcp/linuxcncrsh-test.ini","linuxcnc/tests/linuxcncrsh-tcp/lots-of-gcode","linuxcnc/tests/linuxcncrsh-tcp/tcp.nml","linuxcnc/tests/linuxcncrsh-tcp/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/linuxcncrsh-tcp/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"a64cd94c98057a706624c9b3017f3d7ecdc58f4d9a0a9b07c92e6c1a43bc7d18","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/linuxcncrsh-tcp/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/linuxcncrsh-tcp/test.sh","config_refs":["linuxcnc/tests/linuxcncrsh-tcp/linuxcncrsh-test.ini"],"expected":["linuxcnc/tests/linuxcncrsh-tcp/expected-gcode-output"],"inputs":["linuxcnc/tests/linuxcncrsh-tcp/.gitignore","linuxcnc/tests/linuxcncrsh-tcp/checkresult","linuxcnc/tests/linuxcncrsh-tcp/expected-gcode-output","linuxcnc/tests/linuxcncrsh-tcp/linuxcncrsh-test.ini","linuxcnc/tests/linuxcncrsh-tcp/lots-of-gcode","linuxcnc/tests/linuxcncrsh-tcp/tcp.nml"],"parse_status":"parsed","path":"linuxcnc/tests/linuxcncrsh-tcp/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"181e3dfd1daf85d8e291472d13ac3283ecf43fbd7cf2e0ec09a4cc6bf305abb6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/linuxcncrsh-tcp/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/linuxcncrsh/checkresult","config_refs":[],"expected":["linuxcnc/tests/linuxcncrsh/expected-gcode-output"],"inputs":["linuxcnc/tests/linuxcncrsh/.gitignore","linuxcnc/tests/linuxcncrsh/expected-gcode-output","linuxcnc/tests/linuxcncrsh/linuxcncrsh-test.ini","linuxcnc/tests/linuxcncrsh/lots-of-gcode","linuxcnc/tests/linuxcncrsh/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/linuxcncrsh/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"a64cd94c98057a706624c9b3017f3d7ecdc58f4d9a0a9b07c92e6c1a43bc7d18","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/linuxcncrsh/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/linuxcncrsh/test.sh","config_refs":["linuxcnc/tests/linuxcncrsh/linuxcncrsh-test.ini"],"expected":["linuxcnc/tests/linuxcncrsh/expected-gcode-output"],"inputs":["linuxcnc/tests/linuxcncrsh/.gitignore","linuxcnc/tests/linuxcncrsh/checkresult","linuxcnc/tests/linuxcncrsh/expected-gcode-output","linuxcnc/tests/linuxcncrsh/linuxcncrsh-test.ini","linuxcnc/tests/linuxcncrsh/lots-of-gcode"],"parse_status":"parsed","path":"linuxcnc/tests/linuxcncrsh/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"181e3dfd1daf85d8e291472d13ac3283ecf43fbd7cf2e0ec09a4cc6bf305abb6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/linuxcncrsh/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/loadrt.2/test.sh","config_refs":["linuxcnc/tests/loadrt.2/loadrt.hal"],"expected":["linuxcnc/tests/loadrt.2/expected"],"inputs":["linuxcnc/tests/loadrt.2/expected","linuxcnc/tests/loadrt.2/loadrt.hal"],"parse_status":"parsed","path":"linuxcnc/tests/loadrt.2/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"d87b348a4961f368cdd3d8804983ea29b5a01eb54585ef02c620b782e807e545","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/loadrt.2/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/lowlevel/mutex/test.sh","config_refs":[],"expected":["linuxcnc/tests/lowlevel/mutex/expected"],"inputs":["linuxcnc/tests/lowlevel/mutex/expected","linuxcnc/tests/lowlevel/mutex/test.c"],"parse_status":"parsed","path":"linuxcnc/tests/lowlevel/mutex/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"546587c4fbab620305c37db03643e550ca62ef3a7cd9bb0199c1bfc9299f687b","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/lowlevel/mutex/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/m70-m73/m70m72-restore.0/test.sh","config_refs":["linuxcnc/tests/m70-m73/m70m72-restore.0/test.ngc"],"expected":["linuxcnc/tests/m70-m73/m70m72-restore.0/expected"],"inputs":["linuxcnc/tests/m70-m73/m70m72-restore.0/README","linuxcnc/tests/m70-m73/m70m72-restore.0/expected","linuxcnc/tests/m70-m73/m70m72-restore.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/m70-m73/m70m72-restore.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/m70-m73/m70m72-restore.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/test.sh","config_refs":["linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/test.ngc"],"expected":["linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/expected"],"inputs":["linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/README","linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/expected","linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/m70-m73/m73-flood-mist-restore.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/m70-m73/m73autorestore.0/test.sh","config_refs":["linuxcnc/tests/m70-m73/m73autorestore.0/test.ngc"],"expected":["linuxcnc/tests/m70-m73/m73autorestore.0/expected"],"inputs":["linuxcnc/tests/m70-m73/m73autorestore.0/README","linuxcnc/tests/m70-m73/m73autorestore.0/expected","linuxcnc/tests/m70-m73/m73autorestore.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/m70-m73/m73autorestore.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/m70-m73/m73autorestore.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/matrixkins/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/matrixkins/README","linuxcnc/tests/matrixkins/core_sim.hal","linuxcnc/tests/matrixkins/test-ui.py","linuxcnc/tests/matrixkins/test.ini","linuxcnc/tests/matrixkins/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/matrixkins/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/matrixkins/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/matrixkins/test.sh","config_refs":["linuxcnc/tests/matrixkins/sim.var","linuxcnc/tests/matrixkins/test.ini"],"expected":[],"inputs":["linuxcnc/tests/matrixkins/README","linuxcnc/tests/matrixkins/checkresult","linuxcnc/tests/matrixkins/core_sim.hal","linuxcnc/tests/matrixkins/test-ui.py","linuxcnc/tests/matrixkins/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/matrixkins/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c7904d36dcd3842ae2153fb00517f20aec6c71d77d2e6c97148ae391c1295fdd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/matrixkins/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/mb2hal/mb2hal.1a/checkresult","config_refs":[],"expected":["linuxcnc/tests/mb2hal/mb2hal.1a/expected"],"inputs":["linuxcnc/tests/mb2hal/mb2hal.1a/expected","linuxcnc/tests/mb2hal/mb2hal.1a/mb2hal.ini","linuxcnc/tests/mb2hal/mb2hal.1a/readme","linuxcnc/tests/mb2hal/mb2hal.1a/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/mb2hal/mb2hal.1a/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"6ea4d0d55d816481c30cd3a56fc90cf83206cb0329161589e610cdad0c51a5ba","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mb2hal/mb2hal.1a/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mb2hal/mb2hal.1b/checkresult","config_refs":[],"expected":["linuxcnc/tests/mb2hal/mb2hal.1b/expected"],"inputs":["linuxcnc/tests/mb2hal/mb2hal.1b/expected","linuxcnc/tests/mb2hal/mb2hal.1b/mb2hal.ini","linuxcnc/tests/mb2hal/mb2hal.1b/readme","linuxcnc/tests/mb2hal/mb2hal.1b/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/mb2hal/mb2hal.1b/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"20aeea0c913eabe3eb8d2f88ae6a538e326fe8d1d295efc99ed7ab987bb8fa1f","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mb2hal/mb2hal.1b/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mb2hal/mb2hal.2a/checkresult","config_refs":[],"expected":["linuxcnc/tests/mb2hal/mb2hal.2a/expected"],"inputs":["linuxcnc/tests/mb2hal/mb2hal.2a/expected","linuxcnc/tests/mb2hal/mb2hal.2a/mb2hal.ini","linuxcnc/tests/mb2hal/mb2hal.2a/readme","linuxcnc/tests/mb2hal/mb2hal.2a/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/mb2hal/mb2hal.2a/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"6ea4d0d55d816481c30cd3a56fc90cf83206cb0329161589e610cdad0c51a5ba","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mb2hal/mb2hal.2a/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mb2hal/mb2hal.2b/checkresult","config_refs":[],"expected":["linuxcnc/tests/mb2hal/mb2hal.2b/expected"],"inputs":["linuxcnc/tests/mb2hal/mb2hal.2b/expected","linuxcnc/tests/mb2hal/mb2hal.2b/mb2hal.ini","linuxcnc/tests/mb2hal/mb2hal.2b/readme","linuxcnc/tests/mb2hal/mb2hal.2b/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/mb2hal/mb2hal.2b/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"20aeea0c913eabe3eb8d2f88ae6a538e326fe8d1d295efc99ed7ab987bb8fa1f","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mb2hal/mb2hal.2b/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-queue-length/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/mdi-queue-length/.gitignore","linuxcnc/tests/mdi-queue-length/README","linuxcnc/tests/mdi-queue-length/core_sim.hal","linuxcnc/tests/mdi-queue-length/test-ui.py","linuxcnc/tests/mdi-queue-length/test.ini","linuxcnc/tests/mdi-queue-length/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-queue-length/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mdi-queue-length/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-queue-length/test.sh","config_refs":["linuxcnc/tests/mdi-queue-length/sim.var","linuxcnc/tests/mdi-queue-length/test.ini"],"expected":[],"inputs":["linuxcnc/tests/mdi-queue-length/.gitignore","linuxcnc/tests/mdi-queue-length/README","linuxcnc/tests/mdi-queue-length/checkresult","linuxcnc/tests/mdi-queue-length/core_sim.hal","linuxcnc/tests/mdi-queue-length/test-ui.py","linuxcnc/tests/mdi-queue-length/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-queue-length/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c7904d36dcd3842ae2153fb00517f20aec6c71d77d2e6c97148ae391c1295fdd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/mdi-queue-length/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-queue/oword-queue-buster/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/mdi-queue/oword-queue-buster/dummy.ngc","linuxcnc/tests/mdi-queue/oword-queue-buster/linuxcncrsh-test.ini","linuxcnc/tests/mdi-queue/oword-queue-buster/test.sh","linuxcnc/tests/mdi-queue/oword-queue-buster/tool.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-queue/oword-queue-buster/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"a64cd94c98057a706624c9b3017f3d7ecdc58f4d9a0a9b07c92e6c1a43bc7d18","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mdi-queue/oword-queue-buster/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-queue/oword-queue-buster/test.sh","config_refs":["linuxcnc/tests/mdi-queue/linuxcncrsh-test.ini","linuxcnc/tests/mdi-queue/oword-queue-buster/dummy.ngc"],"expected":[],"inputs":["linuxcnc/tests/mdi-queue/oword-queue-buster/checkresult","linuxcnc/tests/mdi-queue/oword-queue-buster/dummy.ngc","linuxcnc/tests/mdi-queue/oword-queue-buster/linuxcncrsh-test.ini","linuxcnc/tests/mdi-queue/oword-queue-buster/tool.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-queue/oword-queue-buster/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"d9e98bfc0f2092a72b51c8b436ea12ffb5ada39cb5153ac76c2c4faf0f99af15","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/mdi-queue/oword-queue-buster/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-queue/simple-queue-buster/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/mdi-queue/simple-queue-buster/linuxcncrsh-test.ini","linuxcnc/tests/mdi-queue/simple-queue-buster/test.sh","linuxcnc/tests/mdi-queue/simple-queue-buster/tool.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-queue/simple-queue-buster/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"a64cd94c98057a706624c9b3017f3d7ecdc58f4d9a0a9b07c92e6c1a43bc7d18","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mdi-queue/simple-queue-buster/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-queue/simple-queue-buster/test.sh","config_refs":["linuxcnc/tests/mdi-queue/linuxcncrsh-test.ini"],"expected":[],"inputs":["linuxcnc/tests/mdi-queue/simple-queue-buster/checkresult","linuxcnc/tests/mdi-queue/simple-queue-buster/linuxcncrsh-test.ini","linuxcnc/tests/mdi-queue/simple-queue-buster/tool.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-queue/simple-queue-buster/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"c13ba0c6d87fb9110c1b6b762dde0a243f7a0ceba54c92575e8aeec90b8e7bf1","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/mdi-queue/simple-queue-buster/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-while-queuebuster-waitflag/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/mdi-while-queuebuster-waitflag/.gitignore","linuxcnc/tests/mdi-while-queuebuster-waitflag/README","linuxcnc/tests/mdi-while-queuebuster-waitflag/core_sim.hal","linuxcnc/tests/mdi-while-queuebuster-waitflag/remap.py","linuxcnc/tests/mdi-while-queuebuster-waitflag/simpockets.tbl","linuxcnc/tests/mdi-while-queuebuster-waitflag/test-ui.py","linuxcnc/tests/mdi-while-queuebuster-waitflag/test.ini","linuxcnc/tests/mdi-while-queuebuster-waitflag/test.sh","linuxcnc/tests/mdi-while-queuebuster-waitflag/toplevel.py"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-while-queuebuster-waitflag/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mdi-while-queuebuster-waitflag/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mdi-while-queuebuster-waitflag/test.sh","config_refs":["linuxcnc/tests/mdi-while-queuebuster-waitflag/test.ini"],"expected":[],"inputs":["linuxcnc/tests/mdi-while-queuebuster-waitflag/.gitignore","linuxcnc/tests/mdi-while-queuebuster-waitflag/README","linuxcnc/tests/mdi-while-queuebuster-waitflag/checkresult","linuxcnc/tests/mdi-while-queuebuster-waitflag/core_sim.hal","linuxcnc/tests/mdi-while-queuebuster-waitflag/remap.py","linuxcnc/tests/mdi-while-queuebuster-waitflag/simpockets.tbl","linuxcnc/tests/mdi-while-queuebuster-waitflag/test-ui.py","linuxcnc/tests/mdi-while-queuebuster-waitflag/test.ini","linuxcnc/tests/mdi-while-queuebuster-waitflag/toplevel.py"],"parse_status":"parsed","path":"linuxcnc/tests/mdi-while-queuebuster-waitflag/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d3d754cdd99fd1f947f7858b2a0330a4be42bc02778009f38152c73995664fd0","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/mdi-while-queuebuster-waitflag/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/1-names/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/1-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/1-names/RESULT","linuxcnc/tests/module-loading/encoder/1-names/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/1-names/NUM_PINS","linuxcnc/tests/module-loading/encoder/1-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/1-names/RESULT","linuxcnc/tests/module-loading/encoder/1-names/expected","linuxcnc/tests/module-loading/encoder/1-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/1-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/1-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/8-names/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/8-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/8-names/RESULT","linuxcnc/tests/module-loading/encoder/8-names/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/8-names/NUM_PINS","linuxcnc/tests/module-loading/encoder/8-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/8-names/RESULT","linuxcnc/tests/module-loading/encoder/8-names/expected","linuxcnc/tests/module-loading/encoder/8-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/8-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/8-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/9-names/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/9-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/9-names/RESULT","linuxcnc/tests/module-loading/encoder/9-names/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/9-names/NUM_PINS","linuxcnc/tests/module-loading/encoder/9-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/9-names/RESULT","linuxcnc/tests/module-loading/encoder/9-names/expected","linuxcnc/tests/module-loading/encoder/9-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/9-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/9-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/num_chan=0/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/num_chan=0/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/num_chan=0/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=0/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/num_chan=0/NUM_PINS","linuxcnc/tests/module-loading/encoder/num_chan=0/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/num_chan=0/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=0/expected","linuxcnc/tests/module-loading/encoder/num_chan=0/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/num_chan=0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/num_chan=0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/num_chan=1/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/num_chan=1/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/num_chan=1/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=1/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/num_chan=1/NUM_PINS","linuxcnc/tests/module-loading/encoder/num_chan=1/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/num_chan=1/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=1/expected","linuxcnc/tests/module-loading/encoder/num_chan=1/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/num_chan=1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/num_chan=1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/num_chan=8/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/num_chan=8/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/num_chan=8/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=8/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/num_chan=8/NUM_PINS","linuxcnc/tests/module-loading/encoder/num_chan=8/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/num_chan=8/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=8/expected","linuxcnc/tests/module-loading/encoder/num_chan=8/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/num_chan=8/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/num_chan=8/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder/num_chan=9/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder/num_chan=9/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder/num_chan=9/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=9/expected"],"inputs":["linuxcnc/tests/module-loading/encoder/num_chan=9/NUM_PINS","linuxcnc/tests/module-loading/encoder/num_chan=9/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder/num_chan=9/RESULT","linuxcnc/tests/module-loading/encoder/num_chan=9/expected","linuxcnc/tests/module-loading/encoder/num_chan=9/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder/num_chan=9/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder/num_chan=9/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/1-names/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/1-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/1-names/RESULT","linuxcnc/tests/module-loading/encoder_ratio/1-names/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/1-names/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/1-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/1-names/RESULT","linuxcnc/tests/module-loading/encoder_ratio/1-names/expected","linuxcnc/tests/module-loading/encoder_ratio/1-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/1-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/1-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/8-names/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/8-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/8-names/RESULT","linuxcnc/tests/module-loading/encoder_ratio/8-names/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/8-names/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/8-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/8-names/RESULT","linuxcnc/tests/module-loading/encoder_ratio/8-names/expected","linuxcnc/tests/module-loading/encoder_ratio/8-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/8-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/8-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/9-names/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/9-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/9-names/RESULT","linuxcnc/tests/module-loading/encoder_ratio/9-names/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/9-names/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/9-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/9-names/RESULT","linuxcnc/tests/module-loading/encoder_ratio/9-names/expected","linuxcnc/tests/module-loading/encoder_ratio/9-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/9-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/9-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/expected","linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/num_chan=0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/expected","linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/num_chan=1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/expected","linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/num_chan=8/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/test.sh","config_refs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/setup.hal"],"expected":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/expected"],"inputs":["linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/NUM_PINS","linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/PIN_NAME_REGEX","linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/RESULT","linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/expected","linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/encoder_ratio/num_chan=9/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/or2/0-names/test.sh","config_refs":["linuxcnc/tests/module-loading/or2/0-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/or2/0-names/RESULT","linuxcnc/tests/module-loading/or2/0-names/expected"],"inputs":["linuxcnc/tests/module-loading/or2/0-names/NUM_PINS","linuxcnc/tests/module-loading/or2/0-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/or2/0-names/RESULT","linuxcnc/tests/module-loading/or2/0-names/expected","linuxcnc/tests/module-loading/or2/0-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/or2/0-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/or2/0-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/or2/1-names/test.sh","config_refs":["linuxcnc/tests/module-loading/or2/1-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/or2/1-names/RESULT","linuxcnc/tests/module-loading/or2/1-names/expected"],"inputs":["linuxcnc/tests/module-loading/or2/1-names/NUM_PINS","linuxcnc/tests/module-loading/or2/1-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/or2/1-names/RESULT","linuxcnc/tests/module-loading/or2/1-names/expected","linuxcnc/tests/module-loading/or2/1-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/or2/1-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/or2/1-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/or2/16-names/test.sh","config_refs":["linuxcnc/tests/module-loading/or2/16-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/or2/16-names/RESULT","linuxcnc/tests/module-loading/or2/16-names/expected"],"inputs":["linuxcnc/tests/module-loading/or2/16-names/NUM_PINS","linuxcnc/tests/module-loading/or2/16-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/or2/16-names/RESULT","linuxcnc/tests/module-loading/or2/16-names/expected","linuxcnc/tests/module-loading/or2/16-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/or2/16-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/or2/16-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/or2/count=1/test.sh","config_refs":["linuxcnc/tests/module-loading/or2/count=1/setup.hal"],"expected":["linuxcnc/tests/module-loading/or2/count=1/RESULT","linuxcnc/tests/module-loading/or2/count=1/expected"],"inputs":["linuxcnc/tests/module-loading/or2/count=1/NUM_PINS","linuxcnc/tests/module-loading/or2/count=1/PIN_NAME_REGEX","linuxcnc/tests/module-loading/or2/count=1/RESULT","linuxcnc/tests/module-loading/or2/count=1/expected","linuxcnc/tests/module-loading/or2/count=1/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/or2/count=1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/or2/count=1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/or2/count=16/test.sh","config_refs":["linuxcnc/tests/module-loading/or2/count=16/setup.hal"],"expected":["linuxcnc/tests/module-loading/or2/count=16/RESULT","linuxcnc/tests/module-loading/or2/count=16/expected"],"inputs":["linuxcnc/tests/module-loading/or2/count=16/NUM_PINS","linuxcnc/tests/module-loading/or2/count=16/PIN_NAME_REGEX","linuxcnc/tests/module-loading/or2/count=16/RESULT","linuxcnc/tests/module-loading/or2/count=16/expected","linuxcnc/tests/module-loading/or2/count=16/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/or2/count=16/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/or2/count=16/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/or2/count=17/test.sh","config_refs":["linuxcnc/tests/module-loading/or2/count=17/setup.hal"],"expected":["linuxcnc/tests/module-loading/or2/count=17/RESULT","linuxcnc/tests/module-loading/or2/count=17/expected"],"inputs":["linuxcnc/tests/module-loading/or2/count=17/NUM_PINS","linuxcnc/tests/module-loading/or2/count=17/PIN_NAME_REGEX","linuxcnc/tests/module-loading/or2/count=17/RESULT","linuxcnc/tests/module-loading/or2/count=17/expected","linuxcnc/tests/module-loading/or2/count=17/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/or2/count=17/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/or2/count=17/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/1-names/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/1-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/1-names/RESULT","linuxcnc/tests/module-loading/pid/1-names/expected"],"inputs":["linuxcnc/tests/module-loading/pid/1-names/NUM_PINS","linuxcnc/tests/module-loading/pid/1-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/1-names/RESULT","linuxcnc/tests/module-loading/pid/1-names/expected","linuxcnc/tests/module-loading/pid/1-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/1-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/1-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/16-names/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/16-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/16-names/RESULT","linuxcnc/tests/module-loading/pid/16-names/expected"],"inputs":["linuxcnc/tests/module-loading/pid/16-names/NUM_PINS","linuxcnc/tests/module-loading/pid/16-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/16-names/RESULT","linuxcnc/tests/module-loading/pid/16-names/expected","linuxcnc/tests/module-loading/pid/16-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/16-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/16-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/17-names/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/17-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/17-names/RESULT","linuxcnc/tests/module-loading/pid/17-names/expected"],"inputs":["linuxcnc/tests/module-loading/pid/17-names/NUM_PINS","linuxcnc/tests/module-loading/pid/17-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/17-names/RESULT","linuxcnc/tests/module-loading/pid/17-names/expected","linuxcnc/tests/module-loading/pid/17-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/17-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/17-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/num_chan=0/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/num_chan=0/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/num_chan=0/RESULT","linuxcnc/tests/module-loading/pid/num_chan=0/expected"],"inputs":["linuxcnc/tests/module-loading/pid/num_chan=0/NUM_PINS","linuxcnc/tests/module-loading/pid/num_chan=0/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/num_chan=0/RESULT","linuxcnc/tests/module-loading/pid/num_chan=0/expected","linuxcnc/tests/module-loading/pid/num_chan=0/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/num_chan=0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/num_chan=0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/num_chan=1/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/num_chan=1/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/num_chan=1/RESULT","linuxcnc/tests/module-loading/pid/num_chan=1/expected"],"inputs":["linuxcnc/tests/module-loading/pid/num_chan=1/NUM_PINS","linuxcnc/tests/module-loading/pid/num_chan=1/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/num_chan=1/RESULT","linuxcnc/tests/module-loading/pid/num_chan=1/expected","linuxcnc/tests/module-loading/pid/num_chan=1/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/num_chan=1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/num_chan=1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/num_chan=16/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/num_chan=16/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/num_chan=16/RESULT","linuxcnc/tests/module-loading/pid/num_chan=16/expected"],"inputs":["linuxcnc/tests/module-loading/pid/num_chan=16/NUM_PINS","linuxcnc/tests/module-loading/pid/num_chan=16/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/num_chan=16/RESULT","linuxcnc/tests/module-loading/pid/num_chan=16/expected","linuxcnc/tests/module-loading/pid/num_chan=16/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/num_chan=16/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/num_chan=16/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/pid/num_chan=17/test.sh","config_refs":["linuxcnc/tests/module-loading/pid/num_chan=17/setup.hal"],"expected":["linuxcnc/tests/module-loading/pid/num_chan=17/RESULT","linuxcnc/tests/module-loading/pid/num_chan=17/expected"],"inputs":["linuxcnc/tests/module-loading/pid/num_chan=17/NUM_PINS","linuxcnc/tests/module-loading/pid/num_chan=17/PIN_NAME_REGEX","linuxcnc/tests/module-loading/pid/num_chan=17/RESULT","linuxcnc/tests/module-loading/pid/num_chan=17/expected","linuxcnc/tests/module-loading/pid/num_chan=17/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/pid/num_chan=17/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/pid/num_chan=17/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/rtapi-app-main-fails/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/module-loading/rtapi-app-main-fails/control","linuxcnc/tests/module-loading/rtapi-app-main-fails/rtapi_app_main_fails.comp","linuxcnc/tests/module-loading/rtapi-app-main-fails/setup.hal","linuxcnc/tests/module-loading/rtapi-app-main-fails/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/rtapi-app-main-fails/checkresult","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"3d2d685b3d326c531029a279a39915bfa589e4033a04f90619b15d38ebb566ef","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/module-loading/rtapi-app-main-fails/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/rtapi-app-main-fails/test.sh","config_refs":["linuxcnc/tests/module-loading/rtapi-app-main-fails/setup.hal"],"expected":[],"inputs":["linuxcnc/tests/module-loading/rtapi-app-main-fails/checkresult","linuxcnc/tests/module-loading/rtapi-app-main-fails/control","linuxcnc/tests/module-loading/rtapi-app-main-fails/rtapi_app_main_fails.comp","linuxcnc/tests/module-loading/rtapi-app-main-fails/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/rtapi-app-main-fails/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"57d9464f54cb924074e206486881e826b4103bec5d95c5d92b8572f710751afe","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/rtapi-app-main-fails/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/1-names/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/1-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/1-names/RESULT","linuxcnc/tests/module-loading/siggen/1-names/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/1-names/NUM_PINS","linuxcnc/tests/module-loading/siggen/1-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/1-names/RESULT","linuxcnc/tests/module-loading/siggen/1-names/expected","linuxcnc/tests/module-loading/siggen/1-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/1-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/1-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/16-names/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/16-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/16-names/RESULT","linuxcnc/tests/module-loading/siggen/16-names/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/16-names/NUM_PINS","linuxcnc/tests/module-loading/siggen/16-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/16-names/RESULT","linuxcnc/tests/module-loading/siggen/16-names/expected","linuxcnc/tests/module-loading/siggen/16-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/16-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/16-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/17-names/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/17-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/17-names/RESULT","linuxcnc/tests/module-loading/siggen/17-names/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/17-names/NUM_PINS","linuxcnc/tests/module-loading/siggen/17-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/17-names/RESULT","linuxcnc/tests/module-loading/siggen/17-names/expected","linuxcnc/tests/module-loading/siggen/17-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/17-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/17-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/num_chan=0/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/num_chan=0/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/num_chan=0/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=0/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/num_chan=0/NUM_PINS","linuxcnc/tests/module-loading/siggen/num_chan=0/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/num_chan=0/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=0/expected","linuxcnc/tests/module-loading/siggen/num_chan=0/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/num_chan=0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/num_chan=0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/num_chan=1/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/num_chan=1/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/num_chan=1/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=1/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/num_chan=1/NUM_PINS","linuxcnc/tests/module-loading/siggen/num_chan=1/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/num_chan=1/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=1/expected","linuxcnc/tests/module-loading/siggen/num_chan=1/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/num_chan=1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/num_chan=1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/num_chan=16/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/num_chan=16/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/num_chan=16/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=16/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/num_chan=16/NUM_PINS","linuxcnc/tests/module-loading/siggen/num_chan=16/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/num_chan=16/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=16/expected","linuxcnc/tests/module-loading/siggen/num_chan=16/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/num_chan=16/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/num_chan=16/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/siggen/num_chan=17/test.sh","config_refs":["linuxcnc/tests/module-loading/siggen/num_chan=17/setup.hal"],"expected":["linuxcnc/tests/module-loading/siggen/num_chan=17/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=17/expected"],"inputs":["linuxcnc/tests/module-loading/siggen/num_chan=17/NUM_PINS","linuxcnc/tests/module-loading/siggen/num_chan=17/PIN_NAME_REGEX","linuxcnc/tests/module-loading/siggen/num_chan=17/RESULT","linuxcnc/tests/module-loading/siggen/num_chan=17/expected","linuxcnc/tests/module-loading/siggen/num_chan=17/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/siggen/num_chan=17/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/siggen/num_chan=17/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/1-names/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/1-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/1-names/RESULT","linuxcnc/tests/module-loading/sim_encoder/1-names/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/1-names/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/1-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/1-names/RESULT","linuxcnc/tests/module-loading/sim_encoder/1-names/expected","linuxcnc/tests/module-loading/sim_encoder/1-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/1-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/1-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/8-names/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/8-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/8-names/RESULT","linuxcnc/tests/module-loading/sim_encoder/8-names/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/8-names/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/8-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/8-names/RESULT","linuxcnc/tests/module-loading/sim_encoder/8-names/expected","linuxcnc/tests/module-loading/sim_encoder/8-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/8-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/8-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/9-names/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/9-names/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/9-names/RESULT","linuxcnc/tests/module-loading/sim_encoder/9-names/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/9-names/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/9-names/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/9-names/RESULT","linuxcnc/tests/module-loading/sim_encoder/9-names/expected","linuxcnc/tests/module-loading/sim_encoder/9-names/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/9-names/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/9-names/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/num_chan=0/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=0/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/num_chan=0/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=0/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=0/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/num_chan=0/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/num_chan=0/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=0/expected","linuxcnc/tests/module-loading/sim_encoder/num_chan=0/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/num_chan=0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/num_chan=0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/num_chan=1/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=1/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/num_chan=1/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=1/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=1/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/num_chan=1/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/num_chan=1/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=1/expected","linuxcnc/tests/module-loading/sim_encoder/num_chan=1/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/num_chan=1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/num_chan=1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/num_chan=8/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=8/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/num_chan=8/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=8/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=8/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/num_chan=8/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/num_chan=8/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=8/expected","linuxcnc/tests/module-loading/sim_encoder/num_chan=8/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/num_chan=8/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/num_chan=8/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/module-loading/sim_encoder/num_chan=9/test.sh","config_refs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=9/setup.hal"],"expected":["linuxcnc/tests/module-loading/sim_encoder/num_chan=9/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=9/expected"],"inputs":["linuxcnc/tests/module-loading/sim_encoder/num_chan=9/NUM_PINS","linuxcnc/tests/module-loading/sim_encoder/num_chan=9/PIN_NAME_REGEX","linuxcnc/tests/module-loading/sim_encoder/num_chan=9/RESULT","linuxcnc/tests/module-loading/sim_encoder/num_chan=9/expected","linuxcnc/tests/module-loading/sim_encoder/num_chan=9/setup.hal"],"parse_status":"parsed","path":"linuxcnc/tests/module-loading/sim_encoder/num_chan=9/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"96811a29041aa5ccb923f56adf9282e7ff7cb7a50111b1490d7da1e4ff178d33","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/module-loading/sim_encoder/num_chan=9/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion-logger/basic/checkresult","config_refs":[],"expected":["linuxcnc/tests/motion-logger/basic/expected.builtin-startup.in","linuxcnc/tests/motion-logger/basic/expected.g0","linuxcnc/tests/motion-logger/basic/expected.g1","linuxcnc/tests/motion-logger/basic/expected.reset","linuxcnc/tests/motion-logger/basic/expected.s"],"inputs":["linuxcnc/tests/motion-logger/basic/.gitignore","linuxcnc/tests/motion-logger/basic/README","linuxcnc/tests/motion-logger/basic/expected.builtin-startup.in","linuxcnc/tests/motion-logger/basic/expected.g0","linuxcnc/tests/motion-logger/basic/expected.g1","linuxcnc/tests/motion-logger/basic/expected.reset","linuxcnc/tests/motion-logger/basic/expected.s","linuxcnc/tests/motion-logger/basic/g0.ngc","linuxcnc/tests/motion-logger/basic/g1.ngc","linuxcnc/tests/motion-logger/basic/mock-motion.hal","linuxcnc/tests/motion-logger/basic/reset.ngc","linuxcnc/tests/motion-logger/basic/s.ngc","linuxcnc/tests/motion-logger/basic/test-ui.py","linuxcnc/tests/motion-logger/basic/test.ini","linuxcnc/tests/motion-logger/basic/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/motion-logger/basic/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"928f7d32ba9bd32b991ffd9de98a75e824f8523a8cc38f69774065a929e33897","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/motion-logger/basic/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion-logger/basic/test.sh","config_refs":["linuxcnc/tests/motion-logger/basic/test.ini"],"expected":["linuxcnc/tests/motion-logger/basic/expected.builtin-startup.in","linuxcnc/tests/motion-logger/basic/expected.g0","linuxcnc/tests/motion-logger/basic/expected.g1","linuxcnc/tests/motion-logger/basic/expected.reset","linuxcnc/tests/motion-logger/basic/expected.s"],"inputs":["linuxcnc/tests/motion-logger/basic/.gitignore","linuxcnc/tests/motion-logger/basic/README","linuxcnc/tests/motion-logger/basic/checkresult","linuxcnc/tests/motion-logger/basic/expected.builtin-startup.in","linuxcnc/tests/motion-logger/basic/expected.g0","linuxcnc/tests/motion-logger/basic/expected.g1","linuxcnc/tests/motion-logger/basic/expected.reset","linuxcnc/tests/motion-logger/basic/expected.s","linuxcnc/tests/motion-logger/basic/g0.ngc","linuxcnc/tests/motion-logger/basic/g1.ngc","linuxcnc/tests/motion-logger/basic/mock-motion.hal","linuxcnc/tests/motion-logger/basic/reset.ngc","linuxcnc/tests/motion-logger/basic/s.ngc","linuxcnc/tests/motion-logger/basic/test-ui.py","linuxcnc/tests/motion-logger/basic/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/motion-logger/basic/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"46f57af48221b1c3f17e3b9e68d6cdd1c55052a0d37b3aa4ef4afc197f22f913","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/motion-logger/basic/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion-logger/mountaindew/checkresult","config_refs":[],"expected":["linuxcnc/tests/motion-logger/mountaindew/expected.motion-logger"],"inputs":["linuxcnc/tests/motion-logger/mountaindew/.gitignore","linuxcnc/tests/motion-logger/mountaindew/expected.motion-logger","linuxcnc/tests/motion-logger/mountaindew/mock-motion.hal","linuxcnc/tests/motion-logger/mountaindew/mountaindew.ini","linuxcnc/tests/motion-logger/mountaindew/mountaindew.ngc","linuxcnc/tests/motion-logger/mountaindew/test-ui.py","linuxcnc/tests/motion-logger/mountaindew/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/motion-logger/mountaindew/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"177380330f4a079d4e5e5198b43be508ccf9f335f5e3fe114dccb6c2dfc45fe6","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/motion-logger/mountaindew/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion-logger/mountaindew/test.sh","config_refs":["linuxcnc/tests/motion-logger/mountaindew/mountaindew.ini"],"expected":["linuxcnc/tests/motion-logger/mountaindew/expected.motion-logger"],"inputs":["linuxcnc/tests/motion-logger/mountaindew/.gitignore","linuxcnc/tests/motion-logger/mountaindew/checkresult","linuxcnc/tests/motion-logger/mountaindew/expected.motion-logger","linuxcnc/tests/motion-logger/mountaindew/mock-motion.hal","linuxcnc/tests/motion-logger/mountaindew/mountaindew.ini","linuxcnc/tests/motion-logger/mountaindew/mountaindew.ngc","linuxcnc/tests/motion-logger/mountaindew/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/motion-logger/mountaindew/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"79b76773cd00fec2f88125bd290aa4b15437091dd073ca0f2501b4a6cec27db9","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/motion-logger/mountaindew/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion-logger/startup-gcode-abort/checkresult","config_refs":[],"expected":["linuxcnc/tests/motion-logger/startup-gcode-abort/expected.motion-logger.in"],"inputs":["linuxcnc/tests/motion-logger/startup-gcode-abort/.gitignore","linuxcnc/tests/motion-logger/startup-gcode-abort/expected.motion-logger.in","linuxcnc/tests/motion-logger/startup-gcode-abort/mock-motion.hal","linuxcnc/tests/motion-logger/startup-gcode-abort/test-ui.py","linuxcnc/tests/motion-logger/startup-gcode-abort/test.ini","linuxcnc/tests/motion-logger/startup-gcode-abort/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/motion-logger/startup-gcode-abort/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"177380330f4a079d4e5e5198b43be508ccf9f335f5e3fe114dccb6c2dfc45fe6","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/motion-logger/startup-gcode-abort/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion-logger/startup-gcode-abort/test.sh","config_refs":["linuxcnc/tests/motion-logger/startup-gcode-abort/test.ini"],"expected":["linuxcnc/tests/motion-logger/startup-gcode-abort/expected.motion-logger.in"],"inputs":["linuxcnc/tests/motion-logger/startup-gcode-abort/.gitignore","linuxcnc/tests/motion-logger/startup-gcode-abort/checkresult","linuxcnc/tests/motion-logger/startup-gcode-abort/expected.motion-logger.in","linuxcnc/tests/motion-logger/startup-gcode-abort/mock-motion.hal","linuxcnc/tests/motion-logger/startup-gcode-abort/test-ui.py","linuxcnc/tests/motion-logger/startup-gcode-abort/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/motion-logger/startup-gcode-abort/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"46f57af48221b1c3f17e3b9e68d6cdd1c55052a0d37b3aa4ef4afc197f22f913","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/motion-logger/startup-gcode-abort/test.sh"}
|
||||||
|
{"command":"python3 linuxcnc/tests/motion/g0/checkresult","config_refs":["linuxcnc/tests/motion/g0/%s/motion-test.ini"],"expected":[],"inputs":["linuxcnc/tests/motion/g0/motion-test.hal","linuxcnc/tests/motion/g0/motion-test.ini","linuxcnc/tests/motion/g0/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/motion/g0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9b1f8ca4b2d769951bd1fa5af4462f835eaab0697810941f323092352f3ea9c1","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/motion/g0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion/g0/test.sh","config_refs":["linuxcnc/tests/motion/g0/motion-test.ini"],"expected":[],"inputs":["linuxcnc/tests/motion/g0/checkresult","linuxcnc/tests/motion/g0/motion-test.hal","linuxcnc/tests/motion/g0/motion-test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/motion/g0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"9ac98482540edd6a6ed464ac41549c017ff460d093e0ae31d2edb64ec87599be","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/motion/g0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion/jogwheel-axis/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/motion/jogwheel-axis/.gitignore","linuxcnc/tests/motion/jogwheel-axis/motion-test.ini","linuxcnc/tests/motion/jogwheel-axis/postgui.hal","linuxcnc/tests/motion/jogwheel-axis/test-ui.py","linuxcnc/tests/motion/jogwheel-axis/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/motion/jogwheel-axis/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"71d507e8d3af8b367c949b33e8fefca20c4453c6591a60f3132a6a16a412b553","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/motion/jogwheel-axis/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion/jogwheel-axis/test.sh","config_refs":["linuxcnc/tests/motion/jogwheel-axis/motion-test.ini"],"expected":[],"inputs":["linuxcnc/tests/motion/jogwheel-axis/.gitignore","linuxcnc/tests/motion/jogwheel-axis/checkresult","linuxcnc/tests/motion/jogwheel-axis/motion-test.ini","linuxcnc/tests/motion/jogwheel-axis/postgui.hal","linuxcnc/tests/motion/jogwheel-axis/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/motion/jogwheel-axis/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"b04629b6d0e8a4fc834863bdab1ccf4c80cafb324740837dd57da724d6f59469","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/motion/jogwheel-axis/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion/jogwheel-joint/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/motion/jogwheel-joint/.gitignore","linuxcnc/tests/motion/jogwheel-joint/motion-test.ini","linuxcnc/tests/motion/jogwheel-joint/postgui.hal","linuxcnc/tests/motion/jogwheel-joint/test-ui.py","linuxcnc/tests/motion/jogwheel-joint/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/motion/jogwheel-joint/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"71d507e8d3af8b367c949b33e8fefca20c4453c6591a60f3132a6a16a412b553","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/motion/jogwheel-joint/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/motion/jogwheel-joint/test.sh","config_refs":["linuxcnc/tests/motion/jogwheel-joint/motion-test.ini"],"expected":[],"inputs":["linuxcnc/tests/motion/jogwheel-joint/.gitignore","linuxcnc/tests/motion/jogwheel-joint/checkresult","linuxcnc/tests/motion/jogwheel-joint/motion-test.ini","linuxcnc/tests/motion/jogwheel-joint/postgui.hal","linuxcnc/tests/motion/jogwheel-joint/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/motion/jogwheel-joint/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"b04629b6d0e8a4fc834863bdab1ccf4c80cafb324740837dd57da724d6f59469","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/motion/jogwheel-joint/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/mqtt/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/mqtt/display.py","linuxcnc/tests/mqtt/simulator.hal","linuxcnc/tests/mqtt/simulator.ini","linuxcnc/tests/mqtt/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/mqtt/checkresult","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/mqtt/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/mqtt/test.sh","config_refs":["linuxcnc/tests/mqtt/simulator.ini","linuxcnc/tests/mqtt/simulator.var"],"expected":[],"inputs":["linuxcnc/tests/mqtt/checkresult","linuxcnc/tests/mqtt/display.py","linuxcnc/tests/mqtt/simulator.hal","linuxcnc/tests/mqtt/simulator.ini"],"parse_status":"parsed","path":"linuxcnc/tests/mqtt/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"5c044819a50b7747fe38657a1742ed08e4d4fa0e45f85a89bfe3b11e3daf071d","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/mqtt/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/near.0/runstreamer","config_refs":[],"expected":["linuxcnc/tests/near.0/expected"],"inputs":["linuxcnc/tests/near.0/README","linuxcnc/tests/near.0/expected","linuxcnc/tests/near.0/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/near.0/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"2665591e510c526ff6cd434b3b06a4d8d9a92b120eef10bc7223c75008f109fe","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/near.0/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/overrun/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/overrun/README","linuxcnc/tests/overrun/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/overrun/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"05a44206007ff94e499a3aaab0724e0d53f68af9f268274c3b1fa7ce34abed2f","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/overrun/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/overrun/test.sh","config_refs":["linuxcnc/tests/overrun/$TMPDIR/test.hal"],"expected":[],"inputs":["linuxcnc/tests/overrun/README","linuxcnc/tests/overrun/checkresult"],"parse_status":"parsed","path":"linuxcnc/tests/overrun/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"283d61d5d9b584fd1cde2d2b416c32a32693c1e6ae92926dc8d1820d26d7e84c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/overrun/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/oword/sub.0/test.sh","config_refs":["linuxcnc/tests/oword/sub.0/test.ngc"],"expected":["linuxcnc/tests/oword/sub.0/expected"],"inputs":["linuxcnc/tests/oword/sub.0/README","linuxcnc/tests/oword/sub.0/expected","linuxcnc/tests/oword/sub.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/oword/sub.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/oword/sub.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/oword/while.0/test.sh","config_refs":["linuxcnc/tests/oword/while.0/test.ngc"],"expected":["linuxcnc/tests/oword/while.0/expected"],"inputs":["linuxcnc/tests/oword/while.0/README","linuxcnc/tests/oword/while.0/expected","linuxcnc/tests/oword/while.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/oword/while.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"5aca3854d97d0124e6dd9289ed71922ec287c2fcea27f7836ee6a4c21a1479fd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/oword/while.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/realtime-math/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/realtime-math/README","linuxcnc/tests/realtime-math/control","linuxcnc/tests/realtime-math/dotest.hal","linuxcnc/tests/realtime-math/rtmath.comp","linuxcnc/tests/realtime-math/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/realtime-math/checkresult","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"1e57c3721f9f40e3aa41cc58f41784df2037afde7c190f3e1cb3c2d8ed54fcb4","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/realtime-math/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/realtime-math/test.sh","config_refs":["linuxcnc/tests/realtime-math/dotest.hal"],"expected":[],"inputs":["linuxcnc/tests/realtime-math/README","linuxcnc/tests/realtime-math/checkresult","linuxcnc/tests/realtime-math/control","linuxcnc/tests/realtime-math/dotest.hal","linuxcnc/tests/realtime-math/rtmath.comp"],"parse_status":"parsed","path":"linuxcnc/tests/realtime-math/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"ad9c5b21df16d6a9ed1b71cda4ff5d0ed9a569fd2906665922ac14c903cfbab6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/realtime-math/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/duplicate-o-word/test.sh","config_refs":["linuxcnc/tests/remap/duplicate-o-word/test.ini","linuxcnc/tests/remap/duplicate-o-word/test.ngc"],"expected":["linuxcnc/tests/remap/duplicate-o-word/expected"],"inputs":["linuxcnc/tests/remap/duplicate-o-word/README","linuxcnc/tests/remap/duplicate-o-word/expected","linuxcnc/tests/remap/duplicate-o-word/rm207.ngc","linuxcnc/tests/remap/duplicate-o-word/rm208.ngc","linuxcnc/tests/remap/duplicate-o-word/test.ini","linuxcnc/tests/remap/duplicate-o-word/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/duplicate-o-word/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"f352fb4a5c7cabc22ef67c385c42a461c4f6819052335746f356fea37e6dde3e","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/duplicate-o-word/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/args.0/test.sh","config_refs":["linuxcnc/tests/remap/fail/args.0/test.ini","linuxcnc/tests/remap/fail/args.0/test.ngc"],"expected":["linuxcnc/tests/remap/fail/args.0/expected"],"inputs":["linuxcnc/tests/remap/fail/args.0/README","linuxcnc/tests/remap/fail/args.0/expected","linuxcnc/tests/remap/fail/args.0/rm400.ngc","linuxcnc/tests/remap/fail/args.0/test.ini","linuxcnc/tests/remap/fail/args.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/args.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"440efef6282cf08df1e6a4f40d4d44217a37a0cde9f4cfe9a623228ec12bf0e5","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/args.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/args.1/test.sh","config_refs":["linuxcnc/tests/remap/fail/args.1/test.ini","linuxcnc/tests/remap/fail/args.1/test.ngc"],"expected":["linuxcnc/tests/remap/fail/args.1/expected"],"inputs":["linuxcnc/tests/remap/fail/args.1/README","linuxcnc/tests/remap/fail/args.1/expected","linuxcnc/tests/remap/fail/args.1/rm400.ngc","linuxcnc/tests/remap/fail/args.1/test.ini","linuxcnc/tests/remap/fail/args.1/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/args.1/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e1734f60cbb47a9237c75112cab00bc52aa3b6530d56acf81f8aeaddc9b4b2cd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/args.1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/args.2/test.sh","config_refs":["linuxcnc/tests/remap/fail/args.2/test.ini","linuxcnc/tests/remap/fail/args.2/test.ngc"],"expected":["linuxcnc/tests/remap/fail/args.2/expected"],"inputs":["linuxcnc/tests/remap/fail/args.2/README","linuxcnc/tests/remap/fail/args.2/expected","linuxcnc/tests/remap/fail/args.2/rm400.ngc","linuxcnc/tests/remap/fail/args.2/test.ini","linuxcnc/tests/remap/fail/args.2/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/args.2/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e1734f60cbb47a9237c75112cab00bc52aa3b6530d56acf81f8aeaddc9b4b2cd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/args.2/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/body-ngc/test.sh","config_refs":["linuxcnc/tests/remap/fail/body-ngc/test.ini","linuxcnc/tests/remap/fail/body-ngc/test.ngc"],"expected":["linuxcnc/tests/remap/fail/body-ngc/expected"],"inputs":["linuxcnc/tests/remap/fail/body-ngc/README","linuxcnc/tests/remap/fail/body-ngc/expected","linuxcnc/tests/remap/fail/body-ngc/rm400.ngc","linuxcnc/tests/remap/fail/body-ngc/test.ini","linuxcnc/tests/remap/fail/body-ngc/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/body-ngc/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e1734f60cbb47a9237c75112cab00bc52aa3b6530d56acf81f8aeaddc9b4b2cd","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/body-ngc/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/body-py/test.sh","config_refs":["linuxcnc/tests/remap/fail/body-py/test.ini","linuxcnc/tests/remap/fail/body-py/test.ngc"],"expected":["linuxcnc/tests/remap/fail/body-py/expected"],"inputs":["linuxcnc/tests/remap/fail/body-py/README","linuxcnc/tests/remap/fail/body-py/expected","linuxcnc/tests/remap/fail/body-py/remap.py","linuxcnc/tests/remap/fail/body-py/subs.py","linuxcnc/tests/remap/fail/body-py/test.ini","linuxcnc/tests/remap/fail/body-py/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/body-py/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"8ae9fcef9d44fed6726992c7e321362833eec5172b211fcff01355fb64f01380","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/body-py/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/canon_error/test.sh","config_refs":["linuxcnc/tests/remap/fail/canon_error/test.ini","linuxcnc/tests/remap/fail/canon_error/test.ngc"],"expected":["linuxcnc/tests/remap/fail/canon_error/expected"],"inputs":["linuxcnc/tests/remap/fail/canon_error/README","linuxcnc/tests/remap/fail/canon_error/expected","linuxcnc/tests/remap/fail/canon_error/notcalled.ngc","linuxcnc/tests/remap/fail/canon_error/remap.py","linuxcnc/tests/remap/fail/canon_error/subs.py","linuxcnc/tests/remap/fail/canon_error/test.ini","linuxcnc/tests/remap/fail/canon_error/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/canon_error/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c9efa0b7d7f200a41d2e07e70d3e7a8fc745bf34d9816fae75ab5ad142dbc1fc","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/canon_error/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/epilog/test.sh","config_refs":["linuxcnc/tests/remap/fail/epilog/test.ini","linuxcnc/tests/remap/fail/epilog/test.ngc"],"expected":["linuxcnc/tests/remap/fail/epilog/expected"],"inputs":["linuxcnc/tests/remap/fail/epilog/README","linuxcnc/tests/remap/fail/epilog/expected","linuxcnc/tests/remap/fail/epilog/mustbecalled.ngc","linuxcnc/tests/remap/fail/epilog/remap.py","linuxcnc/tests/remap/fail/epilog/subs.py","linuxcnc/tests/remap/fail/epilog/test.ini","linuxcnc/tests/remap/fail/epilog/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/epilog/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"311884a953406d6ab5e89d22caad8bbe207df0ef9ea401c7fcf7827f4d0b2b42","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/epilog/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/fail/prolog/test.sh","config_refs":["linuxcnc/tests/remap/fail/prolog/test.ini","linuxcnc/tests/remap/fail/prolog/test.ngc"],"expected":["linuxcnc/tests/remap/fail/prolog/expected"],"inputs":["linuxcnc/tests/remap/fail/prolog/README","linuxcnc/tests/remap/fail/prolog/expected","linuxcnc/tests/remap/fail/prolog/notcalled.ngc","linuxcnc/tests/remap/fail/prolog/remap.py","linuxcnc/tests/remap/fail/prolog/subs.py","linuxcnc/tests/remap/fail/prolog/test.ini","linuxcnc/tests/remap/fail/prolog/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/fail/prolog/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c9efa0b7d7f200a41d2e07e70d3e7a8fc745bf34d9816fae75ab5ad142dbc1fc","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/fail/prolog/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/introspect/test.sh","config_refs":["linuxcnc/tests/remap/introspect/test.ini","linuxcnc/tests/remap/introspect/test.ngc"],"expected":["linuxcnc/tests/remap/introspect/expected"],"inputs":["linuxcnc/tests/remap/introspect/README","linuxcnc/tests/remap/introspect/expected","linuxcnc/tests/remap/introspect/foo.ngc","linuxcnc/tests/remap/introspect/oword.py","linuxcnc/tests/remap/introspect/subs.py","linuxcnc/tests/remap/introspect/test.ini","linuxcnc/tests/remap/introspect/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/introspect/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"3925db250a9e34ddacce6e585f0d5bdbc74b618a273e2941fcdea9fcc6a00b7c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/introspect/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/m30-interaction/test.sh","config_refs":["linuxcnc/tests/remap/m30-interaction/test.ini","linuxcnc/tests/remap/m30-interaction/test.ngc"],"expected":["linuxcnc/tests/remap/m30-interaction/expected"],"inputs":["linuxcnc/tests/remap/m30-interaction/README","linuxcnc/tests/remap/m30-interaction/expected","linuxcnc/tests/remap/m30-interaction/rm400.ngc","linuxcnc/tests/remap/m30-interaction/test.ini","linuxcnc/tests/remap/m30-interaction/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/m30-interaction/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"25858e6064417f1fd86fbd80f6d98e6cd0db9a9dd3d8a87df9065f628582c19a","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/m30-interaction/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/nested-remaps-oword/test.sh","config_refs":["linuxcnc/tests/remap/nested-remaps-oword/test.ini","linuxcnc/tests/remap/nested-remaps-oword/test.ngc"],"expected":["linuxcnc/tests/remap/nested-remaps-oword/expected"],"inputs":["linuxcnc/tests/remap/nested-remaps-oword/README","linuxcnc/tests/remap/nested-remaps-oword/expected","linuxcnc/tests/remap/nested-remaps-oword/rm400.ngc","linuxcnc/tests/remap/nested-remaps-oword/rm401.ngc","linuxcnc/tests/remap/nested-remaps-oword/rm402.ngc","linuxcnc/tests/remap/nested-remaps-oword/rm403.ngc","linuxcnc/tests/remap/nested-remaps-oword/test.ini","linuxcnc/tests/remap/nested-remaps-oword/test.ngc","linuxcnc/tests/remap/nested-remaps-oword/testsub.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/nested-remaps-oword/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"19405f873e7e0a990e72d9afa283046bcd186e6c9f955566e57594eea5c08284","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/nested-remaps-oword/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/oword-pycall/test.sh","config_refs":["linuxcnc/tests/remap/oword-pycall/test.ini","linuxcnc/tests/remap/oword-pycall/test.ngc","linuxcnc/tests/remap/oword-pycall/test.tbl"],"expected":["linuxcnc/tests/remap/oword-pycall/expected"],"inputs":["linuxcnc/tests/remap/oword-pycall/README","linuxcnc/tests/remap/oword-pycall/expected","linuxcnc/tests/remap/oword-pycall/oword.py","linuxcnc/tests/remap/oword-pycall/subs.py","linuxcnc/tests/remap/oword-pycall/test.ini","linuxcnc/tests/remap/oword-pycall/test.ngc","linuxcnc/tests/remap/oword-pycall/test.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/remap/oword-pycall/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7ba9fcab18c382e6c717044feb96b3e156b9f6695e924cb6d454e0a9f80421b4","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/oword-pycall/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/posargs.0/test.sh","config_refs":["linuxcnc/tests/remap/posargs.0/test.ini"],"expected":["linuxcnc/tests/remap/posargs.0/expected"],"inputs":["linuxcnc/tests/remap/posargs.0/README","linuxcnc/tests/remap/posargs.0/expected","linuxcnc/tests/remap/posargs.0/rg881.ngc","linuxcnc/tests/remap/posargs.0/test.ini","linuxcnc/tests/remap/posargs.0/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/posargs.0/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0e971402b6c7a213fca57e12f6a6c38050aa2d07d923ec83fe506f1e32c485eb","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/posargs.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/predefined-named-params/test.sh","config_refs":["linuxcnc/tests/remap/predefined-named-params/test.ini","linuxcnc/tests/remap/predefined-named-params/test.ngc"],"expected":["linuxcnc/tests/remap/predefined-named-params/expected"],"inputs":["linuxcnc/tests/remap/predefined-named-params/README","linuxcnc/tests/remap/predefined-named-params/expected","linuxcnc/tests/remap/predefined-named-params/namedparams.py","linuxcnc/tests/remap/predefined-named-params/subs.py","linuxcnc/tests/remap/predefined-named-params/test.ini","linuxcnc/tests/remap/predefined-named-params/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/predefined-named-params/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"3925db250a9e34ddacce6e585f0d5bdbc74b618a273e2941fcdea9fcc6a00b7c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/predefined-named-params/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/remap-io/test.sh","config_refs":["linuxcnc/tests/remap/remap-io/test-ngc.ini","linuxcnc/tests/remap/remap-io/test-py.ini"],"expected":["linuxcnc/tests/remap/remap-io/expected"],"inputs":["linuxcnc/tests/remap/remap-io/README","linuxcnc/tests/remap/remap-io/core_sim.hal","linuxcnc/tests/remap/remap-io/expected","linuxcnc/tests/remap/remap-io/io_input_m66.ngc","linuxcnc/tests/remap/remap-io/io_output_m62.ngc","linuxcnc/tests/remap/remap-io/io_output_m63.ngc","linuxcnc/tests/remap/remap-io/io_output_m64.ngc","linuxcnc/tests/remap/remap-io/io_output_m65.ngc","linuxcnc/tests/remap/remap-io/io_output_m67.ngc","linuxcnc/tests/remap/remap-io/io_output_m68.ngc","linuxcnc/tests/remap/remap-io/postgui.hal","linuxcnc/tests/remap/remap-io/remap.py","linuxcnc/tests/remap/remap-io/simpockets.tbl","linuxcnc/tests/remap/remap-io/test-ngc.ini","linuxcnc/tests/remap/remap-io/test-py.ini","linuxcnc/tests/remap/remap-io/test-ui.py","linuxcnc/tests/remap/remap-io/toplevel.py"],"parse_status":"parsed","path":"linuxcnc/tests/remap/remap-io/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"02740469b425547c5bfebac9e3121e166e08648d209cb328f5ef6a34e38a0be4","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/remap-io/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/remap-reentry/test.sh","config_refs":["linuxcnc/tests/remap/remap-reentry/test.ini","linuxcnc/tests/remap/remap-reentry/test.ngc"],"expected":["linuxcnc/tests/remap/remap-reentry/expected"],"inputs":["linuxcnc/tests/remap/remap-reentry/README","linuxcnc/tests/remap/remap-reentry/core_sim.hal","linuxcnc/tests/remap/remap-reentry/expected","linuxcnc/tests/remap/remap-reentry/remap.py","linuxcnc/tests/remap/remap-reentry/rm406.ngc","linuxcnc/tests/remap/remap-reentry/simpockets.tbl","linuxcnc/tests/remap/remap-reentry/test.ini","linuxcnc/tests/remap/remap-reentry/test.ngc","linuxcnc/tests/remap/remap-reentry/toplevel.py"],"parse_status":"parsed","path":"linuxcnc/tests/remap/remap-reentry/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"8e73b0225343bdf4e979264a469f6ae6e81497892605ea83855e74a212958836","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/remap-reentry/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/sequencing/test.sh","config_refs":["linuxcnc/tests/remap/sequencing/test.ini","linuxcnc/tests/remap/sequencing/test.ngc"],"expected":["linuxcnc/tests/remap/sequencing/expected"],"inputs":["linuxcnc/tests/remap/sequencing/README","linuxcnc/tests/remap/sequencing/expected","linuxcnc/tests/remap/sequencing/permute.py","linuxcnc/tests/remap/sequencing/rg881.ngc","linuxcnc/tests/remap/sequencing/rm405.ngc","linuxcnc/tests/remap/sequencing/rm406.ngc","linuxcnc/tests/remap/sequencing/rm407.ngc","linuxcnc/tests/remap/sequencing/rm408.ngc","linuxcnc/tests/remap/sequencing/rm409.ngc","linuxcnc/tests/remap/sequencing/rm410.ngc","linuxcnc/tests/remap/sequencing/test.ini","linuxcnc/tests/remap/sequencing/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/sequencing/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"f352fb4a5c7cabc22ef67c385c42a461c4f6819052335746f356fea37e6dde3e","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/sequencing/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/spindle/test.sh","config_refs":["linuxcnc/tests/remap/spindle/test.ini","linuxcnc/tests/remap/spindle/test.ngc"],"expected":["linuxcnc/tests/remap/spindle/expected"],"inputs":["linuxcnc/tests/remap/spindle/README","linuxcnc/tests/remap/spindle/expected","linuxcnc/tests/remap/spindle/remap.py","linuxcnc/tests/remap/spindle/test.ini","linuxcnc/tests/remap/spindle/test.ngc","linuxcnc/tests/remap/spindle/toplevel.py"],"parse_status":"parsed","path":"linuxcnc/tests/remap/spindle/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"69caaf0893c5e59446554870a17abff7af7b7c8b0c8c8c94eac542b2885bad93","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/spindle/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/remap/variable-injection/test.sh","config_refs":["linuxcnc/tests/remap/variable-injection/test.ini","linuxcnc/tests/remap/variable-injection/test.ngc"],"expected":["linuxcnc/tests/remap/variable-injection/expected"],"inputs":["linuxcnc/tests/remap/variable-injection/README","linuxcnc/tests/remap/variable-injection/expected","linuxcnc/tests/remap/variable-injection/remap.py","linuxcnc/tests/remap/variable-injection/rm405.ngc","linuxcnc/tests/remap/variable-injection/rm406.ngc","linuxcnc/tests/remap/variable-injection/rm407.ngc","linuxcnc/tests/remap/variable-injection/subs.py","linuxcnc/tests/remap/variable-injection/test.ini","linuxcnc/tests/remap/variable-injection/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/remap/variable-injection/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d067b898bd3056d20cdb088322d409ee5aacfe9e86dda729acf9a840d71298d3","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/remap/variable-injection/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/rs274ngc-startup/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/rs274ngc-startup/.gitignore","linuxcnc/tests/rs274ngc-startup/core_sim.hal","linuxcnc/tests/rs274ngc-startup/simpockets.tbl","linuxcnc/tests/rs274ngc-startup/test-ui.py","linuxcnc/tests/rs274ngc-startup/test.ini","linuxcnc/tests/rs274ngc-startup/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/rs274ngc-startup/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/rs274ngc-startup/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/rs274ngc-startup/test.sh","config_refs":["linuxcnc/tests/rs274ngc-startup/test.ini"],"expected":[],"inputs":["linuxcnc/tests/rs274ngc-startup/.gitignore","linuxcnc/tests/rs274ngc-startup/checkresult","linuxcnc/tests/rs274ngc-startup/core_sim.hal","linuxcnc/tests/rs274ngc-startup/simpockets.tbl","linuxcnc/tests/rs274ngc-startup/test-ui.py","linuxcnc/tests/rs274ngc-startup/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/rs274ngc-startup/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"713f957473f6a42937098dbdfcc945c3abe39937c4fb606d9985c335b282fa1f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/rs274ngc-startup/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/rtapi-shmem/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/rtapi-shmem/README.md","linuxcnc/tests/rtapi-shmem/control","linuxcnc/tests/rtapi-shmem/setup.hal","linuxcnc/tests/rtapi-shmem/test.sh","linuxcnc/tests/rtapi-shmem/test_shmem_rtcomp.comp"],"parse_status":"parsed","path":"linuxcnc/tests/rtapi-shmem/checkresult","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"c87c7a722d59a266b300850637a1cb77b46cc67c5add8a66aa9e79e198955808","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/rtapi-shmem/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/rtapi-shmem/test.sh","config_refs":["linuxcnc/tests/rtapi-shmem/setup.hal"],"expected":[],"inputs":["linuxcnc/tests/rtapi-shmem/README.md","linuxcnc/tests/rtapi-shmem/checkresult","linuxcnc/tests/rtapi-shmem/control","linuxcnc/tests/rtapi-shmem/setup.hal","linuxcnc/tests/rtapi-shmem/test_shmem_rtcomp.comp"],"parse_status":"parsed","path":"linuxcnc/tests/rtapi-shmem/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"64190cf7375d91df8abae43d73f96ece6e795ceb134f5222e60a26e48f14b7ce","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/rtapi-shmem/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/rtapi_printf.0/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/rtapi_printf.0/.gitignore","linuxcnc/tests/rtapi_printf.0/test.sh","linuxcnc/tests/rtapi_printf.0/test_rtapi_vsnprintf.c"],"parse_status":"parsed","path":"linuxcnc/tests/rtapi_printf.0/checkresult","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"e96cea10296488350b049a3f60970a264a14042abbb23a21891eef51aa9eb035","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/rtapi_printf.0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/rtapi_printf.0/test.sh","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/rtapi_printf.0/.gitignore","linuxcnc/tests/rtapi_printf.0/checkresult","linuxcnc/tests/rtapi_printf.0/test_rtapi_vsnprintf.c"],"parse_status":"parsed","path":"linuxcnc/tests/rtapi_printf.0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"80b6aba583d815865e02b90d16b5508186d7f9320d41ab2ac9c9e5c5dca88aab","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/rtapi_printf.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/save.0/test.sh","config_refs":[],"expected":["linuxcnc/tests/save.0/expected"],"inputs":["linuxcnc/tests/save.0/README","linuxcnc/tests/save.0/expected"],"parse_status":"parsed","path":"linuxcnc/tests/save.0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"0f602551ba367a7f940d1e2056fb3d48b0b30fd34cfde59302bd54dfe815962d","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/save.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/single-step/checkresult","config_refs":["linuxcnc/tests/single-step/test-ui.py"],"expected":[],"inputs":["linuxcnc/tests/single-step/postgui.hal","linuxcnc/tests/single-step/test-ui.py","linuxcnc/tests/single-step/test.ini","linuxcnc/tests/single-step/test.ngc","linuxcnc/tests/single-step/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/single-step/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"34bb3c6a787b98da65b92c36d6c24ffd63a21cb9ea9f8db49e903626e7a9236a","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/single-step/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/single-step/test.sh","config_refs":["linuxcnc/tests/single-step/test.ini"],"expected":[],"inputs":["linuxcnc/tests/single-step/checkresult","linuxcnc/tests/single-step/postgui.hal","linuxcnc/tests/single-step/test-ui.py","linuxcnc/tests/single-step/test.ini","linuxcnc/tests/single-step/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/single-step/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"7098ec695449fc6b314717f1aa370d045f8e2c25ae5a3b3fc94d2051026379bc","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/single-step/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/source.0/runstreamer","config_refs":[],"expected":["linuxcnc/tests/source.0/expected"],"inputs":["linuxcnc/tests/source.0/expected","linuxcnc/tests/source.0/sourced.hal","linuxcnc/tests/source.0/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/source.0/runstreamer","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"1a0158f4a0fcde432f2e769edb804ba90bf97fc5b704852217e194d6a43a3dfc","test_kind":"stream_test","test_source_id":"test:linuxcnc/tests/source.0/runstreamer"}
|
||||||
|
{"command":"bash linuxcnc/tests/startup-state/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/startup-state/.gitignore","linuxcnc/tests/startup-state/README","linuxcnc/tests/startup-state/core_sim.hal","linuxcnc/tests/startup-state/sim.var.pre","linuxcnc/tests/startup-state/test-ui.py","linuxcnc/tests/startup-state/test.ini","linuxcnc/tests/startup-state/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/startup-state/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/startup-state/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/startup-state/test.sh","config_refs":["linuxcnc/tests/startup-state/sim.var","linuxcnc/tests/startup-state/test.ini"],"expected":[],"inputs":["linuxcnc/tests/startup-state/.gitignore","linuxcnc/tests/startup-state/README","linuxcnc/tests/startup-state/checkresult","linuxcnc/tests/startup-state/core_sim.hal","linuxcnc/tests/startup-state/sim.var.pre","linuxcnc/tests/startup-state/test-ui.py","linuxcnc/tests/startup-state/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/startup-state/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d9fe496d837113483eb072efe65edc36df9e57ada7f8ae653073a087b9e1947f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/startup-state/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/statbuffer-g5x-abort/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/statbuffer-g5x-abort/.gitignore","linuxcnc/tests/statbuffer-g5x-abort/README","linuxcnc/tests/statbuffer-g5x-abort/core_sim.hal","linuxcnc/tests/statbuffer-g5x-abort/simpockets.tbl","linuxcnc/tests/statbuffer-g5x-abort/test-ui.py","linuxcnc/tests/statbuffer-g5x-abort/test.ini","linuxcnc/tests/statbuffer-g5x-abort/test.ngc","linuxcnc/tests/statbuffer-g5x-abort/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/statbuffer-g5x-abort/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/statbuffer-g5x-abort/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/statbuffer-g5x-abort/test.sh","config_refs":["linuxcnc/tests/statbuffer-g5x-abort/test.ini"],"expected":[],"inputs":["linuxcnc/tests/statbuffer-g5x-abort/.gitignore","linuxcnc/tests/statbuffer-g5x-abort/README","linuxcnc/tests/statbuffer-g5x-abort/checkresult","linuxcnc/tests/statbuffer-g5x-abort/core_sim.hal","linuxcnc/tests/statbuffer-g5x-abort/simpockets.tbl","linuxcnc/tests/statbuffer-g5x-abort/test-ui.py","linuxcnc/tests/statbuffer-g5x-abort/test.ini","linuxcnc/tests/statbuffer-g5x-abort/test.ngc"],"parse_status":"parsed","path":"linuxcnc/tests/statbuffer-g5x-abort/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"713f957473f6a42937098dbdfcc945c3abe39937c4fb606d9985c335b282fa1f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/statbuffer-g5x-abort/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/stepgen.1/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/stepgen.1/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/stepgen.1/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"4e8703b5617d807b20707c89cf0de8e23619d469ed89acb31ab47c13eadfdc65","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/stepgen.1/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/stepgen.2/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/stepgen.2/README","linuxcnc/tests/stepgen.2/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/stepgen.2/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c6cd55125cae0014ad87069e9281b681f3362230ea08c3ad0ab2a09d5d1af524","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/stepgen.2/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/symbols.0/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/symbols.0/control","linuxcnc/tests/symbols.0/dotest.hal","linuxcnc/tests/symbols.0/test.sh","linuxcnc/tests/symbols.0/test_define.comp","linuxcnc/tests/symbols.0/test_use.comp"],"parse_status":"parsed","path":"linuxcnc/tests/symbols.0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"605a58405e8f5d50058d582be1198f9d1c3492c4a1f0452248a8a5950c9be93d","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/symbols.0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/symbols.0/test.sh","config_refs":["linuxcnc/tests/symbols.0/dotest.hal"],"expected":[],"inputs":["linuxcnc/tests/symbols.0/checkresult","linuxcnc/tests/symbols.0/control","linuxcnc/tests/symbols.0/dotest.hal","linuxcnc/tests/symbols.0/test_define.comp","linuxcnc/tests/symbols.0/test_use.comp"],"parse_status":"parsed","path":"linuxcnc/tests/symbols.0/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"ff7d6d72c87cc0f2529412c5f18d1724602552d1bbaeea8d8025a6b75a62b62f","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/symbols.0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/symbols.1/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/symbols.1/control","linuxcnc/tests/symbols.1/dotest.hal","linuxcnc/tests/symbols.1/test.sh","linuxcnc/tests/symbols.1/test_define1.comp","linuxcnc/tests/symbols.1/test_use1.comp"],"parse_status":"parsed","path":"linuxcnc/tests/symbols.1/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"a6a00fca137dcef9d6d1bc5e22a787b1bc8ddd4840d558366523e3090e05ab3e","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/symbols.1/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/symbols.1/test.sh","config_refs":["linuxcnc/tests/symbols.1/dotest.hal"],"expected":[],"inputs":["linuxcnc/tests/symbols.1/checkresult","linuxcnc/tests/symbols.1/control","linuxcnc/tests/symbols.1/dotest.hal","linuxcnc/tests/symbols.1/test_define1.comp","linuxcnc/tests/symbols.1/test_use1.comp"],"parse_status":"parsed","path":"linuxcnc/tests/symbols.1/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"7a9a117668af8d87151a830a7c2c95ae6af81215647e1dbd28b71dae5077c8aa","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/symbols.1/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/t0/nonrandom/checkresult","config_refs":[],"expected":["linuxcnc/tests/t0/nonrandom/expected-gcode-output"],"inputs":["linuxcnc/tests/t0/nonrandom/expected-gcode-output","linuxcnc/tests/t0/nonrandom/sim.ini","linuxcnc/tests/t0/nonrandom/test.sh","linuxcnc/tests/t0/nonrandom/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/t0/nonrandom/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"94d1622eef40970870d1536ff9872bdcd3e98757b2f04798713bcef68d0d1961","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/t0/nonrandom/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/t0/nonrandom/test.sh","config_refs":["linuxcnc/tests/t0/nonrandom/sim.ini","linuxcnc/tests/t0/nonrandom/sim.var","linuxcnc/tests/t0/nonrandom/tool.tbl"],"expected":["linuxcnc/tests/t0/nonrandom/expected-gcode-output"],"inputs":["linuxcnc/tests/t0/nonrandom/checkresult","linuxcnc/tests/t0/nonrandom/expected-gcode-output","linuxcnc/tests/t0/nonrandom/sim.ini","linuxcnc/tests/t0/nonrandom/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/t0/nonrandom/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"4cdf19b0619b54150685aaff7203a50fbd676e00e634b652843ee47fd7b66267","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/t0/nonrandom/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/t0/random-with-t0/checkresult","config_refs":[],"expected":["linuxcnc/tests/t0/random-with-t0/expected-gcode-output"],"inputs":["linuxcnc/tests/t0/random-with-t0/expected-gcode-output","linuxcnc/tests/t0/random-with-t0/sim.ini","linuxcnc/tests/t0/random-with-t0/test.sh","linuxcnc/tests/t0/random-with-t0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/t0/random-with-t0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"94d1622eef40970870d1536ff9872bdcd3e98757b2f04798713bcef68d0d1961","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/t0/random-with-t0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/t0/random-with-t0/test.sh","config_refs":["linuxcnc/tests/t0/random-with-t0/sim.ini","linuxcnc/tests/t0/random-with-t0/sim.var","linuxcnc/tests/t0/random-with-t0/tool.tbl"],"expected":["linuxcnc/tests/t0/random-with-t0/expected-gcode-output"],"inputs":["linuxcnc/tests/t0/random-with-t0/checkresult","linuxcnc/tests/t0/random-with-t0/expected-gcode-output","linuxcnc/tests/t0/random-with-t0/sim.ini","linuxcnc/tests/t0/random-with-t0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/t0/random-with-t0/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"4cdf19b0619b54150685aaff7203a50fbd676e00e634b652843ee47fd7b66267","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/t0/random-with-t0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/t0/random-without-t0/checkresult","config_refs":[],"expected":["linuxcnc/tests/t0/random-without-t0/expected-gcode-output"],"inputs":["linuxcnc/tests/t0/random-without-t0/expected-gcode-output","linuxcnc/tests/t0/random-without-t0/sim.ini","linuxcnc/tests/t0/random-without-t0/test.sh","linuxcnc/tests/t0/random-without-t0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/t0/random-without-t0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"94d1622eef40970870d1536ff9872bdcd3e98757b2f04798713bcef68d0d1961","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/t0/random-without-t0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/t0/random-without-t0/test.sh","config_refs":["linuxcnc/tests/t0/random-without-t0/sim.ini","linuxcnc/tests/t0/random-without-t0/sim.var","linuxcnc/tests/t0/random-without-t0/tool.tbl"],"expected":["linuxcnc/tests/t0/random-without-t0/expected-gcode-output"],"inputs":["linuxcnc/tests/t0/random-without-t0/checkresult","linuxcnc/tests/t0/random-without-t0/expected-gcode-output","linuxcnc/tests/t0/random-without-t0/sim.ini","linuxcnc/tests/t0/random-without-t0/tool.tbl.original"],"parse_status":"parsed","path":"linuxcnc/tests/t0/random-without-t0/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"4cdf19b0619b54150685aaff7203a50fbd676e00e634b652843ee47fd7b66267","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/t0/random-without-t0/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/tclsh-extensions/test.sh","config_refs":["linuxcnc/tests/tclsh-extensions/test.tcl"],"expected":["linuxcnc/tests/tclsh-extensions/expected"],"inputs":["linuxcnc/tests/tclsh-extensions/expected","linuxcnc/tests/tclsh-extensions/test.tcl"],"parse_status":"parsed","path":"linuxcnc/tests/tclsh-extensions/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"3688c2fd7ef9c0d062549d31b4ae3787143124d8e5e935e45b73d93a48622132","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/tclsh-extensions/test.sh"}
|
||||||
|
{"command":"python3 linuxcnc/tests/threads.0/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/threads.0/README","linuxcnc/tests/threads.0/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/threads.0/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"76a80e41cd06a5690417b0f4a104cfcd9e4223a3e68b0c7c8c45b16ebc9eb400","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/threads.0/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/threads.1/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/threads.1/test.hal"],"parse_status":"parsed","path":"linuxcnc/tests/threads.1/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0b7c9e38fe5e71c399b159ae8c305143ee72a44ea0843b929533bd068e5af197","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/threads.1/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/tlo/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/tlo/.gitignore","linuxcnc/tests/tlo/g43-test.ini","linuxcnc/tests/tlo/mod_core_sim.hal","linuxcnc/tests/tlo/postgui.hal","linuxcnc/tests/tlo/simpockets.tbl.original","linuxcnc/tests/tlo/test-ui.py","linuxcnc/tests/tlo/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/tlo/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/tlo/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/tlo/test.sh","config_refs":["linuxcnc/tests/tlo/g43-test.ini","linuxcnc/tests/tlo/sim.var","linuxcnc/tests/tlo/simpockets.tbl"],"expected":[],"inputs":["linuxcnc/tests/tlo/.gitignore","linuxcnc/tests/tlo/checkresult","linuxcnc/tests/tlo/g43-test.ini","linuxcnc/tests/tlo/mod_core_sim.hal","linuxcnc/tests/tlo/postgui.hal","linuxcnc/tests/tlo/simpockets.tbl.original","linuxcnc/tests/tlo/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/tlo/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"186669f70c6d519f862a1df7ff8bff6d21b6636cc18c11e0a743d1e60370159e","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/tlo/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/tool-info/README","linuxcnc/tests/tool-info/core_sim.hal","linuxcnc/tests/tool-info/shared-test.sh","linuxcnc/tests/tool-info/simpockets.tbl"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/tool-info/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/non-random/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/tool-info/non-random/.gitignore","linuxcnc/tests/tool-info/non-random/core_sim.hal","linuxcnc/tests/tool-info/non-random/test-ui.py","linuxcnc/tests/tool-info/non-random/test.ini","linuxcnc/tests/tool-info/non-random/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/non-random/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/tool-info/non-random/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/non-random/test.sh","config_refs":["linuxcnc/tests/tool-info/non-random/simpockets.tbl","linuxcnc/tests/tool-info/non-random/test.ini","linuxcnc/tests/tool-info/simpockets.tbl"],"expected":[],"inputs":["linuxcnc/tests/tool-info/non-random/.gitignore","linuxcnc/tests/tool-info/non-random/checkresult","linuxcnc/tests/tool-info/non-random/core_sim.hal","linuxcnc/tests/tool-info/non-random/test-ui.py","linuxcnc/tests/tool-info/non-random/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/non-random/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"4ad6d5a3e767c41a8b4f62e8fe63f286e93c5e3d1c63b7835af9dd92f13e909c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/tool-info/non-random/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/random-no-startup-tool/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/tool-info/random-no-startup-tool/.gitignore","linuxcnc/tests/tool-info/random-no-startup-tool/core_sim.hal","linuxcnc/tests/tool-info/random-no-startup-tool/test-ui.py","linuxcnc/tests/tool-info/random-no-startup-tool/test.ini","linuxcnc/tests/tool-info/random-no-startup-tool/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/random-no-startup-tool/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/tool-info/random-no-startup-tool/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/random-no-startup-tool/test.sh","config_refs":["linuxcnc/tests/tool-info/random-no-startup-tool/simpockets.tbl","linuxcnc/tests/tool-info/random-no-startup-tool/test.ini","linuxcnc/tests/tool-info/simpockets.tbl"],"expected":[],"inputs":["linuxcnc/tests/tool-info/random-no-startup-tool/.gitignore","linuxcnc/tests/tool-info/random-no-startup-tool/checkresult","linuxcnc/tests/tool-info/random-no-startup-tool/core_sim.hal","linuxcnc/tests/tool-info/random-no-startup-tool/test-ui.py","linuxcnc/tests/tool-info/random-no-startup-tool/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/random-no-startup-tool/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"4ad6d5a3e767c41a8b4f62e8fe63f286e93c5e3d1c63b7835af9dd92f13e909c","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/tool-info/random-no-startup-tool/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/random-with-startup-tool/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/tool-info/random-with-startup-tool/.gitignore","linuxcnc/tests/tool-info/random-with-startup-tool/core_sim.hal","linuxcnc/tests/tool-info/random-with-startup-tool/simpockets.tbl.original","linuxcnc/tests/tool-info/random-with-startup-tool/test-ui.py","linuxcnc/tests/tool-info/random-with-startup-tool/test.ini","linuxcnc/tests/tool-info/random-with-startup-tool/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/random-with-startup-tool/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/tool-info/random-with-startup-tool/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/tool-info/random-with-startup-tool/test.sh","config_refs":["linuxcnc/tests/tool-info/random-with-startup-tool/simpockets.tbl","linuxcnc/tests/tool-info/random-with-startup-tool/test.ini"],"expected":[],"inputs":["linuxcnc/tests/tool-info/random-with-startup-tool/.gitignore","linuxcnc/tests/tool-info/random-with-startup-tool/checkresult","linuxcnc/tests/tool-info/random-with-startup-tool/core_sim.hal","linuxcnc/tests/tool-info/random-with-startup-tool/simpockets.tbl.original","linuxcnc/tests/tool-info/random-with-startup-tool/test-ui.py","linuxcnc/tests/tool-info/random-with-startup-tool/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/tool-info/random-with-startup-tool/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c6d1cc1e4e7c94aba31711580662ac607c9cb38aa9b56caedae4c847401ed7d8","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/tool-info/random-with-startup-tool/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/m61/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/toolchanger/m61/.gitignore","linuxcnc/tests/toolchanger/m61/m61-test.ini","linuxcnc/tests/toolchanger/m61/mod_core_sim.hal","linuxcnc/tests/toolchanger/m61/postgui.hal","linuxcnc/tests/toolchanger/m61/test-ui.py","linuxcnc/tests/toolchanger/m61/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/m61/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/toolchanger/m61/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/m61/test.sh","config_refs":["linuxcnc/tests/toolchanger/m61/m61-test.ini","linuxcnc/tests/toolchanger/m61/simpockets.tbl"],"expected":[],"inputs":["linuxcnc/tests/toolchanger/m61/.gitignore","linuxcnc/tests/toolchanger/m61/checkresult","linuxcnc/tests/toolchanger/m61/m61-test.ini","linuxcnc/tests/toolchanger/m61/mod_core_sim.hal","linuxcnc/tests/toolchanger/m61/postgui.hal","linuxcnc/tests/toolchanger/m61/test-ui.py"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/m61/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"11aa8c2af0163b7c9a736507c3ea89bcdae717f30dcd86be61641e2ef1aa77bb","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/toolchanger/m61/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/reload-tool/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/toolchanger/reload-tool/README","linuxcnc/tests/toolchanger/reload-tool/core_sim.hal","linuxcnc/tests/toolchanger/reload-tool/postgui.hal","linuxcnc/tests/toolchanger/reload-tool/shared-test.sh","linuxcnc/tests/toolchanger/reload-tool/simpockets.tbl.save"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/reload-tool/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/toolchanger/reload-tool/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/reload-tool/non-random/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/toolchanger/reload-tool/non-random/core_sim.hal","linuxcnc/tests/toolchanger/reload-tool/non-random/postgui.hal","linuxcnc/tests/toolchanger/reload-tool/non-random/test-ui.py","linuxcnc/tests/toolchanger/reload-tool/non-random/test.ini","linuxcnc/tests/toolchanger/reload-tool/non-random/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/reload-tool/non-random/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/toolchanger/reload-tool/non-random/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/reload-tool/non-random/test.sh","config_refs":["linuxcnc/tests/toolchanger/reload-tool/non-random/sim.var","linuxcnc/tests/toolchanger/reload-tool/non-random/simpockets.tbl","linuxcnc/tests/toolchanger/reload-tool/non-random/test.ini"],"expected":[],"inputs":["linuxcnc/tests/toolchanger/reload-tool/non-random/checkresult","linuxcnc/tests/toolchanger/reload-tool/non-random/core_sim.hal","linuxcnc/tests/toolchanger/reload-tool/non-random/postgui.hal","linuxcnc/tests/toolchanger/reload-tool/non-random/test-ui.py","linuxcnc/tests/toolchanger/reload-tool/non-random/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/reload-tool/non-random/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9910355c53a7dc3468e403fb8bc2d19d1fb543c84c0f377c537746027643b8b6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/toolchanger/reload-tool/non-random/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/reload-tool/random/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/toolchanger/reload-tool/random/core_sim.hal","linuxcnc/tests/toolchanger/reload-tool/random/postgui.hal","linuxcnc/tests/toolchanger/reload-tool/random/test-ui.py","linuxcnc/tests/toolchanger/reload-tool/random/test.ini","linuxcnc/tests/toolchanger/reload-tool/random/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/reload-tool/random/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/toolchanger/reload-tool/random/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/reload-tool/random/test.sh","config_refs":["linuxcnc/tests/toolchanger/reload-tool/random/sim.var","linuxcnc/tests/toolchanger/reload-tool/random/simpockets.tbl","linuxcnc/tests/toolchanger/reload-tool/random/test.ini"],"expected":[],"inputs":["linuxcnc/tests/toolchanger/reload-tool/random/checkresult","linuxcnc/tests/toolchanger/reload-tool/random/core_sim.hal","linuxcnc/tests/toolchanger/reload-tool/random/postgui.hal","linuxcnc/tests/toolchanger/reload-tool/random/test-ui.py","linuxcnc/tests/toolchanger/reload-tool/random/test.ini"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/reload-tool/random/test.sh","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"9910355c53a7dc3468e403fb8bc2d19d1fb543c84c0f377c537746027643b8b6","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/toolchanger/reload-tool/random/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/checkresult","config_refs":[],"expected":["linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/expected-gcode-output"],"inputs":["linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/expected-gcode-output","linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/sim.ini","linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"a64cd94c98057a706624c9b3017f3d7ecdc58f4d9a0a9b07c92e6c1a43bc7d18","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/test.sh","config_refs":["linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/sim.ini","linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/sim.var","linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/simpockets.tbl"],"expected":["linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/expected-gcode-output"],"inputs":["linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/checkresult","linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/expected-gcode-output","linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/sim.ini"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"bd8f1a05ea6ee3d26f8594150845b533c18bfc7ee8b94011230e7a9a084cef9a","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/toolchanger/toolno-pocket-differ/nonrandom/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/toolno-pocket-differ/random/checkresult","config_refs":[],"expected":["linuxcnc/tests/toolchanger/toolno-pocket-differ/random/expected-gcode-output"],"inputs":["linuxcnc/tests/toolchanger/toolno-pocket-differ/random/expected-gcode-output","linuxcnc/tests/toolchanger/toolno-pocket-differ/random/sim.ini","linuxcnc/tests/toolchanger/toolno-pocket-differ/random/test.sh"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/toolno-pocket-differ/random/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"a64cd94c98057a706624c9b3017f3d7ecdc58f4d9a0a9b07c92e6c1a43bc7d18","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/toolchanger/toolno-pocket-differ/random/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/toolchanger/toolno-pocket-differ/random/test.sh","config_refs":["linuxcnc/tests/toolchanger/toolno-pocket-differ/random/sim.ini","linuxcnc/tests/toolchanger/toolno-pocket-differ/random/sim.var","linuxcnc/tests/toolchanger/toolno-pocket-differ/random/simpockets.tbl"],"expected":["linuxcnc/tests/toolchanger/toolno-pocket-differ/random/expected-gcode-output"],"inputs":["linuxcnc/tests/toolchanger/toolno-pocket-differ/random/checkresult","linuxcnc/tests/toolchanger/toolno-pocket-differ/random/expected-gcode-output","linuxcnc/tests/toolchanger/toolno-pocket-differ/random/sim.ini"],"parse_status":"parsed","path":"linuxcnc/tests/toolchanger/toolno-pocket-differ/random/test.sh","portability":"REAL-EXCLUDED","portability_reason":"hardware_or_external_transport","source_sha":"bd8f1a05ea6ee3d26f8594150845b533c18bfc7ee8b94011230e7a9a084cef9a","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/toolchanger/toolno-pocket-differ/random/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/trajectory-planner/circular-arcs/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/trajectory-planner/circular-arcs/.octaverc","linuxcnc/tests/trajectory-planner/circular-arcs/build-debug.sh","linuxcnc/tests/trajectory-planner/circular-arcs/build-profile.sh","linuxcnc/tests/trajectory-planner/circular-arcs/build-release.sh","linuxcnc/tests/trajectory-planner/circular-arcs/linuxcnc_control.py","linuxcnc/tests/trajectory-planner/circular-arcs/machine_setup.py","linuxcnc/tests/trajectory-planner/circular-arcs/position.blank","linuxcnc/tests/trajectory-planner/circular-arcs/process_runlog.sh","linuxcnc/tests/trajectory-planner/circular-arcs/profile-run.sh","linuxcnc/tests/trajectory-planner/circular-arcs/rtapi_app.gdb","linuxcnc/tests/trajectory-planner/circular-arcs/run_all_tests.py","linuxcnc/tests/trajectory-planner/circular-arcs/test-all.sh","linuxcnc/tests/trajectory-planner/circular-arcs/test-debug.sh","linuxcnc/tests/trajectory-planner/circular-arcs/test-lengths.sh","linuxcnc/tests/trajectory-planner/circular-arcs/test-optimization.sh","linuxcnc/tests/trajectory-planner/circular-arcs/test-release.sh","linuxcnc/tests/trajectory-planner/circular-arcs/test-reverse.py","linuxcnc/tests/trajectory-planner/circular-arcs/test-simple.sh","linuxcnc/tests/trajectory-planner/circular-arcs/tp_data_export.hal"],"parse_status":"parsed","path":"linuxcnc/tests/trajectory-planner/circular-arcs/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c210d3eea8c126de9ad24c7f528df7ca22fed21c48399d49f4c852116c6ab1aa","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/trajectory-planner/circular-arcs/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/twopass-personality/test.sh","config_refs":["linuxcnc/tests/twopass-personality/tp.ini"],"expected":["linuxcnc/tests/twopass-personality/expected"],"inputs":["linuxcnc/tests/twopass-personality/a.hal","linuxcnc/tests/twopass-personality/b.hal","linuxcnc/tests/twopass-personality/expected","linuxcnc/tests/twopass-personality/tp.ini"],"parse_status":"parsed","path":"linuxcnc/tests/twopass-personality/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"6b3085b72cea46b0f1130ca1551152c9adbac2919432755cf0e0f7327b5e0fbb","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/twopass-personality/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/twopass/test.sh","config_refs":["linuxcnc/tests/twopass/tp.ini"],"expected":["linuxcnc/tests/twopass/expected"],"inputs":["linuxcnc/tests/twopass/a.hal","linuxcnc/tests/twopass/b.hal","linuxcnc/tests/twopass/expected","linuxcnc/tests/twopass/tp.ini"],"parse_status":"parsed","path":"linuxcnc/tests/twopass/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"6b3085b72cea46b0f1130ca1551152c9adbac2919432755cf0e0f7327b5e0fbb","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/twopass/test.sh"}
|
||||||
|
{"command":"bash linuxcnc/tests/uspace/spawnv-root/checkresult","config_refs":[],"expected":[],"inputs":["linuxcnc/tests/uspace/spawnv-root/.gitignore","linuxcnc/tests/uspace/spawnv-root/control","linuxcnc/tests/uspace/spawnv-root/rtapi.conf","linuxcnc/tests/uspace/spawnv-root/test.sh","linuxcnc/tests/uspace/spawnv-root/test_uspace_spawnv.c","linuxcnc/tests/uspace/spawnv-root/test_uspace_spawnv.hal"],"parse_status":"parsed","path":"linuxcnc/tests/uspace/spawnv-root/checkresult","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","test_kind":"oracle_check","test_source_id":"test:linuxcnc/tests/uspace/spawnv-root/checkresult"}
|
||||||
|
{"command":"bash linuxcnc/tests/uspace/spawnv-root/test.sh","config_refs":["linuxcnc/tests/uspace/spawnv-root/test_uspace_spawnv.hal"],"expected":[],"inputs":["linuxcnc/tests/uspace/spawnv-root/.gitignore","linuxcnc/tests/uspace/spawnv-root/checkresult","linuxcnc/tests/uspace/spawnv-root/control","linuxcnc/tests/uspace/spawnv-root/rtapi.conf","linuxcnc/tests/uspace/spawnv-root/test_uspace_spawnv.c","linuxcnc/tests/uspace/spawnv-root/test_uspace_spawnv.hal"],"parse_status":"parsed","path":"linuxcnc/tests/uspace/spawnv-root/test.sh","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"7d5440c7fc09b8f2306d1e9d69a37ce19b2af662131a413b033bcb0388f639d2","test_kind":"shell_test","test_source_id":"test:linuxcnc/tests/uspace/spawnv-root/test.sh"}
|
||||||
|
{"command":"meson test -C build-native --suite unit_tests","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/interp/interp_testing_util.hh","linuxcnc/unit_tests/interp/meson.build","linuxcnc/unit_tests/interp/test_interp_basics.cc","linuxcnc/unit_tests/interp/test_interp_block.cc","linuxcnc/unit_tests/interp/test_string_conversion.cc","linuxcnc/unit_tests/interp/tests_main.cc"],"meson_targets":[],"parse_status":"needs_review","path":"linuxcnc/unit_tests/interp/meson.build","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"534b25743c0259e3757cc2b60fbe0edad23473a5262bc988992d576fb364385e","test_kind":"unit_test_build","test_source_id":"test:linuxcnc/unit_tests/interp/meson.build"}
|
||||||
|
{"command":"meson test -C build-native interp_basics","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/interp/test_interp_basics.cc"],"parse_status":"parsed","path":"linuxcnc/unit_tests/interp/test_interp_basics.cc","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"0929d736e50c854624102d70d673d0eb15ce93a05af7993429b6f19deff57e74","test_kind":"unit_test_source","test_source_id":"test:linuxcnc/unit_tests/interp/test_interp_basics.cc"}
|
||||||
|
{"command":"meson test -C build-native interp_block","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/interp/test_interp_block.cc"],"parse_status":"parsed","path":"linuxcnc/unit_tests/interp/test_interp_block.cc","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"c2c063b7255bb3b1a15ce2be34d5998a877235b18eca5435df487c8c87dfb81d","test_kind":"unit_test_source","test_source_id":"test:linuxcnc/unit_tests/interp/test_interp_block.cc"}
|
||||||
|
{"command":"meson test -C build-native string_conversion","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/interp/test_string_conversion.cc"],"parse_status":"parsed","path":"linuxcnc/unit_tests/interp/test_string_conversion.cc","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"d6b056f762826da85385d0e235de4dc4d8f96a2b8ef64abe140c7baed09f6754","test_kind":"unit_test_source","test_source_id":"test:linuxcnc/unit_tests/interp/test_string_conversion.cc"}
|
||||||
|
{"command":"meson test -C build-native tests_main","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/interp/tests_main.cc"],"parse_status":"parsed","path":"linuxcnc/unit_tests/interp/tests_main.cc","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"f7ac2692b082bd9309535d2bebe11ace840395b00b63b64180b2857501956a4f","test_kind":"unit_test_source","test_source_id":"test:linuxcnc/unit_tests/interp/tests_main.cc"}
|
||||||
|
{"command":"meson test -C build-native --suite unit_tests","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/tp/meson.build","linuxcnc/unit_tests/tp/test_blendmath.c"],"meson_targets":[],"parse_status":"needs_review","path":"linuxcnc/unit_tests/tp/meson.build","portability":"portable_candidate","portability_reason":"simulated_or_library_only","source_sha":"625c4249c225fed116bc998530cc539703c341cb3426851aedaae58f4291de3d","test_kind":"unit_test_build","test_source_id":"test:linuxcnc/unit_tests/tp/meson.build"}
|
||||||
|
{"command":"meson test -C build-native blendmath","config_refs":[],"expected":[],"inputs":["linuxcnc/unit_tests/tp/test_blendmath.c"],"parse_status":"parsed","path":"linuxcnc/unit_tests/tp/test_blendmath.c","portability":"needs_review","portability_reason":"realtime_or_linuxcnc_process_dependency","source_sha":"0b2aaf0ec2506a4c2fd43a236f01c6c4e08fbf58998126926a8690a314d4d855","test_kind":"unit_test_source","test_source_id":"test:linuxcnc/unit_tests/tp/test_blendmath.c"}
|
||||||
21
coverage/test-entries.report.json
Normal file
21
coverage/test-entries.report.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"blocked": 0,
|
||||||
|
"entries": 321,
|
||||||
|
"output_sha256": "86449838257a7aab7c9219e641a14d4493208b35d8c0cc092d1fa149352c7c37",
|
||||||
|
"parse_errors": [],
|
||||||
|
"portability": {
|
||||||
|
"REAL-EXCLUDED": 24,
|
||||||
|
"needs_review": 65,
|
||||||
|
"portable_candidate": 232
|
||||||
|
},
|
||||||
|
"schema": "test-entries-report.v1",
|
||||||
|
"test_directories": 250,
|
||||||
|
"test_kinds": {
|
||||||
|
"oracle_check": 86,
|
||||||
|
"python_test": 1,
|
||||||
|
"shell_test": 214,
|
||||||
|
"stream_test": 12,
|
||||||
|
"unit_test_build": 3,
|
||||||
|
"unit_test_source": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
12
coverage/workspace-recovery.report.json
Normal file
12
coverage/workspace-recovery.report.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"schema": "workspace-recovery-report.v1",
|
||||||
|
"status": "passed",
|
||||||
|
"scenarios": [
|
||||||
|
"atomic_commit",
|
||||||
|
"half_commit_ignored",
|
||||||
|
"path_validation",
|
||||||
|
"hash_corruption_blocked"
|
||||||
|
],
|
||||||
|
"journal_bytes_sha256": "fnv1a64:61ef8a25110e6c02",
|
||||||
|
"recovery_state_hash": "fnv1a64:9bf65e00c699fdaf"
|
||||||
|
}
|
||||||
214
docs/linuxcnc-web-wasm-context-governance.md
Normal file
214
docs/linuxcnc-web-wasm-context-governance.md
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
# LinuxCNC Web/WASM 上下文治理与最小任务目录
|
||||||
|
|
||||||
|
**状态**:执行规范 v1.0
|
||||||
|
**适用基线**:LinuxCNC `2.10.0~pre0`;实际版本由 context lock 冻结
|
||||||
|
**生成器**:[`scripts/context_packet.py`](../scripts/context_packet.py)
|
||||||
|
**测试**:[`scripts/test_context_packet.py`](../scripts/test_context_packet.py)
|
||||||
|
|
||||||
|
本文件只解决两个问题:任务如何拆到可以持续接续的大小,以及一次任务交接究竟允许携带什么上下文。架构、功能范围、源文件关联和发布门禁分别以[技术路线](linuxcnc-web-wasm-technical-roadmap.md)、[源程序关联目录](linuxcnc-web-wasm-source-map.md)、[覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)和[执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)为准。本文件不复制这些文档的内容。
|
||||||
|
|
||||||
|
## 1. 不变量
|
||||||
|
|
||||||
|
1. 一个任务只有一个主工作流、一个里程碑、一个可验证结果和一个回滚点。跨三个以上工作流必须拆分。
|
||||||
|
2. 一个上下文包只有固定八段:`header`、`baseline`、`scope`、`contracts`、`evidence`、`risks`、`next`、`forbidden`。禁止追加 `history`、聊天记录或完整日志段。
|
||||||
|
3. 默认 profile 为 `feature`(4,096 tokens/16 KiB);里程碑任务才使用 `milestone`(8,192 tokens/32 KiB)。`doc` 和 `contract` 只在确有需要时使用。
|
||||||
|
4. `total_bytes` 同时限制序列化包和选中证据负载:`context_bytes = packet_bytes + selected_evidence_bytes`。`evidence_bytes` 是独立的证据总量上限,不能用文件数量替代。
|
||||||
|
5. 证据在生成阶段筛选。可选证据被排除时必须记录稳定 `reason_code`;必需证据无法容纳时生成失败,不输出部分成功包。
|
||||||
|
6. 交接只携带最新包、context lock 摘要、受影响 manifest ID 和可重跑命令。完整日志、golden 和差异报告只通过路径、大小和哈希引用。
|
||||||
|
|
||||||
|
### 1.1 包的分层读取
|
||||||
|
|
||||||
|
任务执行者按以下顺序读取,读到足够完成任务即停止:
|
||||||
|
|
||||||
|
| 层 | 内容 | 何时读取 | 预算归属 |
|
||||||
|
|---|---|---|---:|
|
||||||
|
| L0 | `context_id`、源码/工具链/schema 摘要、任务账本状态 | 每次开始和恢复 | `baseline` |
|
||||||
|
| L1 | 本任务目标、非目标、直接契约、受影响 manifest | 每次执行 | `header`/`scope`/`contracts` |
|
||||||
|
| L2 | 通过/失败测试摘要、差异首点、回滚点、下一步 | 执行中或交接 | `evidence`/`risks`/`next` |
|
||||||
|
| L3 | 完整日志、源码全文、golden 原件 | 只有需要定位时按路径读取 | 不进入包 |
|
||||||
|
|
||||||
|
L3 证据候选必须先给出 `path`、`bytes`、`sha256`、`kind`、`priority`、`required`;生成器按照必需、优先级、路径排序。读取清单不能包含未经过预算选择的路径。
|
||||||
|
|
||||||
|
## 2. 最小任务契约
|
||||||
|
|
||||||
|
任务描述必须能在一屏内完成审查,并使用以下字段。字段值是摘要或引用,不复制大段背景:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
id: INV-06a
|
||||||
|
title: 生成上下文包骨架
|
||||||
|
owner: WS-0
|
||||||
|
milestone: M0
|
||||||
|
profile: feature
|
||||||
|
objective: 固定八段包和稳定 packet_id
|
||||||
|
non_goals: [证据内容读取, manifest 扫描]
|
||||||
|
inputs: [context-lock.json, task-summary.json]
|
||||||
|
contracts: [context_packet.v1]
|
||||||
|
outputs: [packet.json]
|
||||||
|
tests: [test_context_packet.test_skeleton]
|
||||||
|
rollback: 删除生成物,保留输入锁
|
||||||
|
next: INV-06b
|
||||||
|
```
|
||||||
|
|
||||||
|
`objective` 必须是可观察结果;`non_goals` 防止任务吸收邻近工作;`inputs/contracts` 只列直接依赖;`outputs/tests` 必须能由 CI 重跑;`next` 最多三项。任务完成还需更新 manifest 状态和证据索引,但不把这些历史复制回包内。
|
||||||
|
|
||||||
|
## 3. 最小任务目录
|
||||||
|
|
||||||
|
下面的任务是执行单元,不是新的功能范围。原有大任务保留为父任务;实现时使用子任务 ID。每个子任务只拥有一条主要产物和一组直接测试。
|
||||||
|
|
||||||
|
### 3.1 M0:基线、清单和参考格式
|
||||||
|
|
||||||
|
| ID | 单一结果 | 直接输入 | 依赖 | Profile |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| INV-01a | 文档能力来源索引 | docs、source map | 无 | doc |
|
||||||
|
| INV-01b | 源码导出符号索引 | `src/emc/**`、`src/hal/**` | INV-01a | feature |
|
||||||
|
| INV-01c | 配置资源索引 | `configs/sim/**` | INV-01a | feature |
|
||||||
|
| INV-01d | 测试用例索引 | `tests/**`、`unit_tests/**` | INV-01a | feature |
|
||||||
|
| INV-02a | 规范化 source ID 和哈希 | INV-01a..d | contract |
|
||||||
|
| INV-02b | 依赖闭包和孤儿报告 | 规范化来源 | INV-02a | feature |
|
||||||
|
| INV-03a | context lock 文件 | 版本、工具链、schema | INV-02a | contract |
|
||||||
|
| INV-03b | context lock 校验器 | context lock | INV-03a | doc |
|
||||||
|
| INV-04a | native runner 输入接口 | sim 配置、测试索引 | INV-01c,d | contract |
|
||||||
|
| INV-04b | golden JSONL schema | runner 输入接口 | INV-04a | contract |
|
||||||
|
| INV-04c | 首个 divergent tick 报告 | native 输出 | INV-04b | feature |
|
||||||
|
| INV-05a | source→feature→task 图 | manifest、协议 | INV-02b | feature |
|
||||||
|
| INV-05b | 差异报告字段校验 | golden、manifest | INV-04b、INV-05a | doc |
|
||||||
|
| INV-06a | 固定八段包骨架 | context lock、任务摘要 | INV-03a | feature |
|
||||||
|
| INV-06b | 证据预算选择 | 候选证据清单 | INV-06a | feature |
|
||||||
|
| INV-06c | 排除原因和必需项失败 | 预算选择器 | INV-06b | doc |
|
||||||
|
|
||||||
|
### 3.2 M1:WASM 核心和最小运行闭环
|
||||||
|
|
||||||
|
| ID | 单一结果 | 直接输入 | 依赖 | Profile |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| CORE-01a | 独立构建目录和入口 | 编译锁 | INV-03a | contract |
|
||||||
|
| CORE-01b | 最小 posemath 编译 | posemath 源文件 | CORE-01a | feature |
|
||||||
|
| CORE-01c | TP/解释器最小链接 | TP、rs274 依赖 | CORE-01b | feature |
|
||||||
|
| CORE-02a | `sim_create/destroy` ABI | ABI 草案 | CORE-01a | contract |
|
||||||
|
| CORE-02b | `sim_load` 工作区入口 | INI/G-code 路径 | CORE-02a、FS-01a | feature |
|
||||||
|
| CORE-02c | `sim_step` 固定 tick | 状态结构 | CORE-02a | feature |
|
||||||
|
| CORE-02d | snapshot 导出/导入 | snapshot schema | CORE-02c | contract |
|
||||||
|
| CORE-02e | 错误码和行号映射 | rs274 错误 | CORE-01c | doc |
|
||||||
|
| RT-01a | 单会话 tick 队列 | `sim_step` | CORE-02c | feature |
|
||||||
|
| RT-01b | pause/abort/单步状态机 | tick 队列 | RT-01a | feature |
|
||||||
|
| FS-01a | 虚拟 POSIX 路径规则 | workspace 约束 | INV-02b | contract |
|
||||||
|
| FS-01b | open/read/write/stat | POSIX 规则 | FS-01a | feature |
|
||||||
|
| COM-01a | message envelope/schema | ABI 和错误码 | CORE-02a | contract |
|
||||||
|
| COM-01b | 命令 ack/result 路由 | envelope | COM-01a、RT-01a | feature |
|
||||||
|
| FE-01a | AppShell 和只读状态页 | protocol mock | COM-01a | doc |
|
||||||
|
| FE-01b | WorkerClient 超时/取消 | ack/result | COM-01b | feature |
|
||||||
|
|
||||||
|
### 3.3 M2-M3:核心行为、设备和恢复
|
||||||
|
|
||||||
|
| ID | 单一结果 | 直接输入 | 依赖 | Profile |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| CORE-03a | 基础 G/M 解释 golden | rs274 源和样例 | CORE-01c、INV-04b | feature |
|
||||||
|
| CORE-03b | O-word/参数/循环 | 解释器状态 | CORE-03a | feature |
|
||||||
|
| CORE-03c | remap 调用边界 | remap API | CORE-03b、PY-01a | contract |
|
||||||
|
| CORE-04a | 直线/圆弧 canonical | TP 源 | CORE-01c | feature |
|
||||||
|
| CORE-04b | 速度/加速度/拐角 | TP 配置 | CORE-04a | feature |
|
||||||
|
| CORE-05a | NML 命令/状态最小映射 | NML 消息清单 | CORE-02a、COM-01a | contract |
|
||||||
|
| CORE-05b | Task 状态快照 | NML 映射 | CORE-05a、CORE-02d | feature |
|
||||||
|
| CORE-06a | homing/软限位 | motion 状态 | CORE-02c | feature |
|
||||||
|
| CORE-06b | following error/急停 | motion 状态 | CORE-06a | feature |
|
||||||
|
| CORE-07a | trivkins 姿态 | kinematics ABI | CORE-02d | feature |
|
||||||
|
| CORE-07b | 非 trivkins 能力注册 | kinematics 清单 | CORE-07a | feature |
|
||||||
|
| CORE-08a | 工具表解析和快照 | tooldata 源和样例 | CORE-02b、FS-01b | feature |
|
||||||
|
| CORE-08b | 主轴/换刀/IO 状态 | iotask 消息 | CORE-05a、CORE-08a | feature |
|
||||||
|
| RT-02a | HAL pin/signal 图 | HAL 语法 | CORE-02c | feature |
|
||||||
|
| RT-02b | thread/function/addf 顺序 | HAL 图 | RT-02a | feature |
|
||||||
|
| RT-03a | 主轴/编码器/探针模型 | 虚拟设备 schema | RT-02b | feature |
|
||||||
|
| RT-03b | 限位/换刀故障注入 | 设备模型 | RT-03a | feature |
|
||||||
|
| RT-04a | ClassicLadder 解析 | ladder 输入 | RT-02a | feature |
|
||||||
|
| RT-04b | scan/寄存器/IO 顺序 | ladder 模型 | RT-04a、RT-02b | feature |
|
||||||
|
| FS-02a | journal prepare/commit | POSIX 工作区 | FS-01b | contract |
|
||||||
|
| FS-02b | 损坏记录和配额错误 | journal | FS-02a | feature |
|
||||||
|
| FS-03a | checkpoint 基线 | snapshot ABI | CORE-02d、FS-02a | feature |
|
||||||
|
| FS-03b | 增量重放和迁移 | checkpoint/journal | FS-03a | feature |
|
||||||
|
| PY-01a | Pyodide `linuxcnc/hal` 模块 | Python API 清单 | CORE-03a、FS-01b | feature |
|
||||||
|
| PY-01b | 资源/权限错误 | 虚拟模块 | PY-01a | doc |
|
||||||
|
| PY-02a | remap/filter 生命周期 | Python 回调契约 | CORE-03c、PY-01a | feature |
|
||||||
|
| PY-02b | VCP pin 回调和隔离 | VCP descriptor | PY-02a、RT-02a | feature |
|
||||||
|
| COM-02a | TaskLedger prepare/commit | operation schema | COM-01b、FS-02a | contract |
|
||||||
|
| COM-02b | 确认丢失对账 | TaskLedger | COM-02a | feature |
|
||||||
|
| COM-03a | 完整快照发布 | snapshot schema | CORE-02d、COM-01b | contract |
|
||||||
|
| COM-03b | 轨迹/HAL 流背压 | stream schema | COM-03a、RT-02b | feature |
|
||||||
|
| COM-04a | NML→Worker 命令映射 | NML 映射 | CORE-05a、COM-01a | contract |
|
||||||
|
| COM-04b | 状态/错误顺序 golden | message bus | COM-04a、INV-04b | feature |
|
||||||
|
| COM-05a | 能力/限制注册表 | 全量 manifest | INV-02b、CORE-07b | contract |
|
||||||
|
| COM-05b | 未支持能力解释 | 能力注册表 | COM-05a | doc |
|
||||||
|
|
||||||
|
### 3.4 M4-M5:前端、回归和发布
|
||||||
|
|
||||||
|
| ID | 单一结果 | 直接输入 | 依赖 | Profile |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| FE-03a | 工程选择/租约 | workspace API | FS-03b、COM-02a | feature |
|
||||||
|
| FE-03b | 刷新/Worker 重启恢复向导 | recovery events | FE-03a、COM-02b | feature |
|
||||||
|
| FE-04a | 编辑器诊断和当前行 | interpreter events | CORE-03a、COM-01b | feature |
|
||||||
|
| FE-04b | 轨迹预览与 golden 差异 | trajectory stream | FE-04a、COM-03b | feature |
|
||||||
|
| FE-05a | MDI/run/pause/abort | command schema | RT-01b、FE-01b | feature |
|
||||||
|
| FE-05b | jog/home/override 释放保护 | motion commands | FE-05a、CORE-06a | feature |
|
||||||
|
| FE-06a | 工具/IO/报警面板 | device events | RT-03b | feature |
|
||||||
|
| FE-06b | 主轴/换刀/探针恢复 | IO panel | FE-06a、CORE-08b | feature |
|
||||||
|
| FE-07a | HAL pin 图和命令控制台 | HAL snapshot | RT-02a、COM-03a | feature |
|
||||||
|
| FE-07b | scope/Ladder/日志回放 | sampled streams | FE-07a、RT-04b | feature |
|
||||||
|
| FE-08a | 轨迹和姿态非空渲染 | snapshot/trajectory | CORE-04a、CORE-07a | feature |
|
||||||
|
| FE-08b | 毛坯、坐标和最终姿态 | render state | FE-08a、COM-03b | feature |
|
||||||
|
| FE-09a | VCP descriptor 权限 | Python/VCP schema | PY-01a、COM-01a | contract |
|
||||||
|
| FE-09b | VCP 生命周期和异常隔离 | VCP runtime | FE-09a、PY-02b | feature |
|
||||||
|
| FE-10a | 虚拟列表和消息统计 | UI streams | FE-04b、FE-07b | feature |
|
||||||
|
| FE-10b | 帧预算和录制回放 | performance events | FE-10a、FE-08b | doc |
|
||||||
|
| COM-06a | 通讯/离线/租约 E2E | protocol + workspace | COM-02b、FE-03b | feature |
|
||||||
|
| COM-06b | 背压/未知消息/重启矩阵 | protocol streams | COM-03b、COM-06a | feature |
|
||||||
|
| REG-01a | 单入口 configs/sim 回归 | manifest、native runner | INV-02b、INV-04a | milestone |
|
||||||
|
| REG-01b | 全入口差异汇总 | 单入口报告 | REG-01a | feature |
|
||||||
|
| REG-02a | 失败样本保留和分类 | tests/unit_tests | INV-04a | feature |
|
||||||
|
| REG-03a | 断网/崩溃/配额矩阵 | FS-02b、FS-03b | feature |
|
||||||
|
| REG-03b | 回放终点一致性 | 连续/恢复 golden | REG-03a | feature |
|
||||||
|
| REG-04a | 浏览器通讯和离线 | Playwright | FE-03b、COM-02b | feature |
|
||||||
|
| REG-04b | 性能 P95/P99 报告 | 浏览器矩阵 | REG-04a | doc |
|
||||||
|
| REL-01a | 许可证和兼容报告 | 全量 manifest | REG-01b、REG-02a | doc |
|
||||||
|
| REL-01b | 迁移/回滚/离线包 | 发布候选产物 | REL-01a、REG-03b | milestone |
|
||||||
|
|
||||||
|
父任务只有在所有直接子任务完成且证据链闭合后才能更新状态。子任务之间不得共享未版本化的临时结构;需要共享时先建立 contract 子任务。
|
||||||
|
|
||||||
|
## 4. 交接和恢复
|
||||||
|
|
||||||
|
### 4.1 正常交接
|
||||||
|
|
||||||
|
1. 从 context lock 和父任务摘要生成新的 `packet_id`;只填本子任务的八段。
|
||||||
|
2. 用候选证据的实际字节数调用生成器。生成前就排除 `E1`-`E5`,输出后只接受 `budget.packet_bytes <= byte_limit` 且 `packet_bytes + selected_evidence_bytes <= byte_limit`。
|
||||||
|
3. 完成一步就更新 `evidence`、`risks`、`next`;不追加旧包全文。
|
||||||
|
4. 提交正文只写 `Context-ID`、`Context-Packet`、子任务 ID、测试命令和证据路径。
|
||||||
|
|
||||||
|
### 4.2 工具失败或确认丢失
|
||||||
|
|
||||||
|
以 `operation_id` 查询任务账本:`verified` 步骤只引用原证据,`unfinished` 从最近 checkpoint 继续,`unknown` 先对账。无法对账时标记 `blocked`,保留包和产物,不重放可能产生副作用的操作。
|
||||||
|
|
||||||
|
### 4.3 拆分停止线
|
||||||
|
|
||||||
|
出现任一条件立即拆分,而不是扩大 profile:上下文包超过 profile 80%、候选证据超过证据预算 80%、任务同时修改两个独立契约、测试需要读取三个以上大日志、或 `next` 不能写成三项以内的动作。拆分后的父任务只保留依赖图和摘要。
|
||||||
|
|
||||||
|
## 5. CI 检查
|
||||||
|
|
||||||
|
CI 在生成阶段执行以下检查,校验器只做复核:
|
||||||
|
|
||||||
|
```text
|
||||||
|
packet JSON 可解析
|
||||||
|
固定八段存在且无额外段
|
||||||
|
packet_id/context_id 与任务账本一致
|
||||||
|
budget.packet_bytes == UTF-8 序列化字节数
|
||||||
|
budget.packet_bytes <= byte_limit
|
||||||
|
budget.packet_bytes + budget.selected_evidence_bytes <= byte_limit
|
||||||
|
selected_evidence_bytes <= evidence_byte_limit
|
||||||
|
selected_evidence_files <= evidence_file_limit
|
||||||
|
所有排除项都有 E1-E5 reason_code
|
||||||
|
required 证据无法容纳时命令失败且不写输出
|
||||||
|
```
|
||||||
|
|
||||||
|
最小回归命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
```
|
||||||
|
|
||||||
|
本规范的目标不是把所有信息压进一个更大的包,而是让每个任务只携带完成当前结果所需的最小、可重建、可审计上下文。
|
||||||
313
docs/linuxcnc-web-wasm-execution-strategy.md
Normal file
313
docs/linuxcnc-web-wasm-execution-strategy.md
Normal file
@@ -0,0 +1,313 @@
|
|||||||
|
# LinuxCNC Web/WASM 仿真项目执行与交付策略
|
||||||
|
|
||||||
|
**文档状态**:Draft v0.1
|
||||||
|
**适用范围**:本仓库的纯 Web/WASM 仿真移植、浏览器运行时、OPFS 工程存储、覆盖矩阵和发布物
|
||||||
|
**固定基线**:LinuxCNC `2.10.0~pre0`(以 `linuxcnc/VERSION` 和锁定的源码提交为准)
|
||||||
|
**关联文档**:[技术路线](linuxcnc-web-wasm-technical-roadmap.md)、[仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)、[功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)、[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)、[总控执行手册](linuxcnc-web-wasm-integration-playbook.md)、[上下文治理与最小任务目录](linuxcnc-web-wasm-context-governance.md)
|
||||||
|
|
||||||
|
本文件是项目执行的治理入口。技术路线回答“做什么以及采用什么架构”,覆盖矩阵回答“逐项覆盖什么以及如何验收”,本文件回答“谁在什么固定上下文中交付、如何在断网或失败后接续、什么证据才能过门禁”。三份文档必须以同一基线版本更新;若规则冲突,以本文件的交付门禁和覆盖矩阵的逐项验收要求为准。
|
||||||
|
|
||||||
|
## 1. 治理缺口与补强决定
|
||||||
|
|
||||||
|
| 已有内容 | 缺口 | 本策略的控制措施 | 证据位置 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 技术路线已有 A-E 阶段 | 没有阶段退出条件、依赖关系和返工规则 | 为每个里程碑定义入口、出口、证据和阻断条件;未过门禁不得进入下一阶段 | 第 6、7 节 |
|
||||||
|
| 覆盖矩阵要求 100% | `sim_status`、`web_status` 没有统一枚举,差异可能被静默接受 | 固定状态机和缺失项 CI 门禁;`REAL-EXCLUDED` 与未实现严格分离 | 第 3.4 节;覆盖矩阵第 1、13 节 |
|
||||||
|
| OPFS 已有 journal 思路 | 没有断网、标签页挂起、Worker 崩溃和配额不足的接续协议 | 本地优先、事务提交、checkpoint、重放和幂等命令协议;恢复结果必须可验证 | 第 5 节 |
|
||||||
|
| 固定 tick 和 golden 已提出 | 没有明确“同一上下文”的构成,难以复现差异 | 建立 context lock,提交和 golden 必须携带锁定摘要 | 第 3 节 |
|
||||||
|
| 仿真与真实硬件边界已说明 | 任务容易跨越 WASM、Worker、UI 和存储责任边界 | 以工作流和接口为边界分工;跨边界改动必须有契约变更记录 | 第 4 节 |
|
||||||
|
| 有原生/WASM 对照目标 | 没有统一的变更、回滚和发布证据包 | 采用小步、单主题提交;发布只消费完整证据包和签名的 manifest | 第 3.3、7 节 |
|
||||||
|
|
||||||
|
治理原则:基线可重建、仿真结果可重复、持久数据可恢复、差异可定位、排除项可识别。任何“先合并再补测试”或“离线时先静默丢弃”的做法都不满足本策略。
|
||||||
|
|
||||||
|
## 2. 文档与决策层级
|
||||||
|
|
||||||
|
文档关系固定如下:
|
||||||
|
|
||||||
|
```text
|
||||||
|
执行与交付策略(本文件)
|
||||||
|
├─ 技术路线:架构、范围、阶段 A-E 和风险决策
|
||||||
|
├─ 覆盖矩阵:功能来源、manifest 条目、测试和逐项验收
|
||||||
|
├─ 源程序关联目录:功能到源文件、配置、符号和测试的反向索引
|
||||||
|
├─ 前端与通信设计:UI 工作流、Worker 协议、状态契约、任务和 FE/COM 里程碑
|
||||||
|
└─ 总控执行手册:端到端依赖、统一任务目录、场景验收和当前实施状态
|
||||||
|
```
|
||||||
|
|
||||||
|
架构、范围或阶段发生变化时,先更新技术路线;功能条目、标记、测试或差异状态发生变化时,先更新覆盖矩阵;两者都需要同步更新本文件中的里程碑或门禁时,必须在同一变更包中完成。文档链接、基线版本和状态枚举由文档一致性检查自动校验。
|
||||||
|
|
||||||
|
### 2.1 全功能移植闭环
|
||||||
|
|
||||||
|
“全部功能”按可观察的仿真能力定义,而不是按成功编译的源码行数定义。功能全集由以下来源的并集规范化得到:
|
||||||
|
|
||||||
|
```text
|
||||||
|
F = docs capabilities
|
||||||
|
∪ exported/configurable behavior in src/emc, src/hal, classicladder, usr_intf and Python APIs
|
||||||
|
∪ configs/sim/** resources and workflows
|
||||||
|
∪ tests/** and unit_tests/** cases
|
||||||
|
∪ Web UI, VCP, visualization and persistence workflows
|
||||||
|
```
|
||||||
|
|
||||||
|
M0 必须冻结来源扫描和规范化规则;每个来源项至少映射到一个 manifest 条目,每个 manifest 条目必须反向列出来源、依赖、输入、输出、错误、仿真替代方案、测试和 oracle。来源项没有映射、manifest 条目没有测试、依赖没有递归闭包或新增源码未触发 manifest 变化时,CI 直接阻断。一个来源可以拆成多个功能条目,但不能把多个未验证功能合并成一个笼统的“全覆盖”。
|
||||||
|
|
||||||
|
每个功能条目都要通过六个覆盖维度:正常行为、边界/资源限制、错误和报警、暂停/恢复/急停、持久化/刷新/离线恢复、UI/API/脚本工作流;需要与其他域交互的条目还必须进入关键路径或 pairwise 交互测试。`REAL-EXCLUDED` 只允许用于真实硬件、硬实时和物理安全;任何 `configs/sim` 依赖都必须映射为可观测的 `SIM-CORE`、`SIM-ADAPTER`、`SIM-DEVICE`、`WEB-EQUIV` 或 `PY-WASM` 行,不能用排除项掩盖仿真缺口。
|
||||||
|
|
||||||
|
完整性证明按“来源扫描 → manifest 闭包 → 实现映射 → 多维测试 → 原生/WASM 差异 → 发布签署”顺序生成。[功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)是来源扫描和反向索引的规范入口;发布报告必须同时给出已接受条目、排除条目、阻断条目、孤儿来源和未覆盖交互;只给出一个百分比不能作为全功能声明。
|
||||||
|
|
||||||
|
## 3. 固定上下文与提交策略
|
||||||
|
|
||||||
|
### 3.1 Context lock
|
||||||
|
|
||||||
|
每个可复现构建、golden 集和发布候选都绑定一个不可变的 context lock。锁至少包含以下字段,实际格式可为 `context-lock.json` 或 CI 产物:
|
||||||
|
|
||||||
|
| 字段 | 要求 |
|
||||||
|
|---|---|
|
||||||
|
| `context_id` | 全局唯一,例如 `linuxcnc-2.10.0-pre0-wasm-c1` |
|
||||||
|
| `linuxcnc_version`、`linuxcnc_source_sha` | 与 `linuxcnc/VERSION` 和源码提交一致 |
|
||||||
|
| `roadmap_revision`、`coverage_revision` | 两份治理文档的提交摘要或版本号 |
|
||||||
|
| `emscripten_version`、`compiler_flags` | 包括优化、浮点、异常、线程和文件系统选项 |
|
||||||
|
| `python_runtime` | Pyodide/CPython-WASM 版本及包锁摘要 |
|
||||||
|
| `schema_versions` | C ABI、命令、事件、快照和工程格式版本 |
|
||||||
|
| `browser_matrix` | 浏览器、版本范围、操作系统和是否跨源隔离 |
|
||||||
|
| `test_manifest_sha`、`golden_manifest_sha` | 输入清单及参考结果的内容摘要 |
|
||||||
|
|
||||||
|
锁定后,不能在同一 `context_id` 内悄悄升级编译器、Python、浏览器基线、schema 或 LinuxCNC 源码。升级必须创建新的 `context_id`,重新生成受影响的 golden,并在迁移说明中列出差异。
|
||||||
|
|
||||||
|
### 3.2 固定大小的任务上下文包
|
||||||
|
|
||||||
|
“固定上下文”指每次任务交接和每次提交都重新装载一个固定格式、固定预算的上下文包,而不是把整个历史对话、全部日志或已完成阶段重新带入。上下文包是可丢弃的工作索引;完整源码、日志、golden 和差异报告留在仓库或 CI 产物中,只通过路径和摘要引用。
|
||||||
|
|
||||||
|
上下文包使用固定的八段结构,逻辑预算为 **8,192 tokens,UTF-8 序列化不超过 32 KiB**。实现上由 [`scripts/context_packet.py`](../scripts/context_packet.py) 在选择证据时执行预算;校验器不能成为第一次发现超限的地方。每段有上限,缺省内容用 `none`,不得追加自由历史段:
|
||||||
|
|
||||||
|
| 段 | 固定内容 | 建议上限 |
|
||||||
|
|---|---|---:|
|
||||||
|
| `header` | `context_id`、`packet_id`、任务和里程碑 | 512 tokens |
|
||||||
|
| `baseline` | 源码/工具链/schema/golden 摘要 | 1,024 tokens |
|
||||||
|
| `scope` | 主工作流、目标、非目标、受影响 manifest ID | 1,024 tokens |
|
||||||
|
| `contracts` | 仅列出本任务读写的 ABI、事件、文件和状态契约 | 1,536 tokens |
|
||||||
|
| `evidence` | 已通过测试、失败测试和产物路径/哈希 | 1,536 tokens |
|
||||||
|
| `risks` | 未解决风险、阻断原因和回滚点 | 1,024 tokens |
|
||||||
|
| `next` | 下一步最多三项可执行动作 | 768 tokens |
|
||||||
|
| `forbidden` | 本任务明确不得触碰的边界 | 768 tokens |
|
||||||
|
|
||||||
|
包的 `packet_id` 由 `context_id`、任务 ID 和修订号组成;修订只替换对应段,不复制旧包。超过任一段上限或总预算时,必须先拆分任务、生成摘要或把内容移到可寻址产物,不能扩大上下文预算。每次交接从最新包重建,旧包只保留哈希和归档链接,因此移植从阶段 A 深入阶段 E 时,上下文大小不变。
|
||||||
|
|
||||||
|
#### 生成阶段的预算算法
|
||||||
|
|
||||||
|
证据选择必须在写入输出文件前完成,按以下顺序执行:
|
||||||
|
|
||||||
|
1. 加载固定上下文骨架并计算 `skeleton_bytes`;骨架超过 `byte_limit` 立即失败。
|
||||||
|
2. 将候选证据规范化为 `path`、`bytes`、`sha256`、`kind`、`priority`、`required`,按必需、优先级、路径排序,保证选择确定性。
|
||||||
|
3. 逐项检查:单项证据字节预算、证据总字节预算、证据文件数,以及把该项加入 `selected` 后的完整上下文剩余空间;完整上下文按 `packet_bytes + selected_evidence_bytes` 计算,不能只计算 JSON 清单。
|
||||||
|
4. 可选项无法容纳时不写入包,记录稳定排除码;必需项无法容纳时直接失败,不生成部分成功包。
|
||||||
|
5. 生成最终预算元数据后再次序列化校验;若审计清单本身使包超限,从最低优先级可选项回退并以 `E5=context_remaining_bytes_insufficient` 记录。若只剩必需项仍超限,失败。
|
||||||
|
|
||||||
|
排除原因使用稳定机器码,避免长文本侵占上下文:`E1 duplicate_path`、`E2 evidence_item_bytes_exceed_budget`、`E3 evidence_file_count_exceed_budget`、`E4 evidence_bytes_exceed_budget`、`E5 context_remaining_bytes_insufficient`。输出必须包含选中证据字节数、选中/排除文件数、证据预算、总包预算、最终包字节数和排除码;CI 同时检查 `packet_bytes <= byte_limit` 和 `packet_bytes + selected_evidence_bytes <= byte_limit`,而不是先写超限包再报告错误。
|
||||||
|
|
||||||
|
上下文包的最小机器可读形状如下;CI 应检查字段齐全、段顺序、预算、`context_id` 一致性和引用产物存在:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
context_id: linuxcnc-2.10.0-pre0-wasm-c1
|
||||||
|
packet_id: M2-WS1-interpreter-r07
|
||||||
|
task: "[WS-1][M2] ..."
|
||||||
|
header: { milestone: M2, owner_role: runtime }
|
||||||
|
baseline: { source_sha: "...", schema: { abi: 1, snapshot: 1 } }
|
||||||
|
scope: { include: ["coverage/..."], exclude: ["WS-5"], manifest: ["..."] }
|
||||||
|
contracts: ["sim_step", "snapshot.v1"]
|
||||||
|
evidence: { passed: ["..."], failed: ["..."], artifacts: ["..."] }
|
||||||
|
risks: ["..." ]
|
||||||
|
next: ["...", "...", "..."]
|
||||||
|
forbidden: ["real hardware", "host process", "unversioned schema"]
|
||||||
|
budget: { token_limit: 8192, byte_limit: 32768 }
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.3 提交和证据包
|
||||||
|
|
||||||
|
提交按一个可审查主题组织:运行时、持久化、组件、UI、测试或文档只能有一个主主题;跨主题改动拆成有依赖顺序的提交。每个提交或合并请求必须声明:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Context-ID: <context_id>
|
||||||
|
Context-Packet: <packet_id>
|
||||||
|
Scope: <workstream>/<milestone>
|
||||||
|
Contract-Change: none | <ABI/schema/format/compatibility id>
|
||||||
|
Evidence: <test command or artifact paths>
|
||||||
|
Offline-Impact: none | cached-start | mid-run | recovery
|
||||||
|
Coverage: <manifest ids or paths>
|
||||||
|
Context-Budget: 8192 tokens / 32768 bytes
|
||||||
|
```
|
||||||
|
|
||||||
|
合并请求的证据包至少包括变更摘要、受影响 manifest 条目、测试日志、golden/difference 摘要、性能或配额影响、回滚方式和文档链接。提交正文只保存上下文包和产物摘要,不复制完整日志或历史讨论。没有 `Context-ID`、`Context-Packet`、预算声明、证据路径或覆盖条目的提交只能作为草稿,不能进入受保护分支。
|
||||||
|
|
||||||
|
### 3.4 覆盖状态机
|
||||||
|
|
||||||
|
`sim_status` 和 `web_status` 使用同一组值:
|
||||||
|
|
||||||
|
`planned` → `in_progress` → `implemented` → `verified` → `accepted`。
|
||||||
|
|
||||||
|
允许从任何非终态回到 `blocked`;`blocked` 必须填写阻断原因、责任工作流、下一步和复核日期。`REAL-EXCLUDED` 是终态,但只允许用于覆盖矩阵定义的真实硬件、硬实时和安全排除项。`accepted` 必须同时具备实现、自动测试、差异报告和 context lock;没有这些证据不得通过文字描述或 UI 状态伪装成已支持。
|
||||||
|
|
||||||
|
### 3.5 变更分类和审查
|
||||||
|
|
||||||
|
* **C0 文档/注释**:不改变契约;文档链接和术语检查通过即可。
|
||||||
|
* **C1 行为实现**:必须更新 manifest、golden 或差异说明,并运行受影响功能域测试。
|
||||||
|
* **C2 契约/格式**:改变 ABI、消息、快照或工程格式;必须先提交迁移方案、双读/版本策略和兼容测试。
|
||||||
|
* **C3 基线/工具链**:改变 LinuxCNC、Emscripten、Python 或浏览器基线;必须新建 context lock,完整重跑基线回归。
|
||||||
|
|
||||||
|
C2/C3 变更需要运行时、测试/兼容性和存储(若受影响)三个责任角色共同审查。任何改动都不得把真实硬件能力从 `REAL-EXCLUDED` 改成普通覆盖项而不修改产品边界和安全说明。
|
||||||
|
|
||||||
|
## 4. 工作流拆分与边界
|
||||||
|
|
||||||
|
工作流以可交付接口划分,避免按目录切割导致责任重叠。角色是责任类别,不预设具体人员。
|
||||||
|
|
||||||
|
| ID | 责任工作流 | 交付物 | 依赖 | 明确不负责 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| WS-0 | 基线与清单 | context lock、来源扫描、`coverage/manifest.jsonl`、golden 索引 | 无 | 运行时实现 |
|
||||||
|
| WS-1 | WASM 核心与 ABI | `sim_*` 生命周期、解释器/TP/kinematics 适配、版本化 ABI | WS-0 | UI、OPFS 事务 |
|
||||||
|
| WS-2 | Worker 调度与虚拟设备 | 固定 tick、HAL、IO、故障模型、事件序列 | WS-1 | 浏览器布局和用户文件选择器 |
|
||||||
|
| WS-3 | Workspace/OPFS | 虚拟 POSIX、journal、checkpoint、迁移、配额诊断 | WS-0;消费 WS-1 schema | 运动语义和 UI 状态管理 |
|
||||||
|
| WS-4 | Python/插件兼容 | Pyodide 虚拟模块、remap/filter/VCP 权限和生命周期 | WS-1、WS-3 | 宿主进程、网络和设备访问 |
|
||||||
|
| WS-5 | Web UI/可视化 | Worker 客户端、控制台、3D、工具和配置工作流 | WS-2、WS-3 | 改写核心算法和持久化协议 |
|
||||||
|
| WS-6 | 参考运行器与测试 | 原生/WASM golden、浏览器 E2E、故障注入、差异报告 | WS-0;随各工作流增量接入 | 为失败测试降级或删除样本 |
|
||||||
|
| WS-7 | 发布与文档 | 兼容报告、许可证清单、迁移说明、离线包和发布证据 | WS-0..6 | 绕过门禁发布 |
|
||||||
|
|
||||||
|
跨工作流接口只通过已版本化的 ABI、命令/事件 schema、快照 schema、工程格式和 manifest 交换;WS-2/WS-5 的具体接口、FE/COM 任务和 FE-M0..M5 退出条件见[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)。若需要直接读取另一个工作流的内部结构,应先提出契约变更(C2),而不是复制内部状态。每个任务必须标注一个主工作流和一个里程碑;一个任务同时改动三个以上工作流时,默认拆分。
|
||||||
|
|
||||||
|
## 5. 稳定性、断网与接续
|
||||||
|
|
||||||
|
### 5.1 本地优先原则
|
||||||
|
|
||||||
|
已缓存的应用壳、WASM、Pyodide、样例和工程可以在无网络时启动;仿真核心、Worker、OPFS 和 UI 主流程不得把网络可用性当作前置条件。网络只用于可选更新、协作或远程调试。断网期间禁止自动覆盖已提交版本,禁止删除唯一可恢复的 checkpoint,禁止把失败写入标记为成功。
|
||||||
|
|
||||||
|
### 5.2 故障分类与策略
|
||||||
|
|
||||||
|
| 故障 | 运行策略 | 接续依据 | 验收结果 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 启动时无网 | 从 Service Worker 缓存启动;缺少资源则显示明确缺件 | cache manifest、context lock | 已缓存版本可启动;未缓存依赖可诊断 |
|
||||||
|
| 运行中断网 | 仿真继续按固定 tick 运行;本地命令和日志照常提交 | OPFS journal、`seq`、`simulation_tick` | 重载页面后恢复最近已提交状态 |
|
||||||
|
| 标签页挂起/Worker 重启 | 在安全 checkpoint 重启并重放增量事件 | checkpoint 基线 + event log | 重放终点与连续运行一致 |
|
||||||
|
| 写入中止/崩溃 | 只接受完整 commit;清理临时文件或回滚 | prepare/commit、哈希和版本索引 | 不出现半文件,不损坏旧版本 |
|
||||||
|
| 配额不足 | 停止非关键 cache/日志写入,保留工程和最近 checkpoint | 配额诊断、版本保留策略 | 已提交工程可读;用户得到导出/清理动作 |
|
||||||
|
| 重新联网 | 不自动重放重复命令;按摘要对账可选远程数据 | `context_id`、`seq`、`tick`、状态哈希 | 对账成功或明确冲突,不静默合并 |
|
||||||
|
|
||||||
|
### 5.3 命令、事件和快照接续协议
|
||||||
|
|
||||||
|
每条控制命令带单调递增 `seq`、`context_id`、客户端 `session_id` 和幂等键;每个事件和快照带 `seq`(最后应用的命令)、`simulation_tick`、`schema_version` 和状态哈希。恢复流程固定为:
|
||||||
|
|
||||||
|
1. Worker 读取并校验最新完整 checkpoint 和 journal;只接受哈希、版本和路径均匹配的记录。
|
||||||
|
2. 以 checkpoint 的 tick 为起点按序重放事件;遇到缺号、重复或未知 schema 时停止并报告,不猜测补齐。
|
||||||
|
3. 发布 `recovered` 事件,包含恢复到的 tick、最后提交序号、丢弃的未提交记录和差异摘要。
|
||||||
|
4. UI 只有在收到 `recovered` 后才允许继续发送依赖运行态的命令;重复提交使用幂等键返回原结果。
|
||||||
|
|
||||||
|
快照采用“完整基线 + 有界增量”策略:增量达到大小、数量或时间上限就合并为新基线。UI 偏好与仿真状态分离;恢复仿真不得依赖尚未提交的 UI 偏好。连续运行与恢复运行必须在相同 `context_id`、输入文件哈希和故障注入种子下得到相同终点。
|
||||||
|
|
||||||
|
自动接续使用以下状态机,不依赖用户手动刷新或重复点击:
|
||||||
|
|
||||||
|
```text
|
||||||
|
online_ready
|
||||||
|
└─ 网络/资源不可用 ─▶ offline_degraded
|
||||||
|
└─ 本地资源完整 ─▶ local_continuation
|
||||||
|
└─ online 事件 ─▶ reconnecting
|
||||||
|
├─ 摘要一致 ─▶ reconciled ─▶ online_ready
|
||||||
|
└─ 摘要冲突 ─▶ conflict(暂停远程同步,保留本地版本)
|
||||||
|
```
|
||||||
|
|
||||||
|
`reconnecting` 使用指数退避和上限,不重复执行已确认的 `seq`;`local_continuation` 只把命令写入本地 journal,`reconciled` 后按序发送未确认摘要。出现 `conflict` 时不能自动覆盖任一版本,必须保留两个可导出的版本和差异报告。网络恢复不是仿真恢复的前提:即使永远不重新联网,已缓存资源和 OPFS 工程仍应按本地策略完成运行、暂停、快照和导出。
|
||||||
|
|
||||||
|
### 5.4 稳定性指标
|
||||||
|
|
||||||
|
每个里程碑都记录以下指标,不以平均值掩盖长尾:Worker 周期 overrun、命令确认延迟、快照吞吐、checkpoint 写入耗时、恢复耗时、journal 未完成事务数、OPFS 错误率和 UI 主线程阻塞时间。指标必须按浏览器矩阵和场景分组;性能回归超过基线阈值时阻止发布,除非有带期限的书面例外。
|
||||||
|
|
||||||
|
### 5.5 高效执行策略
|
||||||
|
|
||||||
|
效率优化不能改变固定 tick、事件顺序或恢复结果。执行和构建按以下规则收敛:
|
||||||
|
|
||||||
|
* **按影响图测试**:提交前只运行受影响 manifest 的快速测试;里程碑运行整个功能域;M5 运行全量来源、golden、浏览器和故障矩阵。影响图由来源、契约和测试 ID 生成,不能由提交者手工缩小。
|
||||||
|
* **按 context 缓存**:构建、解析和轨迹缓存的键至少包含 `context_id`、源码摘要、工具链摘要和输入文件摘要;不同 context 不共享可能改变语义的缓存。
|
||||||
|
* **并行与串行分界**:独立 manifest、浏览器和 golden 任务可并行;同一仿真会话内的 tick、命令、HAL 和 OPFS 提交必须串行。并行只是缩短验证时间,不得引入非确定性。
|
||||||
|
* **冷热路径分离**:仿真周期只处理内存中的热点状态;OPFS、日志压缩、差异计算和完整快照在有界批次中运行。任何后台工作都必须有队列上限和取消点,不能拖慢周期或无限积压。
|
||||||
|
* **预算先测后优化**:M1 建立参考场景的周期耗时、P95/P99 Worker 延迟、内存、快照吞吐、恢复时间和 UI 帧时间基线;后续提交默认不得超过基线 20%,否则必须附 profiling、替代方案和期限明确的例外。
|
||||||
|
|
||||||
|
性能优化提交必须同时携带确定性回放结果和资源指标;只有速度变快但无法证明状态、错误和恢复一致的实现不得合并。
|
||||||
|
|
||||||
|
### 5.6 问答、工具或执行失败后的接续
|
||||||
|
|
||||||
|
断网之外,还必须处理请求超时、回答传输中断、工具调用返回失败、工具已执行但确认消息丢失、结果校验失败和 Worker 崩溃。系统不能把“没有收到回答”当成“没有执行”,也不能把“回答失败”当成“任务失败且需要从头开始”。每个任务使用持久化任务账本记录可恢复边界:
|
||||||
|
|
||||||
|
| 字段 | 含义 |
|
||||||
|
|---|---|
|
||||||
|
| `operation_id` | 一次任务或工具操作的稳定幂等键 |
|
||||||
|
| `packet_id`、`context_id` | 恢复时必须重新装载的固定上下文 |
|
||||||
|
| `phase`、`step_id` | 当前里程碑、工作流和步骤;步骤必须可重入 |
|
||||||
|
| `intent_hash` | 输入、目标和契约的摘要,防止用新任务误恢复旧任务 |
|
||||||
|
| `prepare_ref`、`commit_ref` | 操作前后 journal/产物引用 |
|
||||||
|
| `last_verified_step` | 已验证完成的最后步骤,不以“已发送”代替“已完成” |
|
||||||
|
| `status` | `running`、`retrying`、`recovering`、`awaiting_reconcile`、`completed` 或 `blocked` |
|
||||||
|
|
||||||
|
每个有副作用的步骤遵循 `prepare → execute → verify → commit`:先写入 prepare 记录,再以 `operation_id` 调用;收到结果后校验状态哈希、产物和契约,最后写 commit。重试前先查询 `operation_id` 是否已有 commit:已有则直接复用结果,只有明确没有 commit 才能再次执行。执行完成但确认丢失时进入 `awaiting_reconcile`,通过状态查询或产物哈希判定结果,禁止盲目重放。
|
||||||
|
|
||||||
|
恢复流程固定为:
|
||||||
|
|
||||||
|
1. 重新装载 context lock、最新固定大小上下文包和任务账本,检查 `intent_hash` 是否匹配。
|
||||||
|
2. 扫描 prepare/commit、工具产物、Worker 事件和 OPFS journal,建立每个 `step_id` 的 `unknown`、`verified` 或 `unfinished` 判定。
|
||||||
|
3. 已 `verified` 的步骤只引用原证据;`unfinished` 步骤从最近 checkpoint 继续;`unknown` 步骤先查询和对账,不能猜测。
|
||||||
|
4. 每完成一个步骤立即更新 `last_verified_step` 和上下文包的 `evidence/risks/next` 段;不追加历史对话,因此恢复前后仍受 8,192 tokens/32 KiB 预算约束。
|
||||||
|
5. 所有步骤完成后写入 `completed` commit,并生成可重跑的证据索引;无法安全判定时保留本地版本,进入 `blocked` 或 `awaiting_reconcile`,不得静默标记成功。
|
||||||
|
|
||||||
|
网络和回答通道都恢复后,自动接续只发送未确认的操作摘要,使用指数退避和有限重试;重复响应、重复事件和迟到响应按 `operation_id` 丢弃或关联到原结果。该机制保证在本地已提交边界内可继续执行;对外部服务不可查询、数据已发生不可逆变化或上下文摘要冲突的情况,只能保证不丢失本地证据并明确要求对账,不能伪造“恰好执行一次”的结论。
|
||||||
|
|
||||||
|
## 6. 里程碑、依赖和退出条件
|
||||||
|
|
||||||
|
技术路线的阶段 A-E 映射到以下可审查里程碑。里程碑不是日期承诺,而是证据包边界。
|
||||||
|
|
||||||
|
| 里程碑 | 对应路线 | 关键交付 | 退出条件 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| M0 基线锁定 | A | context lock、来源/测试清单、状态枚举、责任分工 | 清单可重建;缺项 CI 失败;文档链接和基线一致 |
|
||||||
|
| M1 运行时骨架 | A | 单 Worker、固定 tick、ABI、最小 OPFS journal、Python 启动 | create/load/step/snapshot/recover ABI 测试通过;无网加载缓存样例 |
|
||||||
|
| M2 核心行为 | B | G/M/O、TP、坐标、补偿、kinematics、原生 golden | 受影响核心 manifest 全部 `verified`;首个 divergent tick 可定位 |
|
||||||
|
| M3 虚拟设备与持久化 | C | HAL/PLC/IO、数字孪生、事务恢复、断网接续 | 故障注入和恢复矩阵通过;配额不足不损坏已提交版本 |
|
||||||
|
| M4 Web 工作流 | D | 控制台、3D、VCP/配置工具、导入导出、离线 PWA | 关键 UI 工作流在浏览器矩阵通过;键盘/触摸和刷新恢复有证据 |
|
||||||
|
| M5 发布候选 | E | 全量覆盖、兼容/许可证报告、迁移工具、离线包 | 所有可计入条目 `accepted`,排除项可识别,发布门禁全绿 |
|
||||||
|
|
||||||
|
里程碑依赖单向推进:M2 不能绕过 M1,M3 不能把未版本化的核心状态写入 OPFS,M4 不能以 UI mock 替代 M2/M3 的真实状态,M5 不接受“后续补齐”的覆盖条目。发现契约或基线变化时,回退到受影响的最早里程碑并重新生成证据。
|
||||||
|
|
||||||
|
## 7. CI、合并与发布门禁
|
||||||
|
|
||||||
|
### 7.1 合并门禁
|
||||||
|
|
||||||
|
每个变更包至少通过:文档链接和术语检查、格式/静态检查、受影响单测、manifest 完整性检查、原生/WASM 差异测试(适用时)、离线影响场景(适用时)、`context_packet.py` 生成器测试、上下文包字段/大小检查和证据包字段检查。任何新增来源、配置、组件、G/M/O 功能或 UI 工作流没有 manifest 条目时 CI 失败。上下文包超过 8,192 tokens 或 32 KiB、出现未定义段、把旧包全文嵌入新包,均直接阻止合并。生成阶段不能产生超限包;验证阶段只能复核,不能负责裁剪。
|
||||||
|
|
||||||
|
### 7.2 里程碑门禁
|
||||||
|
|
||||||
|
* **G0 基线门禁**:context lock 可重建,依赖和生成器版本锁定。
|
||||||
|
* **G1 行为门禁**:核心状态、canonical 输出、错误码和关键轨迹对照通过;容差写入报告。
|
||||||
|
* **G2 持久化门禁**:刷新、Worker 重启、半提交、损坏记录、迁移和配额不足场景通过。
|
||||||
|
* **G3 离线门禁**:断网启动、中途断网、标签页挂起、重新联网对账、请求超时、回答中断、工具结果丢失和 Worker 重启场景通过;没有静默丢命令、重复副作用或跳过步骤。
|
||||||
|
* **G4 覆盖门禁**:所有 `SIM-*`、`WEB-EQUIV`、`PY-WASM` 条目达到 `accepted`;`REAL-EXCLUDED` 均有明确错误和说明。
|
||||||
|
* **G5 发布门禁**:浏览器矩阵、性能预算、安全/权限审查、许可证清单、迁移和回滚演练全部有签名证据。
|
||||||
|
|
||||||
|
门禁失败时,发布候选保持原 context lock 不变;修复可以追加提交,但若改变契约或基线,必须创建新锁并重新跑受影响门禁。任何例外都必须记录范围、风险、补救责任人和失效日期,不能永久豁免。
|
||||||
|
|
||||||
|
## 8. 任务编写与追踪规则
|
||||||
|
|
||||||
|
任务标题使用 `[WS-x][Mx]` 前缀,正文包含目标、非目标、输入契约、输出证据、依赖、风险、回滚和受影响 manifest。父任务必须按[上下文治理与最小任务目录](linuxcnc-web-wasm-context-governance.md)拆成单结果子任务;执行者只读取该子任务及其直接依赖,不把整份路线、覆盖矩阵或父任务历史装入上下文。任务启动时创建一个固定大小的上下文包;每次交接只更新 `evidence`、`risks` 和 `next` 等对应段,并递增 `packet_id`,不把历史对话或旧包拼接进来。证据候选必须交给 `scripts/context_packet.py` 预筛选,禁止手工把完整日志塞进包。任务完成不是“代码已写”,而是对应条目达到约定状态并附上可重跑命令。阻塞任务保留原上下文和失败日志的摘要及哈希;不得通过删除样本、降低容差或把 `in_progress` 改成 `REAL-EXCLUDED` 来清除阻塞。
|
||||||
|
|
||||||
|
最小任务拆分建议与技术路线第 11 节一致:先做 WS-0 的清单和 golden 格式,再做 WS-1/WS-2 的 `sim_step` 与快照,随后做 WS-3 的 WorkspaceRuntime 和恢复测试,最后接入 UI 和全量回归。每个垂直切片都必须同时包含一个正常路径、一个错误路径和一个恢复路径,避免只交付“能运行一次”的演示。
|
||||||
|
|
||||||
|
## 9. 里程碑检查清单
|
||||||
|
|
||||||
|
里程碑评审前,负责人逐项确认:
|
||||||
|
|
||||||
|
1. context lock、源码/工具链版本和文档 revision 一致。
|
||||||
|
2. 每个任务上下文包均为固定八段结构,未超过 8,192 tokens/32 KiB,旧包只以哈希引用。
|
||||||
|
3. 新增或变更的 manifest 条目、测试 ID、golden 和差异报告互相可追溯。
|
||||||
|
4. 正常、边界、错误、暂停/恢复、断网和回答/工具失败场景均有自动化结果。
|
||||||
|
5. OPFS 已提交版本、临时文件、journal、任务账本和 checkpoint 状态可解释且可恢复。
|
||||||
|
6. 失败重试使用幂等键,已确认步骤不会重复执行,未确认步骤不会被跳过。
|
||||||
|
7. 真实硬件排除项未被误报为仿真支持,仿真数字孪生仍覆盖所需可观察行为。
|
||||||
|
8. 性能、配额、浏览器兼容和许可证风险已记录,未关闭的风险有责任人和期限。
|
||||||
|
9. 变更可按证据包中的步骤回滚,并且回滚后旧 context lock 仍可重建。
|
||||||
|
|
||||||
|
通过后,将评审记录、门禁结果和 context lock 摘要作为里程碑附件;未通过则保持里程碑开放,不发布“部分完成”的兼容声明。
|
||||||
|
|
||||||
|
## 10. 与现有路线的落地关系
|
||||||
|
|
||||||
|
技术路线第 8 节的测试层级和第 9 节的阶段 A-E 由本文件第 6、7 节转化为可执行退出条件;覆盖矩阵第 1、2、13 节的状态、manifest、完整性和覆盖率要求由本文件第 2.1、3.4、7 节落实。OPFS 的目录、事务和快照设计以技术路线第 5 节为实现约束,并以本文件第 5 节的故障矩阵作为验收补充。浏览器 UI、Worker 通信、快照、背压、前端任务和 FE-M0..M5 以[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)为实现约束。固定上下文包和提交字段由本文件第 3.2、3.3 节统一,任何后续文档若新增阶段、状态或门禁,必须在这里登记并同步关联文档。
|
||||||
452
docs/linuxcnc-web-wasm-frontend-communication-design.md
Normal file
452
docs/linuxcnc-web-wasm-frontend-communication-design.md
Normal file
@@ -0,0 +1,452 @@
|
|||||||
|
# LinuxCNC Web/WASM 仿真前端与通信详细设计
|
||||||
|
|
||||||
|
**文档状态**:Draft v0.1
|
||||||
|
**适用基线**:LinuxCNC `2.10.0~pre0`;浏览器运行时、WASM 核心、Pyodide、OPFS 和 Web UI 采用同一 `context_id`
|
||||||
|
**上层路线**:[技术路线](linuxcnc-web-wasm-technical-roadmap.md)
|
||||||
|
**源码关联**:[功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)
|
||||||
|
**覆盖验收**:[仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)
|
||||||
|
**执行治理**:[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)
|
||||||
|
**总控执行**:[移植总控执行手册](linuxcnc-web-wasm-integration-playbook.md)
|
||||||
|
|
||||||
|
本文件把“浏览器前端”和“LinuxCNC 仿真核心之间的边界”定义为可实现、可测试、可版本化的契约。前端不直接调用 WASM 内部指针、不直接写 OPFS、不直接改变仿真状态;所有命令、状态、事件、日志、快照和恢复操作都通过 Worker 通信层完成。LinuxCNC 的解释器、TP、motion、HAL、IO、Python 和数字孪生是状态权威;前端是命令发起者、状态投影者和用户工作流编排者。
|
||||||
|
|
||||||
|
## 1. 设计目标与不可变原则
|
||||||
|
|
||||||
|
### 1.1 目标
|
||||||
|
|
||||||
|
1. 覆盖 LinuxCNC 仿真用户的完整工作流:工程选择、配置加载、G-code 编辑/预览/运行、MDI、jog、home、override、主轴、换刀、冷却、探针、报警、HAL、ClassicLadder、工具表、参数、日志、快照、恢复、导入导出和离线运行。
|
||||||
|
2. 前端在 Chromium、Firefox、Safari 支持范围内保持一致的命令语义和状态显示;不要求桌面 GUI 像素级复制,但必须保持工作流、状态、错误和结果等价。
|
||||||
|
3. 主线程只处理输入、布局、可视化和状态投影;WASM、Python、HAL 周期、文件系统、journal、快照和恢复全部在 Worker 侧执行。
|
||||||
|
4. 通信协议可录制、回放、限流、取消、重试和恢复;断网、标签页挂起、Worker 重启、回答中断或工具结果丢失不得产生重复副作用或跳过步骤。
|
||||||
|
5. UI 功能条目与 LinuxCNC 源文件、配置入口、测试和 oracle 互相可追溯,纳入覆盖矩阵和发布门禁。
|
||||||
|
|
||||||
|
### 1.2 不可变原则
|
||||||
|
|
||||||
|
| 原则 | 约束 |
|
||||||
|
|---|---|
|
||||||
|
| Worker 权威 | 前端显示的运行状态必须来自 Worker 快照或事件;前端本地乐观状态只能标记为 `pending`,不能当作仿真已执行 |
|
||||||
|
| 单写者 | 一个仿真会话只允许一个 Worker 实例写入 WASM 状态和 OPFS journal;多标签页只能观察或显式取得租约 |
|
||||||
|
| 固定顺序 | 命令按 `seq` 排序,WASM step、HAL thread、事件和 OPFS commit 在会话内串行 |
|
||||||
|
| 版本化边界 | 命令、事件、快照、能力、工程格式和错误码均带 `schema_version`;未知版本拒绝而不猜测 |
|
||||||
|
| 可重放 | 任何影响仿真结果的命令都可记录输入、tick、结果和状态哈希;调试 UI 不得改变执行顺序 |
|
||||||
|
| 本地优先 | 网络不可用不影响已缓存资源和 OPFS 工程的本地仿真;远程同步是可选功能 |
|
||||||
|
| 安全排除 | 不把宿主路径、shell、真实设备、原始 socket、动态库或任意 Python 宿主能力暴露给前端插件 |
|
||||||
|
|
||||||
|
## 2. 技术路线与实现方法
|
||||||
|
|
||||||
|
### 2.1 前端技术栈
|
||||||
|
|
||||||
|
```text
|
||||||
|
React + TypeScript
|
||||||
|
├─ AppShell / Router / PermissionBoundary
|
||||||
|
├─ Domain stores(session、program、motion、hal、io、workspace、recovery)
|
||||||
|
├─ WorkerClient(postMessage、序列、超时、重试和协议校验)
|
||||||
|
├─ Command UX(命令表单、pending、ack、result、错误和取消)
|
||||||
|
├─ Editors(G-code、INI、HAL、工具表、ClassicLadder、VCP schema)
|
||||||
|
├─ Machine UI(状态、MDI、jog、home、override、报警、工具和 I/O)
|
||||||
|
├─ Visualization(Three.js/WebGL/WebGPU 适配、轨迹、坐标、毛坯和模型)
|
||||||
|
└─ Diagnostics(HAL graph/scope、事件、日志、差异和能力报告)
|
||||||
|
│ structured clone / transferable ArrayBuffer
|
||||||
|
▼
|
||||||
|
Dedicated sim.worker.ts
|
||||||
|
├─ ProtocolGateway / TaskLedger
|
||||||
|
├─ SessionManager / CapabilityRegistry
|
||||||
|
├─ SimScheduler / LinuxCncCompat
|
||||||
|
├─ WasmRuntime / PythonRuntime
|
||||||
|
├─ WorkspaceRuntime / OpfsJournal
|
||||||
|
├─ SnapshotManager / RecoveryManager
|
||||||
|
└─ StatePublisher / BackpressureController
|
||||||
|
```
|
||||||
|
|
||||||
|
推荐采用 TypeScript 严格模式、运行时 schema 校验(例如手工生成的校验器或项目选定的 schema 工具)、结构化日志和可测试的纯 reducer。React 组件不能直接依赖 `postMessage`;所有消息经过 `WorkerClient`,所有 UI 状态经过 domain store。Three.js 只消费轨迹/姿态快照,不读取 WASM 内存。
|
||||||
|
|
||||||
|
### 2.2 分层责任
|
||||||
|
|
||||||
|
| 层 | 责任 | 允许访问 | 禁止访问 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| View/UI | 用户输入、布局、无障碍、键盘/触摸、状态投影 | domain store、WorkerClient 的只读结果 | WASM、OPFS、网络写入、直接修改 authoritative state |
|
||||||
|
| Domain store | 规范化状态、reducer、派生选择器、pending/error 状态 | 已校验 Worker 消息 | 猜测未收到的状态、直接持久化 |
|
||||||
|
| WorkerClient | 握手、序列、超时、取消、重试、消息校验、传输统计 | `postMessage`、transferable buffer | 修改仿真语义、跳过 ack、吞掉错误 |
|
||||||
|
| ProtocolGateway | schema、权限、幂等键、命令路由和能力检查 | Worker 内模块 | 未版本化命令、跨会话写入 |
|
||||||
|
| SimRuntime | WASM、Python、HAL、IO、固定 tick、状态快照 | Worker 内 WASM/虚拟 FS | DOM、真实硬件、宿主命令 |
|
||||||
|
| WorkspaceRuntime | OPFS、journal、checkpoint、导入导出、配额 | Worker OPFS API | UI 线程同步句柄、未提交覆盖 |
|
||||||
|
| StatePublisher | 快照、事件、轨迹、采样、背压、丢弃策略 | Worker 状态 | 改变核心状态或重排事件 |
|
||||||
|
|
||||||
|
### 2.3 状态管理方法
|
||||||
|
|
||||||
|
Worker 发布三种数据:
|
||||||
|
|
||||||
|
1. **权威快照**:完整或增量的当前状态,带 `simulation_tick` 和状态哈希;UI 刷新、重连和恢复以此为基准。
|
||||||
|
2. **领域事件**:报警、错误、模式变化、换刀、主轴到速、探针触发、HAL 变化、恢复进度和命令结果;事件不可替代缺失的权威快照。
|
||||||
|
3. **高频流**:轨迹点、HAL sample、位置/速度/电流等,可按订阅和背压丢弃中间样本;流末端必须有序号和时间范围,不能丢失最终状态。
|
||||||
|
|
||||||
|
前端 store 保存 `authoritative`、`pending`、`last_error`、`last_verified_tick` 和 `stream_cursor`。任何本地编辑先进入 draft;保存成功后才更新 committed 版本。仿真状态、工程文件状态和 UI 偏好分开存储。
|
||||||
|
|
||||||
|
## 3. 前端功能设计
|
||||||
|
|
||||||
|
### 3.1 应用壳和导航
|
||||||
|
|
||||||
|
| 功能 | 前端行为 | 通信依赖 |
|
||||||
|
|---|---|---|
|
||||||
|
| 启动/能力检查 | 显示浏览器、WASM、Pyodide、OPFS、WebGL/WebGPU、跨源隔离和缓存状态 | `HELLO`、`CAPABILITIES` |
|
||||||
|
| 会话选择 | 打开、创建、复制、重命名、导入、导出工程;显示租约和最近快照 | `WORKSPACE_LIST`、`SESSION_CREATE`、`PROJECT_*` |
|
||||||
|
| 运行态导航 | 控制台、程序、预览、HAL、PLC、工具、配置、日志和差异视图 | `STATE_SNAPSHOT`、领域订阅 |
|
||||||
|
| 多视图同步 | 一个主控视图,其他视图只读订阅;切换不重启仿真 | `SUBSCRIBE`、`SNAPSHOT_REQUEST` |
|
||||||
|
| 权限边界 | 插件和 Python VCP 只能访问 manifest 授权的 pins、命令和文件 | `CAPABILITIES`、`PLUGIN_*` |
|
||||||
|
|
||||||
|
### 3.2 程序、MDI 和编辑器
|
||||||
|
|
||||||
|
- G-code 编辑器:语法高亮、行号、错误定位、程序资源树、搜索、跳转行、保存草稿和版本比较。
|
||||||
|
- 程序预览:解析状态、轨迹、刀具、坐标系、毛坯、当前行和首个差异 tick;预览必须明确“仅解析”或“已运行”。
|
||||||
|
- 程序控制:加载、运行、暂停、单步、可选停止、恢复、从行运行、重启、清空队列和中止。
|
||||||
|
- MDI:输入、历史、状态、返回结果、队列破坏和错误行;提交后显示 `pending → ack → result`。
|
||||||
|
- 宏/remap:显示调用栈、参数、返回值、Python 异常、资源限制和 `real_hardware_excluded` 错误。
|
||||||
|
|
||||||
|
### 3.3 手动操作和机床控制
|
||||||
|
|
||||||
|
- 模式:manual、mdi、auto、teleop、joint、world、emergency stop、off、on、homing。
|
||||||
|
- Jog:轴/关节选择、连续/增量、速度、方向、按下/释放、键盘/触控/手轮事件去抖和释放保护。
|
||||||
|
- Home/limit:单轴和全部回零、序列、共享开关、锁定转台、软限位/硬限位和跟随误差报警。
|
||||||
|
- Override:feed、spindle、rapid、adaptive、feed hold、feed inhibit、spindle brake 和急停;每个变更显示来源、范围和确认结果。
|
||||||
|
- 主轴/IO:方向、转速、定向、齿轮、冷却、润滑、换刀、探针、等离子 torch/arc-ok、激光功率和故障注入。
|
||||||
|
|
||||||
|
### 3.4 HAL、PLC 和诊断
|
||||||
|
|
||||||
|
- HAL browser:组件、pin、signal、param、类型、方向、线程、函数、连接和当前值。
|
||||||
|
- HAL command console:`loadrt`、`addf`、`setp`、`sets`、`net`、`unlinkp`、`show`、`save`、`source` 的受控子集。
|
||||||
|
- HAL scope/streamer:订阅通道、采样频率、触发、缩放、暂停、导出、回放和丢样本标记。
|
||||||
|
- ClassicLadder:工程加载/保存、section、symbol、变量、梯形图、顺序图、扫描周期、虚拟寄存器和调试状态。
|
||||||
|
- 诊断:事件时间线、报警确认、配置错误、Worker overrun、OPFS 错误、配额、能力报告和原生/WASM 差异。
|
||||||
|
|
||||||
|
### 3.5 工程、工具和配置
|
||||||
|
|
||||||
|
- 工程文件树:INI/HAL/TBL/VAR/NGC/PY/XML/TCL/CLP、模型和材料表;显示版本、哈希、未保存变更和冲突。
|
||||||
|
- 配置编辑器:section/键类型、include 图、HALFILE 顺序、资源引用、能力映射、警告和仿真排除项。
|
||||||
|
- 工具表:pocket/tool、几何、磨损、角度、方向、数据库查询、备份、迁移和换刀预览。
|
||||||
|
- 快照/恢复:运行态 checkpoint、事件增量、恢复点、差异和回滚;UI 不得把未提交 draft 当作已恢复。
|
||||||
|
- 导入/导出:工程包、manifest、golden、日志和兼容报告;导入先校验哈希、版本、路径和权限。
|
||||||
|
|
||||||
|
### 3.6 可视化与响应式设计
|
||||||
|
|
||||||
|
- 三栏工作布局:左侧工程/程序资源,中部程序与 3D 主视图,右侧状态/报警/工具面板;窄屏切换为标签页和底部控制栏。
|
||||||
|
- 关键状态使用稳定区域:模式、急停、运行/暂停、当前行、坐标、进给、主轴、报警和恢复状态不能因消息刷新跳动。
|
||||||
|
- 轨迹数据使用 transferable `ArrayBuffer`;渲染线程只处理最新可绘制帧,中间帧可丢弃并显示采样间隙。
|
||||||
|
- 所有控制支持键盘和触摸;急停、停止、释放 jog 等高风险操作需要可见状态和二次确认策略。
|
||||||
|
- 前端不使用“看起来完成”的乐观动画;命令尚未 `verified` 时显示 pending,错误必须保留来源和操作 ID。
|
||||||
|
|
||||||
|
## 4. 前端与 LinuxCNC 通信协议
|
||||||
|
|
||||||
|
### 4.1 通信通道
|
||||||
|
|
||||||
|
```text
|
||||||
|
UI thread
|
||||||
|
└─ WorkerClient.postMessage()
|
||||||
|
├─ control channel: command/ack/result/error/recovery
|
||||||
|
├─ state channel: snapshot/event/alarm/capability
|
||||||
|
└─ stream channel: trajectory/HAL samples/log chunks (transferable buffers)
|
||||||
|
```
|
||||||
|
|
||||||
|
第一版使用 Dedicated Worker 的 `postMessage` 和结构化克隆;大块轨迹、日志和快照使用 transferable `ArrayBuffer`。SharedArrayBuffer 只作为后续性能优化,必须保持相同命令顺序和结果。通信不使用真实 NML socket;NML 消息类型和状态语义在 `LinuxCncCompat` 中映射到版本化 message bus。
|
||||||
|
|
||||||
|
### 4.2 通用消息信封
|
||||||
|
|
||||||
|
所有消息都包含以下字段;事件和流也必须带 `seq` 和 `simulation_tick`,不能使用裸 JSON:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
type MessageEnvelope<T> = {
|
||||||
|
schema_version: 1;
|
||||||
|
kind: string;
|
||||||
|
context_id: string;
|
||||||
|
session_id: string;
|
||||||
|
seq: number;
|
||||||
|
operation_id?: string;
|
||||||
|
simulation_tick?: number;
|
||||||
|
sent_at_monotonic_ms?: number;
|
||||||
|
payload: T;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
`seq` 在会话内单调递增;`operation_id` 对所有有副作用命令必填;`sent_at_monotonic_ms` 只用于诊断,不参与仿真结果。消息大小、数组长度、字符串长度、订阅数量和命令速率均由 capability/limits 下发并由 Worker 再次校验。
|
||||||
|
|
||||||
|
### 4.3 握手和能力协商
|
||||||
|
|
||||||
|
```text
|
||||||
|
UI -> HELLO { client_version, supported_schema_versions, requested_features }
|
||||||
|
Worker -> CAPABILITIES { context_id, abi, snapshot, commands, streams, limits, exclusions }
|
||||||
|
UI -> SESSION_ATTACH { session_id?, project_id, lease_token? }
|
||||||
|
Worker -> SESSION_READY { session_id, state_hash, simulation_tick, subscriptions }
|
||||||
|
```
|
||||||
|
|
||||||
|
握手失败不得降级到未版本化协议。`CAPABILITIES` 必须列出支持的 G/M/O、HAL 组件、kinematics、Python 模块、UI 插件、最大程序大小、最大快照、可用流和 `REAL-EXCLUDED` 能力。前端按能力隐藏或禁用控制,并显示原因,不把缺失能力伪装成运行时错误。
|
||||||
|
|
||||||
|
### 4.4 命令分类
|
||||||
|
|
||||||
|
| 命令族 | 示例 | 副作用 | 处理要求 |
|
||||||
|
|---|---|---:|---|
|
||||||
|
| 生命周期 | `SESSION_CREATE`、`LOAD_PROJECT`、`START`、`STOP`、`RESET`、`DESTROY` | 是 | prepare/verify/commit;租约和状态机检查 |
|
||||||
|
| 程序 | `PROGRAM_LOAD`、`PROGRAM_RUN`、`PROGRAM_PAUSE`、`PROGRAM_RESUME`、`PROGRAM_ABORT`、`PROGRAM_STEP`、`PROGRAM_SEEK` | 是 | 记录程序哈希、当前行和 tick;不允许跳过队列语义 |
|
||||||
|
| MDI/运动 | `MDI_EXECUTE`、`JOG_START`、`JOG_STOP`、`HOME`、`SET_MODE` | 是 | jog 必须有 stop/释放;重复 `operation_id` 返回原结果 |
|
||||||
|
| 倍率/IO | `SET_OVERRIDE`、`SPINDLE_COMMAND`、`COOLANT_COMMAND`、`TOOL_PREPARE`、`TOOL_CHANGE`、`PROBE_CONFIG` | 是 | 能力、范围、模式和虚拟设备状态校验 |
|
||||||
|
| HAL/PLC | `HAL_COMMAND`、`HAL_SET`、`HAL_SUBSCRIBE`、`PLC_START/STOP` | 是 | 受控白名单、pin 类型检查、周期和权限检查 |
|
||||||
|
| 工作区 | `PROJECT_SAVE`、`IMPORT`、`EXPORT`、`CHECKPOINT`、`RECOVER` | 是 | OPFS journal;结果带版本和哈希 |
|
||||||
|
| 查询/诊断 | `SNAPSHOT_REQUEST`、`HAL_READ`、`LOG_QUERY`、`DIFF_QUERY`、`CAPABILITIES` | 否/只读 | 可取消、可重复;不改变仿真状态 |
|
||||||
|
| 控制 | `SUBSCRIBE`、`UNSUBSCRIBE`、`CANCEL`、`PING` | 订阅有状态 | 明确 cursor、采样率、背压和取消结果 |
|
||||||
|
|
||||||
|
每条命令经过 `validate → authorize → ledger_prepare → execute → verify → ledger_commit → ack/result`。`ACK` 只表示 Worker 已接收和排队,不表示仿真完成;UI 只有收到 `COMMAND_RESULT` 或明确的 `ERROR` 才结束 pending。
|
||||||
|
|
||||||
|
### 4.5 状态、事件和流
|
||||||
|
|
||||||
|
| 消息 | 频率 | 内容 | 丢失策略 |
|
||||||
|
|---|---:|---|---|
|
||||||
|
| `STATE_SNAPSHOT` | 20-60 Hz 或请求 | task/motion/interpreter/IO/HAL/tool/Python/alarms/恢复状态 | 不可丢最终快照;按 cursor 重取 |
|
||||||
|
| `EVENT`/`ALARM` | 事件驱动 | 状态变化、错误、换刀、探针、主轴、配置和恢复事件 | 不可静默丢;持久化 event log,缺号触发恢复 |
|
||||||
|
| `TRAJECTORY_CHUNK` | 订阅 | tick 范围、坐标/姿态、刀具、采样和差异标记 | 可丢中间块;保留范围和 gap,最终位置来自快照 |
|
||||||
|
| `HAL_SAMPLE` | 订阅 | 通道定义、采样值、tick、丢样本数 | 可按背压降采样;触发和边界样本不可丢 |
|
||||||
|
| `LOG_CHUNK` | 请求/批量 | 级别、来源、操作 ID、错误码和文本 | 可滚动;错误和恢复日志不可丢 |
|
||||||
|
| `RECOVERY_STATUS` | 恢复期间 | checkpoint、重放、对账、冲突、可继续状态 | 不可丢,UI 必须阻塞依赖状态的命令 |
|
||||||
|
|
||||||
|
### 4.6 典型消息
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"schema_version": 1,
|
||||||
|
"kind": "MDI_EXECUTE",
|
||||||
|
"context_id": "linuxcnc-2.10.0-pre0-wasm-c1",
|
||||||
|
"session_id": "s-42",
|
||||||
|
"seq": 184,
|
||||||
|
"operation_id": "op-184-9fd1",
|
||||||
|
"payload": { "line": "G0 X10 Y5", "source": "mdi", "queue_policy": "queue_buster" }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"schema_version": 1,
|
||||||
|
"kind": "COMMAND_RESULT",
|
||||||
|
"context_id": "linuxcnc-2.10.0-pre0-wasm-c1",
|
||||||
|
"session_id": "s-42",
|
||||||
|
"seq": 184,
|
||||||
|
"operation_id": "op-184-9fd1",
|
||||||
|
"simulation_tick": 93210,
|
||||||
|
"payload": {
|
||||||
|
"status": "verified",
|
||||||
|
"state_hash": "sha256:...",
|
||||||
|
"canonical_events": 1,
|
||||||
|
"error": null,
|
||||||
|
"ledger_commit": "journal/184.commit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.7 错误、取消和超时
|
||||||
|
|
||||||
|
错误码分为 `protocol_*`、`capability_*`、`config_*`、`interpreter_*`、`motion_*`、`hal_*`、`python_*`、`workspace_*`、`recovery_*` 和 `real_hardware_excluded`。错误必须包含 `code`、`message_key`、参数、来源文件/行、`operation_id`、`simulation_tick`、可重试性和建议动作。
|
||||||
|
|
||||||
|
取消分为 `requested`、`accepted`、`draining`、`cancelled`、`too_late`;已经提交的有副作用命令不能回滚成“未执行”。超时只表示客户端尚未收到确认,WorkerClient 必须进入 `awaiting_reconcile` 并查询账本/状态,而不是直接重发。
|
||||||
|
|
||||||
|
### 4.8 背压、流控和性能预算
|
||||||
|
|
||||||
|
1. 控制命令使用有界队列;超过上限返回 `protocol_backpressure`,不丢弃已经接收的副作用命令。
|
||||||
|
2. 快照发布采用“最新优先”;事件、报警、恢复状态和命令结果采用“顺序优先”,不可用快照降采样替代。
|
||||||
|
3. 轨迹和 HAL 流按订阅者独立限速;Worker 返回 `cursor`、`sample_period`、`dropped_count` 和 tick 范围。
|
||||||
|
4. 单次消息、单工程、单快照、单流和订阅数量上限在 `CAPABILITIES.limits` 中声明,并在 Worker 和 UI 双重检查。
|
||||||
|
5. 前端只渲染当前可见窗口和最近快照;日志、轨迹和波形使用虚拟列表/分块,不把无限历史放入 React state。
|
||||||
|
6. M1 建立命令确认 P95/P99、快照延迟、流吞吐、UI 主线程阻塞和 Worker overrun 基线;超过预算必须阻止里程碑。
|
||||||
|
|
||||||
|
### 4.9 LinuxCNC 源程序和通信映射
|
||||||
|
|
||||||
|
ProtocolGateway 不能直接调用零散 LinuxCNC 函数;每个命令族先映射到 `LinuxCncCompat` 的稳定接口,再由兼容层访问对应源码状态机。以下关联必须写入 manifest 的 `source_files`、`source_symbols`、`protocol_messages` 和 `state_fields`:
|
||||||
|
|
||||||
|
| 前端通信域 | LinuxCNC 源程序 | Worker/WASM 适配接口 | 前端消息/状态 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 生命周期和 Task | `linuxcnc/src/emc/task/emctaskmain.cc`、`taskclass.cc`、`taskintf.cc`、`emctask.cc` | `SimTask.create/load/start/stop/reset/destroy` | `SESSION_*`、`START/STOP/RESET`、`task.state` |
|
||||||
|
| 程序和解释器 | `linuxcnc/src/emc/rs274ngc/interp_read.cc`、`interp_execute.cc`、`interp_queue.cc`、`interp_convert.cc`、`modal_state.cc` | `Interpreter.load/run/step/abort/seek` | `PROGRAM_*`、`interpreter.*`、`canonical.*` |
|
||||||
|
| MDI 和 canonical | `linuxcnc/src/emc/task/emccanon.cc`、`linuxcnc/src/emc/nml_intf/interpl.cc`、`linuxcnc/src/emc/rs274ngc/interp_queue.cc` | `SimTask.mdi`、`CanonicalQueue` | `MDI_EXECUTE`、`command_result`、当前行/队列 |
|
||||||
|
| Motion/jog/home/limit | `linuxcnc/src/emc/motion/command.c`、`control.c`、`homing.c`、`motion.c`、`motion_struct.h` | `SimMotion.command/jog/home/snapshot` | `JOG_*`、`HOME`、`SET_MODE`、`motion.*`、`homing.*` |
|
||||||
|
| TP 和轨迹 | `linuxcnc/src/emc/tp/tp.c`、`tc.c`、`tcq.c`、`blendmath.c`、`spherical_arc.c` | `TrajectoryPlanner.step/readChunk` | `TRAJECTORY_CHUNK`、位置/速度/加速度、queue depth |
|
||||||
|
| Kinematics/姿态 | `linuxcnc/src/emc/kinematics/*kins.c`、`*kins.cc`、`kins_util.c`、`trtfuncs.c` | `Kinematics.forward/inverse/select` | `kinematics.*`、joint/axis/pose、singularity error |
|
||||||
|
| IO/主轴/换刀/冷却 | `linuxcnc/src/emc/iotask/ioControl.cc`、`ioControl_v2.cc`;`linuxcnc/src/emc/tooldata/**` | `SimIo.command/snapshot`、`ToolService` | `SPINDLE_*`、`TOOL_*`、`COOLANT_*`、`io.*`、`tool.*` |
|
||||||
|
| HAL/halui | `linuxcnc/src/hal/hal_lib.c`、`hal.h`、`hal_priv.h`、`halmodule.cc`;`linuxcnc/src/emc/usr_intf/halui.cc` | `SimHal.execute/read/subscribe` | `HAL_COMMAND/SET/SUBSCRIBE`、`hal.*`、`HAL_SAMPLE` |
|
||||||
|
| ClassicLadder | `linuxcnc/src/hal/classicladder/classicladder.c`、`calc.c`、`calc_sequential.c`、`files_project.c`、`module_hal.c` | `SimPlc.load/start/stop/step` | `PLC_*`、PLC section/variable/scan state |
|
||||||
|
| NML 状态/命令/错误 | `linuxcnc/src/emc/nml_intf/emc.cc`、`emc.hh`、`emc_nml.hh`;`linuxcnc/src/libnml/nml/stat_msg.cc`、`cmd_msg.cc` | `LinuxCncCompat.translateCommand/publishStatus` | envelope、`STATE_SNAPSHOT`、`EVENT`、`ALARM` |
|
||||||
|
| Python/remap/VCP | `linuxcnc/src/emc/pythonplugin/python_plugin.cc`;`linuxcnc/src/emc/rs274ngc/interp_python.cc`、`interp_remap.cc`;`linuxcnc/lib/python/hal.py`、`qtvcp/**`、`gladevcp/**` | `PythonRuntime.invoke`、虚拟 `linuxcnc/hal` 模块 | `PLUGIN_*`、Python result/error、VCP pin/event |
|
||||||
|
| 工程和参数 | `linuxcnc/src/libnml/inifile/**`、`linuxcnc/src/emc/ini/**`、`linuxcnc/src/emc/tooldata/**` | `WorkspaceRuntime`、`ConfigService` | `PROJECT_*`、`IMPORT/EXPORT`、配置/工具/参数状态 |
|
||||||
|
|
||||||
|
前端所需但 LinuxCNC 原生状态中不存在的字段,例如 `pending`、`operation_id`、`lease_token`、`recovery_progress` 和 `dropped_count`,属于 Web 适配状态,必须明确标记为 `SIM-ADAPTER`,不能写回 LinuxCNC 核心结构。
|
||||||
|
|
||||||
|
### 4.10 快照状态契约
|
||||||
|
|
||||||
|
快照按领域分区,允许通过位图和版本号发送增量;增量必须基于已确认的 `base_snapshot_id`,基线缺失时前端请求完整快照:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
type SimSnapshotV1 = {
|
||||||
|
snapshot_id: string;
|
||||||
|
base_snapshot_id?: string;
|
||||||
|
full: boolean;
|
||||||
|
simulation_tick: number;
|
||||||
|
state_hash: string;
|
||||||
|
task: { state: string; mode: string; interp_state: string; current_line: number };
|
||||||
|
motion: { axes: number[]; joints: number[]; velocity: number[]; homed: boolean[]; limits: number };
|
||||||
|
coordinates: { machine: number[]; relative: number[]; g5x: number; g92: number[]; tool_offset: number[] };
|
||||||
|
spindle: Array<{ enabled: boolean; direction: number; commanded: number; actual: number; at_speed: boolean }>;
|
||||||
|
io: { coolant: number; lube: boolean; digital: number[]; analog: number[]; probe: boolean };
|
||||||
|
tool: { current: number; prepared: number; pocket: number; change_state: string };
|
||||||
|
overrides: { feed: number; rapid: number; spindle: number[]; adaptive: number; feed_hold: boolean };
|
||||||
|
hal: { graph_revision: number; changed_values?: ArrayBuffer };
|
||||||
|
alarms: Array<{ id: string; severity: string; code: string; acknowledged: boolean }>;
|
||||||
|
recovery: { status: string; last_verified_seq: number; checkpoint_tick: number };
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
实际编码可以是生成的二进制 schema,但字段语义必须保持。浮点数组的轴顺序、单位、NaN/Infinity 策略、位掩码和空值语义必须在 schema 中固定;前端不能根据数组长度猜测机床配置。
|
||||||
|
|
||||||
|
### 4.11 Worker 到 WASM C ABI 调用规则
|
||||||
|
|
||||||
|
| Worker 操作 | C ABI | 调用规则 | 结果 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 创建核心 | `sim_create(config, len)` | 握手和配置校验后调用一次;失败则不创建会话 | 错误码、能力基础和初始状态 |
|
||||||
|
| 挂载工程 | `sim_load_workspace(root_path)` | WorkspaceRuntime 完成 journal 恢复和 `/workspace` 挂载后调用 | 配置诊断、资源图和可启动状态 |
|
||||||
|
| 发送命令 | `sim_command(cmd, len)` | ProtocolGateway 编码已校验命令;每个 `operation_id` 最多进入核心一次 | 入队/拒绝错误;最终结果从事件或快照确认 |
|
||||||
|
| 推进仿真 | `sim_step(cycles)` | 仅 SimScheduler 调用;UI 不得直接指定墙钟结果 | 新 tick、事件和可发布状态 |
|
||||||
|
| 读取快照 | `sim_read_snapshot(out, capacity)` | 先查询/预分配容量;复制到 Worker 所有的 buffer,再转移给 UI | `STATE_SNAPSHOT` 或容量错误 |
|
||||||
|
| 读取事件 | `sim_read_event(out, capacity)` | 循环读取到空或有界批次上限;保持核心顺序 | `EVENT`、`ALARM`、`COMMAND_RESULT` |
|
||||||
|
| 导出运行态 | `sim_export_state(out, capacity)` | 在安全 tick 暂停写入,生成带 schema/context 的 checkpoint | WorkspaceRuntime prepare/commit |
|
||||||
|
| 导入运行态 | `sim_import_state(data, len)` | 校验 context、schema、工程哈希后导入;导入失败保留旧实例 | `RECOVERY_STATUS` 和完整快照 |
|
||||||
|
| 销毁核心 | `sim_destroy()` | 关闭订阅、flush journal、关闭句柄后调用;幂等 | `SESSION_DESTROYED` |
|
||||||
|
|
||||||
|
WASM 内存由 `WasmRuntime` 独占。输入 buffer 在调用返回前有效;输出在下一次核心调用前复制到 Worker buffer;TypeScript 不长期保存 WASM heap view。C ABI 返回值统一映射为版本化错误码,禁止用异常字符串作为协议。`sim_step`、`sim_command`、状态导入导出和销毁不能并发执行。
|
||||||
|
|
||||||
|
## 5. 生命周期、恢复和离线通信
|
||||||
|
|
||||||
|
### 5.1 会话生命周期
|
||||||
|
|
||||||
|
```text
|
||||||
|
new → handshaking → attaching → loading → ready
|
||||||
|
ready → running ↔ paused
|
||||||
|
running/paused → stopping → stopped
|
||||||
|
任何状态 → recovering → ready | blocked
|
||||||
|
任何状态 → destroying → destroyed
|
||||||
|
```
|
||||||
|
|
||||||
|
状态转换由 Worker 权威决定。UI 可以请求转换,但不能本地伪造转换。每次转换发送 `STATE_TRANSITION` 事件并写入任务账本;非法转换返回 `state_transition_invalid`。
|
||||||
|
|
||||||
|
### 5.2 刷新、Worker 重启和回答中断
|
||||||
|
|
||||||
|
Worker 启动后先发送 `RECOVERY_REQUIRED` 或 `SESSION_READY`。UI 在收到 `RECOVERY_STATUS=verified` 前禁用依赖运行态的运行、jog、MDI 和工具命令,只允许恢复、导出、查看日志和取消。`WorkerClient` 维护未完成操作表;重连时按 `operation_id` 查询结果,已 commit 的操作只关联原结果,未 commit 的操作从 checkpoint 继续。
|
||||||
|
|
||||||
|
### 5.3 断网和重新联网
|
||||||
|
|
||||||
|
前端的网络状态不能决定本地仿真状态。Service Worker 缓存应用壳、WASM、Pyodide、协议 schema 和样例;Worker 继续使用 OPFS journal、快照和本地命令。重新联网只执行缓存更新或可选同步,必须先比较 `context_id`、工程哈希、最后 `seq`、tick 和状态哈希;冲突时保留本地版本并显示差异。
|
||||||
|
|
||||||
|
### 5.4 多标签页与租约
|
||||||
|
|
||||||
|
默认一个工程只能有一个写入会话。主标签页持有 `lease_token` 和 heartbeat;其他标签页以只读模式订阅快照。主标签页崩溃后,候选标签页读取 lease expiry、校验 checkpoint 和 journal,再通过 `SESSION_CLAIM` 取得新租约。两个写者不允许同时运行;无法确定租约时进入 `blocked` 而不是并发写入。
|
||||||
|
|
||||||
|
## 6. 安全、权限和兼容性
|
||||||
|
|
||||||
|
- Worker 对命令、文件、组件、Python 模块和插件能力做白名单检查;UI 隐藏按钮不是安全边界。
|
||||||
|
- 工程路径统一规范化为 `/workspace` 相对路径,拒绝 `..`、绝对宿主路径、符号链接和未授权扩展名。
|
||||||
|
- Python remap、filter 和 VCP 只访问虚拟 `linuxcnc`、`hal`、INI、参数、时间和 I/O API;`fork/exec/subprocess/threading/socket/设备` 返回明确错误。
|
||||||
|
- 所有外部输入(导入工程、G-code、HAL、XML/UI、插件)先解析、限制资源、记录来源哈希,再提交给 Worker。
|
||||||
|
- 前端显示 `REAL-EXCLUDED` 时必须说明“不连接真实硬件、不提供安全保证”,禁止使用“在线”“已连接”等误导状态。
|
||||||
|
- schema/ABI/工程格式升级采用新版本号、双读迁移和 context lock;旧版本不能静默解释新字段。
|
||||||
|
|
||||||
|
## 7. 详细实施任务
|
||||||
|
|
||||||
|
任务标题统一使用 `[WS-x][Mx]`,每个任务绑定 source map/coverage manifest 条目、固定上下文包和测试证据。
|
||||||
|
|
||||||
|
### WS-5 前端与可视化任务
|
||||||
|
|
||||||
|
| 任务 ID | 任务 | 交付物 | 依赖 | 验收 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| FE-01 | 应用壳、路由、响应式布局和主题变量 | AppShell、导航、布局断点、无障碍基础 | 无 | 首次启动、窄屏、键盘和只读模式通过 |
|
||||||
|
| FE-02 | WorkerClient 和协议校验 | 信封类型、schema 校验、序列、超时、取消、重试 | COM-01 | 非法/未知消息拒绝;重复操作不重复副作用 |
|
||||||
|
| FE-03 | 会话/工程工作流 | 工程选择、租约、导入导出、恢复向导 | WS-3、COM-02 | 刷新、Worker 重启、无网、冲突恢复通过 |
|
||||||
|
| FE-04 | 程序编辑器和预览 | G-code 编辑、诊断、轨迹预览、当前行和差异 | WS-1、COM-02 | 语法/运行错误定位,预览与 golden 一致 |
|
||||||
|
| FE-05 | 控制台和手动操作 | MDI、run/pause/step/abort、jog/home/override | WS-2、COM-02 | 模式状态机、释放保护、命令结果完整 |
|
||||||
|
| FE-06 | 工具、IO、报警和状态面板 | 工具表、主轴、冷却、换刀、探针、报警 | WS-2、WS-3 | 正常/故障/恢复工作流通过 |
|
||||||
|
| FE-07 | HAL/PLC/诊断界面 | pin 图、命令控制台、scope、Ladder、日志 | WS-2、WS-4 | 订阅、触发、回放和权限限制通过 |
|
||||||
|
| FE-08 | Three.js 机床和毛坯 | 模型、姿态、轨迹、坐标、切削层 | FE-04、COM-03 | 非空渲染、采样背压、最终姿态一致 |
|
||||||
|
| FE-09 | VCP/插件 schema 运行时 | XML/descriptor 转 Web Component、权限和生命周期 | WS-4、COM-02 | 样例面板、pin 回调、异常隔离通过 |
|
||||||
|
| FE-10 | 前端性能和可观测性 | 虚拟列表、帧预算、消息统计、录制回放 | FE-01..09 | P95/P99 和主线程预算满足门禁 |
|
||||||
|
|
||||||
|
### WS-2/COM 通信与状态任务
|
||||||
|
|
||||||
|
| 任务 ID | 任务 | 交付物 | 依赖 | 验收 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| COM-01 | schema 和 C/TS 类型生成 | `protocol.v1`、命令/事件/错误/能力定义 | WS-0 | schema 版本锁定,未知字段策略明确 |
|
||||||
|
| COM-02 | ProtocolGateway/TaskLedger | 路由、权限、幂等、prepare/commit、恢复 | WS-1、WS-3 | 超时、确认丢失、重复响应和重启恢复通过 |
|
||||||
|
| COM-03 | SnapshotPublisher/流控 | 快照、事件、轨迹、HAL sample、cursor、背压 | WS-2 | 事件不丢、流可降采样、最终快照可重取 |
|
||||||
|
| COM-04 | LinuxCncCompat message bus | NML command/status/error 到 Worker 消息映射 | WS-1 | 消息类型、顺序、错误和状态 golden 对照 |
|
||||||
|
| COM-05 | 能力/限制注册表 | G/M/O、组件、kinematics、Python、UI、limits | WS-0、WS-1..4 | UI 正确启用/禁用,排除项可解释 |
|
||||||
|
| COM-06 | 浏览器和故障矩阵 | Playwright 通讯、离线、租约、刷新、背压测试 | COM-01..05 | Chromium/Firefox/Safari 目标矩阵通过 |
|
||||||
|
|
||||||
|
### 7.3 实施批次和依赖顺序
|
||||||
|
|
||||||
|
| 批次 | 并行任务 | 串行依赖/冻结点 | 可演示结果 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| B0 规范和基线 | COM-01、COM-05、FE-01 | 冻结 `protocol.v1`、能力 ID、错误码和 UI 信息架构 | mock Worker 可完成握手、能力显示和错误页 |
|
||||||
|
| B1 最小通信闭环 | COM-02、COM-04、FE-02 | 必须先有 `sim_create/load/command/step/snapshot` ABI | 加载最小工程、发送命令、显示权威快照 |
|
||||||
|
| B2 核心操作 | FE-04、FE-05、COM-03 | interpreter/motion 状态字段冻结 | G-code、MDI、jog、home、override、轨迹闭环 |
|
||||||
|
| B3 持久化恢复 | FE-03、COM-06 的恢复子集 | WorkspaceRuntime、TaskLedger、checkpoint schema 冻结 | 刷新、Worker 重启、断网和确认丢失自动接续 |
|
||||||
|
| B4 设备和工具 | FE-06、FE-07 | HAL/IO/tool/PLC schema 和虚拟设备能力冻结 | 主轴、换刀、探针、报警、HAL/PLC 工作流 |
|
||||||
|
| B5 可视化和插件 | FE-08、FE-09 | 轨迹/姿态流和插件权限冻结 | Three.js 机床、毛坯、VCP/QtVCP 等价工作流 |
|
||||||
|
| B6 稳定发布 | FE-10、COM-06 全矩阵 | 全量 manifest、浏览器和性能门禁 | 可离线发布候选、兼容/差异/性能报告 |
|
||||||
|
|
||||||
|
B0-B2 可以使用只读 mock/golden 驱动 UI 开发,但到对应里程碑退出时必须切换真实 Worker/WASM 状态;mock 不能作为功能完成证据。B3 以后不得修改 `protocol.v1` 语义,只能增加向后兼容字段;破坏性变更必须创建 `protocol.v2` 并回退到 FE-M0 评审。
|
||||||
|
|
||||||
|
## 8. 里程碑和退出条件
|
||||||
|
|
||||||
|
| 里程碑 | 目标 | 关键输出 | 必须通过的退出条件 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| FE-M0 协议冻结 | 定义前端、Worker、WASM 和 OPFS 边界 | `protocol.v1`、能力模型、错误码、UI 信息架构、source/coverage 关联 | 所有消息有 envelope/schema;命令权限和状态转换无歧义 |
|
||||||
|
| FE-M1 可启动垂直切片 | 工程加载、状态显示、最小 G-code 运行 | AppShell、WorkerClient、`create/load/step/snapshot`、最小 3 轴页面 | 浏览器可加载缓存样例;命令 ack/result、快照和错误完整 |
|
||||||
|
| FE-M2 操作闭环 | 程序、MDI、jog、home、override、报警 | 控制台、程序编辑/预览、手动操作、状态面板 | 正常/边界/错误/暂停恢复与原生 golden 对照通过 |
|
||||||
|
| FE-M3 工程和恢复 | OPFS、快照、断网、重启、租约 | 工程树、导入导出、TaskLedger、恢复 UI、离线 PWA | 半提交、配额不足、确认丢失、标签页抢占和冲突均不丢数据 |
|
||||||
|
| FE-M4 全部仿真工作流 | HAL/PLC/工具/IO/Python/VCP/3D | scope、Ladder、工具、数字孪生、插件和机床视图 | 覆盖矩阵所有 Web/API 条目有 source/test/oracle,关键交互通过 |
|
||||||
|
| FE-M5 发布候选 | 稳定、离线、高效和可诊断 | 浏览器报告、性能报告、兼容报告、迁移/回滚和离线包 | G0-G5 全绿;无孤儿来源、无未覆盖 UI 工作流、无静默降级 |
|
||||||
|
|
||||||
|
每个里程碑都必须附固定 context lock、上下文包、源程序关联 diff、manifest diff、测试日志、golden/difference、性能指标和回滚步骤。发现协议、状态或源文件范围变化时,回退到最早受影响的 FE/COM 里程碑重新验证。
|
||||||
|
|
||||||
|
FE 里程碑与项目里程碑映射如下:FE-M0 属于 M0,FE-M1 属于 M1,FE-M2 属于 M2,FE-M3 属于 M3,FE-M4 属于 M4,FE-M5 属于 M5。项目里程碑未通过时,对应 FE 里程碑不能单独签署完成。
|
||||||
|
|
||||||
|
## 9. 前端验收与覆盖矩阵绑定
|
||||||
|
|
||||||
|
前端功能不得脱离 LinuxCNC 功能条目单独宣布完成。每个前端任务至少绑定:
|
||||||
|
|
||||||
|
```text
|
||||||
|
feature_id → source_files/source_symbols
|
||||||
|
→ config_inputs
|
||||||
|
→ worker command/event schema
|
||||||
|
→ UI workflow test
|
||||||
|
→ native/WASM oracle or Web-equivalent oracle
|
||||||
|
→ recovery/offline test
|
||||||
|
→ context_id + evidence artifact
|
||||||
|
```
|
||||||
|
|
||||||
|
前端与 LinuxCNC 通信条目应使用 `WEB-EQUIV` 或 `SIM-ADAPTER`;Python/VCP 回调使用 `PY-WASM`;虚拟主轴、探针、换刀、等离子、激光、编码器和限位使用 `SIM-DEVICE`。真实设备、真实实时性和安全认证继续使用 `REAL-EXCLUDED`,但其仿真可观察行为必须由数字孪生条目覆盖。
|
||||||
|
|
||||||
|
只有以下条件全部满足,才能声明“前端仿真工作流完成”:
|
||||||
|
|
||||||
|
1. 能力协商正确反映当前构建和配置,不显示未实现功能。
|
||||||
|
2. 命令从 UI 到 Worker 到 LinuxCNC 兼容层的顺序、参数、错误和结果可追踪。
|
||||||
|
3. 快照、事件、流和最终状态在正常、暂停、恢复、断网和 Worker 重启后保持一致。
|
||||||
|
4. 每个操作具备 pending/ack/result/error 状态,超时先对账,重试不重复副作用。
|
||||||
|
5. UI、API、Python、HAL 和 OPFS 证据都进入 manifest,且无孤儿来源或未覆盖交互。
|
||||||
|
|
||||||
|
## 10. 详细测试矩阵
|
||||||
|
|
||||||
|
| 测试层 | 重点用例 | 自动化方式 | 阻断条件 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Schema/类型 | 全部命令、事件、快照、未知版本、缺字段、超限数据 | TS 单测 + C/TS 编解码 round-trip | 任一消息无法双向解析或错误码不稳定 |
|
||||||
|
| WorkerClient | seq、operation_id、ack/result、timeout、cancel、重复/迟到响应 | 假 Worker、确定性时钟 | 重复副作用、pending 泄漏或错误被吞掉 |
|
||||||
|
| ProtocolGateway | 权限、状态机、能力、prepare/commit、幂等 | Worker 单测 + WASM stub | 未授权命令进入核心或账本不一致 |
|
||||||
|
| C ABI | create/load/command/step/snapshot/event/export/import/destroy | Node/WASM harness 和浏览器 Worker | 内存越界、顺序变化、错误映射不一致 |
|
||||||
|
| Domain store | 完整/增量快照、事件乱序、流 gap、恢复覆盖 | reducer/property tests | UI 状态无法由消息历史重建 |
|
||||||
|
| UI 工作流 | 工程、程序、MDI、jog、home、override、工具、HAL、PLC、报警 | Playwright + 页面对象 | 任一覆盖条目没有正常/错误/恢复路径 |
|
||||||
|
| 可视化 | 轨迹、姿态、坐标、毛坯、resize、隐藏/恢复 | Playwright screenshot + canvas pixel checks | 空画布、姿态错误、遮挡或动态内容改变布局 |
|
||||||
|
| 离线/恢复 | 首次缓存、启动无网、中途断网、刷新、Worker 崩溃、租约转移 | Playwright context/service-worker fault injection | 已提交数据丢失、重复命令、无法继续 |
|
||||||
|
| 性能/背压 | 大 G-code、多 HAL pin、高采样、长日志、快速模式 | browser benchmark + trace | P95/P99 超预算、无界队列、主线程长任务 |
|
||||||
|
| 浏览器兼容 | Chromium、Firefox、Safari 支持矩阵 | CI/browser farm 或锁定本地环境 | 必选工作流在任一目标浏览器失败 |
|
||||||
|
|
||||||
|
每个测试输出 `context_id`、浏览器、协议版本、工程哈希、最后 seq/tick、状态哈希和产物路径。视觉截图只验证布局和渲染,不能替代 LinuxCNC 状态和轨迹 golden。
|
||||||
124
docs/linuxcnc-web-wasm-implementation-readiness.md
Normal file
124
docs/linuxcnc-web-wasm-implementation-readiness.md
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# LinuxCNC Web/WASM 实施准备基线
|
||||||
|
|
||||||
|
**状态**:M0 已落地,M1 ABI 骨架已验证,LinuxCNC 功能移植尚未完成
|
||||||
|
**目标**:把既有技术路线收敛成可执行的实施顺序、完整性证明和发布前置条件
|
||||||
|
**固定基线**:LinuxCNC `2.10.0~pre0`,提交 `239dcf4284762ad7e9c65d390bc5524d855c2f8e`
|
||||||
|
**关联文档**:[技术路线](linuxcnc-web-wasm-technical-roadmap.md)、[覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)、[源程序关联](linuxcnc-web-wasm-source-map.md)、[通信设计](linuxcnc-web-wasm-frontend-communication-design.md)、[执行策略](linuxcnc-web-wasm-execution-strategy.md)、[总控手册](linuxcnc-web-wasm-integration-playbook.md)
|
||||||
|
|
||||||
|
本文件是开始编写程序前的单页入口。专项文档保留详细契约;本文件只固定真实基线、先后顺序、完成定义和阻断条件。
|
||||||
|
|
||||||
|
## 1. 现状和不可误读项
|
||||||
|
|
||||||
|
本仓库已经具备完整设计文档,但此前没有 Web/WASM 运行时代码。当前 M0/M1 产物如下:
|
||||||
|
|
||||||
|
| 产物 | 当前事实 | 允许的结论 |
|
||||||
|
|---|---|---|
|
||||||
|
| `context-lock.json` | 锁定 LinuxCNC 提交、Emscripten 3.1.6、schema v1 和索引哈希 | 基线可复现 |
|
||||||
|
| `coverage/source-index.jsonl` | 7,992 个来源文件,来自 docs/src/configs/tests/unit_tests/build | 来源扫描已开始,可审计 |
|
||||||
|
| `coverage/manifest.jsonl` | 7,992 个一对一种子条目,全部 `planned/needs_owner` | 没有来源被静默漏掉;不代表已实现 |
|
||||||
|
| `wasm-core` | C ABI 生命周期、固定 tick、快照、导入导出骨架 | 工程边界可编译、可调用 |
|
||||||
|
| `build-wasm`/`build-native` | WASM 模块生成,宿主 ABI 单测通过 | 构建链路可重跑 |
|
||||||
|
|
||||||
|
以下能力目前都不能声明完成:rs274ngc、TP、motion、kinematics、HAL、ClassicLadder、Python/remap、OPFS、Worker、UI、Three.js、全量配置和浏览器回归。
|
||||||
|
|
||||||
|
## 2. 产品边界和“完整”的定义
|
||||||
|
|
||||||
|
产品是浏览器内离线运行的 LinuxCNC **仿真机床**。状态权威在 Worker 内的 WASM/兼容运行时,主线程只负责 UI 和渲染;所有影响结果的操作都经过固定 tick、版本化协议和可恢复账本。
|
||||||
|
|
||||||
|
功能全集由以下集合并集产生,而不是由一组三轴演示决定:
|
||||||
|
|
||||||
|
```text
|
||||||
|
LinuxCNC 文档能力
|
||||||
|
∪ src/emc、src/hal、classicladder、lib/python 的可观察 API/符号
|
||||||
|
∪ configs/sim/** 的全部入口和引用资源
|
||||||
|
∪ tests/**、unit_tests/** 的全部可运行用例
|
||||||
|
∪ Web 工程、VCP、可视化、持久化和恢复工作流
|
||||||
|
```
|
||||||
|
|
||||||
|
每个功能必须同时闭合:正常、边界、错误/报警、暂停/恢复/急停、持久化/刷新/离线,以及适用的跨域交互。`accepted` 必须有实现、自动测试、oracle、差异报告和 context lock。真实硬件、内核实时性、物理安全和宿主设备访问只能标记 `REAL-EXCLUDED`,且配置检查必须返回明确错误;仿真配置依赖的主轴、编码器、探针、限位、换刀和 IO 必须用数字孪生实现。
|
||||||
|
|
||||||
|
## 3. 已冻结的技术决策
|
||||||
|
|
||||||
|
1. **核心优先复用**:posemath、rs274ngc、TP、可移植 kinematics 优先以最小补丁编译;Linux 进程、NML/CMS、共享内存、实时 API、动态加载和桌面 GUI 不直接移植。
|
||||||
|
2. **单 Worker、单写者**:WASM、Python、HAL、虚拟设备、工作区和恢复全部在同一 Dedicated Worker 中串行;UI 不读 WASM 指针、不直接写 OPFS。
|
||||||
|
3. **确定性时间**:`sim_step(cycles)` 是唯一推进入口;墙钟只负责节流和渲染,不参与结果计算。1x、快速、暂停恢复、单步和回放必须得到同一逻辑终点。
|
||||||
|
4. **两层文件系统**:WASM 内同步工作树承接 LinuxCNC 文件语义;Worker 通过 OPFS journal、checkpoint 和迁移持久化,不能每个 tick 写 OPFS。
|
||||||
|
5. **稳定 C ABI**:TypeScript 只见版本化 C ABI 和消息 schema,不暴露 C++ 布局、STL、指针或异常字符串。
|
||||||
|
6. **Python 受控运行时**:PY-01 前不锁定运行时;启用后必须单独创建锁,固定 Pyodide、包、补丁和 artifact hash,只提供 `linuxcnc/hal/INI` 虚拟模块,拒绝 subprocess、socket、设备和宿主路径。
|
||||||
|
7. **镜像可替换、字节不可替换**:允许中国大陆镜像、官方站点和离线缓存;下载记录必须包含 URL、版本、大小、SHA-256、许可证。镜像切换但字节相同不改变 context;字节、补丁或版本变化必须生成新 context。
|
||||||
|
8. **先建立 oracle 再扩展功能**:原生 LinuxCNC runner 输出解释器状态、canonical、每周期运动、HAL/IO、错误和最终状态;WASM 只以首个 divergent tick、字段差异和定义容差对照。
|
||||||
|
|
||||||
|
## 4. 完整移植功能分层
|
||||||
|
|
||||||
|
| 层 | 必须覆盖的能力 | 实现策略 | 完成证据 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| L0 配置/工作区 | INI/include、HALFILE 顺序、TBL/VAR/NGC/PY/XML/TCL/CLP、路径和诊断 | 虚拟 `/workspace` + 解析器 + OPFS | 233 个 sim INI 全部资源图;错误含文件/行 |
|
||||||
|
| L1 解释器 | 全部 G/M/O、模态、单位、坐标系、参数、循环、补偿、remap 边界 | 复用 rs274ngc;Python 通过受控桥接 | G/M/O manifest、错误行和 golden |
|
||||||
|
| L2 轨迹/运动 | canonical、前瞻、blend、速度/加速度、急停、暂停、jog、home、limit、following error | TP/posemath 复用;sim_motion 状态机 | 每 tick 状态、容差、恢复终点 |
|
||||||
|
| L3 运动学 | trivkins、5 轴、gantry、CoreXY、Delta、机器人、foam 等内置模块 | 静态编译注册,按配置选择 | forward/inverse、姿态、奇异/越限错误 |
|
||||||
|
| L4 HAL/PLC | pin/signal/param、thread/function/addf、全量仿真组件、ClassicLadder | `.comp` 构建期清单 + 固定扫描顺序 | 组件条目、HAL graph、scan/golden |
|
||||||
|
| L5 虚拟设备 | 主轴、编码器、stepgen、探针、限位、换刀、冷却、等离子/激光 | 可脚本化数字孪生和故障注入 | 正常/不到速/超时/失败/恢复 |
|
||||||
|
| L6 Python/VCP | linuxcnc/hal API、remap/filter、VCP 回调和权限 | Pyodide Worker + manifest 能力授权 | API/异常/资源限制/隔离 |
|
||||||
|
| L7 Web 工作流 | 工程、编辑器、MDI、run/pause/abort、jog/home、工具/IO/报警、HAL/PLC | React+TS,WorkerClient,domain store | 浏览器 E2E、键盘/触摸、恢复 |
|
||||||
|
| L8 可视化/发布 | 轨迹、姿态、刀具、毛坯、日志、导入导出、离线 PWA、兼容/许可证报告 | Three.js + transferable streams + 发布清单 | 多浏览器、性能、离线和回滚演练 |
|
||||||
|
|
||||||
|
## 5. 可执行路线和退出条件
|
||||||
|
|
||||||
|
### M0:基线和来源闭包(已完成第一版)
|
||||||
|
|
||||||
|
入口是 LinuxCNC 版本和提交已确认。必须生成 source index、manifest seed、context lock、状态枚举、扫描器版本和下载策略。退出条件是索引/manifest 哈希与锁一致,重复 ID、孤儿来源和缺字段检查生效。
|
||||||
|
|
||||||
|
### M1:最小运行时闭环(当前)
|
||||||
|
|
||||||
|
先完成 `sim_create → sim_load_workspace → sim_command → sim_step → snapshot/event → export/import → destroy`,固定 ABI、错误码、消息 envelope、Worker 单会话队列和虚拟工作区最小接口。正常、非法状态、buffer 不足、暂停/恢复各至少一条测试;不得接 UI mock 作为完成证据。
|
||||||
|
|
||||||
|
### M2:解释器和运动核心
|
||||||
|
|
||||||
|
按 posemath → TP → rs274ngc → canonical → task/motion → kinematics 顺序接入。每个切片先接原生 runner 和差异报告,再接 Worker。M2 退出前,受影响核心条目必须达到 `verified`,且任何差异能定位到首个 tick/字段/源映射。
|
||||||
|
|
||||||
|
### M3:HAL、数字孪生、Python、持久化
|
||||||
|
|
||||||
|
接入 HAL 图和固定线程顺序,再接主轴/编码器/探针/限位/换刀/PLC;随后实现 OPFS prepare/commit、checkpoint、迁移、配额和 Worker 崩溃恢复,最后锁定 Python runtime 并接 remap/VCP。M3 不允许用“刷新后重新初始化”替代恢复。
|
||||||
|
|
||||||
|
### M4:Web 工作流和可视化
|
||||||
|
|
||||||
|
以真实 Worker/WASM 状态接入工程选择、编辑器、MDI、run/pause/abort、jog/home、工具/报警、HAL/PLC、3D、导入导出和离线 PWA。mock 只能用于早期 UI 结构开发,里程碑退出必须全部切换真实协议。
|
||||||
|
|
||||||
|
### M5:全量回归和发布
|
||||||
|
|
||||||
|
递归运行全部 `configs/sim/**`、可移植 `tests/**`、`unit_tests/**`、G/M/O、HAL 组件、Python API 和浏览器故障矩阵。发布包必须同时包含 WASM、Python 运行时、Service Worker、schema、source/coverage/golden manifest、兼容报告、排除项和回滚包;任何孤儿、无 oracle、未覆盖维度或静默降级都阻断发布。
|
||||||
|
|
||||||
|
## 6. 实施顺序(直接照此开工)
|
||||||
|
|
||||||
|
1. 保持 `context-lock.json` 不变,运行 M0 校验和上下文包测试。
|
||||||
|
2. 为 `coverage/manifest.jsonl` 建立 owner/feature/domain 分配器,将 `seed:*` 按功能归并但保留一对多来源引用。
|
||||||
|
3. 在原生 LinuxCNC 环境建立 runner,先覆盖 `unit_tests/interp`、`unit_tests/tp` 和 `configs/sim/axis/minimal_xyz.ini`,冻结 JSONL golden schema。
|
||||||
|
4. 将 `wasm-core` 从 bootstrap API 扩展为 posemath/TP 最小链接;每加入一个源组就更新 manifest、编译参数和 ABI 测试。
|
||||||
|
5. 实现固定 tick scheduler、事件队列、快照 schema 和 `WorkerClient`;先完成命令幂等和 `prepare/verify/commit` 账本。
|
||||||
|
6. 实现虚拟工作区的 `open/read/write/stat/readdir/rename/unlink/fsync`,然后接 OPFS journal 和恢复,不提前接高频 UI。
|
||||||
|
7. 接 HAL 核心和最小三轴数字孪生,完成正常/限位/急停/恢复四条端到端场景。
|
||||||
|
8. 锁定 Python runtime(允许中国镜像下载,但必须记录校验)并接 `linuxcnc/hal`、remap 和一个 VCP descriptor。
|
||||||
|
9. 接 React/TypeScript AppShell、状态面板、G-code/MDI 和 Three.js 轨迹;只消费 Worker 快照和 transferable 流。
|
||||||
|
10. 扩展全部配置、组件、运动学、GUI 工作流和回归矩阵,按 M2-M5 门禁推进。
|
||||||
|
|
||||||
|
## 7. 必须持续保持的检查
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 scripts/generate_source_inventory.py
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
scripts/build-wasm.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
清单重生成后若哈希变化,必须先审查来源差异并创建新 context;不能直接覆盖锁文件。任何新下载都必须进入 `vendor/downloads/index.jsonl`(M1 前建立),任何新源码、配置或测试都必须在同一变更中更新 manifest。只有 `validate_baseline`、受影响测试、原生/WASM 对照和相应恢复场景都通过,任务才可从 `implemented` 进入 `verified`。
|
||||||
|
|
||||||
|
## 8. 当前明确风险
|
||||||
|
|
||||||
|
- 现有 LinuxCNC `meson.build` 面向原生依赖(Python、Boost、`libdl`),不能直接作为 Emscripten 构建;WASM 必须保持独立 CMake 目标。
|
||||||
|
- `configs/sim` 文件量大且资源类型复杂,清单生成必须先于功能归并;不能用目录状态或抽样配置宣称全覆盖。
|
||||||
|
- 浏览器没有 PREEMPT_RT;任何依赖墙钟的行为都必须改成逻辑 tick,并单独报告实时性不等价。
|
||||||
|
- OPFS 有配额和淘汰风险;已提交版本、导出备份和配额错误必须优先于自动保存便利性。
|
||||||
|
- Python、GUI 和 HAL 组件是最大移植面;它们必须按受控能力和静态清单接入,不允许把宿主进程/设备能力直接暴露给工程脚本。
|
||||||
|
|
||||||
|
当前基线允许开始编写程序,但只允许从 M1 的 ABI、runner、工作区和协议契约开始;在 M0/M1 证据闭合前,不应投入全量 UI 或声称 LinuxCNC 功能已经移植完成。
|
||||||
242
docs/linuxcnc-web-wasm-integration-playbook.md
Normal file
242
docs/linuxcnc-web-wasm-integration-playbook.md
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
# LinuxCNC Web/WASM 仿真移植总控执行手册
|
||||||
|
|
||||||
|
**文档状态**:Draft v0.1
|
||||||
|
**用途**:统一功能完整性、任务执行、依赖、测试、接续和里程碑验收
|
||||||
|
**固定基线**:LinuxCNC `2.10.0~pre0`,以 `linuxcnc/VERSION` 和 context lock 为准
|
||||||
|
**架构路线**:[技术路线](linuxcnc-web-wasm-technical-roadmap.md)
|
||||||
|
**源码目录**:[功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)
|
||||||
|
**前端/通信**:[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)
|
||||||
|
**覆盖验收**:[仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)
|
||||||
|
**治理规则**:[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)
|
||||||
|
**最小任务与上下文**:[上下文治理与最小任务目录](linuxcnc-web-wasm-context-governance.md)
|
||||||
|
|
||||||
|
本手册是五份设计文档的总控入口。它不替代各专项文档,而是规定它们如何组合、谁负责什么、任务如何进入执行、依赖如何推进、失败如何恢复以及什么证据才能声明移植完成。
|
||||||
|
|
||||||
|
## 1. 当前审计结论
|
||||||
|
|
||||||
|
当前工作区已经形成完整的设计基线,并已落地 M0/M1 的实施前置产物。当前状态必须按代码证据标记为:
|
||||||
|
|
||||||
|
```text
|
||||||
|
设计基线:已建立
|
||||||
|
源码/功能清单:`coverage/source-index.jsonl` 和 `coverage/manifest.jsonl` 已生成,全部条目仍待归并
|
||||||
|
运行时实现:`wasm-core` ABI bootstrap 已编译,LinuxCNC 核心尚未接入
|
||||||
|
前端实现:未开始或尚未进入当前工作区
|
||||||
|
全功能验收:未开始,不得声明已完成
|
||||||
|
```
|
||||||
|
|
||||||
|
这是当前交付边界:后续任务从 M1/WS-1 的 ABI、原生 runner、固定 tick 和工作区契约继续;M0 清单重生成和哈希校验仍是每次基线变化的前置步骤。任何演示页面、mock Worker 或单一三轴样例都不能把项目状态提前改成“全功能完成”。
|
||||||
|
|
||||||
|
上下文治理的可执行入口是 `scripts/context_packet.py`,测试是 `scripts/test_context_packet.py`,任务拆分和分层读取以[上下文治理与最小任务目录](linuxcnc-web-wasm-context-governance.md)为准。当前仓库没有运行时实现,但上下文生成和预算测试已经可以独立运行;后续 CI 应在任何任务证据包生成前调用该脚本。
|
||||||
|
|
||||||
|
## 2. 唯一追踪链
|
||||||
|
|
||||||
|
所有工作都必须沿下面的链路登记,任何断点都会阻止对应条目进入 `accepted`:
|
||||||
|
|
||||||
|
```text
|
||||||
|
LinuxCNC source/config/test
|
||||||
|
↓ source_id + source_sha
|
||||||
|
feature_id / capability_id
|
||||||
|
↓ dependencies + protocol_messages + state_fields
|
||||||
|
WASM/Worker/UI task_id
|
||||||
|
↓ implementation commit + fixed context packet
|
||||||
|
test_id / scenario_id / oracle_id
|
||||||
|
↓ logs + golden + difference + performance evidence
|
||||||
|
milestone_id + gate_id + release report
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2.1 记录归属
|
||||||
|
|
||||||
|
| 记录 | 规范入口 | 解决的问题 | 不允许替代它的东西 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 架构和范围 | 技术路线 | 做什么、边界在哪里 | 单个任务说明 |
|
||||||
|
| 源文件和符号 | 源程序关联目录 | LinuxCNC 哪些文件必须审查/适配 | 目录级“已处理” |
|
||||||
|
| 功能和覆盖 | 覆盖矩阵/manifest | 每项行为如何验收 | 演示成功截图 |
|
||||||
|
| UI 和通信 | 前端通信设计 | 前端、Worker、WASM 如何协作 | 直接跨层调用 |
|
||||||
|
| 执行和门禁 | 执行与交付策略 | 上下文、恢复、提交和发布规则 | 临时口头约定 |
|
||||||
|
| 证据 | CI/发布产物 | 结果能否复现、定位和回滚 | “本地跑过”描述 |
|
||||||
|
|
||||||
|
## 3. 总体分工和责任边界
|
||||||
|
|
||||||
|
角色是责任类别,不预设具体人员;每个变更必须有一个 DRI(直接负责人)和至少一个独立审查角色。
|
||||||
|
|
||||||
|
| 责任域 | 主责任(DRI) | 复核角色 | 主要产物 | 不得越界 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| 基线与清单 | WS-0/兼容性 | 发布/测试 | source map、manifest、context lock | 不直接实现功能 |
|
||||||
|
| 核心行为 | WS-1/WASM | 原生 LinuxCNC/测试 | C ABI、解释器、TP、motion、kinematics | 不把 UI 预期当行为定义 |
|
||||||
|
| Worker/虚拟设备 | WS-2/运行时 | 核心/持久化 | scheduler、HAL、IO、故障模型、事件 | 不直接改 React 状态 |
|
||||||
|
| Workspace/恢复 | WS-3/存储 | 运行时/安全 | POSIX 适配、journal、checkpoint、迁移 | 不改变运动算法 |
|
||||||
|
| Python/插件 | WS-4/脚本兼容 | 安全/核心 | Pyodide 模块、remap、VCP 权限 | 不暴露宿主能力 |
|
||||||
|
| 前端/可视化 | WS-5/FE 任务 | 通信/UX/测试 | UI、WorkerClient、3D、配置工作流 | 不读取 WASM 指针或直接写 OPFS |
|
||||||
|
| 参考与回归 | WS-6/测试 | 各域 DRI | native runner、WASM golden、浏览器/故障矩阵 | 不删除失败样本来变绿 |
|
||||||
|
| 发布/文档 | WS-7/发布 | 全部域 | 兼容报告、许可证、离线包、回滚包 | 不绕过门禁 |
|
||||||
|
|
||||||
|
协议、快照、工程格式、能力模型和错误码是跨域契约。任何一个域需要读取另一个域的内部结构时,必须先创建 C2 契约变更;禁止通过复制结构或共享未版本化对象解决问题。
|
||||||
|
|
||||||
|
## 4. 依赖图和并行策略
|
||||||
|
|
||||||
|
```text
|
||||||
|
M0 / WS-0 基线、source map、manifest、context lock
|
||||||
|
├─ WS-6 原生参考运行器和 golden 格式
|
||||||
|
├─ WS-1 WASM 核心、C ABI、解释器、TP、motion、kinematics
|
||||||
|
│ └─ WS-2 Worker scheduler、HAL、IO、虚拟设备
|
||||||
|
│ ├─ WS-3 Workspace/OPFS 恢复集成
|
||||||
|
│ ├─ WS-4 Python/remap/VCP 集成
|
||||||
|
│ └─ WS-5 前端/可视化集成
|
||||||
|
└─ COM-01/05 协议和能力模型
|
||||||
|
└─ COM-02/03/04 Worker 通信、账本、快照和 NML 映射
|
||||||
|
└─ FE-01..10 前端工作流
|
||||||
|
↓
|
||||||
|
WS-6 全量回归 → WS-7 发布
|
||||||
|
```
|
||||||
|
|
||||||
|
可并行:来源扫描、协议类型、原生 runner、AppShell、静态 UI 原型和文档检查。必须串行:同一仿真会话的 tick/命令/HAL/OPFS 写入,协议语义冻结后的破坏性变更,恢复账本重放,以及同一 golden 的生成和验收。并行只能减少验证时间,不能改变仿真事件顺序。
|
||||||
|
|
||||||
|
## 5. 统一任务目录
|
||||||
|
|
||||||
|
专项文档中的 FE/COM 任务继续作为前端和通信的详细任务;核心、存储、测试和发布任务使用以下统一编号。
|
||||||
|
|
||||||
|
### 5.1 WS-0 基线和清单
|
||||||
|
|
||||||
|
| ID | 任务 | 输入 | 输出/完成证据 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| INV-01 | 扫描文档、源码、符号、配置、组件和测试 | source map、LinuxCNC 基线 | 来源索引、扫描器版本、排除规则 |
|
||||||
|
| INV-02 | 生成 `coverage/manifest.jsonl` | 来源索引、coverage 规则 | 每个来源的 feature、依赖、oracle、测试和状态 |
|
||||||
|
| INV-03 | 建立 context lock | 源码/编译器/Python/schema/浏览器 | 可重建锁文件和摘要 |
|
||||||
|
| INV-04 | 建立原生参考 runner | configs/sim、tests、unit_tests | native 状态/canonical/HAL/IO/golden 格式 |
|
||||||
|
| INV-05 | 建立影响图和差异报告格式 | manifest、协议、测试 | source→feature→task→test→evidence 索引 |
|
||||||
|
| INV-06 | 固定上下文包生成器和预算测试 | 任务摘要、候选证据 | 预算前移选择、稳定排除码、必需项失败和生成器单测 |
|
||||||
|
|
||||||
|
### 5.2 WS-1 WASM 核心和 ABI
|
||||||
|
|
||||||
|
| ID | 任务 | 输入 | 输出/完成证据 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| CORE-01 | 独立 CMake/Emscripten 工程 | source map、编译锁 | `wasm-core` 可重复构建 |
|
||||||
|
| CORE-02 | C ABI 和错误码 | frontend communication design | `sim_create/load/command/step/snapshot/event/export/import/destroy` |
|
||||||
|
| CORE-03 | rs274ngc/参数/O-code/remap | `src/emc/rs274ngc/**` | 解释器 golden 和错误定位 |
|
||||||
|
| CORE-04 | TP/posemath/几何 | `src/emc/tp/**`、posemath | canonical、轨迹和容差报告 |
|
||||||
|
| CORE-05 | Task/NML/状态 | `src/emc/task/**`、nml_intf、libnml | message bus 和状态快照 |
|
||||||
|
| CORE-06 | Motion/homing/limit | `src/emc/motion/**` | jog、home、limit、following error |
|
||||||
|
| CORE-07 | Kinematics 全集 | `src/emc/kinematics/**` | 静态模块、能力注册、姿态 golden |
|
||||||
|
| CORE-08 | Tooldata/IO 基础 | `src/emc/tooldata/**`、iotask | 工具、主轴、换刀、IO 状态 |
|
||||||
|
|
||||||
|
### 5.3 WS-2/WS-3/WS-4 运行时集成
|
||||||
|
|
||||||
|
| ID | 任务 | 依赖 | 输出/完成证据 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| RT-01 | 固定 tick scheduler、批量 step、暂停/单步 | CORE-02/04/05 | 1x/快速/单步结果一致 |
|
||||||
|
| RT-02 | HAL 对象、thread/function、组件 manifest | CORE-05 | `.comp` 全量索引和 HAL golden |
|
||||||
|
| RT-03 | 虚拟轴/编码器/主轴/探针/限位/换刀 | RT-02、CORE-06/08 | 正常和故障注入可录制 |
|
||||||
|
| RT-04 | ClassicLadder/虚拟寄存器 | RT-02 | ladder/scan/IO 交互结果 |
|
||||||
|
| FS-01 | WasmFS/POSIX 工作区挂载 | INV-02、CORE-03 | open/read/write/stat/readdir 等价测试 |
|
||||||
|
| FS-02 | OPFS journal/事务/配额 | FS-01 | prepare/commit、损坏和配额恢复 |
|
||||||
|
| FS-03 | checkpoint/增量重放/迁移 | FS-02、CORE-02 | 连续与恢复终点相同 |
|
||||||
|
| PY-01 | Pyodide 虚拟 linuxcnc/hal/INI | CORE-03、FS-01 | API/异常/资源限制对照 |
|
||||||
|
| PY-02 | remap/filter/VCP 生命周期和权限 | PY-01、RT-02 | Python、HAL、UI 回调闭环 |
|
||||||
|
| COM-01..06 | 协议、账本、快照、NML、能力和浏览器测试 | CORE-02、RT-01、FS-02 | 详见前端通信设计 |
|
||||||
|
|
||||||
|
### 5.4 WS-5/WS-6/WS-7 交付
|
||||||
|
|
||||||
|
| ID | 任务 | 依赖 | 输出/完成证据 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| FE-01..10 | UI、WorkerClient、程序、控制台、HAL/PLC、3D、插件和性能 | COM、RT、FS | 详见前端通信设计 |
|
||||||
|
| REG-01 | 全量 configs/sim 运行矩阵 | INV-02、CORE/RT/PY | 每个入口有结果和差异 |
|
||||||
|
| REG-02 | 全量 tests/unit_tests 对照 | INV-04、WASM runner | 通过/排除/阻断逐项报告 |
|
||||||
|
| REG-03 | 断网、崩溃、回答失败、租约和恢复矩阵 | FS-02/03、COM-02 | 无重复副作用、无静默丢失 |
|
||||||
|
| REG-04 | 浏览器/性能/视觉矩阵 | FE、COM-03 | Chromium/Firefox/Safari、P95/P99、截图/像素 |
|
||||||
|
| REL-01 | 兼容、许可证、迁移、回滚和离线包 | 全部 REG | 发布候选证据包和签名报告 |
|
||||||
|
|
||||||
|
## 6. 里程碑总表
|
||||||
|
|
||||||
|
| 里程碑 | 入口条件 | 必须完成 | 退出证据 | 失败动作 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| M0 基线锁定 | 版本和范围确认 | INV-01..05、状态枚举、责任人 | source/manifest/context lock 可重建,零孤儿规则生效 | 返回清单阶段,不写运行时代码 |
|
||||||
|
| M1 运行时骨架 | M0 通过 | CORE-01/02、RT-01、FS-01、COM-01/02 最小集 | create/load/command/step/snapshot/recover、离线缓存启动 | 固定 ABI/schema,修复后重跑 M1 |
|
||||||
|
| M2 核心行为 | M1 通过 | CORE-03..08、native/WASM runner、解释/轨迹/运动 golden | 核心 manifest `verified`,首个差异 tick 可定位 | 回退到对应核心任务,不进入 UI 全量 |
|
||||||
|
| M3 虚拟设备和恢复 | M2 通过 | RT-02..04、FS-02/03、PY-01/02、COM-03..05 | HAL/PLC/IO/故障/配额/重启/断网矩阵通过 | 阻断仿真会话发布,保留本地证据 |
|
||||||
|
| M4 前端工作流 | M3 通过 | FE-01..10、COM-06、关键 UI/3D/配置工作流 | UI 条目有协议、源文件、测试、oracle 和恢复证据 | 禁止 mock 冒充完成,回退 FE/COM |
|
||||||
|
| M5 发布候选 | M0..M4 通过 | REG-01..04、REL-01 | G0-G5 全绿、全计入条目 `accepted`、排除项可识别 | 维持候选冻结,创建修复 context 或回退 |
|
||||||
|
|
||||||
|
里程碑退出不按日期判断,而按证据判断。契约或基线变化必须回退到最早受影响里程碑;不能在 M5 以“后续补齐”方式接受未完成条目。
|
||||||
|
|
||||||
|
## 7. 端到端场景验收
|
||||||
|
|
||||||
|
| 场景 | 覆盖链 | 必须验证 |
|
||||||
|
|---|---|---|
|
||||||
|
| S1 最小三轴启动 | INI→WASM→Worker→UI→OPFS | 能力协商、配置错误、初始快照、停止/销毁 |
|
||||||
|
| S2 G-code 正常运行 | rs274ngc→canonical→TP→motion→轨迹/UI | 当前行、模态、坐标、轨迹、最终状态和 golden |
|
||||||
|
| S3 MDI/jog/home | UI command→Task/Motion→HAL/IO | pending/ack/result、释放保护、模式非法转换 |
|
||||||
|
| S4 主轴/换刀/探针 | iotask/tooldata→虚拟设备→HAL→UI | 正常、不到速、失败、超时、恢复 |
|
||||||
|
| S5 Python/remap/VCP | Python plugin→HAL/Task→UI | 参数/异常/权限/资源限制和状态哈希 |
|
||||||
|
| S6 ClassicLadder/HAL | component/PLC→thread→IO→scope | 扫描顺序、pin graph、触发、回放和故障 |
|
||||||
|
| S7 断网继续 | Service Worker→Worker→OPFS | 无网启动、中途断网、离线保存、重新联网对账 |
|
||||||
|
| S8 崩溃/回答失败 | TaskLedger→checkpoint→replay | 已确认不重复、未确认不跳过、无法对账时阻断 |
|
||||||
|
| S9 多浏览器/大负载 | FE/COM→流控→渲染 | P95/P99、背压、内存、UI 长任务和最终状态 |
|
||||||
|
|
||||||
|
每个场景产出一个固定大小上下文包、运行日志摘要、source/feature/task/test 索引、状态哈希和可重跑命令。只通过截图或人工点击成功的场景不算验收证据。
|
||||||
|
|
||||||
|
## 8. 任务执行规程
|
||||||
|
|
||||||
|
### 8.1 开始前
|
||||||
|
|
||||||
|
1. 从最小任务目录选择一个单结果子任务,读取最新 context lock 和固定八段上下文包;确认 `context_id`、子任务、主工作流和里程碑一致。上下文包由 `scripts/context_packet.py` 生成,不能手工拼接。
|
||||||
|
2. 读取 source map/coverage manifest 中的受影响条目,确认输入、依赖、协议、oracle 和非目标。
|
||||||
|
3. 写明预计变更类型 C0-C3、失败恢复点、回滚提交和测试命令。
|
||||||
|
4. 若任务跨越三个以上工作流,先拆分;若需要修改协议或格式,先提交 C2 方案。
|
||||||
|
|
||||||
|
### 8.2 执行中
|
||||||
|
|
||||||
|
1. 先添加失败测试或差异记录,再实现正常路径;不要先删除/放宽测试。
|
||||||
|
2. 运行受影响图的快速测试,同时保留完整证据路径;独立测试可并行,同一会话必须串行。
|
||||||
|
3. 每个副作用操作遵循 prepare/execute/verify/commit;回答或工具失败先查账本和产物,不盲目重做。
|
||||||
|
4. 只更新固定上下文包的对应段,旧历史以摘要/哈希引用;超预算就拆任务。
|
||||||
|
|
||||||
|
### 8.3 完成时
|
||||||
|
|
||||||
|
任务只有在代码、manifest 状态、自动测试、差异报告、性能/配额影响和文档引用都更新后才能标记完成。合并请求必须包含 `Context-ID`、`Context-Packet`、Scope、Contract-Change、Evidence、Offline-Impact、Coverage 和预算声明。
|
||||||
|
|
||||||
|
## 9. 统一完成定义
|
||||||
|
|
||||||
|
### 功能完成
|
||||||
|
|
||||||
|
- 源程序关联目录中没有孤儿来源、未解析符号或未闭合依赖。
|
||||||
|
- 所有可计入功能条目达到 `accepted`;每项有实现、测试、oracle、差异和 context lock。
|
||||||
|
- 正常、边界、错误、暂停/恢复、持久化/离线和适用交互维度全部通过。
|
||||||
|
- `REAL-EXCLUDED` 只用于真实硬件、实时内核和安全认证,且配置检查返回明确错误;仿真可观察行为仍有数字孪生实现。
|
||||||
|
|
||||||
|
### 任务完成
|
||||||
|
|
||||||
|
- DRI、审查人、依赖、非目标、回滚点和固定上下文包齐全。
|
||||||
|
- 未确认操作可安全恢复;重复提交不造成重复副作用;失败原因和下一步可执行。
|
||||||
|
- 测试、日志、golden、差异、性能和文档链接均可重跑。
|
||||||
|
|
||||||
|
### 发布完成
|
||||||
|
|
||||||
|
- G0-G5 全部通过;浏览器、离线、恢复、性能、安全、许可证和迁移报告齐全。
|
||||||
|
- 发布包包含 WASM、Pyodide、Service Worker、协议 schema、source/coverage/golden manifest、兼容报告、排除项清单和回滚包。
|
||||||
|
- 任何孤儿来源、未覆盖交互、无 oracle、静默降级、半提交数据或超预算上下文都会阻止发布。
|
||||||
|
|
||||||
|
## 10. 风险账本和停止线
|
||||||
|
|
||||||
|
| 风险 | 触发条件 | 立即动作 | 恢复条件 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 来源遗漏 | source map 与 manifest 数量/哈希不一致 | 停止实现合并,回到 M0 | 重新扫描、补关联、重生成影响图 |
|
||||||
|
| 核心差异 | 首个 divergent tick、错误码或状态字段不一致 | 冻结受影响域,保留 golden | 定位源文件/编译差异并重跑 |
|
||||||
|
| 协议漂移 | UI/Worker/C ABI schema 不一致 | 拒绝握手,不能自动降级 | 新版本契约、迁移和双向测试 |
|
||||||
|
| 数据损坏 | journal 无 commit、哈希不匹配、配额失败 | 保留旧版本,进入恢复/导出 | 完整 commit 或明确阻断 |
|
||||||
|
| 非确定性 | 同输入同 context 结果不同 | 禁止性能优化合并 | 固定顺序、种子、线程和时钟后重跑 |
|
||||||
|
| 性能退化 | P95/P99 或 UI 长任务超预算 | 阻止里程碑 | profiling、优化和回归证据 |
|
||||||
|
| 任务失联 | 固定上下文缺失、无 DRI、无下一步 | 任务标记 blocked | 补齐上下文和负责人,不复制历史 |
|
||||||
|
|
||||||
|
## 11. 文档维护规则
|
||||||
|
|
||||||
|
新增 LinuxCNC 源文件、配置、G/M/O、HAL 组件、Python API、UI 工作流、协议消息或测试时,必须同时检查:
|
||||||
|
|
||||||
|
1. 源程序关联目录是否新增 `source_files/source_symbols/config_inputs`。
|
||||||
|
2. 覆盖矩阵是否新增 `feature_id`、状态、测试维度、oracle 和差异字段。
|
||||||
|
3. 前端通信设计是否新增命令、事件、快照字段、能力或 UI 工作流。
|
||||||
|
4. 执行策略是否需要新增工作流、任务、门禁、恢复场景或上下文锁字段。
|
||||||
|
5. 技术路线是否需要更新依赖、阶段、风险或代码组织。
|
||||||
|
|
||||||
|
6. 若任务新增证据类型,生成器是否为其提供字节大小、优先级、必需性和稳定排除码;是否增加“证据字节预算”和“完整包剩余空间”测试。
|
||||||
|
|
||||||
|
文档检查必须验证本地链接、编号、状态枚举、manifest 字段、任务引用和里程碑映射。文档通过不代表代码完成;代码通过也不能绕过文档和 manifest 关联。
|
||||||
386
docs/linuxcnc-web-wasm-simulation-coverage.md
Normal file
386
docs/linuxcnc-web-wasm-simulation-coverage.md
Normal file
@@ -0,0 +1,386 @@
|
|||||||
|
# LinuxCNC 纯 Web/WASM 仿真全功能覆盖矩阵(第一版)
|
||||||
|
|
||||||
|
**对应路线**:[LinuxCNC 纯 Web/WASM 仿真机床技术路线](linuxcnc-web-wasm-technical-roadmap.md)
|
||||||
|
**执行治理**:[LinuxCNC Web/WASM 仿真项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)
|
||||||
|
**源码关联**:[LinuxCNC Web/WASM 仿真功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)
|
||||||
|
**前端与通信**:[LinuxCNC Web/WASM 仿真前端与通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)
|
||||||
|
**总控执行**:[LinuxCNC Web/WASM 仿真移植总控执行手册](linuxcnc-web-wasm-integration-playbook.md)
|
||||||
|
**目标**:覆盖 LinuxCNC 面向仿真机床的全部用户可见功能
|
||||||
|
**范围**:只做仿真,不接真实机床,不实现真实硬件访问
|
||||||
|
**基线**:仓库当前 LinuxCNC `2.10.0~pre0`
|
||||||
|
|
||||||
|
## 1. 覆盖规则
|
||||||
|
|
||||||
|
本矩阵不是功能愿望清单,而是验收清单。每一行都必须拥有实现、测试和差异报告;只有标记为 `REAL-EXCLUDED` 的真实硬件/物理安全项目不进入仿真覆盖率。任务拆分、固定 context lock、上下文包预算、断网接续和发布门禁遵循[执行与交付策略](linuxcnc-web-wasm-execution-strategy.md);端到端场景和任务依赖以[总控执行手册](linuxcnc-web-wasm-integration-playbook.md)为准;本矩阵只维护功能条目及其证据索引。
|
||||||
|
|
||||||
|
| 标记 | 含义 | 验收要求 |
|
||||||
|
|---|---|---|
|
||||||
|
| `SIM-CORE` | 直接复用 LinuxCNC C/C++ 核心 | 原生与 WASM golden 对照 |
|
||||||
|
| `SIM-ADAPTER` | 进程、NML、文件、时钟等兼容层 | API、状态和错误码对照 |
|
||||||
|
| `SIM-DEVICE` | 硬件功能的虚拟数字孪生 | pin、时序、故障、报警和状态可录制 |
|
||||||
|
| `WEB-EQUIV` | 桌面 GUI/工具在 Web 中等价实现 | 工作流和配置结果对照,不要求像素一致 |
|
||||||
|
| `PY-WASM` | Python/remap/过滤器在 Pyodide 中执行 | 受控宿主 API、异常和返回值对照 |
|
||||||
|
| `REAL-EXCLUDED` | 真实硬件、物理安全和实时内核 | 不实现,但必须明确报错和文档说明 |
|
||||||
|
|
||||||
|
完成定义:所有 `SIM-*`、`WEB-EQUIV`、`PY-WASM` 项在正常、边界、错误、暂停/恢复、持久化/离线和适用的跨域交互维度达到 100% 通过;`REAL-EXCLUDED` 项在配置检查中全部被识别且不会误报为已连接。单一百分比不能替代来源闭包、维度闭包和交互闭包。
|
||||||
|
|
||||||
|
条目状态使用执行策略定义的 `planned`、`in_progress`、`implemented`、`verified`、`accepted`、`blocked` 和 `REAL-EXCLUDED`。`accepted` 必须有 context lock、自动测试和差异报告;状态缺失、来源新增但无 manifest 项、或上下文包超预算均为 CI 阻断。
|
||||||
|
|
||||||
|
## 2. 功能来源和清单生成
|
||||||
|
|
||||||
|
覆盖清单必须从以下仓库来源自动生成,避免只依赖人工整理:
|
||||||
|
|
||||||
|
各功能域的实际源文件、配置入口和测试入口维护在[源程序关联目录](linuxcnc-web-wasm-source-map.md);本节定义扫描全集,两者共同构成 manifest 的来源合同。
|
||||||
|
|
||||||
|
| 来源 | 覆盖内容 |
|
||||||
|
|---|---|
|
||||||
|
| `linuxcnc/docs/src/Master_Documentation.adoc` | 用户、配置、HAL、ClassicLadder、运动、remap、GUI、G-code 和 Python 接口;Hardware Drivers/Examples 只生成排除项 |
|
||||||
|
| `linuxcnc/configs/sim/**` | 全部仿真 INI/HAL/TBL/NGC/PY/XML/TCL 配置和样例 |
|
||||||
|
| `linuxcnc/tests/**` | 启动、解释器、运动、HAL、IO、remap、工具、回零、限位和 UI 测试 |
|
||||||
|
| `linuxcnc/unit_tests/**` | TP、解释器和数学单元测试 |
|
||||||
|
| `linuxcnc/src/emc/**` | task、io、motion、kinematics、interpreter、tooldata、NML 接口 |
|
||||||
|
| `linuxcnc/src/hal/components/**` | 全部 `.comp`、C 组件、仿真组件、测试组件和组件模板 |
|
||||||
|
| `linuxcnc/src/hal/classicladder/**` | 梯形图、顺序功能图、变量、定时器、计数器、Modbus 逻辑和工程文件 |
|
||||||
|
| `linuxcnc/src/emc/usr_intf/**`、`lib/python/**` | AXIS、Gmoccapy、Touchy、Gscreen、QtVCP、PyVCP、GladeVCP、Vismach 等界面和脚本 |
|
||||||
|
|
||||||
|
构建脚本生成 `coverage/manifest.jsonl`,字段至少包括:`id`、`source`、`source_sha`、`domain`、`kind`、`dependencies`、`inputs`、`outputs`、`errors`、`sim_status`、`web_status`、`test_id`、`oracle`、`golden`、`difference`、`coverage_dimensions`、`context_id`、`exclusion_reason`。`source` 必须可定位到文档锚点、源码符号、配置文件或测试用例;`dependencies` 必须递归闭包;`oracle` 必须说明原生对照、规范结果或明确的 Web 等价判定。任何新增源码、文档功能或仿真配置没有 manifest 项时,CI 失败。
|
||||||
|
|
||||||
|
### 2.1 完整性闭包和防遗漏检查
|
||||||
|
|
||||||
|
每次生成 manifest 都执行以下闭包检查,并将结果作为构建产物:
|
||||||
|
|
||||||
|
1. 对文档标题、G/M/O/Python/HAL/API 名称、导出符号、`.comp`、ClassicLadder 对象、`configs/sim/**` 资源和测试入口做规范化扫描,记录来源总数和来源摘要。
|
||||||
|
2. 计算来源到 manifest 的反向索引;任何孤儿来源、重复 ID、空依赖、无测试、无 oracle 或状态字段缺失都使 CI 失败。
|
||||||
|
3. 对每个条目展开依赖图,确认依赖条目存在且没有未登记的真实硬件路径;仿真配置引用的排除功能必须有对应数字孪生条目。
|
||||||
|
4. 为每个条目生成正常、边界、错误、暂停/恢复、持久化/离线测试维度;G-code、HAL、IO、Python、UI 和存储之间的关键交互生成 pairwise/关键路径用例。
|
||||||
|
5. 比较原生参考运行器和 WASM 结果,保存首个差异 tick、状态/错误字段和容差;没有可比 oracle 的条目只能是 `blocked`,不能是 `accepted`。
|
||||||
|
6. 发布前生成完整性报告:已接受、进行中、阻断、排除、孤儿来源、未覆盖维度和未覆盖交互分别列出;任何非零的未覆盖或孤儿项阻止全功能声明。
|
||||||
|
|
||||||
|
## 3. 启动、工程和配置
|
||||||
|
|
||||||
|
| 功能 | Web/WASM 实现 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| LinuxCNC 启动、初始化、退出和重启 | Worker 内 `create/load/start/stop/reset/destroy` 状态机 | `SIM-ADAPTER` |
|
||||||
|
| 配置选择器和 sample 配置 | OPFS 工程浏览器;完整导入 `configs/sim/**` | `WEB-EQUIV` |
|
||||||
|
| INI 注释、section、变量和 include | 兼容解析、相对路径和循环检测 | `SIM-CORE` |
|
||||||
|
| `[EMC]`、`[DISPLAY]`、`[FILTER]`、`[RS274NGC]` | 仿真相关字段读取、校验、警告和 Web 配置编辑;桌面进程字段识别后映射或排除 | `SIM-ADAPTER` |
|
||||||
|
| `[EMCMOT]`、`[TASK]`、`[HAL]`、`[HALUI]`、`[APPLICATIONS]` | 仿真字段映射到虚拟运行时;外部宿主应用不执行 | `SIM-ADAPTER` |
|
||||||
|
| `[TRAJ]`、`[KINS]`、`[AXIS_*]`、`[JOINT_*]`、`[SPINDLE_*]`、`[EMCIO]` | 轴、关节、主轴、IO、回零和运动参数全部生效 | `SIM-ADAPTER` |
|
||||||
|
| 多入口 INI、include 目录和资源查找 | `/workspace` 虚拟 POSIX 路径 + OPFS | `SIM-ADAPTER` |
|
||||||
|
| HAL twopass、HALFILE 顺序、参数展开 | 解析、排序、重复加载和错误语义对照 | `SIM-ADAPTER` |
|
||||||
|
| HAL 命令 `loadrt/addf/setp/net/sets/ newsig/linksp/linkps` | Worker 内命令执行和状态回放 | `SIM-CORE` |
|
||||||
|
| 参数、变量、`.var`、tool table、tool database | 内存运行态 + OPFS 事务提交 | `SIM-ADAPTER` |
|
||||||
|
| 工程复制、删除、重命名、导入、导出 | OPFS journal + ZIP/目录导入导出 | `WEB-EQUIV` |
|
||||||
|
| 启动错误、配置警告、资源缺失 | 行号、路径、错误码和恢复建议 | `SIM-ADAPTER` |
|
||||||
|
|
||||||
|
## 4. G-code、O-code、M-code 和解释器
|
||||||
|
|
||||||
|
### 4.1 单词、模式和程序结构
|
||||||
|
|
||||||
|
| 功能 | 覆盖内容 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| 行语法 | `%`、序号 `N`、注释、空行、大小写、空格、行尾 | `SIM-CORE` |
|
||||||
|
| 轴/关节词 | `X Y Z A B C U V W`、额外关节和旋转轴 | `SIM-CORE` |
|
||||||
|
| 速度/主轴/刀具 | `F S T H D Q I J K L P R E` 等全部合法词 | `SIM-CORE` |
|
||||||
|
| 参数 | `#1..#5399`、命名参数、系统参数、数组、间接寻址 | `SIM-CORE` |
|
||||||
|
| O-code | sub、call、return、do/while、if/elseif/else、break、continue、repeat、call file、返回值、错误 | `SIM-CORE` |
|
||||||
|
| Fanuc 风格 | `M98/M99`、编号程序和参数传递 | `SIM-CORE` |
|
||||||
|
| 读前瞻/队列破坏 | MDI、M-code、输入等待、暂停、remap 的队列语义 | `SIM-ADAPTER` |
|
||||||
|
| 程序控制 | run、pause、optional stop、single block、step、abort、resume、restart、line seek | `WEB-EQUIV` |
|
||||||
|
| 错误 | 语法、表达式、参数、路径、运动学和运行时错误 | `SIM-CORE` |
|
||||||
|
|
||||||
|
### 4.2 G-code 全量列表
|
||||||
|
|
||||||
|
以下代码全部纳入解析、状态、canonical 输出和运动结果测试:
|
||||||
|
|
||||||
|
| 类别 | 代码 |
|
||||||
|
|---|---|
|
||||||
|
| 运动与停留 | `G0 G1 G2 G3 G4` |
|
||||||
|
| 样条/NURBS | `G5 G5.1 G5.2 G5.3` |
|
||||||
|
| 车床模式 | `G7 G8` |
|
||||||
|
| 参数/坐标/刀具写入 | `G10 L0 L1 L2 L10 L11 L20` |
|
||||||
|
| 平面 | `G17 G17.1 G18 G18.1 G19 G19.1` |
|
||||||
|
| 单位与预定义点 | `G20 G21 G28 G28.1 G30 G30.1` |
|
||||||
|
| 同步/探针 | `G33 G33.1 G38.2 G38.3 G38.4 G38.5` |
|
||||||
|
| 刀补 | `G40 G41 G41.1 G42 G42.1 G43 G43.1 G43.2 G49` |
|
||||||
|
| 坐标系 | `G52 G53 G54 G55 G56 G57 G58 G59 G59.1 G59.2 G59.3` |
|
||||||
|
| 轨迹控制 | `G61 G61.1 G64` |
|
||||||
|
| 车床循环 | `G70 G71 G71.1 G71.2 G72 G72.1 G72.2 G74 G76` |
|
||||||
|
| 铣削/钻孔循环 | `G73 G80 G81 G82 G83 G84 G85 G86 G87 G88 G89` |
|
||||||
|
| 距离/弧距离 | `G90 G90.1 G91 G91.1` |
|
||||||
|
| G92 | `G92 G92.1 G92.2 G92.3` |
|
||||||
|
| 进给与主轴模式 | `G93 G94 G95 G96 G97 G98 G99` |
|
||||||
|
|
||||||
|
### 4.3 M-code 全量列表
|
||||||
|
|
||||||
|
| 类别 | 代码及仿真行为 |
|
||||||
|
|---|---|
|
||||||
|
| 暂停/结束 | `M0 M1 M2 M30 M60`;由 Web 控制面板和虚拟托盘/换盘事件驱动 |
|
||||||
|
| 主轴 | `M3 M4 M5 M19`;虚拟主轴转速、方向、定向和到速状态 |
|
||||||
|
| 换刀 | `M6 M61`;虚拟手动/随机/非随机换刀、准备/完成状态和失败注入 |
|
||||||
|
| 冷却 | `M7 M8 M9`;虚拟雾/洪水/主轴冷却 pin 和状态 |
|
||||||
|
| 倍率 | `M48 M49 M50 M51 M52 M53`;进给、主轴、adaptive、feed stop |
|
||||||
|
| IO | `M62 M63 M64 M65 M66 M67 M68`;同步/立即数字和模拟 IO、输入等待和超时 |
|
||||||
|
| 模态 | `M70 M71 M72 M73`;保存、失效、恢复和自动恢复模态状态 |
|
||||||
|
| 子程序 | `M98 M99`;程序调用、返回和选择性模态恢复 |
|
||||||
|
| 用户命令 | `M100-M199`;映射为 OPFS 工程内白名单 Python/NGC 虚拟动作,不执行宿主命令 |
|
||||||
|
|
||||||
|
### 4.4 Remap、Python 和过滤器
|
||||||
|
|
||||||
|
| 功能 | Web/WASM 实现 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| 内置 remap prolog/epilog | 解释器内 C++ ABI 复用 | `SIM-CORE` |
|
||||||
|
| NGC remap | 虚拟文件工作区中的 O-code 执行 | `SIM-ADAPTER` |
|
||||||
|
| Embedded Python remap | Pyodide Worker,暴露 linuxcnc/hal/INI/参数虚拟模块 | `PY-WASM` |
|
||||||
|
| `T/M6/M61/S/F` remap | 完整参数、返回值、异常和顺序对照 | `PY-WASM` |
|
||||||
|
| 自定义 G/M code | 工程 manifest 注册和安全限额 | `PY-WASM` |
|
||||||
|
| `[FILTER]` 程序过滤器 | 在 Pyodide 中执行 `.py/.pyc` 的纯计算/文本过滤部分 | `PY-WASM` |
|
||||||
|
| CAD/CAM 外部程序 | 不执行宿主程序;提供内置转换插件接口和错误状态 | `WEB-EQUIV` |
|
||||||
|
| Python `subprocess/threading/socket/设备` | 虚拟 API 返回 LinuxCNC 约定错误 | `REAL-EXCLUDED` |
|
||||||
|
|
||||||
|
## 5. 运动、轨迹、轴、关节和运动学
|
||||||
|
|
||||||
|
| 功能域 | 全量覆盖项 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| TP | 直线、圆弧、球面弧、样条、NURBS、前瞻、blend、exact path、exact stop、速度/加速度/jerk 限制 | `SIM-CORE` |
|
||||||
|
| 运行模式 | coordinated、teleop、free/joint jog、MDI、单步、暂停、恢复、abort、queue-buster | `SIM-ADAPTER` |
|
||||||
|
| 轴/关节 | X/Y/Z/A/B/C/U/V/W、额外关节、随机/非随机配置、轴-关节映射 | `SIM-CORE` |
|
||||||
|
| 限制 | soft limit、hard limit、following error、backlash、offset limit、速度/加速度限制 | `SIM-ADAPTER` |
|
||||||
|
| 回零 | search/latch/final velocity、index、shared switch、offset、sequence、volatile、immediate、locking indexer、inhibit | `SIM-DEVICE` |
|
||||||
|
| 坐标 | machine/world/relative/display、G5x、G52、G92、rotation、scale、external offset、moveoff | `SIM-CORE` |
|
||||||
|
| 补偿 | cutter radius、tool length、dynamic tool length、additional tool offset、wear、螺距误差 | `SIM-CORE` |
|
||||||
|
| 主轴同步 | threading、G33/G33.1、rigid tapping、CSS、gear、orient、multiple spindle | `SIM-DEVICE` |
|
||||||
|
| 控制环 | PID、feed/velocity/position loop、encoder、stepgen、adaptive feed | `SIM-CORE` |
|
||||||
|
| 运动学模块 | `trivkins`、`5axiskins`、`corexykins`、`cubic`、`genhexkins`、`genserkins`、`lineardelta`、`maxkins`、`pentakins`、`rosekins`、`rotarydelta`、`rotatekins`、`scarakins`、`scorbot`、`tripod`、`xyzac-trt`、`xyzbc-trt`、`switchkins`、`ugenser/userkfuncs` | `SIM-CORE` |
|
||||||
|
| DH/机器人 | DH 参数、PUMA、SCARA、六足、Delta、Pentapod、Scorbot 和自定义静态 kinematics | `SIM-CORE` |
|
||||||
|
| 用户 kinematics | 构建期静态 WASM ABI、热切换由仿真状态机完成 | `SIM-ADAPTER` |
|
||||||
|
| 坐标/姿态显示 | joints、axes、pose、forward/inverse、tool orientation 和 singularity 错误 | `WEB-EQUIV` |
|
||||||
|
|
||||||
|
## 6. 机床类型和数字孪生
|
||||||
|
|
||||||
|
| 仿真机床 | 覆盖内容 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| 3/4/5/6/7/8/9 轴铣床 | 轴、关节、刀具、冷却、换刀、探针、坐标系和轨迹 | `SIM-DEVICE` |
|
||||||
|
| 车床 | G7/G8、G70/G71/G72/G76、主轴 CSS、刀尖半径、背刀塔、Fanuc Y、双主轴 | `SIM-DEVICE` |
|
||||||
|
| Gantry/CoreXY | 双关节、耦合、gantry HAL、同步误差和回零 | `SIM-DEVICE` |
|
||||||
|
| 机器人/Delta/Hexapod | 全部内置 kinematics、关节限位、姿态和模型 | `SIM-DEVICE` |
|
||||||
|
| 等离子 | torch enable、height control、arc-ok、ohmic、pierce、cut recovery、material table、qtplasmac 行为 | `SIM-DEVICE` |
|
||||||
|
| 激光 | laser power、PWM/模拟输出、动态功率和轨迹同步 | `SIM-DEVICE` |
|
||||||
|
| 泡沫切割 | 双平面/双 Z、foam kinematics、丝热功率和同步 | `SIM-DEVICE` |
|
||||||
|
| 探针/自动对刀 | probe input、触发位置、失败/超时、tool sensor 和宏 | `SIM-DEVICE` |
|
||||||
|
| 3D 打印/挤出 | 虚拟挤出轴、温度/风扇/材料状态(若 LinuxCNC 仿真配置启用) | `SIM-DEVICE` |
|
||||||
|
| 毛坯和切削 | 轨迹核心与可视化切削层分离;heightfield/voxel/SDF 按机床类型选择 | `WEB-EQUIV` |
|
||||||
|
| 故障注入 | 限位、跟随误差、探针不触发、主轴不到速、换刀失败、IO 超时、存储失败 | `SIM-DEVICE` |
|
||||||
|
|
||||||
|
## 7. HAL 全量和仿真 I/O
|
||||||
|
|
||||||
|
### 7.1 HAL 运行时契约
|
||||||
|
|
||||||
|
| 功能 | 覆盖内容 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| HAL 对象 | component、pin、signal、parameter、owner、type、direction、value、export/unexport | `SIM-CORE` |
|
||||||
|
| HAL 命令 | `loadrt`、`addf`、`start/stop`、`setp`、`sets`、`net`、`linksp`、`linkps`、`unlinkp`、`show`、`save`、`source` | `SIM-CORE` |
|
||||||
|
| HAL 线程 | base/servo/thread 周期、顺序、浮点标志、超时和 overrun 事件 | `SIM-ADAPTER` |
|
||||||
|
| `.comp` ABI | 全部组件模板的参数、pin、function、personality 和 lifecycle | `SIM-CORE` |
|
||||||
|
| HAL UI | `halui` 全 pin、模式、jog、home、abort、feed/spindle override 和消息 | `SIM-CORE` |
|
||||||
|
| HAL scope | 采样、触发、通道、缩放、保存和回放 | `WEB-EQUIV` |
|
||||||
|
| HAL show/meter | pin 图、实时值、类型和连接关系 | `WEB-EQUIV` |
|
||||||
|
|
||||||
|
### 7.2 组件 manifest
|
||||||
|
|
||||||
|
`linuxcnc/src/hal/components/**` 下的每个 `.comp`、C 组件和测试组件都必须在 manifest 中出现。按类别验收:
|
||||||
|
|
||||||
|
- 数学/转换:abs、scale、sum、mult、div、min/max、near、hypot、lincurve、lut、modmath、bit/float/s32/s64/u32/u64 转换。
|
||||||
|
- 逻辑/选择:and/or/not、mux、demux、select、logic、flipflop、toggle、tristate、oneshot、edge、multiswitch、multiclick。
|
||||||
|
- 时序/滤波:time、timedelay、timedelta、ton、tof、updown、counter、sample-hold、lowpass、ilowpass、biquad、filter-kalman、ddt、integ、deadzone。
|
||||||
|
- 运动/控制:PID、limit、limit-axis、limit1/2/3、blend、simple_tp、tpcomp、feedcomp、moveoff、gantry、corexy、millturn、orient、spindle、spindle-monitor、stepgen、encoder、encoder-ratio。
|
||||||
|
- 信号/诊断:message、watchdog、safety-latch、estop-latch、histobins、latencybins、sampler、streamer、lcd、matrix-kb。
|
||||||
|
- 设备/仿真:sim-axis-hardware、sim-encoder、sim-home-switch、sim-matrix-kb、sim-parport、sim-spindle、sphereprobe、probe、raster、laserpower、plasmac、thc/thcud、ohmic、charge-pump。
|
||||||
|
- 测试和用户模板:constant、test、thread、userkins、usercomp、所有 `*.comp` personality 和示例工程。
|
||||||
|
|
||||||
|
### 7.3 通用虚拟机床部件
|
||||||
|
|
||||||
|
Web 仿真不移植具体硬件驱动,而由稳定的通用模型为仿真配置提供输入输出:
|
||||||
|
|
||||||
|
| 通用模型 | 仿真能力 |
|
||||||
|
|---|---|
|
||||||
|
| 虚拟数字/模拟 I/O | pin 值、同步/立即变化、等待、延迟、噪声和故障注入 |
|
||||||
|
| 虚拟寄存器组 | 为 ClassicLadder/仿真 PLC 提供本地寄存器,不实现真实 Modbus transport |
|
||||||
|
| 虚拟 MPG/手轮/键盘 | Pointer/键盘/触控事件映射为脉冲和 HAL pin |
|
||||||
|
| 伺服/编码器 | 位置环、量化、噪声、丢脉冲、跟随误差模型 |
|
||||||
|
| 电机/主轴/冷却/阀 | 可配置惯性、加减速、到速、温度/压力/状态数字孪生 |
|
||||||
|
|
||||||
|
真实并口、GPIO、PCI、Mesa/HostMot2/FPGA、串口、VFD、Modbus transport、现场总线和协议工具统一为 `REAL-EXCLUDED`。
|
||||||
|
|
||||||
|
## 8. ClassicLadder、Modbus 和 PLC
|
||||||
|
|
||||||
|
| 功能 | 覆盖内容 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| 工程文件 | `.clp`、sections、symbols、variables、project load/save | `SIM-ADAPTER` |
|
||||||
|
| Ladder 对象 | contacts、coils、set/reset、timers、IEC timers、monostable、counters、compare、assignment、jump/call | `SIM-CORE` |
|
||||||
|
| 顺序控制 | GRAFCET steps/transitions/actions、状态和扫描顺序 | `SIM-CORE` |
|
||||||
|
| 扫描周期 | 虚拟 PLC thread、周期、overrun 和暂停恢复 | `SIM-ADAPTER` |
|
||||||
|
| Modbus 逻辑 | 使用虚拟寄存器、延迟和错误状态验证 Ladder 逻辑;不实现真实 serial/TCP transport | `SIM-DEVICE` |
|
||||||
|
| ClassicLadder UI | Web sections、ladder editor、variable/symbol/config/debug windows | `WEB-EQUIV` |
|
||||||
|
| PLC 与 HAL | pin 绑定、消息、工具换刀、E-stop、冷却和顺序动作 | `SIM-CORE` |
|
||||||
|
|
||||||
|
## 9. 工具、IO、主轴、换刀和探针
|
||||||
|
|
||||||
|
| 功能 | 覆盖内容 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| 工具表 | pocket/tool、X/Y/Z/A/B/C/U/V/W、diameter、front/rear angle、orientation、wear、offset | `SIM-CORE` |
|
||||||
|
| 工具数据库 | `db_program`、JSON/文本数据库、查询、更新、备份和迁移 | `SIM-ADAPTER` |
|
||||||
|
| 换刀 | manual、random、non-random、carousel、prepare/change、M6 remap、tool sensor、失败恢复 | `SIM-DEVICE` |
|
||||||
|
| IO control v1/v2 | tool prepare/change、coolant、lube、spindle brake、mist/flood、aux outputs | `SIM-DEVICE` |
|
||||||
|
| 主轴 | 多主轴、方向、速度、加减速、CSS、orient、gear、encoder、到速和故障 | `SIM-DEVICE` |
|
||||||
|
| 进给 | G93/G94/G95、feed hold、override、adaptive、feed stop、feed inhibit | `SIM-CORE` |
|
||||||
|
| 探针 | G38.x、probe input、位置锁存、宏、失败/超时和对刀 | `SIM-DEVICE` |
|
||||||
|
| 位置日志 | motion logger、采样、导出、回放和差异 | `WEB-EQUIV` |
|
||||||
|
|
||||||
|
## 10. GUI、VCP、可视化和配置工具
|
||||||
|
|
||||||
|
所有桌面界面不要求像素级复制,但必须覆盖其仿真工作流、状态、控制项、配置项和脚本接口。
|
||||||
|
|
||||||
|
组件信息架构、命令 pending/ack/result、通信信封、快照字段、事件/高频流、背压、错误/取消、离线恢复、多标签页租约、详细任务和 FE-M0..M5 退出条件见[前端与通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)。本节条目必须绑定该文档中的 UI 工作流和协议消息,不能只以页面存在作为验收。
|
||||||
|
|
||||||
|
| LinuxCNC 界面/工具 | Web 等价实现 |
|
||||||
|
|---|---|
|
||||||
|
| AXIS/Gremlin | 主控制台、程序、预览、3D 视图、状态、MDI、jog、override、报警、HAL 面板 |
|
||||||
|
| Gmoccapy/Gscreen | 工业面板、主题、消息、宏按钮、偏好、键盘和触控布局 |
|
||||||
|
| Touchy/QtTouchy | 触控操作、轴/关节 jog、home、MDI、程序控制和软键 |
|
||||||
|
| QtDragon/QtVCP | screen/widget schema、动态属性、signals/slots、tabs、custom widget、Vismach |
|
||||||
|
| QtPlasmaC | 等离子流程、材料表、切割参数、探高、arc-ok、暂停/恢复和日志 |
|
||||||
|
| PyVCP/GladeVCP | XML/descriptor 转 Web Component,全部 widget 属性、pin 和回调 |
|
||||||
|
| PanelUI/MDRO | 面板、数字输出、override、模式和用户按键 |
|
||||||
|
| NGCGUI/PyNGCGUI | 子程序参数表单、预览、生成/加载/运行和参数持久化 |
|
||||||
|
| HALShow/HALScope/HALMeter | pin 树、连接图、波形、触发、缩放、保存和回放 |
|
||||||
|
| Vismach | WebGL/WebGPU 机床模型、层级、关节、刀具和姿态 |
|
||||||
|
| 仿真配置编辑器 | 生成兼容的仿真 INI/HAL/工程 manifest;Stepconf/Pncconf 的驱动、板卡、引脚和时序配置排除 |
|
||||||
|
| Tooledit/Tool Database | 工具表、数据库查询、编辑、导入导出和换刀状态 |
|
||||||
|
| Image-to-G-code/NGC tools | 浏览器内纯计算插件;文件通过 OPFS/用户导入,不调用宿主程序 |
|
||||||
|
| 国际化/主题/快捷键 | 语言资源、主题变量、可配置快捷键和触摸交互 |
|
||||||
|
|
||||||
|
## 11. API、远程接口和脚本接口
|
||||||
|
|
||||||
|
| 接口 | 仿真实现 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| NML command/status/error | Worker 内 message bus,保留消息类型、顺序、状态和错误语义 | `SIM-ADAPTER` |
|
||||||
|
| `linuxcnc.command/stat/error` | TypeScript API + 可选 Pyodide Python binding | `PY-WASM` |
|
||||||
|
| `hal`/`hal_glib`/`pyhal` | 虚拟 pin/signal/param、监听、周期回调和类型转换 | `PY-WASM` |
|
||||||
|
| `gstat`/position logger | 状态快照、流式订阅、OPFS 日志和回放 | `WEB-EQUIV` |
|
||||||
|
| `linuxcncrsh`/远程命令 | 同源 Worker loopback;可选 WebSocket 仅连接当前仿真会话 | `SIM-ADAPTER` |
|
||||||
|
| `halcmd`/`haltcl`/`halrun` | Web 控制台命令解析;脚本只作用于当前虚拟工程 | `WEB-EQUIV` |
|
||||||
|
| MQTT/消息发布 | 本地事件总线和可选浏览器 WebSocket mock,不访问真实设备 | `SIM-DEVICE` |
|
||||||
|
| UI 插件/自定义面板 | manifest、权限、版本、生命周期和 OPFS 资源 | `WEB-EQUIV` |
|
||||||
|
|
||||||
|
### 11.1 诊断、开发和运维工具
|
||||||
|
|
||||||
|
| LinuxCNC 工具/能力 | 仿真实现 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| `linuxcnc_info` | 输出浏览器、WASM、Worker、OPFS、配置、组件和仿真能力报告 | `WEB-EQUIV` |
|
||||||
|
| `inivar`/INI 检查 | Web 配置查看、类型转换、include 展开和错误定位 | `WEB-EQUIV` |
|
||||||
|
| `lintini` | Worker 内静态检查全部 INI/HAL/资源引用 | `WEB-EQUIV` |
|
||||||
|
| `halcompile`/`modcompile` | 构建流水线中编译 `.comp`;Web 编辑器提供语法/接口检查 | `SIM-ADAPTER` |
|
||||||
|
| `runtests`/测试选择器 | 浏览器内按 manifest 运行 golden、回归和故障测试 | `WEB-EQUIV` |
|
||||||
|
| 仿真性能诊断 | 提供批处理耗时、Worker 延迟和 UI 帧率;`latency-test` 的内核实时延迟测试排除 | `WEB-EQUIV` |
|
||||||
|
| `debuglevel`/调试标志 | 虚拟运行时动态日志级别和 OPFS 日志 | `SIM-ADAPTER` |
|
||||||
|
| `tool_watch`/tool data monitor | 工具、换刀、数据库和快照监视器 | `WEB-EQUIV` |
|
||||||
|
| `motion-logger`/`halsampler`/`halstreamer` | 采样、导出、回放和差异可视化 | `WEB-EQUIV` |
|
||||||
|
| `axis-remote`/`schedrmt`/`linuxcnclcd`/`emclcd` | 同源命令/状态通道和虚拟显示终端 | `SIM-ADAPTER` |
|
||||||
|
| `linuxcncsvr`/远程 NML 服务 | 仅提供同源仿真会话服务;不监听宿主真实端口 | `SIM-ADAPTER` |
|
||||||
|
| `decode_dmesg`/系统诊断 | 虚拟设备和 WASM 运行时日志;无宿主内核日志 | `REAL-EXCLUDED` |
|
||||||
|
|
||||||
|
## 12. OPFS、快照和可重复仿真
|
||||||
|
|
||||||
|
| 功能 | 覆盖要求 | 标记 |
|
||||||
|
|---|---|---|
|
||||||
|
| 工程目录 | INI/HAL/TBL/VAR/NGC/PY/XML/TCL/CLP/模型/材料/日志全部可保存 | `SIM-ADAPTER` |
|
||||||
|
| 文件语义 | open/read/write/stat/readdir/rename/unlink/fsync、相对路径、大小写和错误 | `SIM-ADAPTER` |
|
||||||
|
| 事务 | prepare/commit、临时文件、SHA-256、原子替换、版本索引 | `SIM-ADAPTER` |
|
||||||
|
| 恢复 | 刷新、崩溃、半提交、版本迁移、损坏文件和回滚 | `SIM-ADAPTER` |
|
||||||
|
| 快照 | 任务、解释器、TP、运动、HAL、IO、Python、工具、参数和 UI 状态 | `SIM-ADAPTER` |
|
||||||
|
| 回放 | 从 tick/事件恢复后与连续运行结果一致 | `SIM-CORE` |
|
||||||
|
| 任务接续账本 | 请求超时、回答/工具结果丢失、重复响应、Worker 重启;按 `operation_id`、prepare/commit 和最后已验证步骤恢复 | `SIM-ADAPTER` |
|
||||||
|
| 配额 | estimate、persist、配额不足、清理 cache、导出备份 | `WEB-EQUIV` |
|
||||||
|
| 离线 | Service Worker 缓存 WASM、Pyodide、样例和 UI;无网加载已有工程 | `WEB-EQUIV` |
|
||||||
|
|
||||||
|
## 13. 测试覆盖模型
|
||||||
|
|
||||||
|
### 13.1 Golden 对照
|
||||||
|
|
||||||
|
原生 LinuxCNC 和 WASM 对每个 manifest 项输出:
|
||||||
|
|
||||||
|
- 解释器状态、当前行、模态、参数和返回值
|
||||||
|
- canonical motion、每 tick 位置/速度/加速度/跟随误差
|
||||||
|
- 轴/关节/姿态、运动学错误和限位状态
|
||||||
|
- HAL pin/signal/param、线程顺序和组件输出
|
||||||
|
- 主轴、工具、探针、换刀、冷却、等离子/激光/泡沫 IO
|
||||||
|
- Python/remap 输出、异常、日志和事件
|
||||||
|
- UI 命令、报警、状态和快照恢复结果
|
||||||
|
|
||||||
|
### 13.2 样本集合
|
||||||
|
|
||||||
|
1. `configs/sim/**` 下全部 INI 和关联资源,而不是只抽取 10 个样例。
|
||||||
|
2. `tests/**` 下全部可运行仿真测试;只依赖真实硬件、内核实时或驱动的测试登记为排除项。
|
||||||
|
3. `unit_tests/interp`、`unit_tests/tp`、posemath 和 kinematics 单元测试。
|
||||||
|
4. 每个 G/M/O 代码至少一个正常、边界、错误和暂停/恢复样例。
|
||||||
|
5. 每个 HAL 组件至少一个 pin 类型、周期、复位和异常样例。
|
||||||
|
6. 每种机床类型至少一个完整工程、模型、程序、工具表、IO 和故障回放。
|
||||||
|
7. 每个 Web UI 工作流覆盖首次启动、刷新恢复、离线、导入导出和键盘/触摸路径。
|
||||||
|
8. 每个可恢复任务至少覆盖一次请求失败、确认丢失、幂等重试和无法对账的阻断路径。
|
||||||
|
|
||||||
|
### 13.3 覆盖率门槛
|
||||||
|
|
||||||
|
- 覆盖率门槛与发布门禁 G4/G5 同步;来源、依赖、维度和交互闭包以及具体任务上下文和证据包格式见[执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)第 2.1、3、7 节。
|
||||||
|
- `SIM-CORE`、`SIM-ADAPTER`、`SIM-DEVICE`、`WEB-EQUIV`、`PY-WASM`:100% manifest 条目有实现和自动测试。
|
||||||
|
- 每个条目的正常、边界、错误、暂停/恢复、持久化/离线及适用交互维度均有通过记录;缺失任一维度不得为 `accepted`。
|
||||||
|
- 关键状态和错误的原生/WASM 对照通过率:100%。
|
||||||
|
- 浮点误差按算法定义容差,默认机床单位目标 `1e-6`。
|
||||||
|
- OPFS 已提交数据在刷新、Worker 重启和模拟崩溃后可恢复。
|
||||||
|
- 任何 manifest 缺失、未测试或静默降级都阻止发布。
|
||||||
|
- 任何孤儿来源、未闭合依赖、无 oracle、未覆盖交互或未解释的差异都阻止发布。
|
||||||
|
- 前端通信条目必须同时有消息 schema、LinuxCNC 源程序映射、UI 工作流、错误/取消、背压和离线恢复测试;详细字段和 FE/COM 任务见[前端与通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)。
|
||||||
|
- `REAL-EXCLUDED` 不计入仿真覆盖率,但配置检查必须返回明确 `real_hardware_excluded`。
|
||||||
|
|
||||||
|
## 14. 实施顺序
|
||||||
|
|
||||||
|
本节的阶段 A-E 只描述功能交付顺序;对应的 M0-M5 里程碑、工作流边界、固定上下文和返工规则见[执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)第 4、6、8 节。
|
||||||
|
|
||||||
|
### 阶段 A:全量清单和运行时骨架
|
||||||
|
|
||||||
|
- 生成 manifest,锁定所有文档、源码、配置和测试输入。
|
||||||
|
- 建立单 Worker、固定 tick、OPFS journal、快照和版本化 ABI。
|
||||||
|
- 建立 Python/Pyodide Worker 和虚拟 `linuxcnc/hal/gstat` 模块。
|
||||||
|
|
||||||
|
### 阶段 B:核心解释和运动全覆盖
|
||||||
|
|
||||||
|
- 移植全部 G/M/O、remap、参数、坐标系、补偿、TP、motion、全部 kinematics。
|
||||||
|
- 完成 mill/lathe/gantry/robot/delta/pentapod/foam/plasma/laser/probe 数字孪生。
|
||||||
|
|
||||||
|
### 阶段 C:HAL、PLC、IO 和虚拟机床部件
|
||||||
|
|
||||||
|
- 生成并编译全部 HAL 组件 manifest。
|
||||||
|
- 完成 ClassicLadder、虚拟寄存器、主轴/换刀/探针/编码器/stepgen/限位/故障模型。
|
||||||
|
- 完成 halcmd/haltcl/halui/HALScope/HALShow。
|
||||||
|
|
||||||
|
### 阶段 D:全部 Web UI 和配置工具
|
||||||
|
|
||||||
|
- 完成 AXIS、Gmoccapy、Touchy、Gscreen、QtVCP、QtDragon、QtPlasmaC、VCP、Vismach、NGCGUI 等仿真操作能力的 Web 等价工作流和仿真配置编辑器。
|
||||||
|
- 完成工程导入、导出、离线、国际化、主题和插件权限。
|
||||||
|
|
||||||
|
### 阶段 E:全量回归和发布
|
||||||
|
|
||||||
|
- 全部 configs/tests/golden/浏览器矩阵跑通。
|
||||||
|
- 生成版本化差异报告、兼容报告、许可证清单和工程迁移工具。
|
||||||
|
|
||||||
|
## 15. 明确排除项
|
||||||
|
|
||||||
|
以下不是仿真机床功能,因此不实现,也不能通过浏览器 API 绕过:
|
||||||
|
|
||||||
|
- 真实电机、驱动器、主轴、刀具、冷却、气路、液压和工件。
|
||||||
|
- 真实 Mesa/FPGA、并口、GPIO、PCI、串口、USB、Modbus 设备和现场总线。
|
||||||
|
- PREEMPT_RT、RTAI、Xenomai、内核模块、CPU 绑定、硬实时和物理步进脉冲。
|
||||||
|
- 真实急停、安全继电器、门锁、限位开关和人员/设备安全认证。
|
||||||
|
- 任意宿主路径、shell、fork/exec、子进程、设备文件和网络原始套接字。
|
||||||
|
|
||||||
|
排除项的仿真等价行为必须由第 6~9 节的数字孪生提供;例如“主轴不到速”要模拟成可配置状态和故障,而不是把主轴驱动标为“不支持”。
|
||||||
112
docs/linuxcnc-web-wasm-source-map.md
Normal file
112
docs/linuxcnc-web-wasm-source-map.md
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
# LinuxCNC Web/WASM 仿真功能与源程序关联目录
|
||||||
|
|
||||||
|
**文档状态**:Draft v0.1
|
||||||
|
**适用基线**:LinuxCNC `2.10.0~pre0`;源码根目录为 `linuxcnc/`
|
||||||
|
**上层路线**:[技术路线](linuxcnc-web-wasm-technical-roadmap.md)
|
||||||
|
**覆盖验收**:[仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)
|
||||||
|
**执行治理**:[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)
|
||||||
|
**前端与通信**:[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)
|
||||||
|
**总控执行**:[移植总控执行手册](linuxcnc-web-wasm-integration-playbook.md)
|
||||||
|
|
||||||
|
本目录把“功能”与 LinuxCNC 的实际源程序、配置、样例和测试绑定。表中的路径是当前仓库中的真实路径;`*`、`**` 通配范围必须由 manifest 生成器展开为逐文件条目,不能把通配符本身当成完成证据。源码文件发生增删、重命名或符号变化时,来源扫描必须更新 manifest 并阻断未关联的提交。
|
||||||
|
|
||||||
|
## 1. 关联契约
|
||||||
|
|
||||||
|
每个功能条目至少包含以下关联字段:
|
||||||
|
|
||||||
|
| 字段 | 要求 |
|
||||||
|
|---|---|
|
||||||
|
| `feature_id` | 稳定的功能 ID,不随文件重命名改变 |
|
||||||
|
| `domain`、`capability` | 功能域和用户可观察能力 |
|
||||||
|
| `source_files` | 仓库相对路径,展开到具体文件并记录 `source_sha` |
|
||||||
|
| `source_symbols` | 从 C/C++/C/Python/组件文件生成的符号或入口;无法解析时标记 `blocked` |
|
||||||
|
| `config_inputs` | `configs/sim/**` 中实际启用该功能的 INI/HAL/NGC/PY/XML/TCL/CLP 文件 |
|
||||||
|
| `adaptation` | `SIM-CORE`、`SIM-ADAPTER`、`SIM-DEVICE`、`WEB-EQUIV`、`PY-WASM` 或 `REAL-EXCLUDED` |
|
||||||
|
| `test_sources`、`test_id` | 原生测试、单测、浏览器测试和故障/恢复测试 |
|
||||||
|
| `oracle` | 原生 golden、规范输出、状态机不变量或明确 Web 等价判定 |
|
||||||
|
| `status`、`difference` | 实施状态、首个差异位置、容差和差异说明 |
|
||||||
|
| `protocol_messages`、`state_fields` | 前端命令、事件、快照字段和 LinuxCNC 状态的映射;详细契约见前端与通信设计 |
|
||||||
|
|
||||||
|
源文件关联只说明“必须审查和适配的来源”,不表示该文件可直接编译进 WASM。每个条目仍须按[覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)的正常、边界、错误、暂停/恢复、持久化/离线和交互维度验收。
|
||||||
|
|
||||||
|
## 2. 核心行为源程序映射
|
||||||
|
|
||||||
|
| 功能域 | LinuxCNC 源程序/文件范围 | Web/WASM 处理 | 首批测试来源 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| INI、配置和 HAL 初始化 | `linuxcnc/src/libnml/inifile/inifile.cc`、`inifile.hh`、`inivar.cc`;`linuxcnc/src/emc/ini/emcIniFile.cc`、`iniaxis.cc`、`inijoint.cc`、`inispindle.cc`、`initraj.cc`、`inihal.cc` | 复用解析规则;路径、include、变量和错误映射到 `/workspace` | `linuxcnc/configs/sim/**` 及其关联启动/配置测试 |
|
||||||
|
| RS-274/G-code 读取 | `linuxcnc/src/emc/rs274ngc/interp_read.cc`、`interp_check.cc`、`interp_setup.cc`、`interp_base.cc`、`rs274ngc.hh` | 优先编译核心;输入和诊断通过稳定 ABI 暴露 | `linuxcnc/unit_tests/interp/**`;`linuxcnc/tests/interp/**` |
|
||||||
|
| G/M/O 执行和 canonical 输出 | `linuxcnc/src/emc/rs274ngc/interp_execute.cc`、`interp_convert.cc`、`interp_cycles.cc`、`interp_o_word.cc`、`interp_queue.cc`、`interp_write.cc`、`canonmodule.cc` | 复用解释器状态和 canonical;队列接入 `sim_task` | `linuxcnc/tests/m70-m73/**`、`linuxcnc/tests/mdi-*`、全部 G/M/O manifest |
|
||||||
|
| Remap、Python 和命名参数 | `linuxcnc/src/emc/rs274ngc/interp_remap.cc`、`interp_python.cc`、`interp_namedparams.cc`、`pyparamclass.cc`、`pyinterp1.cc`、`pyarrays.cc`;`linuxcnc/src/emc/pythonplugin/python_plugin.cc`、`python_plugin.hh` | Pyodide/CPython-WASM 虚拟模块;禁止宿主进程、线程、设备和任意路径 | `linuxcnc/configs/sim/**/python/**`、`tests/**/remap.py`、`unit_tests/interp/**` |
|
||||||
|
| 模态、单位和坐标状态 | `linuxcnc/src/emc/rs274ngc/modal_state.cc`、`modal_state.hh`、`interp_parameter_def.hh`、`units.h`、`interp_inverse.cc` | 状态快照版本化;与原生模态 golden 对照 | `linuxcnc/unit_tests/interp/**`;坐标/单位仿真配置 |
|
||||||
|
| 轨迹规划和队列 | `linuxcnc/src/emc/tp/tp.c`、`tp.h`、`tp_types.h`、`tc.c`、`tcq.c`、`tcq.h`、`blendmath.c`、`spherical_arc.c`、`spherical_arc.h` | 固定 tick 驱动;保留前瞻、blend、exact path/stop 和容差 | `linuxcnc/unit_tests/tp/**`;`linuxcnc/tests/motion-logger/**` |
|
||||||
|
| Task、canonical 和 NML | `linuxcnc/src/emc/task/emctaskmain.cc`、`taskclass.cc`、`taskintf.cc`、`emccanon.cc`;`linuxcnc/src/emc/nml_intf/emc.cc`、`emc.hh`、`emc_nml.hh`、`interpl.cc`;`linuxcnc/src/libnml/nml/nml.cc`、`stat_msg.cc`、`cmd_msg.cc` | 单 Worker `sim_task` 和 message bus;删除 fork/进程边界但保留状态、命令和错误语义 | `linuxcnc/tests/mdi-*`、`linuxcnc/tests/abort/**`、`linuxcnc/tests/linuxcncrsh-*` |
|
||||||
|
| NML/CMS/共享内存边界 | `linuxcnc/src/libnml/cms/**`、`linuxcnc/src/libnml/buffer/**`、`linuxcnc/src/libnml/nml/**` | 进程间通信改为 Worker message bus;共享内存改为进程内结构和版本化快照 | NML、linuxcncrsh、状态/命令 golden |
|
||||||
|
| Worker 协议与固定 tick 边界 | `wasm-core/include/sim_protocol.h`、`wasm-core/src/sim_protocol.c`、`web/worker/sim-session.mjs`、`web/worker/sim-worker.mjs` | 版本化 envelope、单调 seq/tick、会话状态机和错误映射;WASM 核心只暴露受控 C ABI | `wasm-core/tests/sim_protocol_test.c`、`web/worker/test_wasm_session.mjs`、`scripts/test_protocol.py` |
|
||||||
|
| RTAPI、OS 接口和时钟 | `linuxcnc/src/rtapi/**`;`linuxcnc/src/libnml/os_intf/timer.cc`、`_timer.c`、`sem.cc`、`shm.cc`;`linuxcnc/src/emc/linuxcnc.h` | 固定逻辑时钟、虚拟同步原语和受控内存;内核实时、CPU 绑定和设备访问标记为 `REAL-EXCLUDED` | `linuxcnc/tests/lowlevel/**`、`linuxcnc/tests/rtapi-shmem/**`(可移植部分) |
|
||||||
|
| Motion、回零和限位 | `linuxcnc/src/emc/motion/motion.c`、`control.c`、`command.c`、`homing.c`、`emcmotglb.c`、`emcmotutil.c`、`simple_tp.c`、`motion_struct.h`、`homing.h` | `sim_motion` 状态机;虚拟编码器、开关、跟随误差和故障注入 | `linuxcnc/tests/hard-limits/**`、`linuxcnc/tests/abort/**`、`linuxcnc/tests/limit3/**` |
|
||||||
|
| Kinematics | `linuxcnc/src/emc/kinematics/*kins.c`、`*kins.cc`、`kins_util.c`、`genserfuncs.c`、`trtfuncs.c`、`switchkins.c`;关键文件包括 `trivkins.c`、`5axiskins.c`、`genhexkins.c`、`genserkins.c`、`lineardeltakins.c`、`rotarydeltakins.c`、`corexykins.c`、`xyzac-trt-kins.c`、`xyzbc-trt-kins.c` | 静态 WASM 模块和 manifest 注册;不使用宿主动态库 | `linuxcnc/configs/sim/axis/gantry/**`、`linuxcnc/configs/sim/axis/foam/**`、`linuxcnc/configs/sim/axis/ldelta*`、机器人样例;运动学单测 |
|
||||||
|
| Posemath 和几何 | `linuxcnc/src/libnml/posemath/posemath.cc`、`posemath.h`、`gomath.c`、`gomath.h`、`sincos.c`、`gotypes.h` | 原样编译或等价 ABI;固定浮点编译选项 | posemath 相关单测、TP/kinematics golden |
|
||||||
|
| Tooldata、工具表和数据库 | `linuxcnc/src/emc/tooldata/tooldata_common.cc`、`tooldata_nml.cc`、`tooldata_db.cc`、`tooldata_mmap.cc`、`tool_mmap_read.cc`、`tooldata.hh` | 内存工具服务 + OPFS 事务;兼容 pocket、offset、wear 和数据库迁移 | `linuxcnc/tests/mdi-queue/**`、`linuxcnc/configs/sim/**/*.tbl` |
|
||||||
|
| IO、换刀、主轴和冷却 | `linuxcnc/src/emc/iotask/ioControl.cc`、`ioControl_v2.cc`;`linuxcnc/src/emc/tooldata/**` | 虚拟 IO、主轴、换刀、探针和故障模型;真实协议排除 | `linuxcnc/configs/sim/axis/iocontrolv2/**`、`linuxcnc/configs/sim/axis/lathe_multispindle/**`、换刀测试 |
|
||||||
|
|
||||||
|
## 3. HAL、PLC 和数字孪生映射
|
||||||
|
|
||||||
|
| 功能域 | LinuxCNC 源程序/文件范围 | Web/WASM 处理 | 首批测试来源 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| HAL 核心对象和生命周期 | `linuxcnc/src/hal/hal_lib.c`、`hal.h`、`hal_priv.h`、`halmodule.cc` | pin/signal/param/component 图和生命周期;固定线程顺序 | `linuxcnc/tests/hal-*`、`linuxcnc/tests/basic/**` |
|
||||||
|
| halcmd/halrun/Scope | `linuxcnc/src/hal/utils/halcmd.c`、`halcmd_commands.cc`、`halcmd_main.c`、`halsh.c`、`scope.c`、`scope_rt.c`、`meter.c` | Web 命令控制台、波形采样和回放;真实 PCI 工具排除 | `linuxcnc/tests/halrun-*`、`linuxcnc/tests/threads.*`、`linuxcnc/tests/mux/**` |
|
||||||
|
| `.comp` 编译和组件 ABI | `linuxcnc/src/hal/utils/halcompile.g`;`linuxcnc/src/hal/components/*.comp`、`*.c` | 构建期静态组件 manifest;每个 `.comp` 展开为独立条目 | `linuxcnc/tests/symbols.*`、组件同名测试和 `configs/sim/**` |
|
||||||
|
| 虚拟轴/主轴/编码器/回零 | `linuxcnc/src/hal/components/sim_axis_hardware.comp`、`sim_spindle.comp`、`sim_encoder.c`、`sim_home_switch.comp`、`sim_parport.comp`、`sim_matrix_kb.comp` | 通用数字孪生;输入、延迟、噪声和故障可录制 | `configs/sim/**`、`tests/hard-limits/**`、`tests/edge/**` |
|
||||||
|
| 运动和控制组件 | `linuxcnc/src/hal/components/stepgen.c`、`encoder.c`、`encoder_ratio.c`、`pid.c`、`simple_tp.comp`、`gantry.comp`、`corexy_by_hal.comp`、`spindle.comp`、`spindle_monitor.comp` | 固定周期组件和类型转换;与 HAL golden 对照 | `linuxcnc/tests/limit3/**`、`linuxcnc/tests/biquad/**`、组件测试 |
|
||||||
|
| 探针、等离子和激光 | `linuxcnc/src/hal/components/sphereprobe.comp`、`plasmac.comp`、`laserpower.comp`、`homecomp.comp`、`thc.comp`、`thcud.comp`、`ohmic.comp` | 虚拟触发、arc-ok、torch、功率和超时故障模型 | `configs/sim/axis/laser/**`、probe/PlasmaC 样例 |
|
||||||
|
| ClassicLadder | `linuxcnc/src/hal/classicladder/*.c`、`*.h`、`projects_examples/*.clp`,重点为 `classicladder.c`、`calc.c`、`calc_sequential.c`、`files.c`、`files_project.c`、`protocol_modbus_master.c` | PLC 扫描、梯形图、顺序控制和虚拟寄存器;真实串口/TCP Modbus 排除 | ClassicLadder 工程样例、`configs/sim/**` 中 `.clp` |
|
||||||
|
|
||||||
|
## 4. Python、UI 和可视化映射
|
||||||
|
|
||||||
|
| 功能域 | LinuxCNC 源程序/文件范围 | Web/WASM 处理 | 首批测试来源 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Python HAL/LinuxCNC API | `linuxcnc/lib/python/hal.py`、`hal_glib.py`、`pyhal.py`、`tooldb.py`、`linuxcnc_util.py`、`rs274/**` | 虚拟模块和受控回调;API、异常和返回值对照 | `configs/sim/**/**/*.py`、Python remap/filter tests |
|
||||||
|
| AXIS/Gremlin 路径显示 | `linuxcnc/src/emc/usr_intf/axis/scripts/axis.py`、`axis-remote.py`、`mdi.py`、`hal_manualtoolchange.py`;`gremlin/gremlin.py`、`qt5_graphics.py`;`linuxcnc/lib/python/rs274/glcanon.py` | Web 控制台、3D 轨迹和程序工作流;不复制 GTK 窗口 | AXIS 仿真配置、UI tests、路径 golden |
|
||||||
|
| Gmoccapy/Gscreen/Touchy | `linuxcnc/src/emc/usr_intf/gmoccapy/*.py`、`*.glade`;`gscreen/*.py`、`*.glade`;`touchy/*.py`、`*.glade` | 状态、触控、jog、MDI、报警和偏好 Web 等价 | `configs/sim/**` 面板样例、浏览器 E2E |
|
||||||
|
| QtVCP/PyVCP/GladeVCP | `linuxcnc/src/emc/usr_intf/qtvcp/qtvcp.py`;`linuxcnc/lib/python/qtvcp/**`、`gladevcp/**`、`pyvcp_widgets.py`、`pyngcgui.py`、`vcpparse.py` | XML/descriptor 转 Web Component schema;保留 pin、属性、回调和权限 | `configs/sim/axis/gladevcp/**`、`halui_pyvcp/**`、QtVCP samples |
|
||||||
|
| Vismach/机床模型 | `linuxcnc/src/hal/user_comps/vismach/*.py`、`linuxcnc/lib/python/vismach.py` | Three.js/WebGPU 模型、姿态和刀具层 | vismach/5-axis/机器人仿真配置 |
|
||||||
|
| PlasmaC、NGCGUI 和工具界面 | `linuxcnc/src/emc/usr_intf/qtplasmac/*.py`;`linuxcnc/lib/python/plasmac/**`、`pyngcgui.py` | 等离子流程、材料表、参数表单和预览 Web 等价 | `configs/sim/axis/laser/**`、相关 qtplasmac/NGCGUI 样例 |
|
||||||
|
|
||||||
|
Stepconf/Pncconf 的真实板卡、引脚和实时配置源文件仍需进入 manifest,但标记为 `REAL-EXCLUDED`;其中可生成纯仿真 INI/HAL 的部分必须拆出并按 `WEB-EQUIV` 验收,不能整体排除。
|
||||||
|
|
||||||
|
## 5. 仿真配置与测试来源映射
|
||||||
|
|
||||||
|
配置文件不是“示例附件”,而是功能来源。manifest 生成器必须递归扫描 `linuxcnc/configs/sim/**`,为每个入口 INI 建立资源图,至少关联其 HAL、TBL、VAR、NGC、PY、XML、TCL、UI、模型和材料文件。当前重点入口包括:
|
||||||
|
|
||||||
|
| 仿真能力 | 配置入口/资源范围 |
|
||||||
|
|---|---|
|
||||||
|
| 最小三轴、坐标和 INI include | `linuxcnc/configs/sim/axis/minimal_xyz.ini`、`axis/ini_with_includes/**` |
|
||||||
|
| Gantry、额外关节、锁定转台 | `axis/gantry/**`、`axis/extrajoints/**`、`axis/ja_tests/**` |
|
||||||
|
| 车床、Fanuc Y、多主轴 | `axis/lathe.ini`、`axis/lathe-fanucy/**`、`axis/lathe_multispindle/**` |
|
||||||
|
| Foam/Delta/机器人/多轴 | `axis/foam/**`、`axis/ldelta*`、`**/*kins*`、`axis/*gui*` |
|
||||||
|
| Laser/Plasma/探针 | `axis/laser/**`、`axis/gladevcp/probe.*`、所有包含 `plasmac`/`probe` 的 sim 入口 |
|
||||||
|
| IOControl v2、换刀和 O-word | `axis/iocontrolv2/**`、所有 `toolchange`、`oword`、`m6` 入口 |
|
||||||
|
| HAL UI、Scope、VCP 和面板 | `axis/halui_pyvcp/**`、`axis/gladevcp/**`、所有 `*.halshow`、`*.halscope`、`*.xml` |
|
||||||
|
|
||||||
|
测试来源按功能反向绑定:`linuxcnc/tests/**` 的每个可运行测试、`linuxcnc/unit_tests/**` 的每个测试目标和配置入口都必须至少出现在一个 manifest 条目的 `test_sources` 或 `config_inputs` 中。只依赖真实硬件、实时内核或宿主驱动的测试登记为 `REAL-EXCLUDED`,并写明对应的仿真替代测试。
|
||||||
|
|
||||||
|
### 5.1 构建和链接来源
|
||||||
|
|
||||||
|
构建文件也是源程序关联的一部分。以下文件必须扫描并绑定到对应的编译目标、组件 manifest 和排除理由:
|
||||||
|
|
||||||
|
| 构建来源 | 关联要求 |
|
||||||
|
|---|---|
|
||||||
|
| `linuxcnc/meson.build`、`linuxcnc/src/meson.build` | 记录原生目标、子目录和源文件集合;WASM 目标以独立 CMake/Emscripten manifest 对照 |
|
||||||
|
| `linuxcnc/src/**/meson.build`、`linuxcnc/src/**/Submakefile` | 记录每个库、模块、组件和测试目标的实际输入;源文件未被任何目标引用时标记为孤儿候选 |
|
||||||
|
| `linuxcnc/src/hal/components/*.comp` 的生成规则 | 记录 `.comp` 到生成 C/ABI 的映射和编译参数;生成文件不能替代原始 `.comp` 来源 |
|
||||||
|
| `linuxcnc/unit_tests/**/meson.build`、`linuxcnc/tests/**/test.sh` | 记录测试入口、预期结果和需要的仿真资源;测试脚本失败或不可移植时必须登记替代测试 |
|
||||||
|
|
||||||
|
## 6. 生成、审查和变更规则
|
||||||
|
|
||||||
|
1. M0 扫描源码、文档、配置和测试,生成带 `source_sha` 的初始索引;扫描器版本和排除规则写入 context lock。
|
||||||
|
2. 领域负责人把索引项归并为稳定 `feature_id`,保留一对多和多对一关系,不删除原始来源引用。
|
||||||
|
3. C/C++/C/Python/组件符号由固定版本的解析器或 `compile_commands.json` 生成;解析失败的项为 `blocked`,不得手工填充“已覆盖”。
|
||||||
|
4. 文件新增、删除、重命名、构建清单变化或配置入口变化都必须触发 manifest diff;差异没有对应任务和测试时 CI 失败。
|
||||||
|
5. 发布使用锁定的 source map、coverage manifest、golden manifest 和 context lock;source map 与 coverage manifest 的数量、哈希和反向索引必须一致。
|
||||||
|
|
||||||
|
source map 是移植的导航和审计入口,不以目录级“已处理”替代文件级和功能级证据。只有源文件关联、实现、测试、差异和排除理由全部闭合,功能条目才允许进入 `accepted`。
|
||||||
473
docs/linuxcnc-web-wasm-technical-roadmap.md
Normal file
473
docs/linuxcnc-web-wasm-technical-roadmap.md
Normal file
@@ -0,0 +1,473 @@
|
|||||||
|
# LinuxCNC 纯 Web/WASM 仿真机床技术路线(第一版)
|
||||||
|
|
||||||
|
**文档状态**:Draft v0.2
|
||||||
|
**目标产品**:浏览器内、离线可运行的 LinuxCNC 仿真机床
|
||||||
|
**代码基线**:本仓库当前 LinuxCNC `2.10.0~pre0`(以 `linuxcnc/VERSION` 为准)
|
||||||
|
**范围**:只做仿真,不连接真实机床,不通过网络控制硬件
|
||||||
|
**兼容目标**:以 LinuxCNC 仿真模式为行为基线,覆盖全部仿真功能并给出浏览器内等价实现
|
||||||
|
**执行治理**:[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)
|
||||||
|
**逐项验收**:[仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)
|
||||||
|
**源码关联**:[仿真功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)
|
||||||
|
**前端与通信**:[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)
|
||||||
|
**总控执行**:[仿真移植总控执行手册](linuxcnc-web-wasm-integration-playbook.md)
|
||||||
|
|
||||||
|
本路线定义架构、范围、风险和阶段 A-E;任务上下文预算、提交格式、断网接续、里程碑退出条件和发布门禁统一由[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)约束;功能到 LinuxCNC 实际源文件、配置和测试的关联以[源程序关联目录](linuxcnc-web-wasm-source-map.md)为入口;浏览器 UI、Worker 协议、状态契约、前端任务和 FE-M0..M5 里程碑以[前端与通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)为准;端到端依赖、任务目录、场景验收和当前实施状态以[总控执行手册](linuxcnc-web-wasm-integration-playbook.md)为准。
|
||||||
|
|
||||||
|
## 1. 摘要
|
||||||
|
|
||||||
|
本项目不是把完整 LinuxCNC 的 Linux 进程、实时内核和桌面 GUI 原样塞进浏览器,而是将 LinuxCNC 面向仿真用户的全部行为拆成可移植核心,并为浏览器补齐进程、文件系统、时钟、HAL、虚拟 I/O、GUI、Python 和配置运行时。真实机床、真实硬件驱动和安全控制链路全部排除;原本由硬件产生的可观察信号,在浏览器中由可配置的数字孪生设备产生。
|
||||||
|
|
||||||
|
最终形态如下:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Web UI(React + TypeScript)
|
||||||
|
├─ G-code 编辑器、MDI、Jog、倍率、报警、配置
|
||||||
|
├─ Three.js 机床/刀具/轨迹/毛坯显示
|
||||||
|
└─ OPFS 工程、配置、工具表、日志和快照
|
||||||
|
│ postMessage
|
||||||
|
▼
|
||||||
|
Dedicated Web Worker
|
||||||
|
├─ Emscripten WASM LinuxCNC 仿真核心
|
||||||
|
├─ Pyodide/Python 仿真运行时(remap、过滤器、VCP 脚本)
|
||||||
|
├─ POSIX 兼容工作区(WasmFS/适配层)
|
||||||
|
├─ 虚拟时钟、任务/运动/I/O 调度
|
||||||
|
├─ 虚拟 HAL 和全部仿真组件
|
||||||
|
└─ OPFS 同步访问、事务日志和恢复
|
||||||
|
```
|
||||||
|
|
||||||
|
浏览器主线程只负责界面和渲染;解释、轨迹计算、配置读取、HAL 周期、OPFS 同步访问和 Python 调用调度都在 Worker 侧完成。仿真默认单线程、串行、确定性;Python remap/过滤器可以在同一仿真 Worker 的协作运行时中执行,也可以拆成受控 Python Worker,但不能引入不可复现的后台线程。WASM pthread 只作为性能优化构建,不能改变仿真语义。
|
||||||
|
|
||||||
|
## 2. 目标与边界
|
||||||
|
|
||||||
|
### 2.1 必须达到的目标
|
||||||
|
|
||||||
|
1. 在 Chromium、Firefox、Safari 的支持范围内运行纯仿真;主流程不依赖 Linux、Node.js 或服务器 API。
|
||||||
|
2. 能加载 LinuxCNC 仿真配置、G-code、子程序、宏、工具表、INI 和 HAL 配置,并在浏览器内得到明确的兼容结果。
|
||||||
|
3. 对 LinuxCNC 的全部仿真功能做可重复回归:解释器、轨迹规划、全部内置运动学、模态状态、坐标系、补偿、宏、remap、HAL、ClassicLadder、虚拟工具/主轴/探针/换刀/限位、车床/等离子/激光/泡沫/机器人等仿真配置,以及所有仿真操作界面能力。
|
||||||
|
4. 使用 OPFS 持久化工程工作区,支持关闭页面后恢复、崩溃恢复、版本迁移、导入导出和配额诊断。
|
||||||
|
5. 真实硬件功能明确排除;除真实硬件访问外,不允许以“不支持”跳过任何 LinuxCNC 仿真功能。行为有差异的功能必须有机器可读的兼容状态和用户可见的差异说明。
|
||||||
|
6. 通过录制/回放的确定性仿真,能够对照原生 LinuxCNC 生成差异报告。
|
||||||
|
|
||||||
|
### 2.2 明确不做的事情
|
||||||
|
|
||||||
|
- 不连接串口、USB、PCI、并口、Mesa、Ethernet、GPIO 或任何真实硬件。
|
||||||
|
- 不提供真实机床安全保证,不替代急停、限位、安全继电器或认证控制器。
|
||||||
|
- 不执行任意 `fork`、`exec`、shell 命令、系统脚本或宿主机路径操作。
|
||||||
|
- 不连接真实机床或真实硬件;硬件相关 LinuxCNC 功能只实现仿真数字孪生和故障模型。
|
||||||
|
- Python 解释器属于仿真必选运行时;使用 Worker 内的 Pyodide/CPython WASM,并以虚拟文件、虚拟时钟和虚拟 I/O 替代宿主能力。
|
||||||
|
- 不承诺浏览器的墙钟、Worker 调度或后台标签页具有 Linux PREEMPT_RT 的实时保证。
|
||||||
|
|
||||||
|
### 2.3 “仿真全覆盖”的定义
|
||||||
|
|
||||||
|
“仿真全覆盖”不是承诺每一行 LinuxCNC 源码都可直接编译,而是对 LinuxCNC 发布版中所有可由仿真机床观察、配置、调用或回放的行为逐项建立以下状态:
|
||||||
|
|
||||||
|
- **复用**:原生 C/C++ 核心可在 WASM 编译,行为直接复用。
|
||||||
|
- **等价实现**:Linux/进程/硬件依赖不可复用,但在浏览器内提供同等仿真语义。
|
||||||
|
- **兼容适配**:保留配置或 API 形状,内部转换为 Web 运行时模型。
|
||||||
|
- **仿真器**:用通用虚拟机床部件、虚拟 I/O 或虚拟时钟复现仿真配置依赖的行为,不复刻真实设备驱动和现场协议。
|
||||||
|
- **Web 等价**:用 Web UI、Web Worker、WebGL/WebGPU 或浏览器 API 提供同等用户能力。
|
||||||
|
- **排除**:真实硬件访问、真实实时内核、安全认证和物理机床输出;排除项不计入仿真覆盖率,但必须在兼容报告中明确标注。
|
||||||
|
|
||||||
|
每个功能在 [仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md) 中记录:来源文档/源码、输入、输出、错误码、仿真替代方案、参考测试、当前状态和差异说明。覆盖率只统计 `SIM-*`、`WEB-EQUIV` 和 `PY-WASM` 项,目标是 100%;`REAL-EXCLUDED` 单独统计,不得伪装为已支持。
|
||||||
|
|
||||||
|
## 3. 基于当前仓库的复用分析
|
||||||
|
|
||||||
|
当前仓库的 `linuxcnc/configs/sim` 已提供大量无特殊硬件的仿真配置,是移植和回归的首批样本。仓库中的核心目录与路线映射如下:
|
||||||
|
|
||||||
|
本节只给出架构级目录映射;逐文件范围、功能入口、配置资源和测试来源见[仿真功能与源程序关联目录](linuxcnc-web-wasm-source-map.md)。manifest 生成器必须把目录和通配范围展开为带 `source_sha` 的具体文件,禁止用目录级状态替代文件级证据。
|
||||||
|
|
||||||
|
| 当前源码 | Web/WASM 处理 | 说明 |
|
||||||
|
|---|---|---|
|
||||||
|
| `src/emc/rs274ngc` | 优先原样编译并做 ABI 封装 | G-code 解释、宏、循环、模态和 canonical 输出 |
|
||||||
|
| `src/emc/tp` | 原样复用,接入确定性周期 | 前瞻、速度规划、圆弧、球面弧和轨迹队列 |
|
||||||
|
| `src/libnml/posemath` | 原样复用 | 位姿、矩阵、坐标变换和几何计算 |
|
||||||
|
| `src/emc/kinematics` | 原样复用/按配置选择 | trivkins、5 轴、机器人、六足等运动学 |
|
||||||
|
| `src/libnml/inifile` | 编译或等价解析 | 兼容 INI;前端另提供 JSON 配置视图 |
|
||||||
|
| `src/emc/motion` | 迁移到 `sim_motion` | 保留状态机和运动语义,去除设备/共享内存边界 |
|
||||||
|
| `src/emc/task` | 拆分为单进程 `sim_task` | 删除 fork、信号、NML 服务和外部命令 |
|
||||||
|
| `src/emc/iotask` | 迁移为虚拟 I/O 任务 | 主轴、冷却、换刀、探针、限位和消息 |
|
||||||
|
| `src/hal` | 迁移 HAL 数据模型和调度 | pin、signal、param、thread、function、组件生命周期 |
|
||||||
|
| `src/hal/components` | 全量移植/重写 | 全部核心组件、仿真组件、测试组件和用户组件模板进入组件 manifest |
|
||||||
|
| `src/hal/drivers` | 不移植 | 真实设备驱动整体排除;仿真配置所需行为由 `sim_*` 和通用虚拟机床组件提供 |
|
||||||
|
| `src/emc/usr_intf/*` | 全部重写为 Web UI | 不移植 GTK、Qt、Tk、OpenGL 桌面窗口 |
|
||||||
|
| Python plugin/remap | Pyodide/CPython WASM + 虚拟宿主 API | 兼容解释器、remap、过滤器、VCP 脚本和 Python HAL API;禁止宿主进程/线程/设备访问 |
|
||||||
|
|
||||||
|
当前 [meson.build](../linuxcnc/meson.build) 依赖 Boost.Python、Python 2 和 `libdl` 等宿主环境;WASM 工程使用独立 CMake/Emscripten 目标,避免破坏原生构建。
|
||||||
|
|
||||||
|
Python 运行时采用 Pyodide/CPython-WASM,放在 Worker 中执行 remap、过滤器、VCP 回调、工具数据库脚本和 Python HAL API;LinuxCNC 的 `linuxcnc`、`hal`、`gstat` 等模块由仿真桥提供。Pyodide 支持在 Web Worker 中运行,但浏览器环境不提供可直接复用的宿主子进程、线程、原始套接字和设备访问,因此这些调用必须映射为虚拟文件、虚拟时钟、虚拟事件或明确的 `real_hardware_excluded` 错误。[Pyodide Web Worker](https://pyodide.org/en/latest/usage/webworker.html)、[Pyodide WASM constraints](https://pyodide.org/en/latest/usage/wasm-constraints.html)
|
||||||
|
|
||||||
|
## 4. 总体运行时架构
|
||||||
|
|
||||||
|
### 4.1 Worker 分层
|
||||||
|
|
||||||
|
```text
|
||||||
|
sim.worker.ts
|
||||||
|
├─ CommandRouter 命令序列、取消、错误和权限边界
|
||||||
|
├─ TaskLedger operation_id、步骤账本、幂等重试和回答/工具失败接续
|
||||||
|
├─ WorkspaceRuntime OPFS、工作区挂载、日志和恢复
|
||||||
|
├─ WasmRuntime Emscripten 模块生命周期和 C ABI
|
||||||
|
├─ LinuxCncCompat INI/HAL/NML/任务/IO 兼容层
|
||||||
|
├─ SimScheduler 固定步长、倍速、单步、暂停和回放
|
||||||
|
└─ SnapshotPublisher 二进制状态快照和事件流
|
||||||
|
```
|
||||||
|
|
||||||
|
主线程通过结构化消息发送低频控制命令;状态使用固定二进制 schema 或可选 JSON 调试模式。所有命令有单调递增 `seq` 和稳定 `operation_id`,所有快照有 `simulation_tick` 和 `schema_version`。任务账本在执行前写 prepare、验证后写 commit;回答或工具确认丢失时先对账,不盲目重放。
|
||||||
|
|
||||||
|
通信信封、握手/能力协商、命令族、快照字段、事件与高频流、背压、错误/取消、租约、离线接续和 UI 工作流的详细契约见[前端与 LinuxCNC 通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)。
|
||||||
|
|
||||||
|
### 4.2 WASM 边界
|
||||||
|
|
||||||
|
WASM 核心只暴露稳定 C ABI,不把 C++ 类布局、指针或 STL 容器暴露给 TypeScript:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int sim_create(const uint8_t *config, uint32_t config_len);
|
||||||
|
int sim_load_workspace(const char *root_path);
|
||||||
|
int sim_command(const uint8_t *cmd, uint32_t cmd_len);
|
||||||
|
int sim_step(uint32_t cycles);
|
||||||
|
uint32_t sim_read_snapshot(uint8_t *out, uint32_t capacity);
|
||||||
|
uint32_t sim_read_event(uint8_t *out, uint32_t capacity);
|
||||||
|
int sim_export_state(uint8_t *out, uint32_t capacity);
|
||||||
|
int sim_import_state(const uint8_t *data, uint32_t len);
|
||||||
|
void sim_destroy(void);
|
||||||
|
```
|
||||||
|
|
||||||
|
建议使用命令和事件的版本化二进制结构;JSON 只作为调试、日志和外部工程文件格式。
|
||||||
|
|
||||||
|
### 4.3 仿真时钟
|
||||||
|
|
||||||
|
LinuxCNC 的实时周期在浏览器中改写为确定性仿真时钟:
|
||||||
|
|
||||||
|
1. 逻辑周期默认 1 ms,允许配置为 0.25/0.5/1/2/5 ms。
|
||||||
|
2. `sim_step(n)` 批量推进 n 个周期,不读取墙钟决定运动结果。
|
||||||
|
3. Worker 每次运行有限批次,例如 5~20 ms 逻辑时间,然后发布快照并让出事件循环。
|
||||||
|
4. `1x` 模式按墙钟节流,快速模式只按计算能力推进,单步模式一次推进一个周期或一个解释块。
|
||||||
|
5. 快照频率与仿真周期解耦,默认 20~60 Hz;轨迹点可按采样策略压缩。
|
||||||
|
6. 暂停、复位、急停、断点和回放都基于 tick,不依赖 `setInterval(1)` 的准确性。
|
||||||
|
|
||||||
|
## 5. OPFS 工程持久化方案
|
||||||
|
|
||||||
|
### 5.1 选择原则
|
||||||
|
|
||||||
|
OPFS 是按源隔离、浏览器管理、默认不向用户可见的持久化文件系统;需要安全上下文(HTTPS),并可在 Worker 使用。其同步访问句柄只能用于 Worker,适合承接 LinuxCNC 大量同步 `fopen/read/write` 语义。[MDN OPFS](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system)
|
||||||
|
|
||||||
|
OPFS 受浏览器配额和存储淘汰策略约束,因此不能假设无限磁盘;应用启动时调用 `navigator.storage.estimate()`,重要工程可请求 `navigator.storage.persist()`,并提供显式导出为 ZIP/目录的备份能力。[MDN Storage Quotas](https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria)
|
||||||
|
|
||||||
|
### 5.2 目录布局
|
||||||
|
|
||||||
|
```text
|
||||||
|
opfs:/linuxcnc-web/
|
||||||
|
format.json # 工作区格式版本和应用版本
|
||||||
|
projects/
|
||||||
|
<project-id>/
|
||||||
|
project.json # 工程元数据、机床类型、单位、入口 INI
|
||||||
|
config/
|
||||||
|
*.ini *.hal *.tbl *.var *.ngc
|
||||||
|
subroutines/ # O-word、M-code 和用户宏
|
||||||
|
components/ # 允许的静态 HAL 组件配置
|
||||||
|
programs/ # 用户 G-code
|
||||||
|
snapshots/ # 可恢复仿真状态
|
||||||
|
logs/ # 事件、报警、轨迹差异和崩溃日志
|
||||||
|
journal/ # 写前日志、提交标记和恢复信息
|
||||||
|
cache/ # 可删除的预解析/轨迹缓存
|
||||||
|
samples/ # 随应用发布的 configs/sim 样本
|
||||||
|
migrations/ # 格式迁移标记
|
||||||
|
```
|
||||||
|
|
||||||
|
路径必须是 POSIX 风格、大小写敏感且经过规范化;禁止 `..`、绝对宿主路径和符号链接语义。LinuxCNC 看到的是 `/workspace` 下的虚拟工作区,而不是浏览器真实路径。
|
||||||
|
|
||||||
|
### 5.3 两层文件系统模型
|
||||||
|
|
||||||
|
为了兼容同步 C/C++ 文件访问,不让 LinuxCNC 核心直接调用异步 DOM API,采用两层模型:
|
||||||
|
|
||||||
|
```text
|
||||||
|
WASM 进程内工作树(同步、低延迟)
|
||||||
|
└─ WasmFS/MEMFS 或定制 POSIX 适配层
|
||||||
|
▲ 读写同步 / 批量刷新
|
||||||
|
▼
|
||||||
|
Worker OPFS 适配器(FileSystemSyncAccessHandle)
|
||||||
|
└─ OPFS 持久文件、journal、快照、配额和恢复
|
||||||
|
```
|
||||||
|
|
||||||
|
实现路线分两步:
|
||||||
|
|
||||||
|
1. **第一阶段**:使用 Emscripten WasmFS/虚拟文件系统,Worker 启动时加载工作区索引和热点文件;保存时通过 OPFS 适配器批量写入。WasmFS 是稳定但仍非全部旧 FS API 等价的方案,需要针对 LinuxCNC 使用到的文件调用做测试。[Emscripten File System API](https://emscripten.org/docs/api_reference/Filesystem-API.html)
|
||||||
|
2. **第二阶段**:为 `open/read/write/stat/readdir/rename/unlink/fsync` 建立最小 POSIX 适配层,普通文件通过 OPFS 同步句柄按块读写,目录和元数据通过索引维护;不把 OPFS 文件句柄暴露给 WASM。
|
||||||
|
|
||||||
|
OPFS 的 `createSyncAccessHandle()` 本身是异步获取,获取完成后 `read/write/truncate/flush/close` 可同步调用;因此所有句柄建立、恢复和关闭都由 Worker 的 `WorkspaceRuntime` 串行管理。[MDN OPFS Worker Access](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system#manipulating_the_opfs_from_a_web_worker)
|
||||||
|
|
||||||
|
### 5.4 事务、一致性和恢复
|
||||||
|
|
||||||
|
每次工程写入按以下顺序执行:
|
||||||
|
|
||||||
|
1. 生成 `journal/<seq>.prepare`,记录目标路径、旧版本、内容哈希和新版本。
|
||||||
|
2. 写入临时文件 `.<name>.tmp.<seq>`,分块写入并 `flush()`。
|
||||||
|
3. 校验长度和 SHA-256,写入 `journal/<seq>.commit`。
|
||||||
|
4. 原子替换目标文件,更新 `project.json` 的索引版本。
|
||||||
|
5. 删除临时文件和已完成日志。
|
||||||
|
|
||||||
|
启动恢复时扫描 `prepare/commit`:只有 commit 且校验通过的事务才生效;未完成事务回滚到旧版本。快照使用“完整基线 + 增量事件”策略,定期合并,避免每个 tick 写 OPFS。
|
||||||
|
|
||||||
|
### 5.5 数据策略
|
||||||
|
|
||||||
|
| 数据 | 存储 | 写入策略 |
|
||||||
|
|---|---|---|
|
||||||
|
| 当前工程配置 | OPFS | 显式保存 + 防抖自动保存 |
|
||||||
|
| G-code/宏/子程序 | OPFS | 编辑器保存时事务提交 |
|
||||||
|
| 工具表/参数/变量 | OPFS | 运行关键点和退出前提交 |
|
||||||
|
| 仿真快照 | OPFS | 用户手动/周期性 checkpoint |
|
||||||
|
| 事件和报警日志 | OPFS | 批量追加,达到大小后滚动 |
|
||||||
|
| 轨迹缓存 | OPFS `cache/` | 可删除,哈希命中才复用 |
|
||||||
|
| UI 偏好 | IndexedDB 或 OPFS 小文件 | 与工程数据分离 |
|
||||||
|
|
||||||
|
用户可见文件使用浏览器 File System Access API 导入/导出;OPFS 本身不承诺与用户文件系统一一对应,不能把 OPFS 路径显示成真实磁盘路径。
|
||||||
|
|
||||||
|
## 6. LinuxCNC 全功能对照路线
|
||||||
|
|
||||||
|
以下是功能域摘要;完整条目、代码清单、组件清单、配置样本和测试要求以[仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md)为准。每一项都必须进入自动化兼容矩阵;“等价”表示在纯仿真语义下达到相同用户可见结果。开发阶段 P0/P1/P2 只表示交付顺序,不表示可以永久缺失功能。
|
||||||
|
|
||||||
|
本节表格中的“全覆盖”是目标范围标签,不是当前实现状态。只有覆盖矩阵完成来源、依赖、测试维度、交互路径和原生/WASM oracle 闭包,并达到 `accepted`,才可在兼容报告中声明该功能已完成。
|
||||||
|
|
||||||
|
### 6.1 启动、配置和文件
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| INI 文件、include、变量替换 | 虚拟工作区解析;路径限制和错误码保持一致 | P0 |
|
||||||
|
| HAL 文件、`loadrt/addf/setp/net` | 解析器 + 静态组件注册 + pin/signal 图构建 | P0 |
|
||||||
|
| 工具表 `.tbl` | 兼容解析、编辑、校验和持久化 | P0 |
|
||||||
|
| 参数/变量文件 | 进程内参数区 + OPFS 提交 | P0 |
|
||||||
|
| G-code 主程序/子程序 | 工作区相对路径解析、递归深度限制 | P0 |
|
||||||
|
| M-code 文件 | 白名单虚拟动作;禁止外部程序 | P0 |
|
||||||
|
| 配置选择器 | Web 工程选择器和 `configs/sim` 样本导入 | P0 |
|
||||||
|
| 环境变量、宿主路径、权限 | 映射为受控 workspace 变量;不暴露宿主环境 | P1 |
|
||||||
|
| LinuxCNC 启动/退出生命周期 | `sim_create/load/start/stop/destroy` 状态机 | P0 |
|
||||||
|
|
||||||
|
### 6.2 G-code 解释器和程序执行
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| RS-274 基础 G/M 代码 | 复用 `rs274ngc`,canonical 输出接 `sim_task` | P0 |
|
||||||
|
| O-word、宏、命名参数、表达式 | 原生核心优先;禁止未审计宿主回调 | P0 |
|
||||||
|
| 子程序、循环、条件、递归 | 虚拟工作区路径和资源限额 | P0 |
|
||||||
|
| 模态组、单位、平面、绝对/增量 | 对照原生状态快照 | P0 |
|
||||||
|
| G54-G59、G52、G92、旋转/缩放 | 复用解释器和 posemath,逐项差分测试 | P0 |
|
||||||
|
| 刀具长度/半径补偿 | 复用解释器/TP,覆盖 mill、lathe、5 轴和数字孪生设备 | 全覆盖 |
|
||||||
|
| 固定循环、螺纹、同步运动 | 按 canonical 输出逐项验收 | 全覆盖 |
|
||||||
|
| Remap | C++ ABI + Pyodide Python 运行时,覆盖 prolog/epilog、NGC、Python 和队列语义 | 全覆盖 |
|
||||||
|
| MDI、单步、断点、队列清空 | Worker 命令状态机 | P0 |
|
||||||
|
| 程序暂停/恢复/中止 | tick 和解释器状态快照恢复 | P0 |
|
||||||
|
| 语法错误、运行时错误、报警 | 统一错误码 + 行号 + 来源文件 | P0 |
|
||||||
|
|
||||||
|
### 6.3 轨迹规划、运动学和坐标
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| `tp` 前瞻、速度/加速度、拐角融合 | 原样复用,固定 dt 驱动 | P0 |
|
||||||
|
| 直线、圆弧、球面弧、NURBS | 复用 TP/几何库,轨迹容差对表 | 全覆盖 |
|
||||||
|
| 关节/笛卡尔坐标 | `sim_motion` 状态模型 | P0 |
|
||||||
|
| trivkins | 默认机床 | P0 |
|
||||||
|
| 全部内置及示例 kinematics | 编译为静态模块,由配置选择并建立姿态/限位 golden | 全覆盖 |
|
||||||
|
| 用户运动学模块 | 构建期静态 WASM ABI;以 manifest 注册,不允许宿主动态库 | 全覆盖 |
|
||||||
|
| 软限位、硬限位、回零 | 虚拟开关和确定性限位模型 | P0 |
|
||||||
|
| 外部偏置、跟随误差、螺距补偿 | 进程内仿真参数和测试向量 | 全覆盖 |
|
||||||
|
| 反向时运动学/姿态限制 | 与原生 kinematics 对照 | 全覆盖 |
|
||||||
|
|
||||||
|
### 6.4 HAL 和仿真 I/O
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| pin、signal、parameter、component | 内存图模型,名称和类型保持兼容 | P0 |
|
||||||
|
| HAL thread/function/addf | 固定周期调度器中的有序函数列表 | P0 |
|
||||||
|
| 全部逻辑、数学、滤波、PID、计数器和测试组件 | `.comp` 转静态 WASM 组件并由 manifest 验收 | 全覆盖 |
|
||||||
|
| `sim_axis_hardware`、`sim_spindle`、`sim_encoder` | 直接作为虚拟设备模型 | P0 |
|
||||||
|
| 探针、限位、回零、换刀 | 可脚本化虚拟 I/O,状态可录制 | P0 |
|
||||||
|
| 主轴加减速、定向、齿轮/同步 | 虚拟主轴模型 + TP 事件 + 故障注入 | 全覆盖 |
|
||||||
|
| ClassicLadder | 完整解析/执行;UI 用 Web 梯形图视图 | 全覆盖 |
|
||||||
|
| 用户 `.comp` | 构建期组件 ABI 和 manifest;无宿主动态库 | 全覆盖 |
|
||||||
|
| 真实 HAL 驱动 | 不编译、不模拟具体设备协议;仅识别配置并返回 `real_hardware_excluded` | 排除 |
|
||||||
|
| HAL scope/示波器 | Worker 采样环 + Web 图表 + 触发/回放 | 全覆盖 |
|
||||||
|
|
||||||
|
### 6.5 Task、IO、状态和消息
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| emctask 状态机 | `sim_task` 单进程状态机 | P0 |
|
||||||
|
| emcIO/tooldata | 内存服务 + OPFS 工具表 | P0 |
|
||||||
|
| NML command/status/error | Worker 内命令/状态/事件总线;保留消息语义 | P0 |
|
||||||
|
| 共享内存 | 进程内结构体;UI 使用快照,不暴露指针 | P0 |
|
||||||
|
| 信号、日志、报警 | 事件 schema + OPFS 滚动日志 | P0 |
|
||||||
|
| `fork/exec/system` | 虚拟 M-code 白名单 | 不适用/受限 |
|
||||||
|
| 退出、复位、急停 | 明确定义状态转换和恢复点 | P0 |
|
||||||
|
|
||||||
|
### 6.6 用户界面和可视化
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| AXIS | Web 主界面:程序、状态、预览、控制和报警 | P0 |
|
||||||
|
| Gmoccapy/Touchy | 响应式触控布局和可配置面板 | 全覆盖 |
|
||||||
|
| QtVCP/GladeVCP/PyVCP | Web Component + JSON schema + Python 回调桥;不解析桌面窗口 | 全覆盖 |
|
||||||
|
| Gremlin/路径预览 | Three.js 轨迹和坐标可视化 | P0 |
|
||||||
|
| 机床模型/刀具/毛坯 | glTF + Three.js/WebGPU;切削层独立于运动核心 | 全覆盖 |
|
||||||
|
| HALShow/HALScope | Web pin 图和波形查看器 | 全覆盖 |
|
||||||
|
| 仿真配置编辑器 | Web 编辑器生成仿真 JSON/INI/HAL;Stepconf/Pncconf 的真实硬件配置部分排除 | 全覆盖 |
|
||||||
|
| 国际化、主题、快捷键 | TypeScript UI 层实现 | 全覆盖 |
|
||||||
|
|
||||||
|
### 6.7 宿主和实时相关能力
|
||||||
|
|
||||||
|
| LinuxCNC 能力 | Web/WASM 路线 | 初始状态 |
|
||||||
|
|---|---|---|
|
||||||
|
| PREEMPT_RT/RTAI/Xenomai | 不移植;用确定性逻辑时钟代替 | 不适用 |
|
||||||
|
| Linux pthread/优先级/CPU 绑定 | 用确定性 Worker 调度等价;可选 pthread 只做性能优化 | 仿真等价 |
|
||||||
|
| `mmap`、PCI、`ioctl`、`/proc` | 虚拟内存/诊断对象;不访问宿主 | 不适用 |
|
||||||
|
| 动态库 `dlopen` | 构建期静态链接或组件注册表 | 受限 |
|
||||||
|
| gettext/locale | 编译资源 + Web i18n;数值解析保持 LinuxCNC 规则 | 全覆盖 |
|
||||||
|
| OpenGL 桌面上下文 | Three.js WebGL/WebGPU | 等价实现 |
|
||||||
|
|
||||||
|
## 7. 代码组织和构建
|
||||||
|
|
||||||
|
建议不改动 LinuxCNC 原生构建,在仓库根增加独立目标:
|
||||||
|
|
||||||
|
```text
|
||||||
|
wasm-core/
|
||||||
|
include/sim_api.h
|
||||||
|
src/core/sim_engine.cc
|
||||||
|
src/core/sim_task.cc
|
||||||
|
src/core/sim_motion.cc
|
||||||
|
src/core/sim_scheduler.cc
|
||||||
|
src/core/sim_hal.cc
|
||||||
|
src/core/sim_io.cc
|
||||||
|
src/core/sim_nml.cc
|
||||||
|
src/core/sim_fs.cc
|
||||||
|
src/compat/ # 对 LinuxCNC 源码的最小补丁/适配
|
||||||
|
CMakeLists.txt
|
||||||
|
web/
|
||||||
|
src/protocol/ # 版本化命令、事件、快照、错误和能力 schema
|
||||||
|
src/client/WorkerClient.ts # 握手、序列、超时、取消、重试和对账
|
||||||
|
src/workers/sim.worker.ts
|
||||||
|
src/workers/ProtocolGateway.ts
|
||||||
|
src/workers/TaskLedger.ts
|
||||||
|
src/workers/SnapshotPublisher.ts
|
||||||
|
src/engine/WasmEngine.ts # C ABI 内存所有权和错误映射
|
||||||
|
src/state/ # session/program/motion/HAL/IO/recovery stores
|
||||||
|
src/workspace/OpfsWorkspace.ts
|
||||||
|
src/viewer/ # Three.js 机床、轨迹、坐标和毛坯
|
||||||
|
src/ui/ # 控制台、程序、HAL、PLC、工具和配置工作流
|
||||||
|
tests/
|
||||||
|
golden/ # 原生 LinuxCNC 参考快照
|
||||||
|
wasm/ # WASM 结果
|
||||||
|
protocol/ # C/TS round-trip、schema、幂等和背压
|
||||||
|
browser/ # Playwright + OPFS + 离线/恢复/视觉场景
|
||||||
|
scripts/
|
||||||
|
build-wasm.sh
|
||||||
|
generate-compat-matrix.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
推荐 Emscripten/CMake 配置:
|
||||||
|
|
||||||
|
```text
|
||||||
|
emcmake cmake -S wasm-core -B build-wasm -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build build-wasm
|
||||||
|
```
|
||||||
|
|
||||||
|
模块输出使用 `MODULARIZE=1`、`EXPORT_ES6=1`、`ENVIRONMENT=web,worker`。OPFS 同步句柄位于专用 Worker,因此不能依赖 `PROXY_TO_WORKER` 这类把入口转发到不兼容文件系统路径的模式;OPFS/WasmFS 组合要单独做浏览器测试。WasmFS 在 Emscripten 中仍不是旧 JS FS 的完全替代,必须固定版本并锁定实际使用的 API。
|
||||||
|
|
||||||
|
第一版默认单线程构建;若启用 pthread/共享 WASM 内存,需要 HTTPS、`Cross-Origin-Opener-Policy: same-origin` 和 `Cross-Origin-Embedder-Policy: require-corp`/`credentialless`。OPFS 本身不要求线程,但共享内存和高精度计时器需要跨源隔离。[Emscripten Pthreads](https://emscripten.org/docs/porting/pthreads.html)、[MDN SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer)
|
||||||
|
|
||||||
|
## 8. 测试和一致性验证
|
||||||
|
|
||||||
|
### 8.1 参考基线
|
||||||
|
|
||||||
|
对同一个工程和 G-code,原生 LinuxCNC 与 WASM 分别输出:
|
||||||
|
|
||||||
|
- 解释器状态和当前行
|
||||||
|
- canonical motion 命令
|
||||||
|
- 每周期位置、速度、加速度和跟随误差
|
||||||
|
- 模态、坐标系、刀具、参数和变量
|
||||||
|
- HAL pin/signal/parameter 快照
|
||||||
|
- 报警、错误、消息和退出状态
|
||||||
|
|
||||||
|
测试结果保存为带版本的 JSONL/二进制 golden 文件,差异报告按功能域和首个 divergent tick 定位。
|
||||||
|
|
||||||
|
### 8.2 测试层级
|
||||||
|
|
||||||
|
1. **原生核心单测**:复用 `unit_tests/interp`、`unit_tests/tp`,补充边界、NaN、单位和浮点容差。
|
||||||
|
2. **WASM ABI 测试**:创建/加载/命令/周期/快照/快照恢复/错误码。
|
||||||
|
3. **功能对表测试**:覆盖 `configs/sim` 中的仿真 INI/HAL/G-code 样本,逐项登记兼容状态。
|
||||||
|
4. **确定性测试**:相同输入运行 1x、快速、暂停恢复、单步后结果一致。
|
||||||
|
5. **OPFS 测试**:首次创建、断电/异常中止模拟、事务恢复、配额不足、版本迁移、并发打开和句柄关闭。
|
||||||
|
6. **浏览器 E2E**:Playwright 测试 Worker、刷新恢复、离线 PWA、导入导出和 WebGL 画面。
|
||||||
|
7. **性能测试**:程序行数、HAL 组件数量、周期耗时、Worker 延迟、快照吞吐和 OPFS 写入。
|
||||||
|
8. **任务接续测试**:请求超时、回答传输中断、工具结果丢失、重复响应、Worker 重启和任务账本恢复;验证已确认步骤不重复、未确认步骤不跳过。
|
||||||
|
|
||||||
|
### 8.3 验收门槛
|
||||||
|
|
||||||
|
- 交付过程必须遵循[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)的 context lock、固定大小上下文包、断网恢复和 G0-G5 门禁;门禁证据作为本路线验收附件。
|
||||||
|
- [仿真全功能覆盖矩阵](linuxcnc-web-wasm-simulation-coverage.md) 中所有 `SIM-*`、`WEB-EQUIV`、`PY-WASM` 条目均有实现、自动测试和差异报告,覆盖率 100%。
|
||||||
|
- 来源扫描与 manifest 闭包无孤儿项;每个条目覆盖正常、边界、错误、暂停/恢复、持久化/离线和适用交互维度。
|
||||||
|
- 每个仿真配置、导出符号、HAL 组件、G/M/O/Python/API 和 Web 工作流均能追溯到实现、测试和 oracle;未登记或无法对照的功能阻止发布。
|
||||||
|
- 原生/WASM 终点和轨迹误差在定义的机床单位容差内,默认目标 `1e-6`,特殊算法单独声明。
|
||||||
|
- 强制刷新后最近一次已提交工程和快照可恢复;未提交事务不产生半文件。
|
||||||
|
- OPFS 配额不足时不丢失已提交版本,并显示可操作错误。
|
||||||
|
- 请求或工具失败后,任务可从最近已验证步骤继续;同一 `operation_id` 不产生重复副作用,无法对账时保留证据并进入明确阻断状态。
|
||||||
|
- 主线程在普通 3 轴场景保持可用,WASM 计算不阻塞 UI。
|
||||||
|
- 所有真实硬件排除项均返回 `real_hardware_excluded`;仿真配置依赖的通用虚拟主轴、编码器、探针、限位和 I/O 必须可用。真实 Modbus、GPIO、Mesa 或 VFD 协议不属于仿真覆盖范围。
|
||||||
|
|
||||||
|
## 9. 分阶段实施路线
|
||||||
|
|
||||||
|
本节的阶段 A-E 映射到执行策略中的 M0-M5;阶段退出条件、任务边界和返工规则以[项目执行与交付策略](linuxcnc-web-wasm-execution-strategy.md)第 4、6、7 节为准。
|
||||||
|
|
||||||
|
### 阶段 A:全量清单和运行时骨架
|
||||||
|
|
||||||
|
- 固定 LinuxCNC 版本和编译补丁清单。
|
||||||
|
- 生成覆盖 manifest,锁定所有文档、源码、仿真配置和测试输入。
|
||||||
|
- 建立单 Worker、固定 tick、OPFS journal、快照、版本化 ABI 和 Python/WASM 运行时。
|
||||||
|
- 建立原生 LinuxCNC 参考运行器和全量 golden 产物格式。
|
||||||
|
|
||||||
|
### 阶段 B:核心解释和运动全覆盖
|
||||||
|
|
||||||
|
- 移植全部 G/M/O、remap、参数、坐标系、补偿、TP、motion 和全部内置 kinematics。
|
||||||
|
- 完成 mill、lathe、gantry、robot、delta、pentapod、foam、plasma、laser 和 probe 虚拟机床模型。
|
||||||
|
|
||||||
|
### 阶段 C:HAL、PLC、IO 和虚拟机床部件
|
||||||
|
|
||||||
|
- 生成并编译全部 HAL 组件 manifest。
|
||||||
|
- 完成 ClassicLadder、虚拟寄存器、主轴/换刀/探针/编码器/stepgen/限位/故障模型。
|
||||||
|
- 完成 halcmd、haltcl、halui、HALScope、HALShow、Python HAL API。
|
||||||
|
|
||||||
|
### 阶段 D:全部 Web UI 和配置工具
|
||||||
|
|
||||||
|
- 完成 AXIS、Gmoccapy、Touchy、Gscreen、QtVCP、QtDragon、QtPlasmaC、VCP、Vismach、NGCGUI 等仿真操作能力的 Web 等价工作流,以及独立仿真配置编辑器。
|
||||||
|
- 完成工程导入导出、离线、国际化、主题和插件权限。
|
||||||
|
|
||||||
|
### 阶段 E:全量回归和发布
|
||||||
|
|
||||||
|
- 跑通全部 `configs/sim`、`tests`、`unit_tests`、golden 和浏览器矩阵。
|
||||||
|
- 生成版本化差异报告、兼容报告、许可证清单和工程迁移工具。
|
||||||
|
|
||||||
|
## 10. 主要风险与决策
|
||||||
|
|
||||||
|
| 风险 | 影响 | 决策/缓解 |
|
||||||
|
|---|---|---|
|
||||||
|
| LinuxCNC 代码含 Python、动态库和 Linux API | 无法直接链接 | 核心/兼容层分离;Pyodide 提供仿真必需 Python,宿主能力替换为虚拟 API |
|
||||||
|
| 浏览器不提供硬实时 | 运动结果不可依赖墙钟 | 固定 tick、批量 step、确定性回放 |
|
||||||
|
| OPFS 有配额和淘汰 | 用户数据可能不可用 | journal、版本保留、配额提示、导出备份、可选 persist |
|
||||||
|
| WasmFS/OPFS API 版本差异 | 构建或运行时回归 | 锁定 Emscripten 版本,封装适配器,浏览器矩阵测试 |
|
||||||
|
| 全量 HAL/组件工作量大 | 项目周期失控 | manifest 驱动、自动生成组件适配层和全量配置/测试回归 |
|
||||||
|
| 浮点和算法差异 | 原生/WASM 轨迹不一致 | 固定编译选项、黄金快照、定义逐算法容差 |
|
||||||
|
| 浏览器清理存储 | 工程丢失 | OPFS 不是唯一备份,提供工程包导出和恢复检查 |
|
||||||
|
|
||||||
|
## 11. 第一批可执行任务
|
||||||
|
|
||||||
|
1. 增加 `wasm-core` 最小 CMake 工程,先只编译 posemath、TP 和解释器依赖的最小源集。
|
||||||
|
2. 定义 `sim_api.h`、命令/事件/快照 schema 和错误码。
|
||||||
|
3. 由 `configs/sim/**`、`tests/**`、`unit_tests/**` 和文档/源码 G/M/O、HAL、Python、API 清单生成全量 manifest 和 golden 集;不以抽样集代替来源、维度或交互覆盖。
|
||||||
|
4. 实现 Worker 内 `WorkspaceRuntime`:OPFS 目录初始化、句柄池、journal、恢复和配额查询。
|
||||||
|
5. 实现 `sim_step()` 固定周期和 `sim_read_snapshot()`。
|
||||||
|
6. 建立原生 LinuxCNC 参考运行器,自动生成 canonical/状态 golden 文件。
|
||||||
|
7. 完成第一个浏览器 E2E:加载样例、运行、暂停、刷新、恢复、导出工程。
|
||||||
|
8. 按[前端与通信详细设计](linuxcnc-web-wasm-frontend-communication-design.md)完成 COM-01/COM-02 和 FE-01/FE-02,冻结 `protocol.v1`、能力模型、错误码、WorkerClient 和 TaskLedger 最小闭环。
|
||||||
|
|
||||||
|
## 12. 结论
|
||||||
|
|
||||||
|
纯 Web/WASM 仿真版本应把 LinuxCNC 看作“运动和解释行为的参考实现”,把 Linux 进程、实时内核、共享内存、文件系统、HAL 组件和桌面 UI 分别替换为浏览器内等价运行时。OPFS 负责长期工程数据和恢复,不直接承担每个仿真周期的随机写入;Worker 内的同步工作区负责 LinuxCNC 兼容文件语义;固定逻辑时钟负责可重复运动。
|
||||||
|
|
||||||
|
按本路线实施,交付顺序从运行时骨架、核心运动、HAL/数字孪生到 Web UI,但最终验收对象始终是覆盖矩阵中的全部仿真功能。三轴只是最早的垂直切片,不是产品能力边界;发布前必须完成完整仿真覆盖和真实硬件排除校验。
|
||||||
1
linuxcnc
Submodule
1
linuxcnc
Submodule
Submodule linuxcnc added at 239dcf4284
380
nextTask.md
Normal file
380
nextTask.md
Normal file
@@ -0,0 +1,380 @@
|
|||||||
|
# LinuxCNC Web/WASM 任务接续入口
|
||||||
|
|
||||||
|
**用途**:恢复工作时唯一的任务指针,固定“从哪个节点开始”和“完成后进入哪个节点”
|
||||||
|
**更新时间**:2026-08-20
|
||||||
|
**Context ID**:`linuxcnc-2.10.0-pre0-wasm-m0-c1`
|
||||||
|
**当前里程碑**:M0 基线锁定
|
||||||
|
**里程碑状态**:进行中,尚未通过 M0 退出门禁
|
||||||
|
|
||||||
|
> 每次开始工作先读本文件。不要根据聊天记录、目录数量或演示结果推测当前任务。专项范围以文档为准,任务位置以本文件为准。
|
||||||
|
|
||||||
|
## 1. 接续记录
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
handoff_version: 1
|
||||||
|
context_id: linuxcnc-2.10.0-pre0-wasm-m0-c1
|
||||||
|
milestone: M0
|
||||||
|
last_verified_checkpoint: M1-RT-02-r01
|
||||||
|
current_task:
|
||||||
|
id: M2-CORE-01
|
||||||
|
status: ready
|
||||||
|
title: posemath/TP 原生核心接入
|
||||||
|
owner: WS-0
|
||||||
|
profile: feature
|
||||||
|
next_task:
|
||||||
|
id: M2-CORE-02
|
||||||
|
status: pending
|
||||||
|
title: rs274ngc interpreter slice
|
||||||
|
owner: WS-0
|
||||||
|
profile: feature
|
||||||
|
```
|
||||||
|
|
||||||
|
`BOOTSTRAP-M0-01` 只表示以下前置产物已验证,不表示 M0 完成:
|
||||||
|
|
||||||
|
- `context-lock.json` 已锁定 LinuxCNC 提交和当前工具链。
|
||||||
|
- `coverage/source-index.jsonl` 与 `coverage/manifest.jsonl` 已生成 8,014 个文件级种子条目。
|
||||||
|
- `wasm-core` bootstrap ABI 可生成 WASM,宿主 ABI 单测通过。
|
||||||
|
- 基线、下载索引和上下文包测试通过。
|
||||||
|
|
||||||
|
文档能力、源码符号、配置资源、测试入口、规范化关联键、依赖闭包、原生 runner 契约、Worker 最小协议、事件回放、workspace journal、错误/能力映射、Python runtime 边界和 HAL 周期组件边界已完成;M0 仍缺少影响图,M2 从 posemath/TP 原生核心接入开始。因此当前任务从 `M2-CORE-01` 继续,不能把 bootstrap 当成 M2 完成功能。
|
||||||
|
|
||||||
|
## 2. 开始工作时的读取顺序
|
||||||
|
|
||||||
|
1. 本文件:确认 `context_id`、`current_task.id`、状态和最近验证点。
|
||||||
|
2. [`context-lock.json`](context-lock.json):确认源码提交、索引哈希、schema 和工具链没有漂移。
|
||||||
|
3. [`docs/linuxcnc-web-wasm-context-governance.md`](docs/linuxcnc-web-wasm-context-governance.md):读取当前任务行、最小任务契约和上下文预算。
|
||||||
|
4. [`docs/linuxcnc-web-wasm-implementation-readiness.md`](docs/linuxcnc-web-wasm-implementation-readiness.md):读取完整性定义、M0/M1 退出条件和实施顺序。
|
||||||
|
5. [`docs/linuxcnc-web-wasm-source-map.md`](docs/linuxcnc-web-wasm-source-map.md):只读取当前任务涉及的来源规则。
|
||||||
|
|
||||||
|
开始修改前运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
```
|
||||||
|
|
||||||
|
任一命令失败时先修复或建立新的 context lock,不开始当前节点。
|
||||||
|
|
||||||
|
## 3. 当前任务:M2-CORE-01
|
||||||
|
|
||||||
|
**目标**:接入 LinuxCNC posemath 与 TP 的可移植原生核心切片,固定浮点、状态和 golden 对照入口。
|
||||||
|
|
||||||
|
**直接输入**:
|
||||||
|
|
||||||
|
- `linuxcnc/src/libnml/posemath/**`
|
||||||
|
- `linuxcnc/src/emc/tp/**`
|
||||||
|
- `linuxcnc/unit_tests/tp/**`
|
||||||
|
- `context-lock.json`
|
||||||
|
|
||||||
|
**必须产出**:
|
||||||
|
|
||||||
|
- `wasm-core/include/sim_posemath.h`
|
||||||
|
- `wasm-core/src/sim_posemath.c`
|
||||||
|
- `wasm-core/tests/sim_posemath_test.c`
|
||||||
|
- `coverage/posemath-runtime.report.json`
|
||||||
|
- 生成数量、输入摘要和输出 SHA-256
|
||||||
|
|
||||||
|
posemath/TP 切片必须固定 IEEE-754 浮点编译选项、输入 NaN/Inf/退化几何错误、单位与姿态序列化;原生参考结果和 WASM 结果通过相同 golden 字段与容差比较。
|
||||||
|
|
||||||
|
**非目标**:
|
||||||
|
|
||||||
|
- 不接入 Pyodide、全量 LinuxCNC 核心或 UI;这些在后续 M1/M2/M4 节点实施。
|
||||||
|
- 不把文档标题直接标记为 `accepted`。
|
||||||
|
- 不接入 rs274ngc、TP、全量 LinuxCNC HAL 组件或 UI 工作流。
|
||||||
|
|
||||||
|
**完成条件**:
|
||||||
|
|
||||||
|
1. 相同输入连续生成两次,输出字节完全一致。
|
||||||
|
2. 相同 pose/segment 输入连续运行产生相同 canonical JSON 和状态哈希。
|
||||||
|
3. NaN/Inf、退化 segment、越界速度和未知运动类型都有明确阻断结果。
|
||||||
|
4. 生成器和失败路径有自动测试。
|
||||||
|
5. `context-lock.json` 登记新索引的数量和 SHA-256;基线校验器验证该摘要。
|
||||||
|
6. 本文件按第 5 节完成节点切换。
|
||||||
|
|
||||||
|
建议验收命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake --build build-native
|
||||||
|
ctest --test-dir build-native --output-on-failure
|
||||||
|
python3 scripts/test_posemath_runtime.py -v
|
||||||
|
python3 scripts/test_protocol.py -v
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
sha256sum coverage/test-entries.jsonl
|
||||||
|
```
|
||||||
|
|
||||||
|
**回滚点**:删除本任务新增的生成器、测试和能力索引,恢复开始任务前的 `context-lock.json` 与本文件;不得改写已有 source index 和 manifest 种子来掩盖失败。
|
||||||
|
|
||||||
|
## 4. 下一个任务:M2-CORE-02
|
||||||
|
|
||||||
|
**进入条件**:`M2-CORE-01` 的全部完成条件通过,并在本文件记录验证命令、结果和产物哈希。
|
||||||
|
|
||||||
|
**目标**:rs274ngc interpreter slice。
|
||||||
|
|
||||||
|
**预期产出**:
|
||||||
|
|
||||||
|
- `linuxcnc/src/emc/rs274ngc/**`
|
||||||
|
- `linuxcnc/unit_tests/interp/**`
|
||||||
|
- `wasm-core/src/sim_interpreter.c`
|
||||||
|
|
||||||
|
**完成后候选节点**:`M2-CORE-03`(canonical/motion queue)。
|
||||||
|
|
||||||
|
## 5. 节点切换规则
|
||||||
|
|
||||||
|
当前任务完成后,必须在同一个变更中更新本文件:
|
||||||
|
|
||||||
|
1. 把 `last_verified_checkpoint` 更新为已完成任务 ID 和修订号,例如 `INV-01a-r01`。
|
||||||
|
2. 在“已验证证据”中追加日期、精确命令、结果、产物路径、字节数和 SHA-256。
|
||||||
|
3. 将原 `next_task` 原样提升为新的 `current_task`,状态改为 `ready`。
|
||||||
|
4. 从 [`docs/linuxcnc-web-wasm-context-governance.md`](docs/linuxcnc-web-wasm-context-governance.md) 选择它的直接后继作为新的 `next_task`;不能跨过未完成依赖。
|
||||||
|
5. 更新 `context-lock.json` 中受影响索引的哈希;如源码、工具链或 schema 改变,创建新 `context_id`,不能覆盖原基线含义。
|
||||||
|
6. 重新运行第 2 节的基线命令。失败时不切换节点。
|
||||||
|
|
||||||
|
同一时刻只能有一个 `current_task`。`next_task` 不得提前标为 `in_progress`,并行工作必须在独立任务包中登记,不能修改本文件的主接续链。
|
||||||
|
|
||||||
|
## 6. 已验证证据
|
||||||
|
|
||||||
|
### BOOTSTRAP-M0-01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
24 tests passed
|
||||||
|
scripts/build-wasm.sh
|
||||||
|
WASM module generated; native sim_api_test 1/1 passed
|
||||||
|
```
|
||||||
|
|
||||||
|
关键产物:
|
||||||
|
|
||||||
|
- `coverage/source-index.jsonl`:7,992 行,SHA-256 `b7d12bf83ca238db889dcaa00c6d157203b6e1bb0f4d33ae0e4fa8cc2e2e8288`
|
||||||
|
- `coverage/manifest.jsonl`:7,992 行,SHA-256 `dd90d52665725547a368b11779b180d06d416fe1b4f6695b6a120c76a81061cd`
|
||||||
|
- `build-wasm/linuxcnc-sim-core.js` 和 `.wasm`:可重建产物,不进入源码基线
|
||||||
|
|
||||||
|
### INV-01a-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/generate_document_capabilities.py
|
||||||
|
document_capabilities=2868
|
||||||
|
python3 scripts/test_document_capabilities.py -v
|
||||||
|
4 tests passed
|
||||||
|
连续生成两次
|
||||||
|
SHA-256 完全一致
|
||||||
|
```
|
||||||
|
|
||||||
|
- `coverage/document-capabilities.jsonl`:2,868 行,1,286,866 字节,SHA-256 `adf5e8ffda82ac872dbd8246c4359ac94d2cab5cb11500d4663459bf1d03c787`
|
||||||
|
- 报告保留 2 个缺失的生成型 include 和 1 个空文档;没有重复 ID。
|
||||||
|
|
||||||
|
### INV-01b-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/generate_source_symbols.py
|
||||||
|
source_symbols=23983
|
||||||
|
python3 scripts/test_source_symbols.py -v
|
||||||
|
3 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `coverage/source-symbols.jsonl`:23,983 行,SHA-256 `5fc72e6a268d2220b6335f7f6834c925f13c5c35461fa399a400e6621958875a`
|
||||||
|
- 覆盖 C/C++、Python 和 HAL `.comp` 声明;解析失败和无符号文件保留在报告中。
|
||||||
|
|
||||||
|
### INV-01c-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/generate_config_resources.py
|
||||||
|
config_resources=16093
|
||||||
|
python3 scripts/test_config_resources.py -v
|
||||||
|
3 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- 覆盖 233 个仿真 INI 入口,生成 16,093 条资源边。
|
||||||
|
- `coverage/config-resources.jsonl` SHA-256 `d4d02cb13f2f9cb58404630d4de8ac0226e02075166fe30f2b03a6abca4be5bc`
|
||||||
|
- 报告保留 997 个 missing 引用和 91 个 unresolved/宿主变量路径。
|
||||||
|
|
||||||
|
### INV-01d-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/generate_test_entries.py
|
||||||
|
test_entries=321 sha256=86449838257a7aab7c9219e641a14d4493208b35d8c0cc092d1fa149352c7c37
|
||||||
|
python3 scripts/test_test_entries.py -v
|
||||||
|
3 tests passed
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
24 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `coverage/test-entries.jsonl`:321 条,SHA-256 `86449838257a7aab7c9219e641a14d4493208b35d8c0cc092d1fa149352c7c37`
|
||||||
|
- `coverage/test-entries.report.json`:214 shell、86 oracle、12 stream、1 Python、3 Meson build、5 unit source;24 条 `REAL-EXCLUDED`、65 条 `needs_review`。
|
||||||
|
- 所有入口 ID 唯一,连续生成输出字节一致;硬件/实时依赖未被删除或伪装成可移植。
|
||||||
|
|
||||||
|
### INV-02a-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/normalize_sources.py
|
||||||
|
normalized_sources=51257 sha256=b377df306f47d84b6cb42509c061c7ce8848c675b32899ab0004fe36a7df35ff
|
||||||
|
python3 scripts/test_normalize_sources.py -v
|
||||||
|
3 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `coverage/normalized-sources.jsonl`:51,257 条,SHA-256 `64892fb51228f856c15fe31a55a5a619809013aa5db7325ad8dac390c5205edd`
|
||||||
|
- `coverage/normalized-sources.report.json`:51,257 个唯一规范化 ID;3 个重复原始资源 ID 以 `~dupN` 保留,0 个哈希冲突,0 个非预期缺失路径。
|
||||||
|
|
||||||
|
### INV-02a-r02(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/generate_source_inventory.py
|
||||||
|
source_index=8003 manifest_seed=8003
|
||||||
|
python3 scripts/normalize_sources.py
|
||||||
|
normalized_sources=51268 sha256=a9bb2d50952c52b3f3d1bd50e7dc7654cb3831f28ff8147d9c1fc493ebbe80cb
|
||||||
|
```
|
||||||
|
|
||||||
|
- 新增 `wasm-core/**` 与 `web/**` 实现文件已登记;`coverage/normalized-sources.jsonl` 当前为 51,268 条。
|
||||||
|
|
||||||
|
### INV-02b-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/generate_dependency_closure.py
|
||||||
|
dependency_edges=37160 sha256=39ab6b831f4eb53347dbb509855ca05bc557e25abc5d76837c45ce037a3e44a9
|
||||||
|
python3 scripts/test_dependency_closure.py -v
|
||||||
|
3 tests passed
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
30 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `coverage/dependency-closure.jsonl`:37,160 条边,SHA-256 `39ab6b831f4eb53347dbb509855ca05bc557e25abc5d76837c45ce037a3e44a9`
|
||||||
|
- 报告:35,685 条已解析、1,475 条明确 unresolved/missing、74 条重复边、28,897 个无连接孤儿节点;未删除任何缺失引用。
|
||||||
|
|
||||||
|
### INV-03a-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
python3 scripts/native_runner.py --self-test
|
||||||
|
native_runner=self-test status=passed
|
||||||
|
python3 scripts/test_native_runner.py -v
|
||||||
|
3 tests passed
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
33 tests passed
|
||||||
|
bash scripts/build-wasm.sh
|
||||||
|
WASM module generated; native sim_api_test 1/1 passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `scripts/native_runner.py`:固定 `PATH/HOME/LANG/TZ/PYTHONHASHSEED`,固定 cwd,输出退出码、输出摘要、artifact 哈希和严格 oracle 状态。
|
||||||
|
- `coverage/golden-schema.json` SHA-256 `5513535b9480d7100ef3ef59ac933c4040bd7198dc419693a7ee68098171c423`
|
||||||
|
- `coverage/native-runner.report.json` SHA-256 `6f2105f154d12b99f4e1cd4af3cdb5df4a462f3665f1447d5959384be5d4fae2`
|
||||||
|
- `REAL-EXCLUDED` 和 `needs_review` 默认阻断;缺失/错误 golden 不会被当作通过。
|
||||||
|
|
||||||
|
### M1-CORE-01-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
bash scripts/build-wasm.sh
|
||||||
|
WASM module generated; native sim_api_test 1/1 and sim_protocol_test 1/1 passed
|
||||||
|
python3 scripts/test_protocol.py -v
|
||||||
|
5 tests passed
|
||||||
|
node web/worker/test_sim_session.mjs
|
||||||
|
sim_session=passed
|
||||||
|
node web/worker/test_wasm_session.mjs
|
||||||
|
wasm_session=passed tick=11
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
38 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `wasm-core/include/sim_protocol.h` / `sim_protocol.c`:schema 1、严格递增 seq、非递减 tick、生命周期状态机和 side-effect `operation_id` 校验。
|
||||||
|
- `web/worker/sim-session.mjs` / `sim-worker.mjs`:HELLO/CAPABILITIES、SESSION_ATTACH/READY、LOAD_WORKSPACE、SIM_STEP、SNAPSHOT_REQUEST、DESTROY envelope;默认拒绝上下文/序列/路径错误。
|
||||||
|
- WASM 导出新增 `_sim_protocol_*`、`_malloc`/`_free`;真实模块 Node smoke 验证固定 tick 与错误缺号。
|
||||||
|
|
||||||
|
### M1-CORE-02-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
bash scripts/build-wasm.sh
|
||||||
|
WASM module generated; native sim_api_test 1/1, sim_protocol_test 1/1, sim_event_test 1/1 passed
|
||||||
|
ctest --test-dir build-native --output-on-failure
|
||||||
|
3 tests passed
|
||||||
|
node web/worker/test_replay.mjs
|
||||||
|
replay=passed cursor=3 tick=9
|
||||||
|
node web/worker/test_wasm_session.mjs
|
||||||
|
wasm_session=passed tick=11
|
||||||
|
python3 scripts/test_protocol.py -v
|
||||||
|
6 tests passed
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
39 tests passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `wasm-core/include/sim_event.h` / `sim_event.c`:固定 256 条事件容量、严格 seq/tick、FNV-1a payload hash、容量查询、导出/导入和损坏长度拒绝。
|
||||||
|
- `web/worker/replay.mjs`:`event-log.v1`、`snapshot.v1`、base snapshot 链、内容哈希和终点回放校验;缺号、错误基线和篡改快照均阻断。
|
||||||
|
- `coverage/source-index.jsonl`:8,008 行,SHA-256 `59c6b71419a56cee47337946f5089314d172cecac725db7632636d9dc2f05fa1`
|
||||||
|
- `coverage/manifest.jsonl`:8,008 行,SHA-256 `780fc1d9260b1fbd4f946fc93c106b3c50df9b5ce065a50d40bcf9405fba0aeb`
|
||||||
|
- `coverage/document-capabilities.jsonl`:2,868 行,SHA-256 `fa5140bd4995224406381e4190e76bf81f64bd24dbf93a2fd10421c45aee4316`
|
||||||
|
- `coverage/normalized-sources.jsonl`:51,273 行,SHA-256 `4dd3c0b3adfb4e71db899213f35b084a0d8d0d71a6f6caafbd7a434abcf174ed`
|
||||||
|
|
||||||
|
### M1-FS-01-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
node web/workspace/test_recovery.mjs
|
||||||
|
workspace_recovery=passed commit=1
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
39 tests passed
|
||||||
|
bash scripts/build-wasm.sh
|
||||||
|
WASM module generated; native sim_api_test 1/1, sim_protocol_test 1/1, sim_event_test 1/1 passed
|
||||||
|
node web/worker/test_replay.mjs
|
||||||
|
replay=passed cursor=3 tick=9
|
||||||
|
node web/worker/test_wasm_session.mjs
|
||||||
|
wasm_session=passed tick=11
|
||||||
|
```
|
||||||
|
|
||||||
|
- `web/workspace/journal.mjs` / `recovery.mjs`:`prepare/commit/abort` append-only records、规范化路径、data/content hash、半提交忽略、损坏 commit 阻断和恢复状态 hash。
|
||||||
|
- `coverage/workspace-recovery.report.json` SHA-256 `88dd1d851d487730edc6beb034a934ba1c19346312ed3cd4d4893c7259c431de`
|
||||||
|
- `coverage/source-index.jsonl` 当前 8,011 行;`coverage/normalized-sources.jsonl` 当前 51,276 行,哈希已登记在 context lock。
|
||||||
|
|
||||||
|
### M1-RT-01-r01(2026-08-20)
|
||||||
|
|
||||||
|
```text
|
||||||
|
node web/worker/test_runtime_mapping.mjs
|
||||||
|
runtime_mapping=passed errors=18 exclusions=3
|
||||||
|
python3 scripts/validate_baseline.py
|
||||||
|
baseline=valid
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
download_index=valid
|
||||||
|
python3 -m unittest discover -s scripts -p 'test_*.py' -v
|
||||||
|
39 tests passed
|
||||||
|
bash scripts/build-wasm.sh
|
||||||
|
WASM module generated; native sim_api_test 1/1, sim_protocol_test 1/1, sim_event_test 1/1 passed
|
||||||
|
```
|
||||||
|
|
||||||
|
- `web/worker/error-map.mjs`:18 个核心/协议/事件错误码统一到 code、message_key、category、retryable、operation_id、simulation_tick、source。
|
||||||
|
- `web/worker/capabilities.mjs`:10 个 limits、10 个受控命令、3 个 `REAL-EXCLUDED` 替代策略;未知项和超限值 fail-closed。
|
||||||
|
- `coverage/runtime-mapping.report.json` SHA-256 `f4be10828fda8201ff9e69de95bc68e5def42fc7206a851b37474c21b4da0a17`
|
||||||
|
|
||||||
|
## 7. 停止条件
|
||||||
|
|
||||||
|
出现以下任一情况时停止当前任务并记录阻断,不自行跳到下一个节点:
|
||||||
|
|
||||||
|
- `linuxcnc` 提交不再是 context lock 中的提交。
|
||||||
|
- 当前任务需要修改 ABI、协议或 manifest schema,但没有迁移方案。
|
||||||
|
- 必需输入缺失、索引无法确定性生成或来源存在无法解释的孤儿项。
|
||||||
|
- 为完成文档索引需要同时实现运行时功能。
|
||||||
|
- 验证失败只能通过删除样本、降低检查或标记 `REAL-EXCLUDED` 才能通过。
|
||||||
|
|
||||||
|
本文件只保存当前节点、下一节点和最近可验证证据,不复制完整历史。更早的任务历史通过 context packet、产物路径和哈希追溯。
|
||||||
46
python-runtime/compat.mjs
Normal file
46
python-runtime/compat.mjs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import { createHash } from "node:crypto";
|
||||||
|
import manifest from "./manifest.json" with { type: "json" };
|
||||||
|
|
||||||
|
const allowedModules = new Set(Object.keys(manifest.virtual_modules));
|
||||||
|
const denied = new Set(manifest.denied_capabilities);
|
||||||
|
|
||||||
|
export function manifestHash(value = manifest) {
|
||||||
|
return `sha256:${createHash("sha256").update(JSON.stringify(value, Object.keys(value).sort())).digest("hex")}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function runtimeCapabilities() {
|
||||||
|
return {
|
||||||
|
runtime: manifest.runtime,
|
||||||
|
version: manifest.version,
|
||||||
|
python_version: manifest.python_version,
|
||||||
|
abi_version: manifest.abi_version,
|
||||||
|
platform: manifest.platform,
|
||||||
|
worker_only: manifest.worker_only,
|
||||||
|
offline_required: manifest.offline_required,
|
||||||
|
manifest_sha256: manifestHash(),
|
||||||
|
virtual_modules: structuredClone(manifest.virtual_modules),
|
||||||
|
denied_capabilities: [...manifest.denied_capabilities],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateImport(moduleName) {
|
||||||
|
if (typeof moduleName !== "string" || moduleName.length === 0) return { status: "blocked", code: "python_import_invalid", message_key: "python.import_invalid" };
|
||||||
|
if (allowedModules.has(moduleName)) return { status: "accepted", module: moduleName, symbols: [...manifest.virtual_modules[moduleName]] };
|
||||||
|
return { status: "blocked", code: "python_unsupported", message_key: "python.unsupported_module", module: moduleName, retryable: false };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateCapability(capability) {
|
||||||
|
if (denied.has(capability)) return { status: "REAL-EXCLUDED", code: "real_hardware_excluded", message_key: "python.host_capability_denied", capability, retryable: false };
|
||||||
|
if (typeof capability !== "string" || capability.length === 0) return { status: "blocked", code: "python_capability_invalid", message_key: "python.capability_invalid" };
|
||||||
|
return { status: "accepted", capability };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createVirtualEnvironment() {
|
||||||
|
return Object.freeze({
|
||||||
|
importModule: validateImport,
|
||||||
|
checkCapability: validateCapability,
|
||||||
|
capabilities: runtimeCapabilities(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export { manifest };
|
||||||
51
python-runtime/manifest.json
Normal file
51
python-runtime/manifest.json
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"schema": "python-runtime-manifest.v1",
|
||||||
|
"runtime": "Pyodide",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"python_version": "3.13.2",
|
||||||
|
"abi_version": "2025_0",
|
||||||
|
"platform": "emscripten_4_0_9",
|
||||||
|
"index_url": "https://cdn.jsdelivr.net/pyodide/v0.29.4/full/",
|
||||||
|
"origin_release": "https://github.com/pyodide/pyodide/releases/tag/0.29.4",
|
||||||
|
"worker_only": true,
|
||||||
|
"offline_required": true,
|
||||||
|
"package_policy": {
|
||||||
|
"mode": "allowlist",
|
||||||
|
"allowed_packages": [],
|
||||||
|
"reason": "LinuxCNC compatibility modules are virtual and core Python packages are not accepted until individually mapped and hashed."
|
||||||
|
},
|
||||||
|
"virtual_modules": {
|
||||||
|
"linuxcnc": ["command", "stat", "error", "ini"],
|
||||||
|
"hal": ["component", "pin", "param", "signal", "thread"],
|
||||||
|
"gstat": ["state", "task", "motion"],
|
||||||
|
"INI": ["find", "findall", "sections"]
|
||||||
|
},
|
||||||
|
"denied_capabilities": [
|
||||||
|
"os.system", "subprocess", "socket", "select", "multiprocessing", "threading",
|
||||||
|
"ctypes", "fcntl", "pty", "termios", "device_paths", "arbitrary_host_paths"
|
||||||
|
],
|
||||||
|
"artifacts": [
|
||||||
|
{
|
||||||
|
"name": "pyodide-lock.json",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"source_url": "https://cdn.jsdelivr.net/pyodide/v0.29.4/full/pyodide-lock.json",
|
||||||
|
"origin_url": "https://github.com/pyodide/pyodide/releases/tag/0.29.4",
|
||||||
|
"sha256": "14d2c2dba101277999e17135e653d8f15389ad1437f53eae213bf0c3cdff723d",
|
||||||
|
"bytes": 122027,
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"mirror_kind": "official",
|
||||||
|
"role": "package_lock"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pyodide.js",
|
||||||
|
"version": "0.29.4",
|
||||||
|
"source_url": "https://cdn.jsdelivr.net/pyodide/v0.29.4/full/pyodide.js",
|
||||||
|
"origin_url": "https://github.com/pyodide/pyodide/releases/tag/0.29.4",
|
||||||
|
"sha256": "7be9e63eddf6bd8786a5ab71c8689c35731d187e3415fe58d7cb95423b50421a",
|
||||||
|
"bytes": 18597,
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"mirror_kind": "official",
|
||||||
|
"role": "loader_metadata"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
41
python-runtime/test_runtime.mjs
Normal file
41
python-runtime/test_runtime.mjs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { createHash } from "node:crypto";
|
||||||
|
import { writeFile } from "node:fs/promises";
|
||||||
|
import { createVirtualEnvironment, manifest, manifestHash, runtimeCapabilities, validateCapability, validateImport } from "./compat.mjs";
|
||||||
|
|
||||||
|
assert.equal(manifest.schema, "python-runtime-manifest.v1");
|
||||||
|
assert.equal(manifest.runtime, "Pyodide");
|
||||||
|
assert.equal(manifest.version, "0.29.4");
|
||||||
|
assert.equal(manifest.python_version, "3.13.2");
|
||||||
|
assert.equal(manifest.abi_version, "2025_0");
|
||||||
|
assert.equal(manifest.platform, "emscripten_4_0_9");
|
||||||
|
assert.equal(manifest.artifacts.length, 2);
|
||||||
|
assert.equal(new Set(manifest.artifacts.map((artifact) => `${artifact.name}@${artifact.version}`)).size, 2);
|
||||||
|
for (const artifact of manifest.artifacts) {
|
||||||
|
assert.match(artifact.sha256, /^[0-9a-f]{64}$/);
|
||||||
|
assert.ok(artifact.bytes > 0);
|
||||||
|
assert.equal(artifact.mirror_kind, "official");
|
||||||
|
}
|
||||||
|
assert.equal(validateImport("linuxcnc").status, "accepted");
|
||||||
|
assert.equal(validateImport("os").code, "python_unsupported");
|
||||||
|
assert.equal(validateImport("").code, "python_import_invalid");
|
||||||
|
assert.equal(validateCapability("subprocess").status, "REAL-EXCLUDED");
|
||||||
|
assert.equal(validateCapability("arbitrary_host_paths").status, "REAL-EXCLUDED");
|
||||||
|
assert.equal(validateCapability("math").status, "accepted");
|
||||||
|
const environment = createVirtualEnvironment();
|
||||||
|
assert.equal(environment.capabilities.manifest_sha256, manifestHash());
|
||||||
|
assert.equal(environment.importModule("hal").symbols.includes("component"), true);
|
||||||
|
assert.equal(runtimeCapabilities().denied_capabilities.includes("socket"), true);
|
||||||
|
|
||||||
|
const report = {
|
||||||
|
schema: "python-runtime-report.v1",
|
||||||
|
status: "passed",
|
||||||
|
runtime: manifest.runtime,
|
||||||
|
version: manifest.version,
|
||||||
|
manifest_sha256: manifestHash(),
|
||||||
|
artifacts: manifest.artifacts.map(({ name, version, bytes, sha256 }) => ({ name, version, bytes, sha256 })),
|
||||||
|
virtual_modules: Object.keys(manifest.virtual_modules).length,
|
||||||
|
denied_capabilities: manifest.denied_capabilities.length,
|
||||||
|
};
|
||||||
|
await writeFile(new URL("../coverage/python-runtime.report.json", import.meta.url), `${JSON.stringify(report, null, 2)}\n`);
|
||||||
|
console.log(`python_runtime=passed version=${manifest.version} modules=${report.virtual_modules}`);
|
||||||
16
scripts/build-wasm.sh
Executable file
16
scripts/build-wasm.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
build_dir="${repo_root}/build-wasm"
|
||||||
|
native_build_dir="${repo_root}/build-native"
|
||||||
|
|
||||||
|
emcmake cmake -S "${repo_root}/wasm-core" -B "${build_dir}" -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build "${build_dir}"
|
||||||
|
|
||||||
|
cmake -S "${repo_root}/wasm-core" -B "${native_build_dir}" -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build "${native_build_dir}"
|
||||||
|
ctest --test-dir "${native_build_dir}" --output-on-failure
|
||||||
|
printf 'wasm_build=%s\n' "${build_dir}/linuxcnc-sim-core.js"
|
||||||
|
printf 'native_test=%s\n' "${native_build_dir}/sim_api_test"
|
||||||
|
printf 'native_protocol_test=%s\n' "${native_build_dir}/sim_protocol_test"
|
||||||
315
scripts/context_packet.py
Normal file
315
scripts/context_packet.py
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate bounded, auditable task context packets.
|
||||||
|
|
||||||
|
The selector applies byte and count limits before writing a packet. It never
|
||||||
|
creates an over-budget packet for a later validator to reject.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any, Iterable
|
||||||
|
|
||||||
|
|
||||||
|
PROFILES = {
|
||||||
|
"doc": {"tokens": 2048, "bytes": 8192, "evidence_bytes": 2048, "files": 8},
|
||||||
|
"feature": {"tokens": 4096, "bytes": 16384, "evidence_bytes": 6144, "files": 16},
|
||||||
|
"contract": {"tokens": 6144, "bytes": 24576, "evidence_bytes": 10240, "files": 24},
|
||||||
|
"milestone": {"tokens": 8192, "bytes": 32768, "evidence_bytes": 14336, "files": 32},
|
||||||
|
}
|
||||||
|
|
||||||
|
SEGMENTS = ("header", "baseline", "scope", "contracts", "evidence", "risks", "next", "forbidden")
|
||||||
|
|
||||||
|
# Compact codes keep the audit trail inside the packet budget. The human
|
||||||
|
# explanation is stable and can be rendered by the reader without repeating
|
||||||
|
# large strings in every packet.
|
||||||
|
EXCLUSION_REASONS = {
|
||||||
|
"E1": "duplicate_path",
|
||||||
|
"E2": "evidence_item_bytes_exceed_budget",
|
||||||
|
"E3": "evidence_file_count_exceed_budget",
|
||||||
|
"E4": "evidence_bytes_exceed_budget",
|
||||||
|
"E5": "context_remaining_bytes_insufficient",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class PacketError(ValueError):
|
||||||
|
"""Raised when a packet cannot be generated without violating a budget."""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class Candidate:
|
||||||
|
path: str
|
||||||
|
size: int
|
||||||
|
sha256: str | None
|
||||||
|
kind: str
|
||||||
|
priority: int
|
||||||
|
required: bool
|
||||||
|
|
||||||
|
|
||||||
|
def _json_bytes(value: Any) -> bytes:
|
||||||
|
return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode("utf-8")
|
||||||
|
|
||||||
|
|
||||||
|
def _sha256_file(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def _candidate(raw: dict[str, Any], base_dir: Path) -> Candidate:
|
||||||
|
path_value = str(raw.get("path", ""))
|
||||||
|
if not path_value:
|
||||||
|
raise PacketError("candidate is missing path")
|
||||||
|
path = Path(path_value)
|
||||||
|
if "size" in raw:
|
||||||
|
size = int(raw["size"])
|
||||||
|
else:
|
||||||
|
file_path = path if path.is_absolute() else base_dir / path
|
||||||
|
try:
|
||||||
|
size = file_path.stat().st_size
|
||||||
|
except OSError as exc:
|
||||||
|
raise PacketError(f"cannot stat evidence {path_value}: {exc}") from exc
|
||||||
|
if size < 0:
|
||||||
|
raise PacketError(f"evidence size must be non-negative: {path_value}")
|
||||||
|
sha256 = raw.get("sha256")
|
||||||
|
if sha256 is None and raw.get("hash_file", False):
|
||||||
|
file_path = path if path.is_absolute() else base_dir / path
|
||||||
|
sha256 = _sha256_file(file_path)
|
||||||
|
return Candidate(
|
||||||
|
path=path_value,
|
||||||
|
size=size,
|
||||||
|
sha256=str(sha256) if sha256 is not None else None,
|
||||||
|
kind=str(raw.get("kind", "artifact")),
|
||||||
|
priority=int(raw.get("priority", 0)),
|
||||||
|
required=bool(raw.get("required", False)),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _evidence_item(candidate: Candidate) -> dict[str, Any]:
|
||||||
|
item: dict[str, Any] = {"path": candidate.path, "bytes": candidate.size, "kind": candidate.kind}
|
||||||
|
if candidate.sha256:
|
||||||
|
item["sha256"] = candidate.sha256
|
||||||
|
return item
|
||||||
|
|
||||||
|
|
||||||
|
def _packet_bytes(packet: dict[str, Any]) -> int:
|
||||||
|
return len(_json_bytes(packet))
|
||||||
|
|
||||||
|
|
||||||
|
def _context_bytes(packet: dict[str, Any], evidence_used: int) -> int:
|
||||||
|
"""Return the bytes consumed by the envelope and referenced evidence.
|
||||||
|
|
||||||
|
Evidence is referenced by path in the JSON envelope, but the referenced
|
||||||
|
payload is read into the task context by the consumer. Counting both
|
||||||
|
here prevents a packet that is small on disk from expanding past the
|
||||||
|
context limit when it is loaded.
|
||||||
|
"""
|
||||||
|
|
||||||
|
return _packet_bytes(packet) + evidence_used
|
||||||
|
|
||||||
|
|
||||||
|
def _finalize_packet_size(packet: dict[str, Any]) -> int:
|
||||||
|
"""Store the self-consistent serialized size in the budget metadata."""
|
||||||
|
|
||||||
|
packet["budget"]["packet_bytes"] = 0
|
||||||
|
for _ in range(4):
|
||||||
|
packet_bytes = _packet_bytes(packet)
|
||||||
|
if packet["budget"]["packet_bytes"] == packet_bytes:
|
||||||
|
return packet_bytes
|
||||||
|
packet["budget"]["packet_bytes"] = packet_bytes
|
||||||
|
raise PacketError("could not stabilize serialized packet size")
|
||||||
|
|
||||||
|
|
||||||
|
def _base_packet(input_data: dict[str, Any], context_id: str, packet_id: str) -> dict[str, Any]:
|
||||||
|
packet: dict[str, Any] = {
|
||||||
|
"context_id": context_id,
|
||||||
|
"packet_id": packet_id,
|
||||||
|
"task": str(input_data.get("task", "")),
|
||||||
|
"header": dict(input_data.get("header", {})),
|
||||||
|
"baseline": dict(input_data.get("baseline", {})),
|
||||||
|
"scope": dict(input_data.get("scope", {})),
|
||||||
|
"contracts": list(input_data.get("contracts", [])),
|
||||||
|
"evidence": {"selected": [], "excluded": []},
|
||||||
|
"risks": list(input_data.get("risks", [])),
|
||||||
|
"next": list(input_data.get("next", []))[:3],
|
||||||
|
"forbidden": list(input_data.get("forbidden", [])),
|
||||||
|
}
|
||||||
|
return packet
|
||||||
|
|
||||||
|
|
||||||
|
def _budget_metadata(limits: dict[str, int], selected: list[dict[str, Any]], excluded: list[dict[str, Any]], evidence_used: int) -> dict[str, Any]:
|
||||||
|
return {
|
||||||
|
"profile": limits["profile"],
|
||||||
|
"token_limit": limits["tokens"],
|
||||||
|
"byte_limit": limits["bytes"],
|
||||||
|
"evidence_byte_limit": limits["evidence_bytes"],
|
||||||
|
"evidence_file_limit": limits["files"],
|
||||||
|
"selected_evidence_bytes": evidence_used,
|
||||||
|
"selected_evidence_files": len(selected),
|
||||||
|
"excluded_evidence_files": len(excluded),
|
||||||
|
# Reserve the complete decimal width of the configured limit while
|
||||||
|
# selecting. This keeps the selection check conservative.
|
||||||
|
"packet_bytes": limits["bytes"],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def generate_packet(
|
||||||
|
input_data: dict[str, Any],
|
||||||
|
*,
|
||||||
|
context_id: str,
|
||||||
|
packet_id: str,
|
||||||
|
profile: str = "feature",
|
||||||
|
total_bytes: int | None = None,
|
||||||
|
evidence_bytes: int | None = None,
|
||||||
|
max_files: int | None = None,
|
||||||
|
base_dir: Path = Path("."),
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""Select evidence under all budgets and return a packet within its limit."""
|
||||||
|
|
||||||
|
if profile not in PROFILES:
|
||||||
|
raise PacketError(f"unknown profile: {profile}")
|
||||||
|
limits = dict(PROFILES[profile])
|
||||||
|
limits["profile"] = profile
|
||||||
|
if total_bytes is not None:
|
||||||
|
limits["bytes"] = int(total_bytes)
|
||||||
|
if evidence_bytes is not None:
|
||||||
|
limits["evidence_bytes"] = int(evidence_bytes)
|
||||||
|
if max_files is not None:
|
||||||
|
limits["files"] = int(max_files)
|
||||||
|
if any(limits[key] < 0 for key in ("tokens", "bytes", "evidence_bytes", "files")):
|
||||||
|
raise PacketError("budgets must be non-negative")
|
||||||
|
|
||||||
|
raw_candidates = input_data.get("candidates", [])
|
||||||
|
if not isinstance(raw_candidates, list):
|
||||||
|
raise PacketError("candidates must be a list")
|
||||||
|
candidates = []
|
||||||
|
for raw in raw_candidates:
|
||||||
|
if not isinstance(raw, dict):
|
||||||
|
raise PacketError("each candidate must be an object")
|
||||||
|
candidates.append(_candidate(raw, base_dir))
|
||||||
|
candidates.sort(key=lambda item: (-int(item.required), -item.priority, item.path))
|
||||||
|
packet = _base_packet(input_data, context_id, packet_id)
|
||||||
|
skeleton_bytes = _packet_bytes(packet)
|
||||||
|
if skeleton_bytes > limits["bytes"]:
|
||||||
|
raise PacketError(
|
||||||
|
f"context skeleton exceeds byte budget ({skeleton_bytes}>{limits['bytes']}); "
|
||||||
|
"reduce task metadata or use a larger profile"
|
||||||
|
)
|
||||||
|
selected: list[dict[str, Any]] = []
|
||||||
|
excluded: list[dict[str, Any]] = []
|
||||||
|
evidence_used = 0
|
||||||
|
seen: set[str] = set()
|
||||||
|
|
||||||
|
for candidate in candidates:
|
||||||
|
if candidate.path in seen:
|
||||||
|
excluded.append({"path": candidate.path, "reason_code": "E1"})
|
||||||
|
continue
|
||||||
|
seen.add(candidate.path)
|
||||||
|
item = _evidence_item(candidate)
|
||||||
|
reason: str | None = None
|
||||||
|
if candidate.size > limits["evidence_bytes"]:
|
||||||
|
reason = "E2"
|
||||||
|
elif len(selected) >= limits["files"]:
|
||||||
|
reason = "E3"
|
||||||
|
elif evidence_used + candidate.size > limits["evidence_bytes"]:
|
||||||
|
reason = "E4"
|
||||||
|
else:
|
||||||
|
trial = dict(packet)
|
||||||
|
trial_selected = selected + [item]
|
||||||
|
trial["evidence"] = {"selected": trial_selected, "excluded": excluded}
|
||||||
|
trial["budget"] = _budget_metadata(
|
||||||
|
limits, trial_selected, excluded, evidence_used + candidate.size
|
||||||
|
)
|
||||||
|
# This check is intentionally performed before selection is committed.
|
||||||
|
trial_context_bytes = _context_bytes(trial, evidence_used + candidate.size)
|
||||||
|
if trial_context_bytes > limits["bytes"]:
|
||||||
|
reason = "E5"
|
||||||
|
if reason:
|
||||||
|
excluded.append({"path": candidate.path, "reason_code": reason})
|
||||||
|
if candidate.required:
|
||||||
|
raise PacketError(f"required evidence cannot fit ({reason}): {candidate.path}")
|
||||||
|
continue
|
||||||
|
selected.append(item)
|
||||||
|
evidence_used += candidate.size
|
||||||
|
|
||||||
|
# The exclusion audit trail is part of the packet, so it can consume the
|
||||||
|
# remaining context space. Remove optional selections until the complete
|
||||||
|
# packet (selected evidence, exclusions and budget metadata) fits.
|
||||||
|
while True:
|
||||||
|
packet["evidence"] = {"selected": selected, "excluded": excluded}
|
||||||
|
packet["budget"] = _budget_metadata(limits, selected, excluded, evidence_used)
|
||||||
|
packet_bytes = _finalize_packet_size(packet)
|
||||||
|
context_bytes = packet_bytes + evidence_used
|
||||||
|
if packet_bytes <= limits["bytes"] and context_bytes <= limits["bytes"]:
|
||||||
|
break
|
||||||
|
removable_index = next(
|
||||||
|
(index for index in range(len(selected) - 1, -1, -1)
|
||||||
|
if not any(item["path"] == selected[index]["path"] and candidate.required
|
||||||
|
for candidate in candidates)),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
if removable_index is None:
|
||||||
|
raise PacketError("context skeleton and required evidence exceed byte budget")
|
||||||
|
removed = selected.pop(removable_index)
|
||||||
|
evidence_used -= int(removed["bytes"])
|
||||||
|
excluded.append({
|
||||||
|
"path": removed["path"],
|
||||||
|
"reason_code": "E5",
|
||||||
|
})
|
||||||
|
return packet
|
||||||
|
|
||||||
|
|
||||||
|
def _load(path: Path) -> dict[str, Any]:
|
||||||
|
with path.open("r", encoding="utf-8") as handle:
|
||||||
|
value = json.load(handle)
|
||||||
|
if not isinstance(value, dict):
|
||||||
|
raise PacketError("input must be a JSON object")
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv: Iterable[str] | None = None) -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--input", required=True, type=Path, help="candidate/context JSON")
|
||||||
|
parser.add_argument("--output", required=True, type=Path)
|
||||||
|
parser.add_argument("--context-id", required=True)
|
||||||
|
parser.add_argument("--packet-id", required=True)
|
||||||
|
parser.add_argument("--profile", choices=sorted(PROFILES), default="feature")
|
||||||
|
parser.add_argument("--base-dir", type=Path, default=Path("."))
|
||||||
|
parser.add_argument("--total-bytes", type=int)
|
||||||
|
parser.add_argument("--evidence-bytes", type=int)
|
||||||
|
parser.add_argument("--max-files", type=int)
|
||||||
|
args = parser.parse_args(list(argv) if argv is not None else None)
|
||||||
|
try:
|
||||||
|
packet = generate_packet(
|
||||||
|
_load(args.input),
|
||||||
|
context_id=args.context_id,
|
||||||
|
packet_id=args.packet_id,
|
||||||
|
profile=args.profile,
|
||||||
|
total_bytes=args.total_bytes,
|
||||||
|
evidence_bytes=args.evidence_bytes,
|
||||||
|
max_files=args.max_files,
|
||||||
|
base_dir=args.base_dir,
|
||||||
|
)
|
||||||
|
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
payload = _json_bytes(packet)
|
||||||
|
# Do not expose a partially written packet to a concurrent validator.
|
||||||
|
temporary = args.output.with_name(f".{args.output.name}.tmp")
|
||||||
|
temporary.write_bytes(payload)
|
||||||
|
if len(payload) != packet["budget"]["packet_bytes"]:
|
||||||
|
raise PacketError("serialized packet size changed before write")
|
||||||
|
temporary.replace(args.output)
|
||||||
|
except (PacketError, OSError, json.JSONDecodeError) as exc:
|
||||||
|
print(f"context packet generation failed: {exc}", file=sys.stderr)
|
||||||
|
return 2
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
227
scripts/generate_config_resources.py
Normal file
227
scripts/generate_config_resources.py
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate resource dependency graphs for every LinuxCNC simulation INI."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG_ROOT = Path("linuxcnc/configs/sim")
|
||||||
|
RESOURCE_EXTENSIONS = {
|
||||||
|
".ini": "ini", ".hal": "hal", ".tbl": "tool_table", ".var": "parameter_file",
|
||||||
|
".ngc": "gcode", ".nc": "gcode", ".tap": "gcode", ".py": "python",
|
||||||
|
".xml": "ui_descriptor", ".ui": "ui_descriptor", ".glade": "ui_descriptor",
|
||||||
|
".tcl": "script", ".clp": "classicladder", ".pref": "preference",
|
||||||
|
".prefs": "preference", ".dat": "data", ".jpg": "image", ".jpeg": "image",
|
||||||
|
".png": "image", ".gif": "image", ".stl": "model", ".obj": "model",
|
||||||
|
}
|
||||||
|
KEY_KINDS = {
|
||||||
|
"HALFILE": "hal", "POSTGUI_HALFILE": "hal", "TOOL_TABLE": "tool_table",
|
||||||
|
"PARAMETER_FILE": "parameter_file", "POSITION_FILE": "data", "LOG_FILE": "log",
|
||||||
|
"MDI_HISTORY_FILE": "data", "PREFERENCE_FILE_PATH": "preference",
|
||||||
|
"INTRO_GRAPHIC": "image", "PROGRAM_PREFIX": "program_directory",
|
||||||
|
"SUBROUTINE_PATH": "subroutine_directory", "USER_COMMAND": "user_command",
|
||||||
|
"SHUTDOWN": "script", "APP": "application",
|
||||||
|
}
|
||||||
|
HAL_COMMANDS = {"source": "hal_source", "loadusr": "hal_user_component"}
|
||||||
|
TOKEN_RE = re.compile(r"(?<![A-Za-z0-9_./~-])([^\s\"'=;,]+)")
|
||||||
|
EXT_RE = re.compile(r"\.(?:ini|hal|tbl|var|ngc|nc|tap|py|xml|ui|glade|tcl|clp|pref|prefs|dat|png|jpg|jpeg|gif|stl|obj)$", re.I)
|
||||||
|
_SHA_CACHE: dict[Path, str] = {}
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
path = path.resolve()
|
||||||
|
cached = _SHA_CACHE.get(path)
|
||||||
|
if cached:
|
||||||
|
return cached
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
value = digest.hexdigest()
|
||||||
|
_SHA_CACHE[path] = value
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def rel(root: Path, path: Path) -> str:
|
||||||
|
return path.resolve().relative_to(root.resolve()).as_posix()
|
||||||
|
|
||||||
|
|
||||||
|
def clean_value(value: str) -> str:
|
||||||
|
value = value.split("#", 1)[0].split(";", 1)[0].strip().strip('"').strip("'")
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def parse_ini(path: Path) -> list[tuple[str, str, int]]:
|
||||||
|
section = ""
|
||||||
|
rows: list[tuple[str, str, int]] = []
|
||||||
|
for line_number, raw in enumerate(path.read_text(encoding="utf-8", errors="strict").splitlines(), 1):
|
||||||
|
line = raw.strip()
|
||||||
|
if not line or line.startswith(("#", ";")):
|
||||||
|
continue
|
||||||
|
if line.startswith("[") and "]" in line:
|
||||||
|
section = line[1:line.index("]")].strip().upper()
|
||||||
|
continue
|
||||||
|
if "=" not in line:
|
||||||
|
continue
|
||||||
|
key, value = line.split("=", 1)
|
||||||
|
rows.append((section, key.strip().upper(), clean_value(value)))
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_reference(repo_root: Path, config_root: Path, base: Path, value: str) -> tuple[Path | None, str]:
|
||||||
|
value = clean_value(value)
|
||||||
|
if not value:
|
||||||
|
return None, "empty"
|
||||||
|
if value.startswith(("~", "$", "${")):
|
||||||
|
return None, "host_or_variable_path"
|
||||||
|
candidate = Path(value)
|
||||||
|
if not candidate.is_absolute():
|
||||||
|
candidate = base / candidate
|
||||||
|
candidate = candidate.resolve()
|
||||||
|
try:
|
||||||
|
candidate.relative_to(repo_root.resolve())
|
||||||
|
except ValueError:
|
||||||
|
return None, "outside_repo"
|
||||||
|
return candidate, "path"
|
||||||
|
|
||||||
|
|
||||||
|
def tokens_with_extensions(value: str) -> list[str]:
|
||||||
|
return [match.group(1) for match in TOKEN_RE.finditer(value) if EXT_RE.search(match.group(1))]
|
||||||
|
|
||||||
|
|
||||||
|
def config_files(config_root: Path) -> list[Path]:
|
||||||
|
return sorted(path for path in config_root.rglob("*") if path.is_file())
|
||||||
|
|
||||||
|
|
||||||
|
def add_row(rows: list[dict[str, object]], repo_root: Path, config_root: Path, entrypoint: Path,
|
||||||
|
target: Path | None, raw: str, kind: str, edge_kind: str, line: int, status: str | None = None,
|
||||||
|
origin: Path | None = None) -> None:
|
||||||
|
entry_id = rel(repo_root, entrypoint)
|
||||||
|
if target is None:
|
||||||
|
target_path = raw
|
||||||
|
target_sha = None
|
||||||
|
target_status = status or "unresolved"
|
||||||
|
else:
|
||||||
|
target_path = rel(repo_root, target) if target.exists() else rel(repo_root, target)
|
||||||
|
target_sha = sha256(target) if target.is_file() else None
|
||||||
|
target_status = "resolved_file" if target.is_file() else ("resolved_directory" if target.is_dir() else "missing")
|
||||||
|
rows.append({
|
||||||
|
"resource_source_id": f"resource:{entry_id}:{line}:{edge_kind}:{target_path}",
|
||||||
|
"entrypoint": entry_id,
|
||||||
|
"path": target_path,
|
||||||
|
"resource_kind": kind,
|
||||||
|
"edge_kind": edge_kind,
|
||||||
|
"line": line,
|
||||||
|
"raw_value": raw,
|
||||||
|
"source_sha": sha256(origin or entrypoint),
|
||||||
|
"target_sha256": target_sha,
|
||||||
|
"origin_path": rel(repo_root, origin or entrypoint),
|
||||||
|
"parse_status": target_status,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def scan_entrypoint(repo_root: Path, config_root: Path, entrypoint: Path) -> list[dict[str, object]]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
ini_rows = parse_ini(entrypoint)
|
||||||
|
row_numbers = {(section, key, value): index for index, (section, key, value) in enumerate(ini_rows, 1)}
|
||||||
|
for section, key, value in ini_rows:
|
||||||
|
if key in KEY_KINDS:
|
||||||
|
kind = KEY_KINDS[key]
|
||||||
|
if key in {"SUBROUTINE_PATH"}:
|
||||||
|
values = value.split(":")
|
||||||
|
elif key == "PROGRAM_PREFIX":
|
||||||
|
values = [value]
|
||||||
|
else:
|
||||||
|
values = [value]
|
||||||
|
for item in values:
|
||||||
|
target, status = resolve_reference(repo_root, config_root, entrypoint.parent, item)
|
||||||
|
add_row(rows, repo_root, config_root, entrypoint, target, item, kind, f"ini:{section}:{key}", row_numbers[(section, key, value)], status if target is None else None)
|
||||||
|
elif section == "FILTER" and key not in {"PROGRAM_EXTENSION"}:
|
||||||
|
for token in tokens_with_extensions(value):
|
||||||
|
target, status = resolve_reference(repo_root, config_root, entrypoint.parent, token)
|
||||||
|
add_row(rows, repo_root, config_root, entrypoint, target, token, "filter", "ini:filter_command", row_numbers[(section, key, value)], status if target is None else None)
|
||||||
|
elif key in {"EMBED_TAB_COMMAND", "DISPLAY", "HALCMD", "TASK", "EMCIO"}:
|
||||||
|
for token in tokens_with_extensions(value):
|
||||||
|
target, status = resolve_reference(repo_root, config_root, entrypoint.parent, token)
|
||||||
|
add_row(rows, repo_root, config_root, entrypoint, target, token, RESOURCE_EXTENSIONS.get(Path(token).suffix.lower(), "external"), f"ini:{section}:{key}", row_numbers[(section, key, value)], status if target is None else None)
|
||||||
|
|
||||||
|
seen_paths = {str(row["path"]) for row in rows}
|
||||||
|
for path in sorted(path for path in entrypoint.parent.rglob("*") if path.is_file() and path != entrypoint):
|
||||||
|
path_key = rel(repo_root, path)
|
||||||
|
if path.suffix.lower() in RESOURCE_EXTENSIONS and path_key not in seen_paths:
|
||||||
|
add_row(rows, repo_root, config_root, entrypoint, path, rel(repo_root, path), RESOURCE_EXTENSIONS[path.suffix.lower()], "directory_member", 0)
|
||||||
|
seen_paths.add(path_key)
|
||||||
|
|
||||||
|
seen_ids = {str(existing["resource_source_id"]) for existing in rows}
|
||||||
|
for row in parse_hal_references(repo_root, config_root, entrypoint, rows):
|
||||||
|
if row["resource_source_id"] not in seen_ids:
|
||||||
|
rows.append(row)
|
||||||
|
seen_ids.add(str(row["resource_source_id"]))
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def parse_hal_references(repo_root: Path, config_root: Path, entrypoint: Path, rows: list[dict[str, object]]) -> list[dict[str, object]]:
|
||||||
|
output: list[dict[str, object]] = []
|
||||||
|
hal_paths = [Path(str(row["path"])) for row in rows if row["resource_kind"] == "hal" and row["parse_status"] == "resolved_file"]
|
||||||
|
for relative_path in hal_paths:
|
||||||
|
hal = repo_root / relative_path
|
||||||
|
for line_number, raw in enumerate(hal.read_text(encoding="utf-8", errors="strict").splitlines(), 1):
|
||||||
|
parts = raw.strip().split()
|
||||||
|
if not parts or parts[0] not in HAL_COMMANDS:
|
||||||
|
continue
|
||||||
|
command = parts[0]
|
||||||
|
candidates = tokens_with_extensions(raw)
|
||||||
|
for token in candidates:
|
||||||
|
target, status = resolve_reference(repo_root, config_root, hal.parent, token)
|
||||||
|
add_row(output, repo_root, config_root, entrypoint, target, token, RESOURCE_EXTENSIONS.get(Path(token).suffix.lower(), "external"), f"hal:{command}", line_number, status if target is None else None, hal)
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
def generate(repo_root: Path, output: Path, report_path: Path) -> tuple[int, str]:
|
||||||
|
config_root = repo_root / CONFIG_ROOT
|
||||||
|
if not config_root.is_dir():
|
||||||
|
raise FileNotFoundError(f"required config root is missing: {CONFIG_ROOT}")
|
||||||
|
entrypoints = sorted(path for path in config_root.rglob("*.ini") if path.is_file())
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
for entrypoint in entrypoints:
|
||||||
|
rows.extend(scan_entrypoint(repo_root, config_root, entrypoint))
|
||||||
|
rows.sort(key=lambda row: str(row["resource_source_id"]))
|
||||||
|
output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with output.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for row in rows:
|
||||||
|
handle.write(json.dumps(row, ensure_ascii=False, sort_keys=True, separators=(",", ":")) + "\n")
|
||||||
|
digest = sha256(output)
|
||||||
|
report = {
|
||||||
|
"schema": "config-resources-report.v1",
|
||||||
|
"entrypoints": len(entrypoints),
|
||||||
|
"resources": len(rows),
|
||||||
|
"missing": sum(1 for row in rows if row["parse_status"] == "missing"),
|
||||||
|
"unresolved": sum(1 for row in rows if row["parse_status"] in {"unresolved", "host_or_variable_path", "outside_repo"}),
|
||||||
|
"output_sha256": digest,
|
||||||
|
"entrypoint_paths": [rel(repo_root, path) for path in entrypoints],
|
||||||
|
}
|
||||||
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
return len(rows), digest
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--output", type=Path, default=Path("coverage/config-resources.jsonl"))
|
||||||
|
parser.add_argument("--report", type=Path, default=Path("coverage/config-resources.report.json"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
count, digest = generate(root, root / args.output, root / args.report)
|
||||||
|
print(f"config_resources={count} sha256={digest}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
167
scripts/generate_dependency_closure.py
Normal file
167
scripts/generate_dependency_closure.py
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Build a deterministic dependency graph from normalized coverage records."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
from collections import Counter, defaultdict
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
NORMALIZED = Path("coverage/normalized-sources.jsonl")
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def read_jsonl(path: Path) -> list[dict[str, object]]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
with path.open("r", encoding="utf-8") as handle:
|
||||||
|
for line_number, line in enumerate(handle, 1):
|
||||||
|
if not line.strip():
|
||||||
|
continue
|
||||||
|
row = json.loads(line)
|
||||||
|
if not isinstance(row, dict):
|
||||||
|
raise ValueError(f"{path}:{line_number}: expected object")
|
||||||
|
rows.append(row)
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def canonical_path(value: object) -> str | None:
|
||||||
|
if not isinstance(value, str) or not value.strip():
|
||||||
|
return None
|
||||||
|
raw = value.replace("\\", "/").strip()
|
||||||
|
if raw.startswith("/"):
|
||||||
|
return None
|
||||||
|
parts: list[str] = []
|
||||||
|
for part in raw.split("/"):
|
||||||
|
if part in ("", "."):
|
||||||
|
continue
|
||||||
|
if part == "..":
|
||||||
|
if not parts:
|
||||||
|
return None
|
||||||
|
parts.pop()
|
||||||
|
else:
|
||||||
|
parts.append(part)
|
||||||
|
return "/".join(parts) or None
|
||||||
|
|
||||||
|
|
||||||
|
def generate(root: Path, output: Path, report_path: Path) -> tuple[int, str]:
|
||||||
|
normalized_path = root / NORMALIZED
|
||||||
|
if not normalized_path.is_file():
|
||||||
|
raise FileNotFoundError(f"required normalized index is missing: {NORMALIZED}")
|
||||||
|
records = read_jsonl(normalized_path)
|
||||||
|
file_ids = {
|
||||||
|
str(row["path"]): str(row["source_id"])
|
||||||
|
for row in records if row.get("origin_index") == "source" and row.get("path")
|
||||||
|
}
|
||||||
|
nodes = {str(row["source_id"]) for row in records}
|
||||||
|
edges: list[dict[str, object]] = []
|
||||||
|
edge_counts: Counter[str] = Counter()
|
||||||
|
duplicate_edges: list[dict[str, object]] = []
|
||||||
|
unresolved: list[dict[str, object]] = []
|
||||||
|
|
||||||
|
def target_for(path_value: object, status: str = "unresolved") -> tuple[str, str]:
|
||||||
|
path = canonical_path(path_value)
|
||||||
|
if path and path in file_ids:
|
||||||
|
return file_ids[path], "resolved"
|
||||||
|
if path and (root / path).is_file():
|
||||||
|
return f"unindexed:{path}", "unindexed"
|
||||||
|
return f"unresolved:{path or str(path_value) or 'empty'}", status
|
||||||
|
|
||||||
|
def add_edge(from_id: str, to_id: str, edge_kind: str, record: dict[str, object], status: str, raw_value: object = None) -> None:
|
||||||
|
key = f"{from_id}|{edge_kind}|{to_id}|{record.get('line', '')}"
|
||||||
|
edge_counts[key] += 1
|
||||||
|
if edge_counts[key] > 1:
|
||||||
|
duplicate_edges.append({"key": key, "occurrence": edge_counts[key], "source_id": record.get("source_id")})
|
||||||
|
edge_id = f"edge:{key}" + (f"~dup{edge_counts[key]}" if edge_counts[key] > 1 else "")
|
||||||
|
row = {
|
||||||
|
"edge_id": edge_id,
|
||||||
|
"from_source_id": from_id,
|
||||||
|
"to_source_id": to_id,
|
||||||
|
"edge_kind": edge_kind,
|
||||||
|
"raw_value": raw_value,
|
||||||
|
"evidence_path": record.get("hash_path") or record.get("path"),
|
||||||
|
"evidence_line": record.get("line"),
|
||||||
|
"evidence_source_id": record.get("source_id"),
|
||||||
|
"parse_status": status,
|
||||||
|
}
|
||||||
|
edges.append(row)
|
||||||
|
nodes.add(to_id)
|
||||||
|
if status not in {"resolved", "parsed"}:
|
||||||
|
unresolved.append({"edge_id": edge_id, "to_source_id": to_id, "status": status, "raw_value": raw_value})
|
||||||
|
|
||||||
|
for record in records:
|
||||||
|
source_id = str(record["source_id"])
|
||||||
|
index_name = str(record.get("origin_index"))
|
||||||
|
if index_name == "resource":
|
||||||
|
origin_path = canonical_path(record.get("hash_path"))
|
||||||
|
from_id = file_ids.get(origin_path, source_id)
|
||||||
|
target_id, status = target_for(record.get("path"), str(record.get("target_status") or "unresolved"))
|
||||||
|
add_edge(from_id, target_id, f"resource:{record.get('edge_kind') or record.get('resource_kind') or 'reference'}", record, status, record.get("raw_value"))
|
||||||
|
elif index_name == "test":
|
||||||
|
entry_path = canonical_path(record.get("path"))
|
||||||
|
entry_file = file_ids.get(entry_path)
|
||||||
|
if entry_file:
|
||||||
|
add_edge(entry_file, source_id, "test_entrypoint", record, "resolved", record.get("command"))
|
||||||
|
for field, edge_kind in (("inputs", "test_input"), ("expected", "test_expected"), ("config_refs", "test_config_ref")):
|
||||||
|
values = record.get(field, [])
|
||||||
|
if not isinstance(values, list):
|
||||||
|
continue
|
||||||
|
for value in sorted(str(item) for item in values):
|
||||||
|
target_id, status = target_for(value)
|
||||||
|
add_edge(source_id, target_id, edge_kind, record, status, value)
|
||||||
|
elif index_name in {"symbol", "document"}:
|
||||||
|
related = record.get("related_source_ids", [])
|
||||||
|
if isinstance(related, list):
|
||||||
|
for related_id in sorted(str(item) for item in related):
|
||||||
|
add_edge(related_id, source_id, "declares" if index_name == "symbol" else "documents", record, "resolved", record.get("path"))
|
||||||
|
|
||||||
|
edges.sort(key=lambda row: str(row["edge_id"]))
|
||||||
|
output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with output.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for row in edges:
|
||||||
|
handle.write(json.dumps(row, ensure_ascii=False, sort_keys=True, separators=(",", ":")) + "\n")
|
||||||
|
digest = sha256(output)
|
||||||
|
incoming = Counter(str(edge["to_source_id"]) for edge in edges)
|
||||||
|
outgoing = Counter(str(edge["from_source_id"]) for edge in edges)
|
||||||
|
orphan_nodes = sorted(node for node in nodes if not incoming[node] and not outgoing[node] and not node.startswith(("unresolved:", "unindexed:")))
|
||||||
|
report = {
|
||||||
|
"schema": "dependency-closure-report.v1",
|
||||||
|
"normalized_input_sha256": sha256(normalized_path),
|
||||||
|
"nodes": len(nodes),
|
||||||
|
"edges": len(edges),
|
||||||
|
"resolved_edges": sum(1 for edge in edges if edge["parse_status"] == "resolved"),
|
||||||
|
"unresolved_edges": len(unresolved),
|
||||||
|
"edge_kinds": dict(sorted(Counter(str(edge["edge_kind"]) for edge in edges).items())),
|
||||||
|
"duplicate_edges": duplicate_edges,
|
||||||
|
"unresolved": unresolved,
|
||||||
|
"orphan_nodes": orphan_nodes,
|
||||||
|
"output_sha256": digest,
|
||||||
|
}
|
||||||
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
return len(edges), digest
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--output", type=Path, default=Path("coverage/dependency-closure.jsonl"))
|
||||||
|
parser.add_argument("--report", type=Path, default=Path("coverage/dependency-closure.report.json"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
count, digest = generate(root, root / args.output, root / args.report)
|
||||||
|
print(f"dependency_edges={count} sha256={digest}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
241
scripts/generate_document_capabilities.py
Normal file
241
scripts/generate_document_capabilities.py
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate a deterministic, source-addressable LinuxCNC document index.
|
||||||
|
|
||||||
|
The index is intentionally a source index, not a coverage claim. Every
|
||||||
|
heading in the Master Documentation include graph and every heading in the
|
||||||
|
project's migration documents becomes a planned capability candidate. Files
|
||||||
|
that cannot be classified are retained with ``needs_review`` rather than
|
||||||
|
silently discarded.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
MASTER = Path("linuxcnc/docs/src/Master_Documentation.adoc")
|
||||||
|
PROJECT_DOCS = (
|
||||||
|
Path("docs/linuxcnc-web-wasm-source-map.md"),
|
||||||
|
Path("docs/linuxcnc-web-wasm-simulation-coverage.md"),
|
||||||
|
)
|
||||||
|
INCLUDE_RE = re.compile(r"^\s*include::([^\[]+)\[.*\]\s*$")
|
||||||
|
ASCIIDOC_ANCHOR_RE = re.compile(r"^\s*\[\[([^,\]]+)(?:,[^\]]*)?\]\]\s*$")
|
||||||
|
ASCIIDOC_BLOCK_ID_RE = re.compile(r"^\s*\[#([^\]]+)\]\s*$")
|
||||||
|
ASCIIDOC_HEADING_RE = re.compile(r"^(={1,6})\s+(.+?)\s*$")
|
||||||
|
MARKDOWN_HEADING_RE = re.compile(r"^(#{1,6})\s+(.+?)\s*#*\s*$")
|
||||||
|
SLUG_RE = re.compile(r"[^a-z0-9]+")
|
||||||
|
|
||||||
|
DOMAIN_RULES = (
|
||||||
|
("getting-started", "getting_started"),
|
||||||
|
("user", "user"),
|
||||||
|
("config", "configuration"),
|
||||||
|
("hal", "hal"),
|
||||||
|
("ladder", "classicladder"),
|
||||||
|
("motion", "motion"),
|
||||||
|
("gcode", "gcode"),
|
||||||
|
("remap", "remap"),
|
||||||
|
("gui", "gui"),
|
||||||
|
("plasma", "plasma"),
|
||||||
|
("tooldatabase", "tooldata"),
|
||||||
|
("drivers", "real_hardware"),
|
||||||
|
("examples", "examples"),
|
||||||
|
("integrator", "integrator"),
|
||||||
|
("install", "installation"),
|
||||||
|
("source-highlight", "documentation"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class Heading:
|
||||||
|
level: int
|
||||||
|
title: str
|
||||||
|
anchor: str | None
|
||||||
|
line: int
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def slugify(title: str) -> str:
|
||||||
|
value = title.lower().replace("&", " and ")
|
||||||
|
value = SLUG_RE.sub("-", value).strip("-")
|
||||||
|
return value or "section"
|
||||||
|
|
||||||
|
|
||||||
|
def parse_headings(path: Path) -> list[Heading]:
|
||||||
|
lines = path.read_text(encoding="utf-8", errors="strict").splitlines()
|
||||||
|
headings: list[Heading] = []
|
||||||
|
pending_anchor: str | None = None
|
||||||
|
for line_number, line in enumerate(lines, 1):
|
||||||
|
anchor_match = ASCIIDOC_ANCHOR_RE.match(line) or ASCIIDOC_BLOCK_ID_RE.match(line)
|
||||||
|
if anchor_match:
|
||||||
|
pending_anchor = anchor_match.group(1).strip()
|
||||||
|
continue
|
||||||
|
match = ASCIIDOC_HEADING_RE.match(line) or MARKDOWN_HEADING_RE.match(line)
|
||||||
|
if not match:
|
||||||
|
continue
|
||||||
|
headings.append(Heading(len(match.group(1)), match.group(2).strip(), pending_anchor, line_number))
|
||||||
|
pending_anchor = None
|
||||||
|
return headings
|
||||||
|
|
||||||
|
|
||||||
|
def include_graph(repo_root: Path, master: Path = MASTER) -> tuple[list[Path], list[dict[str, str]]]:
|
||||||
|
ordered: list[Path] = []
|
||||||
|
seen: set[Path] = set()
|
||||||
|
missing: list[dict[str, str]] = []
|
||||||
|
|
||||||
|
def visit(path: Path) -> None:
|
||||||
|
path = path.resolve()
|
||||||
|
if path in seen:
|
||||||
|
return
|
||||||
|
if not path.is_file():
|
||||||
|
raise FileNotFoundError(f"included documentation file is missing: {path}")
|
||||||
|
seen.add(path)
|
||||||
|
ordered.append(path)
|
||||||
|
for line in path.read_text(encoding="utf-8", errors="strict").splitlines():
|
||||||
|
match = INCLUDE_RE.match(line)
|
||||||
|
if match:
|
||||||
|
include_path = (path.parent / match.group(1)).resolve()
|
||||||
|
if not include_path.is_file():
|
||||||
|
missing.append({
|
||||||
|
"document": relative_path(repo_root, path),
|
||||||
|
"include": match.group(1),
|
||||||
|
"resolved_path": relative_path(repo_root, include_path),
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
visit(include_path)
|
||||||
|
|
||||||
|
visit((repo_root / master).resolve())
|
||||||
|
return ordered, missing
|
||||||
|
|
||||||
|
|
||||||
|
def classify(path: Path, title: str) -> tuple[str, str]:
|
||||||
|
lowered = "/".join(path.parts).lower()
|
||||||
|
for token, domain in DOMAIN_RULES:
|
||||||
|
if token in lowered:
|
||||||
|
return domain, "mapped"
|
||||||
|
title_lower = title.lower()
|
||||||
|
if any(token in title_lower for token in ("g-code", "m-code", "o-code", "rs274")):
|
||||||
|
return "gcode", "mapped"
|
||||||
|
if any(token in title_lower for token in ("hardware", "driver", "mesa", "gpio")):
|
||||||
|
return "real_hardware", "needs_review"
|
||||||
|
if path.suffix.lower() in {".md", ".adoc"} and path.as_posix().startswith("docs/"):
|
||||||
|
return "web_wasm_governance", "mapped"
|
||||||
|
return "unclassified", "needs_review"
|
||||||
|
|
||||||
|
|
||||||
|
def relative_path(repo_root: Path, path: Path) -> str:
|
||||||
|
return path.resolve().relative_to(repo_root.resolve()).as_posix()
|
||||||
|
|
||||||
|
|
||||||
|
def make_entries(repo_root: Path) -> tuple[list[dict[str, object]], dict[str, object]]:
|
||||||
|
paths, missing_includes = include_graph(repo_root)
|
||||||
|
for project_doc in PROJECT_DOCS:
|
||||||
|
path = (repo_root / project_doc).resolve()
|
||||||
|
if not path.is_file():
|
||||||
|
raise FileNotFoundError(f"project migration document is missing: {project_doc}")
|
||||||
|
if path not in paths:
|
||||||
|
paths.append(path)
|
||||||
|
|
||||||
|
entries: list[dict[str, object]] = []
|
||||||
|
report: dict[str, object] = {
|
||||||
|
"schema": "document-capabilities-report.v1",
|
||||||
|
"documents": len(paths),
|
||||||
|
"headings": 0,
|
||||||
|
"unclassified": [],
|
||||||
|
"duplicate_ids": [],
|
||||||
|
"empty_documents": [],
|
||||||
|
"missing_includes": missing_includes,
|
||||||
|
}
|
||||||
|
used_ids: set[str] = set()
|
||||||
|
for path in paths:
|
||||||
|
relative = relative_path(repo_root, path)
|
||||||
|
document_sha = sha256(path)
|
||||||
|
headings = parse_headings(path)
|
||||||
|
if not headings:
|
||||||
|
report["empty_documents"].append(relative)
|
||||||
|
headings = [Heading(1, path.stem, None, 1)]
|
||||||
|
anchor_counts: dict[str, int] = {}
|
||||||
|
parent_stack: list[tuple[int, str]] = []
|
||||||
|
for heading in headings:
|
||||||
|
base_anchor = heading.anchor or slugify(heading.title)
|
||||||
|
anchor_counts[base_anchor] = anchor_counts.get(base_anchor, 0) + 1
|
||||||
|
anchor = base_anchor if anchor_counts[base_anchor] == 1 else f"{base_anchor}-{anchor_counts[base_anchor]}"
|
||||||
|
capability_id = f"doc:{relative}#{anchor}"
|
||||||
|
if capability_id in used_ids:
|
||||||
|
report["duplicate_ids"].append(capability_id)
|
||||||
|
continue
|
||||||
|
used_ids.add(capability_id)
|
||||||
|
while parent_stack and parent_stack[-1][0] >= heading.level:
|
||||||
|
parent_stack.pop()
|
||||||
|
parent_anchor = parent_stack[-1][1] if parent_stack else None
|
||||||
|
parent_stack.append((heading.level, anchor))
|
||||||
|
domain, mapping_status = classify(path, heading.title)
|
||||||
|
entry = {
|
||||||
|
"capability_source_id": capability_id,
|
||||||
|
"document": relative,
|
||||||
|
"anchor": anchor,
|
||||||
|
"title": heading.title,
|
||||||
|
"domain": domain,
|
||||||
|
"source_sha": document_sha,
|
||||||
|
"line": heading.line,
|
||||||
|
"level": heading.level,
|
||||||
|
"parent_anchor": parent_anchor,
|
||||||
|
"mapping_status": mapping_status,
|
||||||
|
"sim_status": "planned",
|
||||||
|
"web_status": "planned",
|
||||||
|
}
|
||||||
|
entries.append(entry)
|
||||||
|
report["headings"] += 1
|
||||||
|
if mapping_status != "mapped":
|
||||||
|
report["unclassified"].append({"capability_source_id": capability_id, "domain": domain})
|
||||||
|
entries.sort(key=lambda item: str(item["capability_source_id"]))
|
||||||
|
return entries, report
|
||||||
|
|
||||||
|
|
||||||
|
def write_json(path: Path, value: object) -> None:
|
||||||
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
path.write_text(json.dumps(value, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
|
||||||
|
|
||||||
|
def write_jsonl(path: Path, entries: Iterable[dict[str, object]]) -> None:
|
||||||
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with path.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for entry in entries:
|
||||||
|
handle.write(json.dumps(entry, ensure_ascii=False, sort_keys=True, separators=(",", ":")))
|
||||||
|
handle.write("\n")
|
||||||
|
|
||||||
|
|
||||||
|
def generate(repo_root: Path, output: Path, report_path: Path) -> tuple[int, str]:
|
||||||
|
entries, report = make_entries(repo_root)
|
||||||
|
write_jsonl(output, entries)
|
||||||
|
report["output_sha256"] = sha256(output)
|
||||||
|
write_json(report_path, report)
|
||||||
|
return len(entries), str(report["output_sha256"])
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--output", type=Path, default=Path("coverage/document-capabilities.jsonl"))
|
||||||
|
parser.add_argument("--report", type=Path, default=Path("coverage/document-capabilities.report.json"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
count, digest = generate(root, root / args.output, root / args.report)
|
||||||
|
print(f"document_capabilities={count} sha256={digest}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
145
scripts/generate_source_inventory.py
Executable file
145
scripts/generate_source_inventory.py
Executable file
@@ -0,0 +1,145 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate the reproducible LinuxCNC source and coverage seed indexes.
|
||||||
|
|
||||||
|
The source index is deliberately mechanical: every file in a declared input
|
||||||
|
root is recorded with its size and digest. The coverage seed is not an
|
||||||
|
implementation claim; entries remain ``planned`` until an owner assigns a
|
||||||
|
feature, adapter, test and oracle.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
ROOTS = (
|
||||||
|
("doc", Path("linuxcnc/docs")),
|
||||||
|
("source", Path("linuxcnc/src")),
|
||||||
|
("config", Path("linuxcnc/configs/sim")),
|
||||||
|
("test", Path("linuxcnc/tests")),
|
||||||
|
("unit_test", Path("linuxcnc/unit_tests")),
|
||||||
|
("implementation", Path("wasm-core")),
|
||||||
|
("implementation", Path("web")),
|
||||||
|
)
|
||||||
|
BUILD_FILES = (
|
||||||
|
Path("linuxcnc/VERSION"),
|
||||||
|
Path("linuxcnc/meson.build"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def source_kind(root_kind: str, path: Path) -> str:
|
||||||
|
if root_kind == "implementation":
|
||||||
|
if path.suffix in {".h", ".hpp"}:
|
||||||
|
return "web_wasm_interface"
|
||||||
|
if path.suffix in {".c", ".cc", ".cpp", ".mjs", ".js"}:
|
||||||
|
return "web_wasm_implementation"
|
||||||
|
return "web_wasm_build_or_test"
|
||||||
|
if root_kind == "doc":
|
||||||
|
return "documentation"
|
||||||
|
if root_kind in {"test", "unit_test"}:
|
||||||
|
return "test"
|
||||||
|
if root_kind == "config":
|
||||||
|
return "simulation_config"
|
||||||
|
if path.name.endswith(".comp"):
|
||||||
|
return "hal_component_source"
|
||||||
|
return "source"
|
||||||
|
|
||||||
|
|
||||||
|
def iter_files(repo_root: Path) -> Iterable[tuple[str, Path]]:
|
||||||
|
for root_kind, relative_root in ROOTS:
|
||||||
|
root = repo_root / relative_root
|
||||||
|
if not root.is_dir():
|
||||||
|
raise FileNotFoundError(f"required inventory root is missing: {relative_root}")
|
||||||
|
for path in sorted(path for path in root.rglob("*") if path.is_file()):
|
||||||
|
yield root_kind, path
|
||||||
|
for relative_path in BUILD_FILES:
|
||||||
|
path = repo_root / relative_path
|
||||||
|
if not path.is_file():
|
||||||
|
raise FileNotFoundError(f"required build source is missing: {relative_path}")
|
||||||
|
yield "build", path
|
||||||
|
|
||||||
|
|
||||||
|
def make_entry(repo_root: Path, root_kind: str, path: Path) -> dict[str, object]:
|
||||||
|
relative = path.relative_to(repo_root).as_posix()
|
||||||
|
source_id = f"{root_kind}:{relative}"
|
||||||
|
return {
|
||||||
|
"source_id": source_id,
|
||||||
|
"path": relative,
|
||||||
|
"kind": source_kind(root_kind, path),
|
||||||
|
"bytes": path.stat().st_size,
|
||||||
|
"sha256": sha256(path),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def make_manifest_entry(source: dict[str, object]) -> dict[str, object]:
|
||||||
|
source_id = str(source["source_id"])
|
||||||
|
return {
|
||||||
|
"id": f"seed:{source_id}",
|
||||||
|
"feature_id": None,
|
||||||
|
"source": source_id,
|
||||||
|
"source_sha": source["sha256"],
|
||||||
|
"domain": "unassigned",
|
||||||
|
"kind": source["kind"],
|
||||||
|
"adaptation": None,
|
||||||
|
"dependencies": [],
|
||||||
|
"inputs": [source["path"]],
|
||||||
|
"outputs": [],
|
||||||
|
"errors": [],
|
||||||
|
"sim_status": "planned",
|
||||||
|
"web_status": "planned",
|
||||||
|
"test_id": None,
|
||||||
|
"oracle": None,
|
||||||
|
"golden": None,
|
||||||
|
"difference": None,
|
||||||
|
"coverage_dimensions": [],
|
||||||
|
"context_id": None,
|
||||||
|
"exclusion_reason": None,
|
||||||
|
"mapping_status": "needs_owner",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def write_jsonl(path: Path, entries: Iterable[dict[str, object]]) -> None:
|
||||||
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with path.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for entry in entries:
|
||||||
|
handle.write(json.dumps(entry, ensure_ascii=False, sort_keys=True, separators=(",", ":")))
|
||||||
|
handle.write("\n")
|
||||||
|
|
||||||
|
|
||||||
|
def generate(repo_root: Path, source_index: Path, manifest: Path) -> tuple[int, int]:
|
||||||
|
sources = [make_entry(repo_root, kind, path) for kind, path in iter_files(repo_root)]
|
||||||
|
sources.sort(key=lambda item: str(item["source_id"]))
|
||||||
|
write_jsonl(source_index, sources)
|
||||||
|
write_jsonl(manifest, (make_manifest_entry(source) for source in sources))
|
||||||
|
return len(sources), len(sources)
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--source-index", type=Path, default=Path("coverage/source-index.jsonl"))
|
||||||
|
parser.add_argument("--manifest", type=Path, default=Path("coverage/manifest.jsonl"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
source_count, manifest_count = generate(
|
||||||
|
args.repo_root.resolve(),
|
||||||
|
args.repo_root.resolve() / args.source_index,
|
||||||
|
args.repo_root.resolve() / args.manifest,
|
||||||
|
)
|
||||||
|
print(f"source_index={source_count} manifest_seed={manifest_count}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
159
scripts/generate_source_symbols.py
Normal file
159
scripts/generate_source_symbols.py
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate deterministic source symbol and HAL component entry indexes."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
ROOTS = (
|
||||||
|
Path("linuxcnc/src/emc"),
|
||||||
|
Path("linuxcnc/src/hal"),
|
||||||
|
Path("linuxcnc/lib/python"),
|
||||||
|
)
|
||||||
|
EXTENSIONS = {
|
||||||
|
".c": "c", ".h": "c", ".cc": "cpp", ".hh": "cpp", ".cpp": "cpp",
|
||||||
|
".hpp": "cpp", ".cxx": "cpp", ".hxx": "cpp", ".py": "python", ".comp": "hal_comp",
|
||||||
|
}
|
||||||
|
IDENT = r"[A-Za-z_][A-Za-z0-9_]*"
|
||||||
|
KEYWORDS = {"if", "for", "while", "switch", "catch", "sizeof", "return", "do"}
|
||||||
|
DEFINE_RE = re.compile(rf"^\s*#\s*define\s+({IDENT})\b")
|
||||||
|
C_FUNCTION_RE = re.compile(
|
||||||
|
rf"^\s*(?:(?:static|inline|extern|const|volatile|unsigned|signed|long|short|struct|class|enum|[A-Za-z_][\w:*&<>]*)\s+)+({IDENT})\s*\([^;{{}}]*\)\s*(?:const\s*)?(?:\{{.*|;)?\s*$"
|
||||||
|
)
|
||||||
|
C_TYPE_RE = re.compile(rf"^\s*(?:typedef\s+)?(?:struct|class|enum|union)\s+({IDENT})\b")
|
||||||
|
PY_DEF_RE = re.compile(rf"^\s*(async\s+)?def\s+({IDENT})\s*\(")
|
||||||
|
PY_CLASS_RE = re.compile(rf"^\s*class\s+({IDENT})\b")
|
||||||
|
COMP_PATTERNS = (
|
||||||
|
("component", re.compile(rf"^\s*component\s+({IDENT})\b")),
|
||||||
|
("function", re.compile(rf"^\s*function\s+({IDENT})\b")),
|
||||||
|
("option", re.compile(rf"^\s*option\s+({IDENT})\b")),
|
||||||
|
("pin", re.compile(rf"^\s*pin\s+(?:in|out|io)\s+{IDENT}\s+({IDENT})\b")),
|
||||||
|
("param", re.compile(rf"^\s*param\s+(?:r|rw)\s+{IDENT}\s+({IDENT})\b")),
|
||||||
|
("variable", re.compile(rf"^\s*variable\s+{IDENT}\s+({IDENT})\b")),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def files(repo_root: Path) -> Iterable[Path]:
|
||||||
|
for root in ROOTS:
|
||||||
|
absolute = repo_root / root
|
||||||
|
if not absolute.is_dir():
|
||||||
|
raise FileNotFoundError(f"required symbol root is missing: {root}")
|
||||||
|
for path in sorted(path for path in absolute.rglob("*") if path.is_file() and path.suffix.lower() in EXTENSIONS):
|
||||||
|
yield path
|
||||||
|
|
||||||
|
|
||||||
|
def relative(repo_root: Path, path: Path) -> str:
|
||||||
|
return path.resolve().relative_to(repo_root.resolve()).as_posix()
|
||||||
|
|
||||||
|
|
||||||
|
def add_symbol(rows: list[dict[str, object]], repo_root: Path, path: Path, language: str, symbol: str,
|
||||||
|
symbol_kind: str, line: int, source_sha: str, **extra: object) -> None:
|
||||||
|
rows.append({
|
||||||
|
"symbol_source_id": f"symbol:{relative(repo_root, path)}:{line}:{symbol_kind}:{symbol}",
|
||||||
|
"path": relative(repo_root, path),
|
||||||
|
"language": language,
|
||||||
|
"symbol": symbol,
|
||||||
|
"symbol_kind": symbol_kind,
|
||||||
|
"line": line,
|
||||||
|
"source_sha": source_sha,
|
||||||
|
"parse_status": "parsed",
|
||||||
|
**extra,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def parse_file(repo_root: Path, path: Path) -> tuple[list[dict[str, object]], dict[str, object]]:
|
||||||
|
language = EXTENSIONS[path.suffix.lower()]
|
||||||
|
source_sha = sha256(path)
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
report: dict[str, object] = {"path": relative(repo_root, path), "language": language, "symbols": 0, "parse_status": "parsed"}
|
||||||
|
try:
|
||||||
|
lines = path.read_text(encoding="utf-8", errors="strict").splitlines()
|
||||||
|
except UnicodeDecodeError as exc:
|
||||||
|
report.update({"parse_status": "decode_error", "error": str(exc)})
|
||||||
|
return rows, report
|
||||||
|
for line_number, line in enumerate(lines, 1):
|
||||||
|
match = DEFINE_RE.match(line) if language in {"c", "cpp"} else None
|
||||||
|
if match:
|
||||||
|
add_symbol(rows, repo_root, path, language, match.group(1), "macro", line_number, source_sha)
|
||||||
|
continue
|
||||||
|
if language == "python":
|
||||||
|
match = PY_DEF_RE.match(line) or PY_CLASS_RE.match(line)
|
||||||
|
if match:
|
||||||
|
symbol = match.group(2) if match.re is PY_DEF_RE else match.group(1)
|
||||||
|
kind = "async_function" if match.re is PY_DEF_RE and match.group(1) else ("function" if match.re is PY_DEF_RE else "class")
|
||||||
|
add_symbol(rows, repo_root, path, language, symbol, kind, line_number, source_sha)
|
||||||
|
continue
|
||||||
|
if language == "hal_comp":
|
||||||
|
for kind, pattern in COMP_PATTERNS:
|
||||||
|
match = pattern.match(line)
|
||||||
|
if match:
|
||||||
|
add_symbol(rows, repo_root, path, language, match.group(1), kind, line_number, source_sha)
|
||||||
|
break
|
||||||
|
continue
|
||||||
|
match = C_TYPE_RE.match(line)
|
||||||
|
if match:
|
||||||
|
add_symbol(rows, repo_root, path, language, match.group(1), "type", line_number, source_sha)
|
||||||
|
continue
|
||||||
|
match = C_FUNCTION_RE.match(line)
|
||||||
|
if match:
|
||||||
|
symbol = match.group(1)
|
||||||
|
if symbol not in KEYWORDS:
|
||||||
|
add_symbol(rows, repo_root, path, language, symbol, "function", line_number, source_sha)
|
||||||
|
report["symbols"] = len(rows)
|
||||||
|
return rows, report
|
||||||
|
|
||||||
|
|
||||||
|
def generate(repo_root: Path, output: Path, report_path: Path) -> tuple[int, str]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
file_reports: list[dict[str, object]] = []
|
||||||
|
for path in files(repo_root):
|
||||||
|
parsed, report = parse_file(repo_root, path)
|
||||||
|
rows.extend(parsed)
|
||||||
|
file_reports.append(report)
|
||||||
|
rows.sort(key=lambda row: str(row["symbol_source_id"]))
|
||||||
|
output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with output.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for row in rows:
|
||||||
|
handle.write(json.dumps(row, ensure_ascii=False, sort_keys=True, separators=(",", ":")) + "\n")
|
||||||
|
digest = sha256(output)
|
||||||
|
report = {
|
||||||
|
"schema": "source-symbols-report.v1",
|
||||||
|
"files": len(file_reports),
|
||||||
|
"symbols": len(rows),
|
||||||
|
"files_without_symbols": sorted(report["path"] for report in file_reports if report["symbols"] == 0),
|
||||||
|
"decode_errors": [report for report in file_reports if report["parse_status"] != "parsed"],
|
||||||
|
"output_sha256": digest,
|
||||||
|
"file_reports": file_reports,
|
||||||
|
}
|
||||||
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
return len(rows), digest
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--output", type=Path, default=Path("coverage/source-symbols.jsonl"))
|
||||||
|
parser.add_argument("--report", type=Path, default=Path("coverage/source-symbols.report.json"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
count, digest = generate(args.repo_root.resolve(), args.repo_root.resolve() / args.output, args.repo_root.resolve() / args.report)
|
||||||
|
print(f"source_symbols={count} sha256={digest}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
236
scripts/generate_test_entries.py
Normal file
236
scripts/generate_test_entries.py
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate a deterministic index of LinuxCNC test and unit-test entrypoints."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
from collections import Counter
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
TEST_ROOT = Path("linuxcnc/tests")
|
||||||
|
UNIT_ROOT = Path("linuxcnc/unit_tests")
|
||||||
|
MESON_PATHS = (Path("linuxcnc/meson.build"),)
|
||||||
|
ENTRY_NAMES = {"test.sh", "test.py", "runstreamer", "checkresult"}
|
||||||
|
HARDWARE_TOKENS = (
|
||||||
|
"/dev/", "hm2", "hostmot2", "mesa", "parport", "gpio", "pci", "modbus",
|
||||||
|
"serial", "rtai", "xenomai", "latency", "linuxcncrsh", "mqtt", "tcp", "usb",
|
||||||
|
)
|
||||||
|
REALTIME_TOKENS = ("$realtime", "realtime", "rtapi", "halcmd", "halrun", "loadrt")
|
||||||
|
CONFIG_SUFFIXES = {".ini", ".hal", ".tbl", ".var", ".ngc", ".nc", ".tap", ".py", ".tcl"}
|
||||||
|
CONFIG_TOKEN_RE = re.compile(r"(?<![A-Za-z0-9_./~-])([^\s\"'=;,]+)")
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def rel(root: Path, path: Path) -> str:
|
||||||
|
# Keep symlinked/shared test paths distinct; hashing still follows the link.
|
||||||
|
return path.absolute().relative_to(root.absolute()).as_posix()
|
||||||
|
|
||||||
|
|
||||||
|
def read_text(path: Path) -> tuple[str | None, str | None]:
|
||||||
|
try:
|
||||||
|
return path.read_text(encoding="utf-8", errors="strict"), None
|
||||||
|
except (OSError, UnicodeError) as exc:
|
||||||
|
return None, f"{type(exc).__name__}: {exc}"
|
||||||
|
|
||||||
|
|
||||||
|
def classify(path: Path, text: str) -> tuple[str, str]:
|
||||||
|
haystack = f"{path.as_posix()}\n{text}".lower()
|
||||||
|
if any(token in haystack for token in HARDWARE_TOKENS):
|
||||||
|
return "REAL-EXCLUDED", "hardware_or_external_transport"
|
||||||
|
if any(token in haystack for token in REALTIME_TOKENS):
|
||||||
|
return "needs_review", "realtime_or_linuxcnc_process_dependency"
|
||||||
|
return "portable_candidate", "simulated_or_library_only"
|
||||||
|
|
||||||
|
|
||||||
|
def directory_context(root: Path, path: Path) -> tuple[list[str], list[str]]:
|
||||||
|
directory = path.parent
|
||||||
|
files = sorted(candidate for candidate in directory.iterdir() if candidate.is_file())
|
||||||
|
inputs = [rel(root, candidate) for candidate in files if candidate != path]
|
||||||
|
expected = [
|
||||||
|
rel(root, candidate) for candidate in files
|
||||||
|
if candidate.name.lower().startswith(("expected", "result", "golden"))
|
||||||
|
or candidate.name.lower() in {"expected", "expected.txt", "result", "golden"}
|
||||||
|
]
|
||||||
|
return inputs, expected
|
||||||
|
|
||||||
|
|
||||||
|
def config_refs(root: Path, path: Path, text: str) -> list[str]:
|
||||||
|
refs: set[str] = set()
|
||||||
|
for token in CONFIG_TOKEN_RE.findall(text):
|
||||||
|
if Path(token).suffix.lower() not in CONFIG_SUFFIXES:
|
||||||
|
continue
|
||||||
|
candidate = (path.parent / token).resolve()
|
||||||
|
try:
|
||||||
|
candidate.relative_to(root.resolve())
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
refs.add(rel(root, candidate))
|
||||||
|
return sorted(refs)
|
||||||
|
|
||||||
|
|
||||||
|
def entry(root: Path, path: Path, test_kind: str, command: str) -> dict[str, object]:
|
||||||
|
text, error = read_text(path)
|
||||||
|
if text is None:
|
||||||
|
text = ""
|
||||||
|
portability, reason = classify(path, text)
|
||||||
|
inputs, expected = directory_context(root, path)
|
||||||
|
status = "blocked" if error else "parsed"
|
||||||
|
row: dict[str, object] = {
|
||||||
|
"test_source_id": f"test:{rel(root, path)}",
|
||||||
|
"path": rel(root, path),
|
||||||
|
"test_kind": test_kind,
|
||||||
|
"command": command,
|
||||||
|
"inputs": inputs,
|
||||||
|
"expected": expected,
|
||||||
|
"config_refs": config_refs(root, path, text),
|
||||||
|
"portability": portability,
|
||||||
|
"portability_reason": reason,
|
||||||
|
"source_sha": sha256(path) if error is None else None,
|
||||||
|
"parse_status": status,
|
||||||
|
}
|
||||||
|
if error:
|
||||||
|
row["parse_error"] = error
|
||||||
|
return row
|
||||||
|
|
||||||
|
|
||||||
|
def script_command(root: Path, path: Path) -> tuple[str, str]:
|
||||||
|
name = path.name
|
||||||
|
if name == "test.py":
|
||||||
|
return "python_test", f"python3 {rel(root, path)}"
|
||||||
|
if name == "runstreamer":
|
||||||
|
return "stream_test", f"bash {rel(root, path)}"
|
||||||
|
if name == "checkresult":
|
||||||
|
text, _ = read_text(path)
|
||||||
|
interpreter = "python3" if text and "python" in text.splitlines()[0].lower() else "bash"
|
||||||
|
return "oracle_check", f"{interpreter} {rel(root, path)}"
|
||||||
|
return "shell_test", f"bash {rel(root, path)}"
|
||||||
|
|
||||||
|
|
||||||
|
def meson_entries(root: Path) -> list[dict[str, object]]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
paths = [root / path for path in MESON_PATHS]
|
||||||
|
paths.extend(sorted((root / UNIT_ROOT).rglob("meson.build")))
|
||||||
|
for path in sorted(set(paths)):
|
||||||
|
if not path.is_file():
|
||||||
|
continue
|
||||||
|
text, error = read_text(path)
|
||||||
|
if text is None:
|
||||||
|
text = ""
|
||||||
|
portability, reason = classify(path, text)
|
||||||
|
source_path = rel(root, path)
|
||||||
|
targets = sorted(set(re.findall(r"\btest\s*\(\s*['\"]([^'\"]+)", text)))
|
||||||
|
targets.extend(sorted(set(re.findall(r"executable\s*\(\s*['\"](test_[^'\"]+)", text))))
|
||||||
|
target_names = sorted(set(targets))
|
||||||
|
command = "meson test -C build-native --suite unit_tests"
|
||||||
|
row: dict[str, object] = {
|
||||||
|
"test_source_id": f"test:{source_path}",
|
||||||
|
"path": source_path,
|
||||||
|
"test_kind": "unit_test_build",
|
||||||
|
"command": command,
|
||||||
|
"inputs": sorted(rel(root, child) for child in path.parent.iterdir() if child.is_file()),
|
||||||
|
"expected": [],
|
||||||
|
"config_refs": [],
|
||||||
|
"meson_targets": target_names,
|
||||||
|
"portability": portability,
|
||||||
|
"portability_reason": reason,
|
||||||
|
"source_sha": sha256(path) if error is None else None,
|
||||||
|
"parse_status": "blocked" if error else ("parsed" if target_names else "needs_review"),
|
||||||
|
}
|
||||||
|
if error:
|
||||||
|
row["parse_error"] = error
|
||||||
|
rows.append(row)
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def unit_source_entries(root: Path) -> list[dict[str, object]]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
if not (root / UNIT_ROOT).is_dir():
|
||||||
|
return rows
|
||||||
|
for path in sorted((root / UNIT_ROOT).rglob("*")):
|
||||||
|
if not path.is_file() or path.suffix.lower() not in {".c", ".cc", ".cpp", ".cxx"}:
|
||||||
|
continue
|
||||||
|
if not (path.name.startswith("test_") or path.name.startswith("tests_")):
|
||||||
|
continue
|
||||||
|
source_path = rel(root, path)
|
||||||
|
portability, reason = classify(path, read_text(path)[0] or "")
|
||||||
|
rows.append({
|
||||||
|
"test_source_id": f"test:{source_path}",
|
||||||
|
"path": source_path,
|
||||||
|
"test_kind": "unit_test_source",
|
||||||
|
"command": f"meson test -C build-native {path.stem.removeprefix('test_')}",
|
||||||
|
"inputs": [source_path],
|
||||||
|
"expected": [],
|
||||||
|
"config_refs": [],
|
||||||
|
"portability": portability,
|
||||||
|
"portability_reason": reason,
|
||||||
|
"source_sha": sha256(path),
|
||||||
|
"parse_status": "parsed",
|
||||||
|
})
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def generate(root: Path, output: Path, report_path: Path) -> tuple[int, str]:
|
||||||
|
roots = [root / TEST_ROOT, root / UNIT_ROOT]
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
parse_errors: list[dict[str, str]] = []
|
||||||
|
for scan_root in roots:
|
||||||
|
if not scan_root.is_dir():
|
||||||
|
continue
|
||||||
|
for path in sorted(scan_root.rglob("*")):
|
||||||
|
if not path.is_file() or path.name not in ENTRY_NAMES:
|
||||||
|
continue
|
||||||
|
kind, command = script_command(root, path)
|
||||||
|
row = entry(root, path, kind, command)
|
||||||
|
rows.append(row)
|
||||||
|
if row["parse_status"] == "blocked":
|
||||||
|
parse_errors.append({"path": str(row["path"]), "error": str(row.get("parse_error", ""))})
|
||||||
|
rows.extend(meson_entries(root))
|
||||||
|
rows.extend(unit_source_entries(root))
|
||||||
|
rows.sort(key=lambda row: str(row["test_source_id"]))
|
||||||
|
output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with output.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for row in rows:
|
||||||
|
handle.write(json.dumps(row, ensure_ascii=False, sort_keys=True, separators=(",", ":")) + "\n")
|
||||||
|
digest = sha256(output)
|
||||||
|
portability = Counter(str(row["portability"]) for row in rows)
|
||||||
|
kinds = Counter(str(row["test_kind"]) for row in rows)
|
||||||
|
report = {
|
||||||
|
"schema": "test-entries-report.v1",
|
||||||
|
"entries": len(rows),
|
||||||
|
"test_directories": len({str(Path(str(row["path"])).parent) for row in rows}),
|
||||||
|
"test_kinds": dict(sorted(kinds.items())),
|
||||||
|
"portability": dict(sorted(portability.items())),
|
||||||
|
"parse_errors": parse_errors,
|
||||||
|
"blocked": sum(1 for row in rows if row["parse_status"] == "blocked"),
|
||||||
|
"output_sha256": digest,
|
||||||
|
}
|
||||||
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
return len(rows), digest
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--output", type=Path, default=Path("coverage/test-entries.jsonl"))
|
||||||
|
parser.add_argument("--report", type=Path, default=Path("coverage/test-entries.report.json"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
count, digest = generate(root, root / args.output, root / args.report)
|
||||||
|
print(f"test_entries={count} sha256={digest}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
243
scripts/native_runner.py
Normal file
243
scripts/native_runner.py
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Run one indexed test in a fixed native environment and emit an oracle record."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
import shlex
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
|
||||||
|
SCHEMA = "native-runner-result.v1"
|
||||||
|
GOLDEN_SCHEMA = "native-golden.v1"
|
||||||
|
DEFAULT_INDEX = Path("coverage/test-entries.jsonl")
|
||||||
|
DEFAULT_REPORT = Path("coverage/native-runner.report.json")
|
||||||
|
DEFAULT_ARTIFACTS = Path("build-native/native-runner-artifacts")
|
||||||
|
MAX_OUTPUT_BYTES = 4 * 1024 * 1024
|
||||||
|
PORTABLE_ENV = {
|
||||||
|
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||||
|
"HOME": ".runner-home",
|
||||||
|
"LANG": "C",
|
||||||
|
"LC_ALL": "C",
|
||||||
|
"TZ": "UTC",
|
||||||
|
"PYTHONHASHSEED": "0",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def sha256_bytes(value: bytes) -> str:
|
||||||
|
return hashlib.sha256(value).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def sha256_file(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def canonical_json(value: Any) -> str:
|
||||||
|
return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(",", ":"))
|
||||||
|
|
||||||
|
|
||||||
|
def read_entries(path: Path) -> list[dict[str, object]]:
|
||||||
|
entries: list[dict[str, object]] = []
|
||||||
|
with path.open("r", encoding="utf-8") as handle:
|
||||||
|
for line_number, line in enumerate(handle, 1):
|
||||||
|
if not line.strip():
|
||||||
|
continue
|
||||||
|
row = json.loads(line)
|
||||||
|
if not isinstance(row, dict):
|
||||||
|
raise ValueError(f"{path}:{line_number}: expected object")
|
||||||
|
entries.append(row)
|
||||||
|
return entries
|
||||||
|
|
||||||
|
|
||||||
|
def environment(root: Path) -> dict[str, str]:
|
||||||
|
result = dict(PORTABLE_ENV)
|
||||||
|
result["PWD"] = str(root)
|
||||||
|
result["LINUXCNC_RUNNER_ROOT"] = str(root)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def command_for_workdir(root: Path, entry: dict[str, object], workdir: Path) -> list[str]:
|
||||||
|
command = entry.get("command")
|
||||||
|
if not isinstance(command, str) or not command.strip():
|
||||||
|
raise ValueError("entry has no executable command")
|
||||||
|
tokens = shlex.split(command)
|
||||||
|
entry_path = root / str(entry.get("path", ""))
|
||||||
|
for index, token in enumerate(tokens):
|
||||||
|
candidate = (root / token).resolve() if not token.startswith("/") else Path(token)
|
||||||
|
try:
|
||||||
|
candidate.relative_to(workdir.resolve())
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
if candidate.is_file():
|
||||||
|
tokens[index] = os.path.relpath(candidate, workdir)
|
||||||
|
if entry_path.is_file() and tokens and tokens[-1] == str(entry.get("path")):
|
||||||
|
tokens[-1] = entry_path.name
|
||||||
|
return tokens
|
||||||
|
|
||||||
|
|
||||||
|
def result_digest(result: dict[str, object]) -> str:
|
||||||
|
payload = {key: value for key, value in result.items() if key not in {"duration_ms", "stdout", "stderr"}}
|
||||||
|
return sha256_bytes(canonical_json(payload).encode("utf-8"))
|
||||||
|
|
||||||
|
|
||||||
|
def compare_golden(actual: dict[str, object], golden: dict[str, object]) -> dict[str, object]:
|
||||||
|
if golden.get("schema") != GOLDEN_SCHEMA:
|
||||||
|
return {"status": "blocked", "reason": "unsupported_golden_schema"}
|
||||||
|
expected = golden.get("expected", {})
|
||||||
|
if not isinstance(expected, dict):
|
||||||
|
return {"status": "blocked", "reason": "golden_expected_must_be_object"}
|
||||||
|
differences: list[dict[str, object]] = []
|
||||||
|
for field, expected_value in sorted(expected.items()):
|
||||||
|
if actual.get(field) != expected_value:
|
||||||
|
differences.append({"field": field, "expected": expected_value, "actual": actual.get(field)})
|
||||||
|
if differences:
|
||||||
|
return {"status": "different", "differences": differences}
|
||||||
|
return {"status": "passed", "differences": []}
|
||||||
|
|
||||||
|
|
||||||
|
def run_entry(root: Path, entry: dict[str, object], artifacts_dir: Path, timeout: float,
|
||||||
|
allow_real_excluded: bool = False, allow_needs_review: bool = False,
|
||||||
|
golden: dict[str, object] | None = None) -> dict[str, object]:
|
||||||
|
portability = str(entry.get("portability", "needs_review"))
|
||||||
|
if portability == "REAL-EXCLUDED" and not allow_real_excluded:
|
||||||
|
return {
|
||||||
|
"schema": SCHEMA, "status": "REAL-EXCLUDED", "test_source_id": entry.get("test_source_id"),
|
||||||
|
"path": entry.get("path"), "portability": portability, "reason": "hardware_or_external_transport_requires_substitute",
|
||||||
|
}
|
||||||
|
if portability == "needs_review" and not allow_needs_review:
|
||||||
|
return {
|
||||||
|
"schema": SCHEMA, "status": "blocked", "test_source_id": entry.get("test_source_id"),
|
||||||
|
"path": entry.get("path"), "portability": portability, "reason": "needs_review_requires_explicit_override",
|
||||||
|
}
|
||||||
|
if entry.get("parse_status") == "blocked":
|
||||||
|
return {"schema": SCHEMA, "status": "blocked", "test_source_id": entry.get("test_source_id"), "path": entry.get("path"), "reason": "entry_parse_blocked"}
|
||||||
|
entry_path = root / str(entry.get("path", ""))
|
||||||
|
workdir = entry_path.parent if entry_path.is_file() else root
|
||||||
|
try:
|
||||||
|
command = command_for_workdir(root, entry, workdir)
|
||||||
|
except (ValueError, OSError) as exc:
|
||||||
|
return {"schema": SCHEMA, "status": "blocked", "test_source_id": entry.get("test_source_id"), "path": entry.get("path"), "reason": str(exc)}
|
||||||
|
try:
|
||||||
|
completed = subprocess.run(
|
||||||
|
command,
|
||||||
|
cwd=workdir,
|
||||||
|
env=environment(root),
|
||||||
|
stdin=subprocess.DEVNULL,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
timeout=timeout,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
timed_out = False
|
||||||
|
except subprocess.TimeoutExpired as exc:
|
||||||
|
completed = subprocess.CompletedProcess(command, 124, exc.stdout or b"", exc.stderr or b"")
|
||||||
|
timed_out = True
|
||||||
|
stdout = bytes(completed.stdout or b"")
|
||||||
|
stderr = bytes(completed.stderr or b"")
|
||||||
|
artifact_root = artifacts_dir / str(entry.get("test_source_id", "unknown")).replace("/", "_").replace(":", "_")
|
||||||
|
artifact_root.mkdir(parents=True, exist_ok=True)
|
||||||
|
stdout_path = artifact_root / "stdout.bin"
|
||||||
|
stderr_path = artifact_root / "stderr.bin"
|
||||||
|
stdout_path.write_bytes(stdout[:MAX_OUTPUT_BYTES])
|
||||||
|
stderr_path.write_bytes(stderr[:MAX_OUTPUT_BYTES])
|
||||||
|
status = "timeout" if timed_out else ("passed" if completed.returncode == 0 else "failed")
|
||||||
|
result: dict[str, object] = {
|
||||||
|
"schema": SCHEMA,
|
||||||
|
"status": status,
|
||||||
|
"test_source_id": entry.get("test_source_id"),
|
||||||
|
"path": entry.get("path"),
|
||||||
|
"command": command,
|
||||||
|
"cwd": str(workdir.relative_to(root)),
|
||||||
|
"portability": portability,
|
||||||
|
"exit_code": completed.returncode,
|
||||||
|
"stdout_bytes": len(stdout),
|
||||||
|
"stderr_bytes": len(stderr),
|
||||||
|
"stdout_sha256": sha256_bytes(stdout),
|
||||||
|
"stderr_sha256": sha256_bytes(stderr),
|
||||||
|
"stdout_artifact": str(stdout_path.relative_to(root)),
|
||||||
|
"stderr_artifact": str(stderr_path.relative_to(root)),
|
||||||
|
"source_sha": entry.get("source_sha"),
|
||||||
|
}
|
||||||
|
if len(stdout) <= MAX_OUTPUT_BYTES:
|
||||||
|
result["stdout"] = stdout.decode("utf-8", errors="replace")
|
||||||
|
if len(stderr) <= MAX_OUTPUT_BYTES:
|
||||||
|
result["stderr"] = stderr.decode("utf-8", errors="replace")
|
||||||
|
result["result_sha256"] = result_digest(result)
|
||||||
|
if golden is not None:
|
||||||
|
result["oracle"] = compare_golden(result, golden)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def self_test(root: Path, report_path: Path) -> int:
|
||||||
|
completed = subprocess.run(
|
||||||
|
[sys.executable, "-c", "print('native-runner-self-test')"],
|
||||||
|
cwd=root,
|
||||||
|
env=environment(root),
|
||||||
|
stdin=subprocess.DEVNULL,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
passed = completed.returncode == 0 and completed.stdout == b"native-runner-self-test\n" and completed.stderr == b""
|
||||||
|
report = {
|
||||||
|
"schema": "native-runner-report.v1",
|
||||||
|
"status": "passed" if passed else "failed",
|
||||||
|
"self_test": True,
|
||||||
|
"result": {
|
||||||
|
"exit_code": completed.returncode,
|
||||||
|
"stdout_sha256": sha256_bytes(completed.stdout),
|
||||||
|
"stderr_sha256": sha256_bytes(completed.stderr),
|
||||||
|
"expected_stdout_sha256": sha256_bytes(b"native-runner-self-test\n"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
print(f"native_runner=self-test status={report['status']}")
|
||||||
|
return 0 if passed else 1
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--index", type=Path, default=DEFAULT_INDEX)
|
||||||
|
parser.add_argument("--test-source-id")
|
||||||
|
parser.add_argument("--path")
|
||||||
|
parser.add_argument("--timeout", type=float, default=60.0)
|
||||||
|
parser.add_argument("--allow-real-excluded", action="store_true")
|
||||||
|
parser.add_argument("--allow-needs-review", action="store_true")
|
||||||
|
parser.add_argument("--golden", type=Path)
|
||||||
|
parser.add_argument("--artifacts-dir", type=Path, default=DEFAULT_ARTIFACTS)
|
||||||
|
parser.add_argument("--report", type=Path, default=DEFAULT_REPORT)
|
||||||
|
parser.add_argument("--self-test", action="store_true")
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
if args.self_test:
|
||||||
|
return self_test(root, root / args.report)
|
||||||
|
entries = read_entries(root / args.index)
|
||||||
|
matches = [entry for entry in entries if (not args.test_source_id or entry.get("test_source_id") == args.test_source_id) and (not args.path or entry.get("path") == args.path)]
|
||||||
|
if len(matches) != 1:
|
||||||
|
parser.error(f"expected exactly one test entry, found {len(matches)}")
|
||||||
|
golden = None
|
||||||
|
if args.golden:
|
||||||
|
golden = json.loads((root / args.golden).read_text(encoding="utf-8"))
|
||||||
|
result = run_entry(root, matches[0], root / args.artifacts_dir, args.timeout, args.allow_real_excluded, args.allow_needs_review, golden)
|
||||||
|
report = {"schema": "native-runner-report.v1", "status": result.get("status"), "result": result}
|
||||||
|
(root / args.report).parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
(root / args.report).write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
print(canonical_json(result))
|
||||||
|
return 0 if result.get("status") == "passed" else 1
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
239
scripts/normalize_sources.py
Normal file
239
scripts/normalize_sources.py
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Normalize the independent coverage indexes into stable cross-index records."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
from collections import defaultdict
|
||||||
|
from pathlib import Path, PurePosixPath
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
INDEXES = (
|
||||||
|
("source", Path("coverage/source-index.jsonl")),
|
||||||
|
("document", Path("coverage/document-capabilities.jsonl")),
|
||||||
|
("symbol", Path("coverage/source-symbols.jsonl")),
|
||||||
|
("resource", Path("coverage/config-resources.jsonl")),
|
||||||
|
("test", Path("coverage/test-entries.jsonl")),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def read_jsonl(path: Path) -> list[dict[str, object]]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
with path.open("r", encoding="utf-8") as handle:
|
||||||
|
for line_number, line in enumerate(handle, 1):
|
||||||
|
if not line.strip():
|
||||||
|
continue
|
||||||
|
value = json.loads(line)
|
||||||
|
if not isinstance(value, dict):
|
||||||
|
raise ValueError(f"{path}:{line_number}: expected object")
|
||||||
|
rows.append(value)
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def canonical_path(value: object) -> str | None:
|
||||||
|
if not isinstance(value, str) or not value.strip():
|
||||||
|
return None
|
||||||
|
raw = value.replace("\\", "/").strip()
|
||||||
|
if raw.startswith("/"):
|
||||||
|
return None
|
||||||
|
parts: list[str] = []
|
||||||
|
for part in PurePosixPath(raw).parts:
|
||||||
|
if part in ("", "."):
|
||||||
|
continue
|
||||||
|
if part == "..":
|
||||||
|
if not parts:
|
||||||
|
return None
|
||||||
|
parts.pop()
|
||||||
|
continue
|
||||||
|
parts.append(part)
|
||||||
|
return "/".join(parts) or None
|
||||||
|
|
||||||
|
|
||||||
|
def as_text(value: object) -> str:
|
||||||
|
return str(value) if value is not None else ""
|
||||||
|
|
||||||
|
|
||||||
|
def source_key(index_name: str, row: dict[str, object], path: str | None) -> str:
|
||||||
|
if index_name == "source":
|
||||||
|
return f"src:file:{path or as_text(row.get('source_id'))}"
|
||||||
|
if index_name == "document":
|
||||||
|
return f"src:doc:{path or 'unknown'}#{as_text(row.get('anchor')) or 'root'}"
|
||||||
|
if index_name == "symbol":
|
||||||
|
return "src:symbol:{}:{}:{}:{}".format(
|
||||||
|
path or "unknown", as_text(row.get("line")), as_text(row.get("symbol_kind")), as_text(row.get("symbol")),
|
||||||
|
)
|
||||||
|
if index_name == "resource":
|
||||||
|
entrypoint = canonical_path(row.get("entrypoint")) or "unknown"
|
||||||
|
return f"src:resource:{entrypoint}:{as_text(row.get('line'))}:{as_text(row.get('edge_kind'))}:{path or as_text(row.get('raw_value'))}"
|
||||||
|
return f"src:test:{path or as_text(row.get('test_source_id'))}"
|
||||||
|
|
||||||
|
|
||||||
|
def row_path(index_name: str, row: dict[str, object]) -> str | None:
|
||||||
|
if index_name == "document":
|
||||||
|
return canonical_path(row.get("document"))
|
||||||
|
if index_name == "resource":
|
||||||
|
return canonical_path(row.get("path"))
|
||||||
|
return canonical_path(row.get("path"))
|
||||||
|
|
||||||
|
|
||||||
|
def hash_path(index_name: str, row: dict[str, object]) -> str | None:
|
||||||
|
if index_name == "resource":
|
||||||
|
return canonical_path(row.get("origin_path")) or canonical_path(row.get("entrypoint"))
|
||||||
|
return row_path(index_name, row)
|
||||||
|
|
||||||
|
|
||||||
|
def original_id(index_name: str, row: dict[str, object]) -> str:
|
||||||
|
keys = {
|
||||||
|
"source": "source_id",
|
||||||
|
"document": "capability_source_id",
|
||||||
|
"symbol": "symbol_source_id",
|
||||||
|
"resource": "resource_source_id",
|
||||||
|
"test": "test_source_id",
|
||||||
|
}
|
||||||
|
return as_text(row.get(keys[index_name]))
|
||||||
|
|
||||||
|
|
||||||
|
def normalize_row(index_name: str, row: dict[str, object], root: Path, path_to_file_id: dict[str, str]) -> dict[str, object]:
|
||||||
|
path = row_path(index_name, row)
|
||||||
|
source_id = source_key(index_name, row, path)
|
||||||
|
source_hash = row.get("source_sha", row.get("sha256"))
|
||||||
|
if source_hash is not None:
|
||||||
|
source_hash = as_text(source_hash)
|
||||||
|
related: set[str] = set()
|
||||||
|
if path in path_to_file_id:
|
||||||
|
related.add(path_to_file_id[path])
|
||||||
|
if index_name == "resource":
|
||||||
|
origin = canonical_path(row.get("origin_path"))
|
||||||
|
target = canonical_path(row.get("path"))
|
||||||
|
if origin in path_to_file_id:
|
||||||
|
related.add(path_to_file_id[origin])
|
||||||
|
if target in path_to_file_id:
|
||||||
|
related.add(path_to_file_id[target])
|
||||||
|
elif index_name == "test":
|
||||||
|
for ref in row.get("config_refs", []) if isinstance(row.get("config_refs"), list) else []:
|
||||||
|
ref_path = canonical_path(ref)
|
||||||
|
if ref_path in path_to_file_id:
|
||||||
|
related.add(path_to_file_id[ref_path])
|
||||||
|
record: dict[str, object] = {
|
||||||
|
"source_id": source_id,
|
||||||
|
"origin_index": index_name,
|
||||||
|
"origin_source_id": original_id(index_name, row),
|
||||||
|
"path": path,
|
||||||
|
"hash_path": hash_path(index_name, row),
|
||||||
|
"source_sha": source_hash,
|
||||||
|
"domain": as_text(row.get("domain")) or ({"source": "source", "document": "documentation", "symbol": "code", "resource": "configuration", "test": "test"}[index_name]),
|
||||||
|
"kind": as_text(row.get("kind")) or as_text(row.get("symbol_kind")) or as_text(row.get("resource_kind")) or as_text(row.get("test_kind")) or index_name,
|
||||||
|
"line": row.get("line"),
|
||||||
|
"parse_status": as_text(row.get("parse_status")) or as_text(row.get("mapping_status")) or "parsed",
|
||||||
|
"related_source_ids": sorted(related),
|
||||||
|
}
|
||||||
|
if index_name == "resource":
|
||||||
|
record.update({
|
||||||
|
"edge_kind": row.get("edge_kind"),
|
||||||
|
"raw_value": row.get("raw_value"),
|
||||||
|
"resource_kind": row.get("resource_kind"),
|
||||||
|
"target_status": row.get("parse_status"),
|
||||||
|
})
|
||||||
|
elif index_name == "test":
|
||||||
|
record.update({
|
||||||
|
"command": row.get("command"),
|
||||||
|
"inputs": row.get("inputs", []),
|
||||||
|
"expected": row.get("expected", []),
|
||||||
|
"config_refs": row.get("config_refs", []),
|
||||||
|
"test_kind": row.get("test_kind"),
|
||||||
|
})
|
||||||
|
return record
|
||||||
|
|
||||||
|
|
||||||
|
def generate(root: Path, output: Path, report_path: Path) -> tuple[int, str]:
|
||||||
|
loaded: dict[str, list[dict[str, object]]] = {}
|
||||||
|
input_summary: dict[str, dict[str, object]] = {}
|
||||||
|
for index_name, relative_path in INDEXES:
|
||||||
|
path = root / relative_path
|
||||||
|
if not path.is_file():
|
||||||
|
raise FileNotFoundError(f"required index is missing: {relative_path}")
|
||||||
|
loaded[index_name] = read_jsonl(path)
|
||||||
|
input_summary[index_name] = {
|
||||||
|
"path": relative_path.as_posix(),
|
||||||
|
"rows": len(loaded[index_name]),
|
||||||
|
"sha256": sha256(path),
|
||||||
|
}
|
||||||
|
|
||||||
|
path_to_file_id: dict[str, str] = {}
|
||||||
|
for row in loaded["source"]:
|
||||||
|
path = canonical_path(row.get("path"))
|
||||||
|
if path:
|
||||||
|
path_to_file_id.setdefault(path, f"src:file:{path}")
|
||||||
|
|
||||||
|
records: list[dict[str, object]] = []
|
||||||
|
source_ids: set[str] = set()
|
||||||
|
source_id_counts: dict[str, int] = defaultdict(int)
|
||||||
|
collisions: list[dict[str, object]] = []
|
||||||
|
path_hashes: dict[str, set[str]] = defaultdict(set)
|
||||||
|
missing_paths: set[str] = set()
|
||||||
|
for index_name, _ in INDEXES:
|
||||||
|
for row in loaded[index_name]:
|
||||||
|
record = normalize_row(index_name, row, root, path_to_file_id)
|
||||||
|
base_source_id = str(record["source_id"])
|
||||||
|
source_id_counts[base_source_id] += 1
|
||||||
|
if base_source_id in source_ids:
|
||||||
|
collisions.append({"source_id": base_source_id, "occurrence": source_id_counts[base_source_id], "origin_index": index_name, "origin_source_id": record["origin_source_id"]})
|
||||||
|
record["source_id"] = f"{base_source_id}~dup{source_id_counts[base_source_id]}"
|
||||||
|
source_ids.add(str(record["source_id"]))
|
||||||
|
hash_value = record.get("source_sha")
|
||||||
|
hash_path_value = record.get("hash_path")
|
||||||
|
if hash_value and hash_path_value:
|
||||||
|
path_hashes[str(hash_path_value)].add(str(hash_value))
|
||||||
|
primary_path = record.get("path")
|
||||||
|
if primary_path and not (root / str(primary_path)).exists():
|
||||||
|
if not (index_name == "resource" and as_text(row.get("parse_status")) in {"missing", "unresolved", "host_or_variable_path", "outside_repo"}):
|
||||||
|
missing_paths.add(str(primary_path))
|
||||||
|
records.append(record)
|
||||||
|
|
||||||
|
records.sort(key=lambda row: str(row["source_id"]))
|
||||||
|
output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with output.open("w", encoding="utf-8", newline="\n") as handle:
|
||||||
|
for record in records:
|
||||||
|
handle.write(json.dumps(record, ensure_ascii=False, sort_keys=True, separators=(",", ":")) + "\n")
|
||||||
|
digest = sha256(output)
|
||||||
|
report = {
|
||||||
|
"schema": "normalized-sources-report.v1",
|
||||||
|
"records": len(records),
|
||||||
|
"unique_source_ids": len(source_ids),
|
||||||
|
"input_summary": input_summary,
|
||||||
|
"collisions": collisions,
|
||||||
|
"hash_conflicts": {path: sorted(values) for path, values in sorted(path_hashes.items()) if len(values) > 1},
|
||||||
|
"missing_paths": sorted(missing_paths),
|
||||||
|
"orphan_related_ids": sum(1 for row in records if not row["related_source_ids"] and row["origin_index"] != "source"),
|
||||||
|
"output_sha256": digest,
|
||||||
|
}
|
||||||
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2) + "\n", encoding="utf-8")
|
||||||
|
return len(records), digest
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--output", type=Path, default=Path("coverage/normalized-sources.jsonl"))
|
||||||
|
parser.add_argument("--report", type=Path, default=Path("coverage/normalized-sources.report.json"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
count, digest = generate(root, root / args.output, root / args.report)
|
||||||
|
print(f"normalized_sources={count} sha256={digest}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
65
scripts/test_config_resources.py
Normal file
65
scripts/test_config_resources.py
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from generate_config_resources import generate, scan_entrypoint
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigResourcesTests(unittest.TestCase):
|
||||||
|
def create_tree(self):
|
||||||
|
directory = TemporaryDirectory()
|
||||||
|
root = Path(directory.name)
|
||||||
|
config = root / "linuxcnc/configs/sim/demo"
|
||||||
|
config.mkdir(parents=True)
|
||||||
|
(config / "main.ini").write_text(
|
||||||
|
"[HAL]\nHALFILE = core.hal\nPOSTGUI_HALFILE = post.hal\n"
|
||||||
|
"[RS274NGC]\nPARAMETER_FILE = vars.var\nSUBROUTINE_PATH = macros\n"
|
||||||
|
"[EMCIO]\nTOOL_TABLE = tools.tbl\n",
|
||||||
|
encoding="utf-8",
|
||||||
|
)
|
||||||
|
(config / "core.hal").write_text("source extra.hal\nloadusr helper.py\n", encoding="utf-8")
|
||||||
|
(config / "post.hal").write_text("loadrt demo\n", encoding="utf-8")
|
||||||
|
(config / "extra.hal").write_text("setp demo.value 1\n", encoding="utf-8")
|
||||||
|
(config / "helper.py").write_text("print('ok')\n", encoding="utf-8")
|
||||||
|
(config / "tools.tbl").write_text("T1 P1\n", encoding="utf-8")
|
||||||
|
(config / "vars.var").write_text("#1 = 2\n", encoding="utf-8")
|
||||||
|
(config / "macros").mkdir()
|
||||||
|
return directory, root, config / "main.ini"
|
||||||
|
|
||||||
|
def test_resolves_ini_and_hal_edges(self):
|
||||||
|
directory, root, entrypoint = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
rows = scan_entrypoint(root, root / "linuxcnc/configs/sim", entrypoint)
|
||||||
|
paths = {row["path"] for row in rows}
|
||||||
|
self.assertIn("linuxcnc/configs/sim/demo/core.hal", paths)
|
||||||
|
self.assertIn("linuxcnc/configs/sim/demo/extra.hal", paths)
|
||||||
|
self.assertIn("linuxcnc/configs/sim/demo/helper.py", paths)
|
||||||
|
self.assertIn("linuxcnc/configs/sim/demo/tools.tbl", paths)
|
||||||
|
|
||||||
|
def test_missing_resource_is_retained(self):
|
||||||
|
directory, root, entrypoint = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
entrypoint.write_text("[HAL]\nHALFILE = missing.hal\n", encoding="utf-8")
|
||||||
|
rows = scan_entrypoint(root, root / "linuxcnc/configs/sim", entrypoint)
|
||||||
|
missing = [row for row in rows if row["path"].endswith("missing.hal")]
|
||||||
|
self.assertEqual(len(missing), 1)
|
||||||
|
self.assertEqual(missing[0]["parse_status"], "missing")
|
||||||
|
|
||||||
|
def test_generation_is_deterministic(self):
|
||||||
|
directory, root, _ = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
first = root / "one.jsonl"
|
||||||
|
second = root / "two.jsonl"
|
||||||
|
report = root / "report.json"
|
||||||
|
_, digest_one = generate(root, first, report)
|
||||||
|
_, digest_two = generate(root, second, report)
|
||||||
|
self.assertEqual(digest_one, digest_two)
|
||||||
|
self.assertEqual(first.read_bytes(), second.read_bytes())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
153
scripts/test_context_packet.py
Normal file
153
scripts/test_context_packet.py
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
from context_packet import PacketError, generate_packet
|
||||||
|
|
||||||
|
|
||||||
|
class ContextPacketTests(unittest.TestCase):
|
||||||
|
def base(self, candidates):
|
||||||
|
return {
|
||||||
|
"task": "bounded task",
|
||||||
|
"header": {"milestone": "M1"},
|
||||||
|
"baseline": {"source_sha": "abc"},
|
||||||
|
"scope": {"include": ["feature/1"]},
|
||||||
|
"contracts": ["protocol.v1"],
|
||||||
|
"risks": [],
|
||||||
|
"next": ["run test"],
|
||||||
|
"forbidden": ["real hardware"],
|
||||||
|
"candidates": candidates,
|
||||||
|
}
|
||||||
|
|
||||||
|
def test_filters_by_evidence_bytes_before_final_write(self):
|
||||||
|
packet = generate_packet(
|
||||||
|
self.base([
|
||||||
|
{"path": "small.log", "size": 6, "priority": 2},
|
||||||
|
{"path": "large.log", "size": 7, "priority": 1},
|
||||||
|
]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=4096,
|
||||||
|
evidence_bytes=10,
|
||||||
|
)
|
||||||
|
self.assertEqual([item["path"] for item in packet["evidence"]["selected"]], ["small.log"])
|
||||||
|
self.assertEqual(packet["evidence"]["excluded"][0]["reason_code"], "E4")
|
||||||
|
self.assertLessEqual(packet["budget"]["packet_bytes"], 4096)
|
||||||
|
|
||||||
|
def test_filters_by_remaining_context_space(self):
|
||||||
|
packet = generate_packet(
|
||||||
|
self.base([{"path": "evidence.log", "size": 1, "priority": 1}]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=550,
|
||||||
|
evidence_bytes=100,
|
||||||
|
)
|
||||||
|
self.assertEqual(packet["evidence"]["selected"], [])
|
||||||
|
self.assertEqual(packet["evidence"]["excluded"][0]["reason_code"], "E5")
|
||||||
|
self.assertLessEqual(packet["budget"]["packet_bytes"], 550)
|
||||||
|
|
||||||
|
def test_evidence_payload_counts_against_total_context_budget(self):
|
||||||
|
packet = generate_packet(
|
||||||
|
self.base([{"path": "payload.bin", "size": 40, "priority": 1}]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=570,
|
||||||
|
evidence_bytes=100,
|
||||||
|
)
|
||||||
|
self.assertEqual(packet["evidence"]["selected"], [])
|
||||||
|
self.assertEqual(packet["evidence"]["excluded"][0]["reason_code"], "E5")
|
||||||
|
self.assertLessEqual(
|
||||||
|
packet["budget"]["packet_bytes"]
|
||||||
|
+ packet["budget"]["selected_evidence_bytes"],
|
||||||
|
570,
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
packet["budget"]["packet_bytes"],
|
||||||
|
len(json.dumps(packet, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode("utf-8")),
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_skeleton_over_budget_fails_before_selection(self):
|
||||||
|
with self.assertRaisesRegex(PacketError, "context skeleton exceeds byte budget"):
|
||||||
|
generate_packet(
|
||||||
|
self.base([]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=100,
|
||||||
|
evidence_bytes=100,
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_required_item_fails_without_writing_an_over_budget_packet(self):
|
||||||
|
with self.assertRaisesRegex(PacketError, "required evidence cannot fit"):
|
||||||
|
generate_packet(
|
||||||
|
self.base([{"path": "required.log", "size": 101, "required": True}]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=4096,
|
||||||
|
evidence_bytes=100,
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_required_item_fails_when_payload_consumes_remaining_context(self):
|
||||||
|
with self.assertRaisesRegex(PacketError, r"required evidence cannot fit \(E5\)"):
|
||||||
|
generate_packet(
|
||||||
|
self.base([{"path": "required.log", "size": 40, "required": True}]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=570,
|
||||||
|
evidence_bytes=100,
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_selection_is_deterministic_and_count_is_enforced(self):
|
||||||
|
packet = generate_packet(
|
||||||
|
self.base([
|
||||||
|
{"path": "z.log", "size": 1},
|
||||||
|
{"path": "a.log", "size": 1},
|
||||||
|
{"path": "required.log", "size": 1, "required": True},
|
||||||
|
]),
|
||||||
|
context_id="c1",
|
||||||
|
packet_id="p1",
|
||||||
|
total_bytes=4096,
|
||||||
|
evidence_bytes=100,
|
||||||
|
max_files=2,
|
||||||
|
)
|
||||||
|
self.assertEqual([item["path"] for item in packet["evidence"]["selected"]], ["required.log", "a.log"])
|
||||||
|
self.assertEqual(packet["evidence"]["excluded"][0]["reason_code"], "E3")
|
||||||
|
|
||||||
|
def test_cli_does_not_replace_existing_output_on_generation_failure(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
root = Path(directory)
|
||||||
|
input_path = root / "input.json"
|
||||||
|
output_path = root / "packet.json"
|
||||||
|
input_path.write_text(
|
||||||
|
json.dumps(self.base([{"path": "required.log", "size": 101, "required": True}]))
|
||||||
|
)
|
||||||
|
output_path.write_text("previous packet")
|
||||||
|
result = subprocess.run(
|
||||||
|
[
|
||||||
|
"python3",
|
||||||
|
"scripts/context_packet.py",
|
||||||
|
"--input",
|
||||||
|
str(input_path),
|
||||||
|
"--output",
|
||||||
|
str(output_path),
|
||||||
|
"--context-id",
|
||||||
|
"c1",
|
||||||
|
"--packet-id",
|
||||||
|
"p1",
|
||||||
|
"--total-bytes",
|
||||||
|
"4096",
|
||||||
|
"--evidence-bytes",
|
||||||
|
"100",
|
||||||
|
],
|
||||||
|
check=False,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertEqual(result.returncode, 2)
|
||||||
|
self.assertEqual(output_path.read_text(), "previous packet")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
63
scripts/test_dependency_closure.py
Normal file
63
scripts/test_dependency_closure.py
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from generate_dependency_closure import generate
|
||||||
|
|
||||||
|
|
||||||
|
class DependencyClosureTests(unittest.TestCase):
|
||||||
|
def create_tree(self):
|
||||||
|
directory = TemporaryDirectory()
|
||||||
|
root = Path(directory.name)
|
||||||
|
(root / "coverage").mkdir()
|
||||||
|
(root / "linuxcnc").mkdir()
|
||||||
|
(root / "linuxcnc/src").mkdir()
|
||||||
|
(root / "linuxcnc/configs").mkdir()
|
||||||
|
(root / "linuxcnc/tests/demo").mkdir(parents=True)
|
||||||
|
(root / "linuxcnc/src/a.c").write_text("int a;\n", encoding="utf-8")
|
||||||
|
(root / "linuxcnc/configs/demo.ini").write_text("[EMC]\n", encoding="utf-8")
|
||||||
|
(root / "linuxcnc/tests/demo/test.sh").write_text("#!/bin/sh\n", encoding="utf-8")
|
||||||
|
rows = [
|
||||||
|
{"source_id": "src:file:linuxcnc/src/a.c", "origin_index": "source", "origin_source_id": "build:a", "path": "linuxcnc/src/a.c", "hash_path": "linuxcnc/src/a.c", "source_sha": "a", "domain": "source", "kind": "source", "line": None, "parse_status": "parsed", "related_source_ids": []},
|
||||||
|
{"source_id": "src:file:linuxcnc/configs/demo.ini", "origin_index": "source", "origin_source_id": "build:ini", "path": "linuxcnc/configs/demo.ini", "hash_path": "linuxcnc/configs/demo.ini", "source_sha": "b", "domain": "source", "kind": "source", "line": None, "parse_status": "parsed", "related_source_ids": []},
|
||||||
|
{"source_id": "src:test:linuxcnc/tests/demo/test.sh", "origin_index": "test", "origin_source_id": "test:demo", "path": "linuxcnc/tests/demo/test.sh", "hash_path": "linuxcnc/tests/demo/test.sh", "source_sha": "c", "domain": "test", "kind": "shell_test", "line": None, "parse_status": "parsed", "related_source_ids": [], "command": "bash", "inputs": ["linuxcnc/src/a.c"], "expected": [], "config_refs": ["linuxcnc/configs/missing.ini"], "test_kind": "shell_test"},
|
||||||
|
]
|
||||||
|
(root / "coverage/normalized-sources.jsonl").write_text("".join(json.dumps(row) + "\n" for row in rows), encoding="utf-8")
|
||||||
|
return directory, root
|
||||||
|
|
||||||
|
def test_resolved_and_unresolved_edges_are_retained(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
count, _ = generate(root, root / "out.jsonl", root / "report.json")
|
||||||
|
rows = [json.loads(line) for line in (root / "out.jsonl").read_text(encoding="utf-8").splitlines()]
|
||||||
|
self.assertEqual(count, 2)
|
||||||
|
self.assertTrue(any(row["parse_status"] == "resolved" for row in rows))
|
||||||
|
self.assertTrue(any(row["to_source_id"].startswith("unresolved:") for row in rows))
|
||||||
|
|
||||||
|
def test_deterministic_output(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
_, first = generate(root, root / "one.jsonl", root / "report.json")
|
||||||
|
_, second = generate(root, root / "two.jsonl", root / "report.json")
|
||||||
|
self.assertEqual(first, second)
|
||||||
|
self.assertEqual((root / "one.jsonl").read_bytes(), (root / "two.jsonl").read_bytes())
|
||||||
|
|
||||||
|
def test_duplicate_edges_are_reported(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
path = root / "coverage/normalized-sources.jsonl"
|
||||||
|
rows = [json.loads(line) for line in path.read_text(encoding="utf-8").splitlines()]
|
||||||
|
rows[-1]["inputs"] = ["linuxcnc/src/a.c", "linuxcnc/src/a.c"]
|
||||||
|
path.write_text("".join(json.dumps(row) + "\n" for row in rows), encoding="utf-8")
|
||||||
|
generate(root, root / "out.jsonl", root / "report.json")
|
||||||
|
report = json.loads((root / "report.json").read_text(encoding="utf-8"))
|
||||||
|
self.assertTrue(report["duplicate_edges"])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
62
scripts/test_document_capabilities.py
Normal file
62
scripts/test_document_capabilities.py
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from generate_document_capabilities import make_entries, parse_headings, slugify
|
||||||
|
|
||||||
|
|
||||||
|
class DocumentCapabilitiesTests(unittest.TestCase):
|
||||||
|
def test_slugify_is_ascii_and_deterministic(self):
|
||||||
|
self.assertEqual(slugify("G-Code & Motion"), "g-code-and-motion")
|
||||||
|
self.assertEqual(slugify("!!!"), "section")
|
||||||
|
|
||||||
|
def test_explicit_anchor_and_duplicate_heading_are_stable(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
path = Path(directory) / "sample.adoc"
|
||||||
|
path.write_text("[[explicit]]\n== Same\n== Same\n", encoding="utf-8")
|
||||||
|
headings = parse_headings(path)
|
||||||
|
self.assertEqual(headings[0].anchor, "explicit")
|
||||||
|
self.assertEqual(headings[1].anchor, None)
|
||||||
|
|
||||||
|
def test_include_graph_and_project_documents_are_indexed(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
root = Path(directory)
|
||||||
|
(root / "linuxcnc/docs/src/sub").mkdir(parents=True)
|
||||||
|
(root / "docs").mkdir()
|
||||||
|
(root / "linuxcnc/docs/src/Master_Documentation.adoc").write_text(
|
||||||
|
"include::sub/a.adoc[]\n", encoding="utf-8"
|
||||||
|
)
|
||||||
|
(root / "linuxcnc/docs/src/sub/a.adoc").write_text("[[a]]\n= HAL\n", encoding="utf-8")
|
||||||
|
(root / "docs/linuxcnc-web-wasm-source-map.md").write_text("# Source Map\n", encoding="utf-8")
|
||||||
|
(root / "docs/linuxcnc-web-wasm-simulation-coverage.md").write_text("# Coverage\n", encoding="utf-8")
|
||||||
|
entries, report = make_entries(root)
|
||||||
|
ids = {str(entry["capability_source_id"]) for entry in entries}
|
||||||
|
self.assertIn("doc:linuxcnc/docs/src/sub/a.adoc#a", ids)
|
||||||
|
self.assertIn("doc:docs/linuxcnc-web-wasm-source-map.md#source-map", ids)
|
||||||
|
self.assertEqual(report["duplicate_ids"], [])
|
||||||
|
|
||||||
|
def test_generated_entries_have_required_fields(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
root = Path(directory)
|
||||||
|
(root / "linuxcnc/docs/src").mkdir(parents=True)
|
||||||
|
(root / "docs").mkdir()
|
||||||
|
(root / "linuxcnc/docs/src/Master_Documentation.adoc").write_text("= G-Code\n", encoding="utf-8")
|
||||||
|
for name in ("linuxcnc-web-wasm-source-map.md", "linuxcnc-web-wasm-simulation-coverage.md"):
|
||||||
|
(root / "docs" / name).write_text("# Project\n", encoding="utf-8")
|
||||||
|
entries, _ = make_entries(root)
|
||||||
|
for entry in entries:
|
||||||
|
self.assertTrue(entry["capability_source_id"])
|
||||||
|
self.assertTrue(entry["document"])
|
||||||
|
self.assertTrue(entry["anchor"])
|
||||||
|
self.assertTrue(entry["title"])
|
||||||
|
self.assertTrue(entry["source_sha"])
|
||||||
|
self.assertIn(entry["mapping_status"], {"mapped", "needs_review"})
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
51
scripts/test_download_index.py
Normal file
51
scripts/test_download_index.py
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
from validate_download_index import validate
|
||||||
|
|
||||||
|
|
||||||
|
class DownloadIndexTests(unittest.TestCase):
|
||||||
|
def write(self, row):
|
||||||
|
directory = TemporaryDirectory()
|
||||||
|
path = Path(directory.name) / "index.jsonl"
|
||||||
|
path.write_text(json.dumps(row) + "\n", encoding="utf-8")
|
||||||
|
return directory, path
|
||||||
|
|
||||||
|
def test_empty_project_index_is_valid(self):
|
||||||
|
self.assertEqual(validate(Path("vendor/downloads/index.jsonl")), [])
|
||||||
|
|
||||||
|
def test_china_mirror_requires_origin(self):
|
||||||
|
directory, path = self.write({
|
||||||
|
"record_type": "artifact",
|
||||||
|
"name": "demo",
|
||||||
|
"version": "1",
|
||||||
|
"source_url": "https://mirror.example/demo",
|
||||||
|
"sha256": "0" * 64,
|
||||||
|
"bytes": 1,
|
||||||
|
"license": "MIT",
|
||||||
|
"mirror_kind": "china-mirror",
|
||||||
|
})
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
errors = validate(path)
|
||||||
|
self.assertTrue(any("origin_url" in error for error in errors))
|
||||||
|
|
||||||
|
def test_valid_local_cache_record(self):
|
||||||
|
directory, path = self.write({
|
||||||
|
"record_type": "artifact",
|
||||||
|
"name": "demo",
|
||||||
|
"version": "1",
|
||||||
|
"source_url": "demo.tar",
|
||||||
|
"sha256": "0" * 64,
|
||||||
|
"bytes": 1,
|
||||||
|
"license": "MIT",
|
||||||
|
"mirror_kind": "local-cache",
|
||||||
|
})
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
self.assertEqual(validate(path), [])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
33
scripts/test_hal_runtime.py
Normal file
33
scripts/test_hal_runtime.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
|
|
||||||
|
class HalRuntimeTests(unittest.TestCase):
|
||||||
|
def test_native_hal_binary(self):
|
||||||
|
binary = ROOT / "build-native/sim_hal_test"
|
||||||
|
if not binary.is_file():
|
||||||
|
self.skipTest("native build has not been generated")
|
||||||
|
result = subprocess.run([str(binary)], cwd=ROOT, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
self.assertEqual(result.returncode, 0, result.stderr.decode(errors="replace"))
|
||||||
|
|
||||||
|
def test_header_declares_error_boundary(self):
|
||||||
|
header = (ROOT / "wasm-core/include/sim_hal.h").read_text(encoding="utf-8")
|
||||||
|
for token in ("SIM_HAL_ERR_TYPE", "SIM_HAL_ERR_FUNCTION", "SIM_HAL_ERR_REAL_EXCLUDED", "sim_hal_step"):
|
||||||
|
self.assertIn(token, header)
|
||||||
|
|
||||||
|
def test_wasm_exports_hal_api(self):
|
||||||
|
module = ROOT / "build-wasm/linuxcnc-sim-core.js"
|
||||||
|
if not module.is_file():
|
||||||
|
self.skipTest("WASM build has not been generated")
|
||||||
|
text = module.read_text(encoding="utf-8")
|
||||||
|
for symbol in ("sim_hal_register_pin", "sim_hal_register_thread", "sim_hal_step"):
|
||||||
|
self.assertIn(symbol, text)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
54
scripts/test_native_runner.py
Normal file
54
scripts/test_native_runner.py
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from native_runner import compare_golden, run_entry
|
||||||
|
|
||||||
|
|
||||||
|
class NativeRunnerTests(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.directory = TemporaryDirectory()
|
||||||
|
self.root = Path(self.directory.name)
|
||||||
|
(self.root / "linuxcnc/tests/demo").mkdir(parents=True)
|
||||||
|
(self.root / "linuxcnc/tests/demo/test.sh").write_text("#!/bin/sh\nprintf 'ok\\n'\n", encoding="utf-8")
|
||||||
|
(self.root / "artifacts").mkdir()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
self.directory.cleanup()
|
||||||
|
|
||||||
|
def entry(self, portability="portable_candidate"):
|
||||||
|
return {
|
||||||
|
"test_source_id": "test:linuxcnc/tests/demo/test.sh",
|
||||||
|
"path": "linuxcnc/tests/demo/test.sh",
|
||||||
|
"command": "bash linuxcnc/tests/demo/test.sh",
|
||||||
|
"portability": portability,
|
||||||
|
"parse_status": "parsed",
|
||||||
|
"source_sha": "source",
|
||||||
|
}
|
||||||
|
|
||||||
|
def test_fixed_runner_emits_stable_content_hashes(self):
|
||||||
|
result = run_entry(self.root, self.entry(), self.root / "artifacts", 5)
|
||||||
|
self.assertEqual(result["status"], "passed")
|
||||||
|
self.assertEqual(result["stdout"], "ok\n")
|
||||||
|
self.assertEqual(result["cwd"], "linuxcnc/tests/demo")
|
||||||
|
self.assertRegex(result["result_sha256"], r"^[0-9a-f]{64}$")
|
||||||
|
|
||||||
|
def test_real_excluded_is_not_executed_without_override(self):
|
||||||
|
result = run_entry(self.root, self.entry("REAL-EXCLUDED"), self.root / "artifacts", 5)
|
||||||
|
self.assertEqual(result["status"], "REAL-EXCLUDED")
|
||||||
|
self.assertNotIn("exit_code", result)
|
||||||
|
|
||||||
|
def test_golden_comparison_is_explicit(self):
|
||||||
|
actual = {"status": "passed", "exit_code": 0}
|
||||||
|
self.assertEqual(compare_golden(actual, {"schema": "native-golden.v1", "expected": actual})["status"], "passed")
|
||||||
|
self.assertEqual(compare_golden(actual, {"schema": "native-golden.v1", "expected": {"exit_code": 1}})["status"], "different")
|
||||||
|
self.assertEqual(compare_golden(actual, {"schema": "unknown", "expected": actual})["status"], "blocked")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
69
scripts/test_normalize_sources.py
Normal file
69
scripts/test_normalize_sources.py
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from normalize_sources import generate
|
||||||
|
|
||||||
|
|
||||||
|
class NormalizeSourcesTests(unittest.TestCase):
|
||||||
|
def create_tree(self):
|
||||||
|
directory = TemporaryDirectory()
|
||||||
|
root = Path(directory.name)
|
||||||
|
(root / "coverage").mkdir()
|
||||||
|
(root / "linuxcnc/src").mkdir(parents=True)
|
||||||
|
(root / "docs").mkdir()
|
||||||
|
(root / "linuxcnc/configs/sim/demo").mkdir(parents=True)
|
||||||
|
(root / "linuxcnc/tests/demo").mkdir(parents=True)
|
||||||
|
(root / "linuxcnc/src/demo.c").write_text("int main(void) { return 0; }\n", encoding="utf-8")
|
||||||
|
(root / "docs/demo.md").write_text("# Demo\n", encoding="utf-8")
|
||||||
|
(root / "linuxcnc/configs/sim/demo/main.ini").write_text("[EMC]\n", encoding="utf-8")
|
||||||
|
(root / "linuxcnc/tests/demo/test.sh").write_text("#!/bin/sh\n", encoding="utf-8")
|
||||||
|
indexes = {
|
||||||
|
"source-index.jsonl": [{"bytes": 1, "kind": "source", "path": "linuxcnc/src/demo.c", "sha256": "a", "source_id": "build:demo"}],
|
||||||
|
"document-capabilities.jsonl": [{"anchor": "demo", "capability_source_id": "doc:demo#demo", "document": "docs/demo.md", "domain": "demo", "source_sha": "b", "title": "Demo"}],
|
||||||
|
"source-symbols.jsonl": [{"language": "c", "line": 1, "parse_status": "parsed", "path": "linuxcnc/src/demo.c", "source_sha": "a", "symbol": "main", "symbol_kind": "function", "symbol_source_id": "symbol:demo"}],
|
||||||
|
"config-resources.jsonl": [{"edge_kind": "ini:EMC", "entrypoint": "linuxcnc/configs/sim/demo/main.ini", "line": 1, "origin_path": "linuxcnc/configs/sim/demo/main.ini", "parse_status": "resolved_file", "path": "linuxcnc/configs/sim/demo/main.ini", "resource_kind": "ini", "resource_source_id": "resource:demo", "source_sha": "c", "target_sha256": "c"}],
|
||||||
|
"test-entries.jsonl": [{"command": "bash linuxcnc/tests/demo/test.sh", "config_refs": [], "expected": [], "inputs": [], "parse_status": "parsed", "path": "linuxcnc/tests/demo/test.sh", "portability": "portable_candidate", "source_sha": "d", "test_kind": "shell_test", "test_source_id": "test:demo"}],
|
||||||
|
}
|
||||||
|
for name, rows in indexes.items():
|
||||||
|
(root / "coverage" / name).write_text("".join(json.dumps(row) + "\n" for row in rows), encoding="utf-8")
|
||||||
|
return directory, root
|
||||||
|
|
||||||
|
def test_normalized_ids_are_unique_and_link_files(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
output = root / "coverage/normalized.jsonl"
|
||||||
|
count, _ = generate(root, output, root / "coverage/report.json")
|
||||||
|
rows = [json.loads(line) for line in output.read_text(encoding="utf-8").splitlines()]
|
||||||
|
self.assertEqual(count, 5)
|
||||||
|
self.assertEqual(len(rows), len({row["source_id"] for row in rows}))
|
||||||
|
symbol = next(row for row in rows if row["origin_index"] == "symbol")
|
||||||
|
self.assertIn("src:file:linuxcnc/src/demo.c", symbol["related_source_ids"])
|
||||||
|
|
||||||
|
def test_missing_and_hash_conflicts_are_reported(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
source = root / "coverage/source-index.jsonl"
|
||||||
|
source.write_text(json.dumps({"bytes": 1, "kind": "source", "path": "linuxcnc/src/demo.c", "sha256": "different", "source_id": "build:demo"}) + "\n", encoding="utf-8")
|
||||||
|
report_path = root / "coverage/report.json"
|
||||||
|
generate(root, root / "out.jsonl", report_path)
|
||||||
|
report = json.loads(report_path.read_text(encoding="utf-8"))
|
||||||
|
self.assertTrue(report["hash_conflicts"])
|
||||||
|
self.assertFalse(report["missing_paths"])
|
||||||
|
|
||||||
|
def test_generation_is_deterministic(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
_, first = generate(root, root / "one.jsonl", root / "report.json")
|
||||||
|
_, second = generate(root, root / "two.jsonl", root / "report.json")
|
||||||
|
self.assertEqual(first, second)
|
||||||
|
self.assertEqual((root / "one.jsonl").read_bytes(), (root / "two.jsonl").read_bytes())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
32
scripts/test_posemath_runtime.py
Normal file
32
scripts/test_posemath_runtime.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import subprocess
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
|
|
||||||
|
class PosemathRuntimeTests(unittest.TestCase):
|
||||||
|
def test_native_posemath_binary(self):
|
||||||
|
binary = ROOT / "build-native/sim_posemath_test"
|
||||||
|
if not binary.is_file():
|
||||||
|
self.skipTest("native build has not been generated")
|
||||||
|
result = subprocess.run([str(binary)], cwd=ROOT, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
self.assertEqual(result.returncode, 0, result.stderr.decode(errors="replace"))
|
||||||
|
|
||||||
|
def test_wasm_exports_posemath_api(self):
|
||||||
|
module = ROOT / "build-wasm/linuxcnc-sim-core.js"
|
||||||
|
if not module.is_file():
|
||||||
|
self.skipTest("WASM build has not been generated")
|
||||||
|
text = module.read_text(encoding="utf-8")
|
||||||
|
for symbol in ("sim_posemath_normalize", "sim_posemath_dot", "sim_posemath_line_point"):
|
||||||
|
self.assertIn(symbol, text)
|
||||||
|
|
||||||
|
def test_posemath_source_is_linked(self):
|
||||||
|
cmake = (ROOT / "wasm-core/CMakeLists.txt").read_text(encoding="utf-8")
|
||||||
|
self.assertIn("posemath.cc", cmake)
|
||||||
|
self.assertIn("target_link_libraries(sim_core PUBLIC sim_posemath)", cmake)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
68
scripts/test_protocol.py
Normal file
68
scripts/test_protocol.py
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Smoke tests for the fixed protocol ABI and its generated WASM exports."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
|
|
||||||
|
class ProtocolTests(unittest.TestCase):
|
||||||
|
def test_contract_declares_versions_and_errors(self):
|
||||||
|
header = (ROOT / "wasm-core/include/sim_protocol.h").read_text(encoding="utf-8")
|
||||||
|
for token in ("SIM_PROTOCOL_ERR_SCHEMA", "SIM_PROTOCOL_ERR_SEQUENCE", "sim_protocol_accept", "sim_protocol_last_seq"):
|
||||||
|
self.assertIn(token, header)
|
||||||
|
|
||||||
|
def test_native_protocol_binary_passes(self):
|
||||||
|
binary = ROOT / "build-native/sim_protocol_test"
|
||||||
|
if not binary.is_file():
|
||||||
|
self.skipTest("native build has not been generated")
|
||||||
|
completed = subprocess.run([str(binary)], cwd=ROOT, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
self.assertEqual(completed.returncode, 0, completed.stderr.decode(errors="replace"))
|
||||||
|
|
||||||
|
def test_native_event_binary_passes(self):
|
||||||
|
binary = ROOT / "build-native/sim_event_test"
|
||||||
|
if not binary.is_file():
|
||||||
|
self.skipTest("native build has not been generated")
|
||||||
|
completed = subprocess.run([str(binary)], cwd=ROOT, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
self.assertEqual(completed.returncode, 0, completed.stderr.decode(errors="replace"))
|
||||||
|
|
||||||
|
def test_wasm_exports_protocol_functions(self):
|
||||||
|
module = ROOT / "build-wasm/linuxcnc-sim-core.js"
|
||||||
|
if not module.is_file():
|
||||||
|
self.skipTest("WASM build has not been generated")
|
||||||
|
text = module.read_text(encoding="utf-8")
|
||||||
|
for symbol in ("sim_protocol_reset", "sim_protocol_accept", "sim_protocol_last_seq", "sim_event_append", "sim_event_export"):
|
||||||
|
self.assertIn(symbol, text)
|
||||||
|
|
||||||
|
def test_worker_session_smoke(self):
|
||||||
|
completed = subprocess.run(
|
||||||
|
["node", "web/worker/test_sim_session.mjs"],
|
||||||
|
cwd=ROOT,
|
||||||
|
check=False,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertEqual(completed.returncode, 0, completed.stderr)
|
||||||
|
self.assertIn("sim_session=passed", completed.stdout)
|
||||||
|
|
||||||
|
def test_real_wasm_session_smoke(self):
|
||||||
|
completed = subprocess.run(
|
||||||
|
["node", "web/worker/test_wasm_session.mjs"],
|
||||||
|
cwd=ROOT,
|
||||||
|
check=False,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertEqual(completed.returncode, 0, completed.stderr)
|
||||||
|
self.assertIn("wasm_session=passed", completed.stdout)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
59
scripts/test_source_symbols.py
Normal file
59
scripts/test_source_symbols.py
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from generate_source_symbols import generate, parse_file
|
||||||
|
|
||||||
|
|
||||||
|
class SourceSymbolsTests(unittest.TestCase):
|
||||||
|
def test_parses_c_python_and_comp_entries(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
root = Path(directory)
|
||||||
|
for sub in ("linuxcnc/src/emc", "linuxcnc/src/hal", "linuxcnc/lib/python"):
|
||||||
|
(root / sub).mkdir(parents=True, exist_ok=True)
|
||||||
|
c = root / "linuxcnc/src/emc/demo.c"
|
||||||
|
c.write_text("#define DEMO 1\nint demo(int x) { return x; }\n", encoding="utf-8")
|
||||||
|
py = root / "linuxcnc/lib/python/demo.py"
|
||||||
|
py.write_text("class Demo:\n async def run(self):\n pass\n", encoding="utf-8")
|
||||||
|
comp = root / "linuxcnc/src/hal/demo.comp"
|
||||||
|
comp.write_text("component demo;\npin in bit enable;\nfunction update;\n", encoding="utf-8")
|
||||||
|
rows, report = parse_file(root, c)
|
||||||
|
self.assertEqual({row["symbol"] for row in rows}, {"DEMO", "demo"})
|
||||||
|
self.assertEqual(report["parse_status"], "parsed")
|
||||||
|
rows, _ = parse_file(root, py)
|
||||||
|
self.assertEqual({row["symbol_kind"] for row in rows}, {"class", "async_function"})
|
||||||
|
rows, _ = parse_file(root, comp)
|
||||||
|
self.assertEqual({row["symbol_kind"] for row in rows}, {"component", "pin", "function"})
|
||||||
|
|
||||||
|
def test_generation_is_deterministic(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
root = Path(directory)
|
||||||
|
for sub in ("linuxcnc/src/emc", "linuxcnc/src/hal", "linuxcnc/lib/python"):
|
||||||
|
(root / sub).mkdir(parents=True, exist_ok=True)
|
||||||
|
(root / "linuxcnc/src/emc/demo.c").write_text("void z(void) {}\n", encoding="utf-8")
|
||||||
|
first = root / "one.jsonl"
|
||||||
|
second = root / "two.jsonl"
|
||||||
|
report = root / "report.json"
|
||||||
|
_, digest_one = generate(root, first, report)
|
||||||
|
_, digest_two = generate(root, second, report)
|
||||||
|
self.assertEqual(digest_one, digest_two)
|
||||||
|
self.assertEqual(first.read_bytes(), second.read_bytes())
|
||||||
|
|
||||||
|
def test_decode_error_is_reported(self):
|
||||||
|
with TemporaryDirectory() as directory:
|
||||||
|
root = Path(directory)
|
||||||
|
path = root / "linuxcnc/src/emc"
|
||||||
|
path.mkdir(parents=True)
|
||||||
|
bad = path / "bad.c"
|
||||||
|
bad.write_bytes(b"\xff\xfe")
|
||||||
|
rows, report = parse_file(root, bad)
|
||||||
|
self.assertEqual(rows, [])
|
||||||
|
self.assertEqual(report["parse_status"], "decode_error")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
65
scripts/test_test_entries.py
Normal file
65
scripts/test_test_entries.py
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||||
|
|
||||||
|
from generate_test_entries import generate
|
||||||
|
|
||||||
|
|
||||||
|
class TestEntriesTests(unittest.TestCase):
|
||||||
|
def create_tree(self):
|
||||||
|
directory = TemporaryDirectory()
|
||||||
|
root = Path(directory.name)
|
||||||
|
test_dir = root / "linuxcnc/tests/demo"
|
||||||
|
unit_dir = root / "linuxcnc/unit_tests/tp"
|
||||||
|
test_dir.mkdir(parents=True)
|
||||||
|
unit_dir.mkdir(parents=True)
|
||||||
|
(test_dir / "test.sh").write_text("#!/bin/sh\nlinuxcnc demo.ini\n", encoding="utf-8")
|
||||||
|
(test_dir / "demo.ini").write_text("[EMC]\nMACHINE = demo\n", encoding="utf-8")
|
||||||
|
(test_dir / "expected.txt").write_text("ok\n", encoding="utf-8")
|
||||||
|
(test_dir / "checkresult").write_text("#!/bin/sh\nexit 0\n", encoding="utf-8")
|
||||||
|
(unit_dir / "meson.build").write_text("test('blendmath', executable('test_blendmath', 'test_blendmath.c'))\n", encoding="utf-8")
|
||||||
|
(unit_dir / "test_blendmath.c").write_text("int main(void) { return 0; }\n", encoding="utf-8")
|
||||||
|
(root / "linuxcnc/meson.build").write_text("test('top', executable('test_top', 'x.c'))\n", encoding="utf-8")
|
||||||
|
return directory, root
|
||||||
|
|
||||||
|
def test_entries_contain_contract_fields(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
output = root / "coverage/test-entries.jsonl"
|
||||||
|
count, _ = generate(root, output, root / "coverage/report.json")
|
||||||
|
self.assertGreaterEqual(count, 4)
|
||||||
|
rows = [json.loads(line) for line in output.read_text(encoding="utf-8").splitlines()]
|
||||||
|
shell = next(row for row in rows if row["path"].endswith("/test.sh"))
|
||||||
|
self.assertEqual(shell["parse_status"], "parsed")
|
||||||
|
self.assertIn("linuxcnc/tests/demo/demo.ini", shell["inputs"])
|
||||||
|
self.assertIn("linuxcnc/tests/demo/expected.txt", shell["expected"])
|
||||||
|
self.assertEqual(shell["portability"], "portable_candidate")
|
||||||
|
|
||||||
|
def test_hardware_is_real_excluded(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
test_path = root / "linuxcnc/tests/demo/test.sh"
|
||||||
|
test_path.write_text("#!/bin/sh\nloadrt hostmot2\n", encoding="utf-8")
|
||||||
|
generate(root, root / "out.jsonl", root / "report.json")
|
||||||
|
rows = [json.loads(line) for line in (root / "out.jsonl").read_text(encoding="utf-8").splitlines()]
|
||||||
|
shell = next(row for row in rows if row["path"].endswith("/test.sh"))
|
||||||
|
self.assertEqual(shell["portability"], "REAL-EXCLUDED")
|
||||||
|
|
||||||
|
def test_generation_is_deterministic(self):
|
||||||
|
directory, root = self.create_tree()
|
||||||
|
self.addCleanup(directory.cleanup)
|
||||||
|
first, digest_one = root / "one.jsonl", None
|
||||||
|
_, digest_one = generate(root, first, root / "report.json")
|
||||||
|
second, digest_two = root / "two.jsonl", None
|
||||||
|
_, digest_two = generate(root, second, root / "report.json")
|
||||||
|
self.assertEqual(digest_one, digest_two)
|
||||||
|
self.assertEqual(first.read_bytes(), second.read_bytes())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
240
scripts/validate_baseline.py
Executable file
240
scripts/validate_baseline.py
Executable file
@@ -0,0 +1,240 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Validate the M0 baseline and fail closed on unassigned coverage entries."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
REQUIRED_MANIFEST_FIELDS = {
|
||||||
|
"id", "source", "source_sha", "domain", "kind", "dependencies", "inputs",
|
||||||
|
"outputs", "errors", "sim_status", "web_status", "test_id", "oracle", "golden",
|
||||||
|
"difference", "coverage_dimensions", "context_id", "exclusion_reason",
|
||||||
|
}
|
||||||
|
ALLOWED_STATUS = {"planned", "in_progress", "implemented", "verified", "accepted", "blocked", "REAL-EXCLUDED"}
|
||||||
|
|
||||||
|
|
||||||
|
def read_jsonl(path: Path) -> list[dict[str, object]]:
|
||||||
|
rows: list[dict[str, object]] = []
|
||||||
|
with path.open("r", encoding="utf-8") as handle:
|
||||||
|
for line_number, line in enumerate(handle, 1):
|
||||||
|
if not line.strip():
|
||||||
|
continue
|
||||||
|
value = json.loads(line)
|
||||||
|
if not isinstance(value, dict):
|
||||||
|
raise ValueError(f"{path}:{line_number}: expected object")
|
||||||
|
rows.append(value)
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(path: Path) -> str:
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with path.open("rb") as handle:
|
||||||
|
for block in iter(lambda: handle.read(1024 * 1024), b""):
|
||||||
|
digest.update(block)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def validate(repo_root: Path, lock_path: Path, source_path: Path, manifest_path: Path) -> list[str]:
|
||||||
|
errors: list[str] = []
|
||||||
|
lock = json.loads(lock_path.read_text(encoding="utf-8"))
|
||||||
|
for field in ("context_id", "linuxcnc_version", "linuxcnc_source_sha", "emscripten_version", "schema_versions"):
|
||||||
|
if not lock.get(field):
|
||||||
|
errors.append(f"context lock missing {field}")
|
||||||
|
sources = read_jsonl(source_path)
|
||||||
|
manifests = read_jsonl(manifest_path)
|
||||||
|
if lock.get("source_index_sha256") != sha256(source_path):
|
||||||
|
errors.append("source index hash does not match context lock")
|
||||||
|
if lock.get("manifest_seed_sha256") != sha256(manifest_path):
|
||||||
|
errors.append("manifest seed hash does not match context lock")
|
||||||
|
document_index_path = repo_root / "coverage/document-capabilities.jsonl"
|
||||||
|
document_index_hash = lock.get("document_capabilities_sha256")
|
||||||
|
if document_index_hash:
|
||||||
|
if not document_index_path.is_file():
|
||||||
|
errors.append("document capabilities index is missing")
|
||||||
|
elif document_index_hash != sha256(document_index_path):
|
||||||
|
errors.append("document capabilities index hash does not match context lock")
|
||||||
|
version_path = repo_root / "linuxcnc/VERSION"
|
||||||
|
if lock.get("linuxcnc_version") != version_path.read_text(encoding="utf-8").strip():
|
||||||
|
errors.append("linuxcnc version does not match context lock")
|
||||||
|
try:
|
||||||
|
source_sha = subprocess.check_output(
|
||||||
|
["git", "-C", str(repo_root / "linuxcnc"), "rev-parse", "HEAD"],
|
||||||
|
text=True,
|
||||||
|
).strip()
|
||||||
|
except (OSError, subprocess.CalledProcessError):
|
||||||
|
source_sha = None
|
||||||
|
if source_sha and lock.get("linuxcnc_source_sha") != source_sha:
|
||||||
|
errors.append("linuxcnc source commit does not match context lock")
|
||||||
|
inventory_count = lock.get("inventory_counts", {})
|
||||||
|
if isinstance(inventory_count, dict):
|
||||||
|
if inventory_count.get("total") != len(sources):
|
||||||
|
errors.append("source index count does not match context lock")
|
||||||
|
if inventory_count.get("source_index") != len(sources):
|
||||||
|
errors.append("source_index count does not match context lock")
|
||||||
|
if inventory_count.get("manifest_seed") != len(manifests):
|
||||||
|
errors.append("manifest_seed count does not match context lock")
|
||||||
|
if document_index_hash and inventory_count.get("document_capabilities") is not None:
|
||||||
|
if inventory_count.get("document_capabilities") != sum(
|
||||||
|
1 for line in document_index_path.read_text(encoding="utf-8").splitlines() if line.strip()
|
||||||
|
):
|
||||||
|
errors.append("document_capabilities count does not match context lock")
|
||||||
|
symbols_path = repo_root / "coverage/source-symbols.jsonl"
|
||||||
|
symbols_hash = lock.get("source_symbols_sha256")
|
||||||
|
if symbols_hash:
|
||||||
|
if not symbols_path.is_file():
|
||||||
|
errors.append("source symbols index is missing")
|
||||||
|
elif symbols_hash != sha256(symbols_path):
|
||||||
|
errors.append("source symbols index hash does not match context lock")
|
||||||
|
if isinstance(inventory_count, dict) and symbols_hash and inventory_count.get("source_symbols") is not None:
|
||||||
|
if inventory_count.get("source_symbols") != sum(1 for line in symbols_path.read_text(encoding="utf-8").splitlines() if line.strip()):
|
||||||
|
errors.append("source_symbols count does not match context lock")
|
||||||
|
resources_path = repo_root / "coverage/config-resources.jsonl"
|
||||||
|
resources_hash = lock.get("config_resources_sha256")
|
||||||
|
if resources_hash:
|
||||||
|
if not resources_path.is_file():
|
||||||
|
errors.append("config resources index is missing")
|
||||||
|
elif resources_hash != sha256(resources_path):
|
||||||
|
errors.append("config resources index hash does not match context lock")
|
||||||
|
if isinstance(inventory_count, dict) and resources_hash and inventory_count.get("config_resources") is not None:
|
||||||
|
if inventory_count.get("config_resources") != sum(1 for line in resources_path.read_text(encoding="utf-8").splitlines() if line.strip()):
|
||||||
|
errors.append("config_resources count does not match context lock")
|
||||||
|
test_entries_path = repo_root / "coverage/test-entries.jsonl"
|
||||||
|
test_entries_hash = lock.get("test_entries_sha256")
|
||||||
|
if test_entries_hash:
|
||||||
|
if not test_entries_path.is_file():
|
||||||
|
errors.append("test entries index is missing")
|
||||||
|
elif test_entries_hash != sha256(test_entries_path):
|
||||||
|
errors.append("test entries index hash does not match context lock")
|
||||||
|
if isinstance(inventory_count, dict) and test_entries_hash and inventory_count.get("test_entries") is not None:
|
||||||
|
if inventory_count.get("test_entries") != sum(1 for line in test_entries_path.read_text(encoding="utf-8").splitlines() if line.strip()):
|
||||||
|
errors.append("test_entries count does not match context lock")
|
||||||
|
normalized_path = repo_root / "coverage/normalized-sources.jsonl"
|
||||||
|
normalized_hash = lock.get("normalized_sources_sha256")
|
||||||
|
if normalized_hash:
|
||||||
|
if not normalized_path.is_file():
|
||||||
|
errors.append("normalized sources index is missing")
|
||||||
|
elif normalized_hash != sha256(normalized_path):
|
||||||
|
errors.append("normalized sources index hash does not match context lock")
|
||||||
|
if isinstance(inventory_count, dict) and normalized_hash and inventory_count.get("normalized_sources") is not None:
|
||||||
|
if inventory_count.get("normalized_sources") != sum(1 for line in normalized_path.read_text(encoding="utf-8").splitlines() if line.strip()):
|
||||||
|
errors.append("normalized_sources count does not match context lock")
|
||||||
|
closure_path = repo_root / "coverage/dependency-closure.jsonl"
|
||||||
|
closure_hash = lock.get("dependency_closure_sha256")
|
||||||
|
if closure_hash:
|
||||||
|
if not closure_path.is_file():
|
||||||
|
errors.append("dependency closure index is missing")
|
||||||
|
elif closure_hash != sha256(closure_path):
|
||||||
|
errors.append("dependency closure index hash does not match context lock")
|
||||||
|
if isinstance(inventory_count, dict) and closure_hash and inventory_count.get("dependency_edges") is not None:
|
||||||
|
if inventory_count.get("dependency_edges") != sum(1 for line in closure_path.read_text(encoding="utf-8").splitlines() if line.strip()):
|
||||||
|
errors.append("dependency_edges count does not match context lock")
|
||||||
|
golden_schema_path = repo_root / "coverage/golden-schema.json"
|
||||||
|
golden_schema_hash = lock.get("golden_schema_sha256")
|
||||||
|
if golden_schema_hash:
|
||||||
|
if not golden_schema_path.is_file():
|
||||||
|
errors.append("golden schema is missing")
|
||||||
|
elif golden_schema_hash != sha256(golden_schema_path):
|
||||||
|
errors.append("golden schema hash does not match context lock")
|
||||||
|
runner_report_path = repo_root / "coverage/native-runner.report.json"
|
||||||
|
runner_report_hash = lock.get("native_runner_report_sha256")
|
||||||
|
if runner_report_hash:
|
||||||
|
if not runner_report_path.is_file():
|
||||||
|
errors.append("native runner report is missing")
|
||||||
|
elif runner_report_hash != sha256(runner_report_path):
|
||||||
|
errors.append("native runner report hash does not match context lock")
|
||||||
|
recovery_report_path = repo_root / "coverage/workspace-recovery.report.json"
|
||||||
|
recovery_report_hash = lock.get("workspace_recovery_report_sha256")
|
||||||
|
if recovery_report_hash:
|
||||||
|
if not recovery_report_path.is_file():
|
||||||
|
errors.append("workspace recovery report is missing")
|
||||||
|
elif recovery_report_hash != sha256(recovery_report_path):
|
||||||
|
errors.append("workspace recovery report hash does not match context lock")
|
||||||
|
runtime_report_path = repo_root / "coverage/runtime-mapping.report.json"
|
||||||
|
runtime_report_hash = lock.get("runtime_mapping_report_sha256")
|
||||||
|
if runtime_report_hash:
|
||||||
|
if not runtime_report_path.is_file():
|
||||||
|
errors.append("runtime mapping report is missing")
|
||||||
|
elif runtime_report_hash != sha256(runtime_report_path):
|
||||||
|
errors.append("runtime mapping report hash does not match context lock")
|
||||||
|
python_manifest_path = repo_root / "python-runtime/manifest.json"
|
||||||
|
python_manifest_hash = lock.get("python_runtime_manifest_sha256")
|
||||||
|
if python_manifest_hash:
|
||||||
|
if not python_manifest_path.is_file():
|
||||||
|
errors.append("python runtime manifest is missing")
|
||||||
|
elif python_manifest_hash != sha256(python_manifest_path):
|
||||||
|
errors.append("python runtime manifest hash does not match context lock")
|
||||||
|
python_report_path = repo_root / "coverage/python-runtime.report.json"
|
||||||
|
python_report_hash = lock.get("python_runtime_report_sha256")
|
||||||
|
if python_report_hash:
|
||||||
|
if not python_report_path.is_file():
|
||||||
|
errors.append("python runtime report is missing")
|
||||||
|
elif python_report_hash != sha256(python_report_path):
|
||||||
|
errors.append("python runtime report hash does not match context lock")
|
||||||
|
hal_report_path = repo_root / "coverage/hal-runtime.report.json"
|
||||||
|
hal_report_hash = lock.get("hal_runtime_report_sha256")
|
||||||
|
if hal_report_hash:
|
||||||
|
if not hal_report_path.is_file():
|
||||||
|
errors.append("hal runtime report is missing")
|
||||||
|
elif hal_report_hash != sha256(hal_report_path):
|
||||||
|
errors.append("hal runtime report hash does not match context lock")
|
||||||
|
posemath_report_path = repo_root / "coverage/posemath-runtime.report.json"
|
||||||
|
posemath_report_hash = lock.get("posemath_runtime_report_sha256")
|
||||||
|
if posemath_report_hash:
|
||||||
|
if not posemath_report_path.is_file():
|
||||||
|
errors.append("posemath runtime report is missing")
|
||||||
|
elif posemath_report_hash != sha256(posemath_report_path):
|
||||||
|
errors.append("posemath runtime report hash does not match context lock")
|
||||||
|
source_ids = [str(row.get("source_id", "")) for row in sources]
|
||||||
|
if len(source_ids) != len(set(source_ids)):
|
||||||
|
errors.append("source index contains duplicate source_id")
|
||||||
|
manifest_ids = [str(row.get("id", "")) for row in manifests]
|
||||||
|
if len(manifest_ids) != len(set(manifest_ids)):
|
||||||
|
errors.append("manifest contains duplicate id")
|
||||||
|
source_sha_by_id = {str(row["source_id"]): str(row["sha256"]) for row in sources}
|
||||||
|
manifest_sources = {str(row.get("source", "")) for row in manifests}
|
||||||
|
missing = sorted(set(source_ids) - manifest_sources)
|
||||||
|
if missing:
|
||||||
|
errors.append(f"manifest has {len(missing)} orphan sources; first={missing[0]}")
|
||||||
|
extra = sorted(manifest_sources - set(source_ids))
|
||||||
|
if extra:
|
||||||
|
errors.append(f"manifest has {len(extra)} unknown sources; first={extra[0]}")
|
||||||
|
for row in manifests:
|
||||||
|
missing_fields = REQUIRED_MANIFEST_FIELDS - row.keys()
|
||||||
|
if missing_fields:
|
||||||
|
errors.append(f"{row.get('id')}: missing fields {sorted(missing_fields)}")
|
||||||
|
source_id = str(row.get("source", ""))
|
||||||
|
if source_id in source_sha_by_id and row.get("source_sha") != source_sha_by_id[source_id]:
|
||||||
|
errors.append(f"{row.get('id')}: source_sha does not match source index")
|
||||||
|
for field in ("sim_status", "web_status"):
|
||||||
|
if row.get(field) not in ALLOWED_STATUS:
|
||||||
|
errors.append(f"{row.get('id')}: invalid {field}={row.get(field)!r}")
|
||||||
|
if row.get("sim_status") == "accepted" or row.get("web_status") == "accepted":
|
||||||
|
if not row.get("feature_id") or not row.get("test_id") or not row.get("oracle") or not row.get("context_id"):
|
||||||
|
errors.append(f"{row.get('id')}: accepted entry lacks feature/test/oracle/context evidence")
|
||||||
|
return errors
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--repo-root", type=Path, default=Path(__file__).resolve().parents[1])
|
||||||
|
parser.add_argument("--lock", type=Path, default=Path("context-lock.json"))
|
||||||
|
parser.add_argument("--source-index", type=Path, default=Path("coverage/source-index.jsonl"))
|
||||||
|
parser.add_argument("--manifest", type=Path, default=Path("coverage/manifest.jsonl"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
root = args.repo_root.resolve()
|
||||||
|
errors = validate(root, root / args.lock, root / args.source_index, root / args.manifest)
|
||||||
|
if errors:
|
||||||
|
for error in errors:
|
||||||
|
print(f"ERROR: {error}")
|
||||||
|
return 1
|
||||||
|
print("baseline=valid")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
68
scripts/validate_download_index.py
Executable file
68
scripts/validate_download_index.py
Executable file
@@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Validate external artifact provenance before it enters a build context."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
|
||||||
|
SHA256 = re.compile(r"^[0-9a-f]{64}$")
|
||||||
|
KINDS = {"official", "china-mirror", "local-cache"}
|
||||||
|
|
||||||
|
|
||||||
|
def validate(path: Path) -> list[str]:
|
||||||
|
errors: list[str] = []
|
||||||
|
seen: set[tuple[str, str]] = set()
|
||||||
|
with path.open("r", encoding="utf-8") as handle:
|
||||||
|
for line_number, line in enumerate(handle, 1):
|
||||||
|
if not line.strip():
|
||||||
|
continue
|
||||||
|
try:
|
||||||
|
row = json.loads(line)
|
||||||
|
except json.JSONDecodeError as exc:
|
||||||
|
errors.append(f"{path}:{line_number}: invalid JSON: {exc.msg}")
|
||||||
|
continue
|
||||||
|
if row.get("record_type") != "artifact":
|
||||||
|
continue
|
||||||
|
required = {"name", "version", "source_url", "sha256", "bytes", "license", "mirror_kind"}
|
||||||
|
missing = sorted(required - row.keys())
|
||||||
|
if missing:
|
||||||
|
errors.append(f"{path}:{line_number}: missing {missing}")
|
||||||
|
continue
|
||||||
|
key = (str(row["name"]), str(row["version"]))
|
||||||
|
if key in seen:
|
||||||
|
errors.append(f"{path}:{line_number}: duplicate artifact {key[0]}@{key[1]}")
|
||||||
|
seen.add(key)
|
||||||
|
if not SHA256.fullmatch(str(row["sha256"])):
|
||||||
|
errors.append(f"{path}:{line_number}: sha256 must be 64 lowercase hex characters")
|
||||||
|
if not isinstance(row["bytes"], int) or row["bytes"] <= 0:
|
||||||
|
errors.append(f"{path}:{line_number}: bytes must be a positive integer")
|
||||||
|
if row["mirror_kind"] not in KINDS:
|
||||||
|
errors.append(f"{path}:{line_number}: invalid mirror_kind")
|
||||||
|
parsed = urlparse(str(row["source_url"]))
|
||||||
|
if row["mirror_kind"] != "local-cache" and parsed.scheme not in {"http", "https"}:
|
||||||
|
errors.append(f"{path}:{line_number}: source_url must be HTTP(S) for downloaded artifacts")
|
||||||
|
if row["mirror_kind"] == "china-mirror" and not row.get("origin_url"):
|
||||||
|
errors.append(f"{path}:{line_number}: china-mirror requires origin_url")
|
||||||
|
return errors
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--index", type=Path, default=Path("vendor/downloads/index.jsonl"))
|
||||||
|
args = parser.parse_args()
|
||||||
|
errors = validate(args.index)
|
||||||
|
if errors:
|
||||||
|
for error in errors:
|
||||||
|
print(f"ERROR: {error}")
|
||||||
|
return 1
|
||||||
|
print(f"download_index=valid path={args.index}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
22
vendor/downloads/README.md
vendored
Normal file
22
vendor/downloads/README.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# 可复现下载缓存
|
||||||
|
|
||||||
|
这里登记构建所需的外部物料。允许使用官方地址、中国大陆镜像或已验证的离线缓存;镜像只改变传输位置,不改变物料身份。
|
||||||
|
|
||||||
|
每个 `artifact` 记录必须包含:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"record_type":"artifact","name":"...","version":"...","source_url":"https://...","origin_url":"https://...","sha256":"64 hex","bytes":123,"license":"SPDX-ID","mirror_kind":"official|china-mirror|local-cache"}
|
||||||
|
```
|
||||||
|
|
||||||
|
规则:
|
||||||
|
|
||||||
|
- `sha256` 必须对实际缓存文件计算,不能填写网页摘要或下载时间。
|
||||||
|
- `china-mirror` 必须同时填写可追溯的 `origin_url`;无法核对上游摘要的文件不得进入构建。
|
||||||
|
- 同一 `name/version` 只能有一条物料记录;切换镜像但 SHA-256 不变不产生新 context。
|
||||||
|
- 物料文件放在此目录或 CI 缓存中,发布前生成离线清单;不把未验证 CDN 内容直接纳入发布包。
|
||||||
|
|
||||||
|
校验命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 scripts/validate_download_index.py
|
||||||
|
```
|
||||||
3
vendor/downloads/index.jsonl
vendored
Normal file
3
vendor/downloads/index.jsonl
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{"record_type":"index","schema":"download-index.v1","policy":"mirror-allowed-checksum-required"}
|
||||||
|
{"record_type":"artifact","name":"pyodide-lock.json","version":"0.29.4","source_url":"https://cdn.jsdelivr.net/pyodide/v0.29.4/full/pyodide-lock.json","origin_url":"https://github.com/pyodide/pyodide/releases/tag/0.29.4","sha256":"14d2c2dba101277999e17135e653d8f15389ad1437f53eae213bf0c3cdff723d","bytes":122027,"license":"MPL-2.0","mirror_kind":"official"}
|
||||||
|
{"record_type":"artifact","name":"pyodide.js","version":"0.29.4","source_url":"https://cdn.jsdelivr.net/pyodide/v0.29.4/full/pyodide.js","origin_url":"https://github.com/pyodide/pyodide/releases/tag/0.29.4","sha256":"7be9e63eddf6bd8786a5ab71c8689c35731d187e3415fe58d7cb95423b50421a","bytes":18597,"license":"MPL-2.0","mirror_kind":"official"}
|
||||||
70
wasm-core/CMakeLists.txt
Normal file
70
wasm-core/CMakeLists.txt
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
project(linuxcnc_web_wasm_core LANGUAGES C CXX)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
add_library(sim_core STATIC src/sim_api.c src/sim_protocol.c src/sim_event.c src/sim_hal.c src/sim_posemath.c)
|
||||||
|
target_include_directories(sim_core PUBLIC include)
|
||||||
|
target_compile_definitions(sim_core PRIVATE SIM_API_BUILD=1)
|
||||||
|
|
||||||
|
add_library(sim_posemath STATIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/libnml/posemath/_posemath.c
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/libnml/posemath/gomath.c
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/libnml/posemath/sincos.c
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/libnml/posemath/posemath.cc
|
||||||
|
)
|
||||||
|
target_include_directories(sim_posemath PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/rtapi
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/libnml/posemath
|
||||||
|
)
|
||||||
|
target_compile_definitions(sim_posemath PRIVATE ULAPI)
|
||||||
|
target_link_libraries(sim_core PUBLIC sim_posemath)
|
||||||
|
|
||||||
|
if(NOT EMSCRIPTEN)
|
||||||
|
add_executable(sim_api_test tests/sim_api_test.c)
|
||||||
|
target_link_libraries(sim_api_test PRIVATE sim_core)
|
||||||
|
target_include_directories(sim_api_test PRIVATE include)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(NAME sim_api_test COMMAND sim_api_test)
|
||||||
|
|
||||||
|
add_executable(sim_protocol_test tests/sim_protocol_test.c)
|
||||||
|
target_link_libraries(sim_protocol_test PRIVATE sim_core)
|
||||||
|
target_include_directories(sim_protocol_test PRIVATE include)
|
||||||
|
add_test(NAME sim_protocol_test COMMAND sim_protocol_test)
|
||||||
|
|
||||||
|
add_executable(sim_event_test tests/sim_event_test.c)
|
||||||
|
target_link_libraries(sim_event_test PRIVATE sim_core)
|
||||||
|
target_include_directories(sim_event_test PRIVATE include)
|
||||||
|
add_test(NAME sim_event_test COMMAND sim_event_test)
|
||||||
|
|
||||||
|
add_executable(sim_hal_test tests/sim_hal_test.c)
|
||||||
|
target_link_libraries(sim_hal_test PRIVATE sim_core)
|
||||||
|
target_include_directories(sim_hal_test PRIVATE include)
|
||||||
|
add_test(NAME sim_hal_test COMMAND sim_hal_test)
|
||||||
|
|
||||||
|
add_executable(sim_posemath_test tests/sim_posemath_test.c)
|
||||||
|
target_link_libraries(sim_posemath_test PRIVATE sim_core)
|
||||||
|
target_include_directories(sim_posemath_test PRIVATE include)
|
||||||
|
add_test(NAME sim_posemath_test COMMAND sim_posemath_test)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
add_executable(sim_core_module src/sim_api.c src/sim_protocol.c src/sim_event.c src/sim_hal.c src/sim_posemath.c)
|
||||||
|
target_include_directories(sim_core_module PRIVATE
|
||||||
|
include
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/rtapi
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../linuxcnc/src/libnml/posemath
|
||||||
|
)
|
||||||
|
target_link_libraries(sim_core_module PRIVATE sim_posemath)
|
||||||
|
set_target_properties(sim_core_module PROPERTIES
|
||||||
|
OUTPUT_NAME "linuxcnc-sim-core"
|
||||||
|
SUFFIX ".js"
|
||||||
|
LINK_FLAGS "-sMODULARIZE=1 -sEXPORT_ES6=1 -sENVIRONMENT=web,worker -sEXPORTED_FUNCTIONS=['_malloc','_free','_sim_create','_sim_load_workspace','_sim_command','_sim_step','_sim_read_snapshot','_sim_read_event','_sim_export_state','_sim_import_state','_sim_destroy','_sim_protocol_reset','_sim_protocol_accept','_sim_protocol_pause','_sim_protocol_resume','_sim_protocol_state_value','_sim_protocol_last_seq','_sim_protocol_tick','_sim_protocol_set_tick','_sim_event_reset','_sim_event_append','_sim_event_count','_sim_event_cursor','_sim_event_read','_sim_event_export','_sim_event_import','_sim_hal_reset','_sim_hal_register_pin','_sim_hal_set_pin','_sim_hal_get_pin','_sim_hal_connect','_sim_hal_register_thread','_sim_hal_register_function','_sim_hal_set_function_failure','_sim_hal_step','_sim_hal_tick','_sim_hal_function_calls','_sim_hal_pin_count','_sim_hal_thread_count','_sim_hal_function_count','_sim_posemath_normalize','_sim_posemath_dot','_sim_posemath_line_point','_sim_posemath_is_finite'] -sEXPORTED_RUNTIME_METHODS=['ccall','cwrap']"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
34
wasm-core/include/sim_api.h
Normal file
34
wasm-core/include/sim_api.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef LINUXCNC_WEB_WASM_SIM_API_H
|
||||||
|
#define LINUXCNC_WEB_WASM_SIM_API_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum sim_result {
|
||||||
|
SIM_OK = 0,
|
||||||
|
SIM_ERR_INVALID_ARGUMENT = -1,
|
||||||
|
SIM_ERR_NOT_CREATED = -2,
|
||||||
|
SIM_ERR_BUFFER_TOO_SMALL = -3,
|
||||||
|
SIM_ERR_INVALID_STATE = -4,
|
||||||
|
SIM_ERR_UNSUPPORTED = -5,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Bootstrap ABI only. LinuxCNC behavior is added behind this stable boundary. */
|
||||||
|
int32_t sim_create(const uint8_t *config, uint32_t config_len);
|
||||||
|
int32_t sim_load_workspace(const char *root_path);
|
||||||
|
int32_t sim_command(const uint8_t *command, uint32_t command_len);
|
||||||
|
int32_t sim_step(uint32_t cycles);
|
||||||
|
uint32_t sim_read_snapshot(uint8_t *out, uint32_t capacity);
|
||||||
|
uint32_t sim_read_event(uint8_t *out, uint32_t capacity);
|
||||||
|
int32_t sim_export_state(uint8_t *out, uint32_t capacity);
|
||||||
|
int32_t sim_import_state(const uint8_t *data, uint32_t len);
|
||||||
|
void sim_destroy(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
42
wasm-core/include/sim_event.h
Normal file
42
wasm-core/include/sim_event.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef LINUXCNC_WEB_WASM_SIM_EVENT_H
|
||||||
|
#define LINUXCNC_WEB_WASM_SIM_EVENT_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SIM_EVENT_KIND_CAPACITY 32U
|
||||||
|
#define SIM_EVENT_CAPACITY 256U
|
||||||
|
|
||||||
|
enum sim_event_result {
|
||||||
|
SIM_EVENT_OK = 0,
|
||||||
|
SIM_EVENT_ERR_SEQUENCE = -200,
|
||||||
|
SIM_EVENT_ERR_TICK = -201,
|
||||||
|
SIM_EVENT_ERR_ARGUMENT = -202,
|
||||||
|
SIM_EVENT_ERR_FULL = -203,
|
||||||
|
SIM_EVENT_ERR_BUFFER = -204,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct sim_event_record {
|
||||||
|
uint32_t seq;
|
||||||
|
uint32_t tick;
|
||||||
|
uint64_t payload_hash;
|
||||||
|
char kind[SIM_EVENT_KIND_CAPACITY];
|
||||||
|
} sim_event_record;
|
||||||
|
|
||||||
|
void sim_event_reset(void);
|
||||||
|
int32_t sim_event_append(uint32_t seq, uint32_t tick, const char *kind,
|
||||||
|
const uint8_t *payload, uint32_t payload_len);
|
||||||
|
uint32_t sim_event_count(void);
|
||||||
|
uint32_t sim_event_cursor(void);
|
||||||
|
uint32_t sim_event_read(uint32_t index, uint8_t *out, uint32_t capacity);
|
||||||
|
uint32_t sim_event_export(uint8_t *out, uint32_t capacity);
|
||||||
|
int32_t sim_event_import(const uint8_t *data, uint32_t len);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
64
wasm-core/include/sim_hal.h
Normal file
64
wasm-core/include/sim_hal.h
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#ifndef LINUXCNC_WEB_WASM_SIM_HAL_H
|
||||||
|
#define LINUXCNC_WEB_WASM_SIM_HAL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SIM_HAL_NAME_CAPACITY 48U
|
||||||
|
#define SIM_HAL_PIN_CAPACITY 64U
|
||||||
|
#define SIM_HAL_THREAD_CAPACITY 16U
|
||||||
|
#define SIM_HAL_FUNCTION_CAPACITY 64U
|
||||||
|
|
||||||
|
enum sim_hal_result {
|
||||||
|
SIM_HAL_OK = 0,
|
||||||
|
SIM_HAL_ERR_ARGUMENT = -300,
|
||||||
|
SIM_HAL_ERR_FULL = -301,
|
||||||
|
SIM_HAL_ERR_DUPLICATE = -302,
|
||||||
|
SIM_HAL_ERR_NOT_FOUND = -303,
|
||||||
|
SIM_HAL_ERR_TYPE = -304,
|
||||||
|
SIM_HAL_ERR_RANGE = -305,
|
||||||
|
SIM_HAL_ERR_CONNECTION = -306,
|
||||||
|
SIM_HAL_ERR_FUNCTION = -307,
|
||||||
|
SIM_HAL_ERR_REAL_EXCLUDED = -308,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum sim_hal_type {
|
||||||
|
SIM_HAL_BIT = 1,
|
||||||
|
SIM_HAL_S32 = 2,
|
||||||
|
SIM_HAL_U32 = 3,
|
||||||
|
SIM_HAL_FLOAT = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct sim_hal_value {
|
||||||
|
uint32_t type;
|
||||||
|
union {
|
||||||
|
uint32_t bit;
|
||||||
|
int32_t s32;
|
||||||
|
uint32_t u32;
|
||||||
|
float real;
|
||||||
|
} value;
|
||||||
|
} sim_hal_value;
|
||||||
|
|
||||||
|
void sim_hal_reset(void);
|
||||||
|
int32_t sim_hal_register_pin(const char *name, uint32_t type);
|
||||||
|
int32_t sim_hal_set_pin(const char *name, sim_hal_value value);
|
||||||
|
int32_t sim_hal_get_pin(const char *name, sim_hal_value *out);
|
||||||
|
int32_t sim_hal_connect(const char *source, const char *target);
|
||||||
|
int32_t sim_hal_register_thread(const char *name, uint32_t period_ticks);
|
||||||
|
int32_t sim_hal_register_function(const char *thread, const char *name);
|
||||||
|
int32_t sim_hal_set_function_failure(const char *name, uint32_t fail);
|
||||||
|
int32_t sim_hal_step(uint32_t ticks);
|
||||||
|
uint32_t sim_hal_tick(void);
|
||||||
|
uint32_t sim_hal_function_calls(const char *name);
|
||||||
|
uint32_t sim_hal_pin_count(void);
|
||||||
|
uint32_t sim_hal_thread_count(void);
|
||||||
|
uint32_t sim_hal_function_count(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
32
wasm-core/include/sim_posemath.h
Normal file
32
wasm-core/include/sim_posemath.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef LINUXCNC_WEB_WASM_SIM_POSEMATH_H
|
||||||
|
#define LINUXCNC_WEB_WASM_SIM_POSEMATH_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum sim_posemath_result {
|
||||||
|
SIM_POSEMATH_OK = 0,
|
||||||
|
SIM_POSEMATH_ERR_ARGUMENT = -400,
|
||||||
|
SIM_POSEMATH_ERR_NONFINITE = -401,
|
||||||
|
SIM_POSEMATH_ERR_DEGENERATE = -402,
|
||||||
|
SIM_POSEMATH_ERR_RANGE = -403,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct sim_posemath_cartesian {
|
||||||
|
double x;
|
||||||
|
double y;
|
||||||
|
double z;
|
||||||
|
} sim_posemath_cartesian;
|
||||||
|
|
||||||
|
int sim_posemath_normalize(const sim_posemath_cartesian *input, sim_posemath_cartesian *output);
|
||||||
|
int sim_posemath_dot(const sim_posemath_cartesian *left, const sim_posemath_cartesian *right, double *output);
|
||||||
|
int sim_posemath_line_point(const sim_posemath_cartesian *start, const sim_posemath_cartesian *end,
|
||||||
|
double fraction, sim_posemath_cartesian *output);
|
||||||
|
int sim_posemath_is_finite(const sim_posemath_cartesian *value);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
46
wasm-core/include/sim_protocol.h
Normal file
46
wasm-core/include/sim_protocol.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
#ifndef LINUXCNC_WEB_WASM_SIM_PROTOCOL_H
|
||||||
|
#define LINUXCNC_WEB_WASM_SIM_PROTOCOL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum sim_protocol_result {
|
||||||
|
SIM_PROTOCOL_OK = 0,
|
||||||
|
SIM_PROTOCOL_ERR_SCHEMA = -100,
|
||||||
|
SIM_PROTOCOL_ERR_SEQUENCE = -101,
|
||||||
|
SIM_PROTOCOL_ERR_STATE = -102,
|
||||||
|
SIM_PROTOCOL_ERR_OPERATION_ID = -103,
|
||||||
|
SIM_PROTOCOL_ERR_KIND = -104,
|
||||||
|
SIM_PROTOCOL_ERR_ARGUMENT = -105,
|
||||||
|
SIM_PROTOCOL_ERR_TICK = -106,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum sim_protocol_state {
|
||||||
|
SIM_PROTOCOL_NEW = 0,
|
||||||
|
SIM_PROTOCOL_HELLO = 1,
|
||||||
|
SIM_PROTOCOL_ATTACHED = 2,
|
||||||
|
SIM_PROTOCOL_READY = 3,
|
||||||
|
SIM_PROTOCOL_PAUSED = 4,
|
||||||
|
SIM_PROTOCOL_DESTROYED = 5,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The protocol validator is deliberately independent of JSON and malloc. */
|
||||||
|
void sim_protocol_reset(void);
|
||||||
|
int32_t sim_protocol_accept(uint32_t schema_version, uint32_t seq,
|
||||||
|
const char *kind, const char *operation_id,
|
||||||
|
uint32_t simulation_tick);
|
||||||
|
int32_t sim_protocol_pause(void);
|
||||||
|
int32_t sim_protocol_resume(void);
|
||||||
|
int32_t sim_protocol_state_value(void);
|
||||||
|
uint32_t sim_protocol_last_seq(void);
|
||||||
|
uint32_t sim_protocol_tick(void);
|
||||||
|
int32_t sim_protocol_set_tick(uint32_t simulation_tick);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
79
wasm-core/src/sim_api.c
Normal file
79
wasm-core/src/sim_api.c
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#include "sim_api.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t created;
|
||||||
|
uint32_t loaded;
|
||||||
|
uint64_t tick;
|
||||||
|
uint32_t pending_event;
|
||||||
|
} sim_state;
|
||||||
|
|
||||||
|
static sim_state state;
|
||||||
|
|
||||||
|
static int valid_buffer(const uint8_t *data, uint32_t len) {
|
||||||
|
return len == 0 || data != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_create(const uint8_t *config, uint32_t config_len) {
|
||||||
|
if (!valid_buffer(config, config_len)) return SIM_ERR_INVALID_ARGUMENT;
|
||||||
|
memset(&state, 0, sizeof(state));
|
||||||
|
state.created = 1;
|
||||||
|
state.pending_event = 1;
|
||||||
|
return SIM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_load_workspace(const char *root_path) {
|
||||||
|
if (!state.created) return SIM_ERR_NOT_CREATED;
|
||||||
|
if (root_path == NULL || root_path[0] == '\0') return SIM_ERR_INVALID_ARGUMENT;
|
||||||
|
state.loaded = 1;
|
||||||
|
state.pending_event = 1;
|
||||||
|
return SIM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_command(const uint8_t *command, uint32_t command_len) {
|
||||||
|
if (!state.created || !state.loaded) return SIM_ERR_INVALID_STATE;
|
||||||
|
if (!valid_buffer(command, command_len) || command_len == 0) return SIM_ERR_INVALID_ARGUMENT;
|
||||||
|
state.pending_event = 1;
|
||||||
|
return SIM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_step(uint32_t cycles) {
|
||||||
|
if (!state.created || !state.loaded) return SIM_ERR_INVALID_STATE;
|
||||||
|
state.tick += cycles;
|
||||||
|
state.pending_event = 1;
|
||||||
|
return SIM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_read_snapshot(uint8_t *out, uint32_t capacity) {
|
||||||
|
const uint32_t size = (uint32_t)sizeof(state.tick);
|
||||||
|
if (out == NULL || capacity < size) return size;
|
||||||
|
memcpy(out, &state.tick, size);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_read_event(uint8_t *out, uint32_t capacity) {
|
||||||
|
const uint32_t size = 1;
|
||||||
|
if (!state.pending_event) return 0;
|
||||||
|
if (out == NULL || capacity < size) return size;
|
||||||
|
out[0] = 1;
|
||||||
|
state.pending_event = 0;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_export_state(uint8_t *out, uint32_t capacity) {
|
||||||
|
const uint32_t size = (uint32_t)sizeof(state);
|
||||||
|
if (out == NULL || capacity < size) return SIM_ERR_BUFFER_TOO_SMALL;
|
||||||
|
memcpy(out, &state, size);
|
||||||
|
return (int32_t)size;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_import_state(const uint8_t *data, uint32_t len) {
|
||||||
|
if (data == NULL || len != sizeof(state)) return SIM_ERR_INVALID_ARGUMENT;
|
||||||
|
memcpy(&state, data, sizeof(state));
|
||||||
|
return SIM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sim_destroy(void) {
|
||||||
|
memset(&state, 0, sizeof(state));
|
||||||
|
}
|
||||||
82
wasm-core/src/sim_event.c
Normal file
82
wasm-core/src/sim_event.c
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
#include "sim_event.h"
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef struct sim_event_state {
|
||||||
|
uint32_t count;
|
||||||
|
uint32_t last_seq;
|
||||||
|
uint32_t last_tick;
|
||||||
|
sim_event_record records[SIM_EVENT_CAPACITY];
|
||||||
|
} sim_event_state;
|
||||||
|
|
||||||
|
static sim_event_state state;
|
||||||
|
|
||||||
|
static uint64_t hash_payload(const uint8_t *payload, uint32_t payload_len) {
|
||||||
|
uint64_t hash = 1469598103934665603ULL;
|
||||||
|
uint32_t index;
|
||||||
|
if (payload == NULL && payload_len != 0U) return 0;
|
||||||
|
for (index = 0; index < payload_len; ++index) {
|
||||||
|
hash ^= payload[index];
|
||||||
|
hash *= 1099511628211ULL;
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sim_event_reset(void) {
|
||||||
|
memset(&state, 0, sizeof(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_event_append(uint32_t seq, uint32_t tick, const char *kind,
|
||||||
|
const uint8_t *payload, uint32_t payload_len) {
|
||||||
|
sim_event_record *record;
|
||||||
|
size_t kind_len;
|
||||||
|
if (seq == 0U || seq != state.last_seq + 1U) return SIM_EVENT_ERR_SEQUENCE;
|
||||||
|
if (tick < state.last_tick) return SIM_EVENT_ERR_TICK;
|
||||||
|
if (kind == NULL || kind[0] == '\0') return SIM_EVENT_ERR_ARGUMENT;
|
||||||
|
kind_len = strlen(kind);
|
||||||
|
if (kind_len >= SIM_EVENT_KIND_CAPACITY || (payload == NULL && payload_len != 0U)) return SIM_EVENT_ERR_ARGUMENT;
|
||||||
|
if (state.count >= SIM_EVENT_CAPACITY) return SIM_EVENT_ERR_FULL;
|
||||||
|
record = &state.records[state.count++];
|
||||||
|
memset(record, 0, sizeof(*record));
|
||||||
|
memcpy(record->kind, kind, kind_len);
|
||||||
|
record->seq = seq;
|
||||||
|
record->tick = tick;
|
||||||
|
record->payload_hash = hash_payload(payload, payload_len);
|
||||||
|
state.last_seq = seq;
|
||||||
|
state.last_tick = tick;
|
||||||
|
return SIM_EVENT_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_event_count(void) {
|
||||||
|
return state.count;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_event_cursor(void) {
|
||||||
|
return state.last_seq;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_event_read(uint32_t index, uint8_t *out, uint32_t capacity) {
|
||||||
|
const uint32_t size = (uint32_t)sizeof(sim_event_record);
|
||||||
|
if (index >= state.count) return 0;
|
||||||
|
if (out == NULL || capacity < size) return size;
|
||||||
|
memcpy(out, &state.records[index], size);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_event_export(uint8_t *out, uint32_t capacity) {
|
||||||
|
const uint32_t size = (uint32_t)sizeof(state);
|
||||||
|
if (out == NULL || capacity < size) return size;
|
||||||
|
memcpy(out, &state, size);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_event_import(const uint8_t *data, uint32_t len) {
|
||||||
|
if (data == NULL || len != sizeof(state)) return SIM_EVENT_ERR_ARGUMENT;
|
||||||
|
memcpy(&state, data, sizeof(state));
|
||||||
|
if (state.count > SIM_EVENT_CAPACITY) {
|
||||||
|
sim_event_reset();
|
||||||
|
return SIM_EVENT_ERR_ARGUMENT;
|
||||||
|
}
|
||||||
|
return SIM_EVENT_OK;
|
||||||
|
}
|
||||||
166
wasm-core/src/sim_hal.c
Normal file
166
wasm-core/src/sim_hal.c
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
#include "sim_hal.h"
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t used;
|
||||||
|
char name[SIM_HAL_NAME_CAPACITY];
|
||||||
|
sim_hal_value value;
|
||||||
|
} pin_entry;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t used;
|
||||||
|
char name[SIM_HAL_NAME_CAPACITY];
|
||||||
|
uint32_t period;
|
||||||
|
} thread_entry;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t used;
|
||||||
|
char name[SIM_HAL_NAME_CAPACITY];
|
||||||
|
uint32_t thread;
|
||||||
|
uint32_t calls;
|
||||||
|
uint32_t fail;
|
||||||
|
} function_entry;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t tick;
|
||||||
|
pin_entry pins[SIM_HAL_PIN_CAPACITY];
|
||||||
|
thread_entry threads[SIM_HAL_THREAD_CAPACITY];
|
||||||
|
function_entry functions[SIM_HAL_FUNCTION_CAPACITY];
|
||||||
|
} hal_state;
|
||||||
|
|
||||||
|
static hal_state state;
|
||||||
|
|
||||||
|
static int valid_name(const char *name) {
|
||||||
|
return name != NULL && name[0] != '\0' && strlen(name) < SIM_HAL_NAME_CAPACITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int find_pin(const char *name) {
|
||||||
|
uint32_t index;
|
||||||
|
for (index = 0; index < SIM_HAL_PIN_CAPACITY; ++index) {
|
||||||
|
if (state.pins[index].used && strcmp(state.pins[index].name, name) == 0) return (int)index;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int find_thread(const char *name) {
|
||||||
|
uint32_t index;
|
||||||
|
for (index = 0; index < SIM_HAL_THREAD_CAPACITY; ++index) {
|
||||||
|
if (state.threads[index].used && strcmp(state.threads[index].name, name) == 0) return (int)index;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int find_function(const char *name) {
|
||||||
|
uint32_t index;
|
||||||
|
for (index = 0; index < SIM_HAL_FUNCTION_CAPACITY; ++index) {
|
||||||
|
if (state.functions[index].used && strcmp(state.functions[index].name, name) == 0) return (int)index;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sim_hal_reset(void) {
|
||||||
|
memset(&state, 0, sizeof(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_register_pin(const char *name, uint32_t type) {
|
||||||
|
uint32_t index;
|
||||||
|
if (!valid_name(name) || type < SIM_HAL_BIT || type > SIM_HAL_FLOAT) return SIM_HAL_ERR_ARGUMENT;
|
||||||
|
if (find_pin(name) >= 0) return SIM_HAL_ERR_DUPLICATE;
|
||||||
|
for (index = 0; index < SIM_HAL_PIN_CAPACITY; ++index) {
|
||||||
|
if (!state.pins[index].used) {
|
||||||
|
state.pins[index].used = 1;
|
||||||
|
strcpy(state.pins[index].name, name);
|
||||||
|
state.pins[index].value.type = type;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SIM_HAL_ERR_FULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_set_pin(const char *name, sim_hal_value value) {
|
||||||
|
int index = find_pin(name);
|
||||||
|
if (index < 0) return SIM_HAL_ERR_NOT_FOUND;
|
||||||
|
if (value.type != state.pins[index].value.type) return SIM_HAL_ERR_TYPE;
|
||||||
|
if (value.type == SIM_HAL_BIT && value.value.bit > 1U) return SIM_HAL_ERR_RANGE;
|
||||||
|
state.pins[index].value = value;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_get_pin(const char *name, sim_hal_value *out) {
|
||||||
|
int index = find_pin(name);
|
||||||
|
if (index < 0 || out == NULL) return index < 0 ? SIM_HAL_ERR_NOT_FOUND : SIM_HAL_ERR_ARGUMENT;
|
||||||
|
*out = state.pins[index].value;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_connect(const char *source, const char *target) {
|
||||||
|
int source_index = find_pin(source);
|
||||||
|
int target_index = find_pin(target);
|
||||||
|
if (source_index < 0 || target_index < 0) return SIM_HAL_ERR_NOT_FOUND;
|
||||||
|
if (state.pins[source_index].value.type != state.pins[target_index].value.type) return SIM_HAL_ERR_CONNECTION;
|
||||||
|
state.pins[target_index].value = state.pins[source_index].value;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_register_thread(const char *name, uint32_t period_ticks) {
|
||||||
|
uint32_t index;
|
||||||
|
if (!valid_name(name) || period_ticks == 0U || period_ticks > 1000000U) return SIM_HAL_ERR_RANGE;
|
||||||
|
if (find_thread(name) >= 0) return SIM_HAL_ERR_DUPLICATE;
|
||||||
|
for (index = 0; index < SIM_HAL_THREAD_CAPACITY; ++index) {
|
||||||
|
if (!state.threads[index].used) {
|
||||||
|
state.threads[index].used = 1;
|
||||||
|
strcpy(state.threads[index].name, name);
|
||||||
|
state.threads[index].period = period_ticks;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SIM_HAL_ERR_FULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_register_function(const char *thread, const char *name) {
|
||||||
|
uint32_t index;
|
||||||
|
int thread_index = find_thread(thread);
|
||||||
|
if (thread_index < 0) return SIM_HAL_ERR_NOT_FOUND;
|
||||||
|
if (!valid_name(name)) return SIM_HAL_ERR_ARGUMENT;
|
||||||
|
if (find_function(name) >= 0) return SIM_HAL_ERR_DUPLICATE;
|
||||||
|
for (index = 0; index < SIM_HAL_FUNCTION_CAPACITY; ++index) {
|
||||||
|
if (!state.functions[index].used) {
|
||||||
|
state.functions[index].used = 1;
|
||||||
|
strcpy(state.functions[index].name, name);
|
||||||
|
state.functions[index].thread = (uint32_t)thread_index;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SIM_HAL_ERR_FULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_set_function_failure(const char *name, uint32_t fail) {
|
||||||
|
int index = find_function(name);
|
||||||
|
if (index < 0) return SIM_HAL_ERR_NOT_FOUND;
|
||||||
|
state.functions[index].fail = fail ? 1U : 0U;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_hal_step(uint32_t ticks) {
|
||||||
|
uint32_t target = state.tick + ticks;
|
||||||
|
uint32_t tick;
|
||||||
|
uint32_t function_index;
|
||||||
|
for (tick = state.tick + 1U; tick <= target; ++tick) {
|
||||||
|
for (function_index = 0; function_index < SIM_HAL_FUNCTION_CAPACITY; ++function_index) {
|
||||||
|
function_entry *function = &state.functions[function_index];
|
||||||
|
if (!function->used || tick % state.threads[function->thread].period != 0U) continue;
|
||||||
|
if (function->fail) return SIM_HAL_ERR_FUNCTION;
|
||||||
|
function->calls += 1U;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state.tick = target;
|
||||||
|
return SIM_HAL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_hal_tick(void) { return state.tick; }
|
||||||
|
uint32_t sim_hal_function_calls(const char *name) { int index = find_function(name); return index < 0 ? 0U : state.functions[index].calls; }
|
||||||
|
uint32_t sim_hal_pin_count(void) { uint32_t i, count = 0; for (i = 0; i < SIM_HAL_PIN_CAPACITY; ++i) count += state.pins[i].used; return count; }
|
||||||
|
uint32_t sim_hal_thread_count(void) { uint32_t i, count = 0; for (i = 0; i < SIM_HAL_THREAD_CAPACITY; ++i) count += state.threads[i].used; return count; }
|
||||||
|
uint32_t sim_hal_function_count(void) { uint32_t i, count = 0; for (i = 0; i < SIM_HAL_FUNCTION_CAPACITY; ++i) count += state.functions[i].used; return count; }
|
||||||
62
wasm-core/src/sim_posemath.c
Normal file
62
wasm-core/src/sim_posemath.c
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#include "sim_posemath.h"
|
||||||
|
|
||||||
|
#include "posemath.h"
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
static int finite_cart(const sim_posemath_cartesian *value) {
|
||||||
|
return value != 0 && isfinite(value->x) && isfinite(value->y) && isfinite(value->z);
|
||||||
|
}
|
||||||
|
|
||||||
|
static PmCartesian to_pm(const sim_posemath_cartesian *value) {
|
||||||
|
PmCartesian result = {value->x, value->y, value->z};
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void from_pm(const PmCartesian *value, sim_posemath_cartesian *output) {
|
||||||
|
output->x = value->x;
|
||||||
|
output->y = value->y;
|
||||||
|
output->z = value->z;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sim_posemath_is_finite(const sim_posemath_cartesian *value) {
|
||||||
|
return finite_cart(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
int sim_posemath_normalize(const sim_posemath_cartesian *input, sim_posemath_cartesian *output) {
|
||||||
|
PmCartesian source;
|
||||||
|
PmCartesian result;
|
||||||
|
double magnitude_squared = 0.0;
|
||||||
|
if (!finite_cart(input) || output == 0) return SIM_POSEMATH_ERR_ARGUMENT;
|
||||||
|
source = to_pm(input);
|
||||||
|
if (pmCartMagSq(&source, &magnitude_squared) != 0 || !isfinite(magnitude_squared)) return SIM_POSEMATH_ERR_NONFINITE;
|
||||||
|
if (magnitude_squared <= 1e-24) return SIM_POSEMATH_ERR_DEGENERATE;
|
||||||
|
if (pmCartUnit(&source, &result) != 0) return SIM_POSEMATH_ERR_DEGENERATE;
|
||||||
|
from_pm(&result, output);
|
||||||
|
return SIM_POSEMATH_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sim_posemath_dot(const sim_posemath_cartesian *left, const sim_posemath_cartesian *right, double *output) {
|
||||||
|
PmCartesian lhs;
|
||||||
|
PmCartesian rhs;
|
||||||
|
if (!finite_cart(left) || !finite_cart(right) || output == 0) return SIM_POSEMATH_ERR_ARGUMENT;
|
||||||
|
lhs = to_pm(left);
|
||||||
|
rhs = to_pm(right);
|
||||||
|
if (pmCartCartDot(&lhs, &rhs, output) != 0 || !isfinite(*output)) return SIM_POSEMATH_ERR_NONFINITE;
|
||||||
|
return SIM_POSEMATH_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sim_posemath_line_point(const sim_posemath_cartesian *start, const sim_posemath_cartesian *end,
|
||||||
|
double fraction, sim_posemath_cartesian *output) {
|
||||||
|
PmCartesian begin;
|
||||||
|
PmCartesian finish;
|
||||||
|
PmCartesian result;
|
||||||
|
PmCartesian delta;
|
||||||
|
if (!finite_cart(start) || !finite_cart(end) || output == 0) return SIM_POSEMATH_ERR_ARGUMENT;
|
||||||
|
if (!isfinite(fraction) || fraction < 0.0 || fraction > 1.0) return SIM_POSEMATH_ERR_RANGE;
|
||||||
|
begin = to_pm(start);
|
||||||
|
finish = to_pm(end);
|
||||||
|
if (pmCartCartSub(&finish, &begin, &delta) != 0 || pmCartScalMult(&delta, fraction, &delta) != 0 || pmCartCartAdd(&begin, &delta, &result) != 0) return SIM_POSEMATH_ERR_DEGENERATE;
|
||||||
|
from_pm(&result, output);
|
||||||
|
return SIM_POSEMATH_OK;
|
||||||
|
}
|
||||||
112
wasm-core/src/sim_protocol.c
Normal file
112
wasm-core/src/sim_protocol.c
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#include "sim_protocol.h"
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t state;
|
||||||
|
uint32_t last_seq;
|
||||||
|
uint32_t tick;
|
||||||
|
} protocol_state;
|
||||||
|
|
||||||
|
static protocol_state state;
|
||||||
|
|
||||||
|
static int has_text(const char *value) {
|
||||||
|
return value != NULL && value[0] != '\0' && strlen(value) <= 128;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int is_kind(const char *kind, const char *expected) {
|
||||||
|
return kind != NULL && strcmp(kind, expected) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int is_side_effect(const char *kind) {
|
||||||
|
static const char *const commands[] = {
|
||||||
|
"SESSION_CREATE", "LOAD_PROJECT", "START", "STOP", "RESET",
|
||||||
|
"LOAD_WORKSPACE", "SIM_STEP", "COMMAND",
|
||||||
|
"PROGRAM_LOAD", "PROGRAM_RUN", "PROGRAM_PAUSE", "PROGRAM_RESUME",
|
||||||
|
"PROGRAM_ABORT", "PROGRAM_STEP", "PROGRAM_SEEK", "MDI_EXECUTE",
|
||||||
|
"JOG_START", "JOG_STOP", "HOME", "SET_MODE", "SET_OVERRIDE",
|
||||||
|
"SPINDLE_COMMAND", "COOLANT_COMMAND", "TOOL_PREPARE", "TOOL_CHANGE",
|
||||||
|
"PROBE_CONFIG", "HAL_COMMAND", "HAL_SET", "PLC_START", "PLC_STOP",
|
||||||
|
"PROJECT_SAVE", "IMPORT", "EXPORT", "CHECKPOINT", "RECOVER",
|
||||||
|
"SUBSCRIBE", "UNSUBSCRIBE", "CANCEL", NULL,
|
||||||
|
};
|
||||||
|
size_t index;
|
||||||
|
if (!has_text(kind)) return 0;
|
||||||
|
for (index = 0; commands[index] != NULL; ++index) {
|
||||||
|
if (is_kind(kind, commands[index])) return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int state_accepts_kind(uint32_t current, const char *kind) {
|
||||||
|
if (current == SIM_PROTOCOL_NEW) return is_kind(kind, "HELLO");
|
||||||
|
if (current == SIM_PROTOCOL_HELLO) return is_kind(kind, "SESSION_ATTACH") || is_kind(kind, "CAPABILITIES");
|
||||||
|
if (current == SIM_PROTOCOL_ATTACHED) return is_kind(kind, "SESSION_READY");
|
||||||
|
if (current == SIM_PROTOCOL_READY) return 1;
|
||||||
|
if (current == SIM_PROTOCOL_PAUSED) {
|
||||||
|
return is_kind(kind, "PROGRAM_RESUME") || is_kind(kind, "RESUME") ||
|
||||||
|
is_kind(kind, "PING") || is_kind(kind, "SNAPSHOT_REQUEST") ||
|
||||||
|
is_kind(kind, "DESTROY");
|
||||||
|
}
|
||||||
|
return is_kind(kind, "RESET");
|
||||||
|
}
|
||||||
|
|
||||||
|
void sim_protocol_reset(void) {
|
||||||
|
memset(&state, 0, sizeof(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_protocol_accept(uint32_t schema_version, uint32_t seq,
|
||||||
|
const char *kind, const char *operation_id,
|
||||||
|
uint32_t simulation_tick) {
|
||||||
|
if (schema_version != 1U) return SIM_PROTOCOL_ERR_SCHEMA;
|
||||||
|
if (!has_text(kind)) return SIM_PROTOCOL_ERR_KIND;
|
||||||
|
if (state.state == SIM_PROTOCOL_DESTROYED && !is_kind(kind, "RESET")) return SIM_PROTOCOL_ERR_STATE;
|
||||||
|
if (seq == 0U || seq != state.last_seq + 1U) return SIM_PROTOCOL_ERR_SEQUENCE;
|
||||||
|
if (simulation_tick < state.tick) return SIM_PROTOCOL_ERR_TICK;
|
||||||
|
if (!state_accepts_kind(state.state, kind)) return SIM_PROTOCOL_ERR_STATE;
|
||||||
|
if (is_side_effect(kind) && !has_text(operation_id)) return SIM_PROTOCOL_ERR_OPERATION_ID;
|
||||||
|
|
||||||
|
state.last_seq = seq;
|
||||||
|
state.tick = simulation_tick;
|
||||||
|
if (is_kind(kind, "HELLO")) state.state = SIM_PROTOCOL_HELLO;
|
||||||
|
/* SESSION_READY is the worker response; the next client command is valid immediately. */
|
||||||
|
else if (is_kind(kind, "SESSION_ATTACH")) state.state = SIM_PROTOCOL_READY;
|
||||||
|
else if (is_kind(kind, "SESSION_READY")) state.state = SIM_PROTOCOL_READY;
|
||||||
|
else if (is_kind(kind, "PROGRAM_PAUSE")) state.state = SIM_PROTOCOL_PAUSED;
|
||||||
|
else if (is_kind(kind, "PROGRAM_RESUME") || is_kind(kind, "RESUME")) state.state = SIM_PROTOCOL_READY;
|
||||||
|
else if (is_kind(kind, "DESTROY")) state.state = SIM_PROTOCOL_DESTROYED;
|
||||||
|
else if (is_kind(kind, "RESET")) sim_protocol_reset();
|
||||||
|
return SIM_PROTOCOL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_protocol_pause(void) {
|
||||||
|
if (state.state != SIM_PROTOCOL_READY) return SIM_PROTOCOL_ERR_STATE;
|
||||||
|
state.state = SIM_PROTOCOL_PAUSED;
|
||||||
|
return SIM_PROTOCOL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_protocol_resume(void) {
|
||||||
|
if (state.state != SIM_PROTOCOL_PAUSED) return SIM_PROTOCOL_ERR_STATE;
|
||||||
|
state.state = SIM_PROTOCOL_READY;
|
||||||
|
return SIM_PROTOCOL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_protocol_state_value(void) {
|
||||||
|
return (int32_t)state.state;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_protocol_last_seq(void) {
|
||||||
|
return state.last_seq;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t sim_protocol_tick(void) {
|
||||||
|
return state.tick;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t sim_protocol_set_tick(uint32_t simulation_tick) {
|
||||||
|
if (simulation_tick < state.tick) return SIM_PROTOCOL_ERR_TICK;
|
||||||
|
state.tick = simulation_tick;
|
||||||
|
return SIM_PROTOCOL_OK;
|
||||||
|
}
|
||||||
26
wasm-core/tests/sim_api_test.c
Normal file
26
wasm-core/tests/sim_api_test.c
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#include "sim_api.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
uint8_t snapshot[sizeof(uint64_t)] = {0};
|
||||||
|
uint8_t state[32] = {0};
|
||||||
|
assert(sim_step(1) == SIM_ERR_NOT_CREATED);
|
||||||
|
assert(sim_create(NULL, 0) == SIM_OK);
|
||||||
|
assert(sim_load_workspace("/workspace") == SIM_OK);
|
||||||
|
assert(sim_step(7) == SIM_OK);
|
||||||
|
assert(sim_read_snapshot(snapshot, sizeof(snapshot)) == sizeof(snapshot));
|
||||||
|
uint64_t tick = 0;
|
||||||
|
memcpy(&tick, snapshot, sizeof(tick));
|
||||||
|
assert(tick == 7);
|
||||||
|
assert(sim_export_state(state, sizeof(state)) > 0);
|
||||||
|
assert(sim_step(3) == SIM_OK);
|
||||||
|
assert(sim_import_state(state, sizeof(state)) == SIM_OK);
|
||||||
|
assert(sim_read_snapshot(snapshot, sizeof(snapshot)) == sizeof(snapshot));
|
||||||
|
memcpy(&tick, snapshot, sizeof(tick));
|
||||||
|
assert(tick == 7);
|
||||||
|
sim_destroy();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
28
wasm-core/tests/sim_event_test.c
Normal file
28
wasm-core/tests/sim_event_test.c
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#include "sim_event.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
uint8_t record[sizeof(sim_event_record)] = {0};
|
||||||
|
uint8_t exported[16384] = {0};
|
||||||
|
const uint8_t payload[] = {'o', 'k'};
|
||||||
|
|
||||||
|
sim_event_reset();
|
||||||
|
assert(sim_event_append(2, 0, "bad", payload, sizeof(payload)) == SIM_EVENT_ERR_SEQUENCE);
|
||||||
|
assert(sim_event_append(1, 2, "STEP", payload, sizeof(payload)) == SIM_EVENT_OK);
|
||||||
|
assert(sim_event_append(2, 1, "BAD_TICK", NULL, 0) == SIM_EVENT_ERR_TICK);
|
||||||
|
assert(sim_event_read(0, NULL, 0) == sizeof(sim_event_record));
|
||||||
|
assert(sim_event_read(0, record, sizeof(record)) == sizeof(record));
|
||||||
|
assert(((sim_event_record *)record)->seq == 1);
|
||||||
|
assert(sim_event_count() == 1);
|
||||||
|
assert(sim_event_cursor() == 1);
|
||||||
|
uint32_t export_size = sim_event_export(NULL, 0);
|
||||||
|
assert(export_size > 0 && export_size < sizeof(exported));
|
||||||
|
assert(sim_event_export(exported, sizeof(exported)) == export_size);
|
||||||
|
sim_event_reset();
|
||||||
|
assert(sim_event_import(exported, export_size) == SIM_EVENT_OK);
|
||||||
|
assert(sim_event_count() == 1);
|
||||||
|
assert(sim_event_import(exported, export_size - 1) == SIM_EVENT_ERR_ARGUMENT);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
29
wasm-core/tests/sim_hal_test.c
Normal file
29
wasm-core/tests/sim_hal_test.c
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#include "sim_hal.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
sim_hal_value bit = {SIM_HAL_BIT, {.bit = 1}};
|
||||||
|
sim_hal_value wrong = {SIM_HAL_S32, {.s32 = 1}};
|
||||||
|
sim_hal_value out = {0};
|
||||||
|
|
||||||
|
sim_hal_reset();
|
||||||
|
assert(sim_hal_register_pin("source", SIM_HAL_BIT) == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_register_pin("target", SIM_HAL_BIT) == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_register_pin("source", SIM_HAL_BIT) == SIM_HAL_ERR_DUPLICATE);
|
||||||
|
assert(sim_hal_set_pin("source", bit) == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_set_pin("source", wrong) == SIM_HAL_ERR_TYPE);
|
||||||
|
assert(sim_hal_connect("source", "target") == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_get_pin("target", &out) == SIM_HAL_OK && out.value.bit == 1);
|
||||||
|
assert(sim_hal_register_thread("servo", 2) == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_register_thread("servo", 2) == SIM_HAL_ERR_DUPLICATE);
|
||||||
|
assert(sim_hal_register_function("servo", "update") == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_register_function("missing", "bad") == SIM_HAL_ERR_NOT_FOUND);
|
||||||
|
assert(sim_hal_step(5) == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_tick() == 5 && sim_hal_function_calls("update") == 2);
|
||||||
|
assert(sim_hal_set_function_failure("update", 1) == SIM_HAL_OK);
|
||||||
|
assert(sim_hal_step(1) == SIM_HAL_ERR_FUNCTION);
|
||||||
|
assert(sim_hal_tick() == 5);
|
||||||
|
assert(sim_hal_register_thread("invalid", 0) == SIM_HAL_ERR_RANGE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
23
wasm-core/tests/sim_posemath_test.c
Normal file
23
wasm-core/tests/sim_posemath_test.c
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#include "sim_posemath.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
sim_posemath_cartesian input = {3.0, 4.0, 0.0};
|
||||||
|
sim_posemath_cartesian output = {0};
|
||||||
|
sim_posemath_cartesian end = {10.0, 10.0, 10.0};
|
||||||
|
double dot = 0;
|
||||||
|
|
||||||
|
assert(sim_posemath_normalize(&input, &output) == SIM_POSEMATH_OK);
|
||||||
|
assert(fabs(output.x - 0.6) < 1e-12 && fabs(output.y - 0.8) < 1e-12);
|
||||||
|
assert(sim_posemath_dot(&input, &end, &dot) == SIM_POSEMATH_OK && dot == 70.0);
|
||||||
|
assert(sim_posemath_line_point(&input, &end, 0.5, &output) == SIM_POSEMATH_OK);
|
||||||
|
assert(output.x == 6.5 && output.y == 7.0 && output.z == 5.0);
|
||||||
|
assert(sim_posemath_line_point(&input, &end, 1.1, &output) == SIM_POSEMATH_ERR_RANGE);
|
||||||
|
input.x = NAN;
|
||||||
|
assert(sim_posemath_normalize(&input, &output) == SIM_POSEMATH_ERR_ARGUMENT);
|
||||||
|
input.x = 0.0; input.y = 0.0; input.z = 0.0;
|
||||||
|
assert(sim_posemath_normalize(&input, &output) == SIM_POSEMATH_ERR_DEGENERATE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
wasm-core/tests/sim_protocol_test.c
Normal file
25
wasm-core/tests/sim_protocol_test.c
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include "sim_protocol.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
sim_protocol_reset();
|
||||||
|
assert(sim_protocol_state_value() == SIM_PROTOCOL_NEW);
|
||||||
|
assert(sim_protocol_accept(1, 1, "HELLO", NULL, 0) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_accept(1, 3, "SESSION_ATTACH", NULL, 0) == SIM_PROTOCOL_ERR_SEQUENCE);
|
||||||
|
assert(sim_protocol_accept(1, 2, "SESSION_ATTACH", NULL, 0) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_state_value() == SIM_PROTOCOL_READY);
|
||||||
|
assert(sim_protocol_accept(1, 3, "MDI_EXECUTE", NULL, 0) == SIM_PROTOCOL_ERR_OPERATION_ID);
|
||||||
|
assert(sim_protocol_accept(1, 3, "MDI_EXECUTE", "op-3", 2) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_accept(1, 4, "PROGRAM_PAUSE", "op-4", 2) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_accept(1, 5, "MDI_EXECUTE", "op-5", 2) == SIM_PROTOCOL_ERR_STATE);
|
||||||
|
assert(sim_protocol_accept(1, 5, "PROGRAM_RESUME", "op-5", 2) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_accept(2, 6, "PING", NULL, 2) == SIM_PROTOCOL_ERR_SCHEMA);
|
||||||
|
assert(sim_protocol_accept(1, 6, "PING", NULL, 1) == SIM_PROTOCOL_ERR_TICK);
|
||||||
|
assert(sim_protocol_accept(1, 6, "DESTROY", NULL, 2) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_accept(1, 7, "PING", NULL, 2) == SIM_PROTOCOL_ERR_STATE);
|
||||||
|
assert(sim_protocol_accept(1, 8, "RESET", "reset-1", 0) == SIM_PROTOCOL_OK);
|
||||||
|
assert(sim_protocol_state_value() == SIM_PROTOCOL_NEW);
|
||||||
|
assert(sim_protocol_set_tick(4) == SIM_PROTOCOL_ERR_TICK);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
43
web/worker/capabilities.mjs
Normal file
43
web/worker/capabilities.mjs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import { realExcluded } from "./error-map.mjs";
|
||||||
|
|
||||||
|
export const LIMITS = Object.freeze({
|
||||||
|
max_command_bytes: 65536,
|
||||||
|
max_snapshot_bytes: 1048576,
|
||||||
|
max_tick_step: 1000000,
|
||||||
|
max_event_records: 256,
|
||||||
|
max_workspace_path_bytes: 1024,
|
||||||
|
max_workspace_file_bytes: 64 * 1024 * 1024,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const COMMANDS = Object.freeze([
|
||||||
|
"SESSION_ATTACH", "LOAD_WORKSPACE", "COMMAND", "SIM_STEP", "SNAPSHOT_REQUEST",
|
||||||
|
"PROGRAM_PAUSE", "PROGRAM_RESUME", "CHECKPOINT", "RECOVER", "DESTROY",
|
||||||
|
]);
|
||||||
|
|
||||||
|
export const EXCLUSIONS = Object.freeze([
|
||||||
|
realExcluded("real_hardware", "browser_has_no_direct_machine_control", "digital_twin"),
|
||||||
|
realExcluded("linux_realtime_kernel", "wasm_worker_uses_logical_ticks", "fixed_tick_scheduler"),
|
||||||
|
realExcluded("host_device_access", "browser_sandbox_disallows_arbitrary_devices", "virtual_device_adapter"),
|
||||||
|
]);
|
||||||
|
|
||||||
|
export function capabilities(contextId) {
|
||||||
|
return {
|
||||||
|
context_id: contextId,
|
||||||
|
abi: 1,
|
||||||
|
protocol: 1,
|
||||||
|
snapshot: 1,
|
||||||
|
event: 1,
|
||||||
|
workspace: 1,
|
||||||
|
commands: [...COMMANDS],
|
||||||
|
streams: ["STATE_SNAPSHOT", "EVENT", "ALARM"],
|
||||||
|
limits: { ...LIMITS },
|
||||||
|
exclusions: EXCLUSIONS.map((entry) => ({ ...entry })),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLimit(name, value) {
|
||||||
|
if (!(name in LIMITS)) return { status: "blocked", code: "capability_unknown_limit", message_key: "capability.unknown_limit", limit: name };
|
||||||
|
if (!Number.isSafeInteger(value) || value < 0) return { status: "blocked", code: "capability_invalid_value", message_key: "capability.invalid_value", limit: name, value };
|
||||||
|
if (value > LIMITS[name]) return { status: "blocked", code: "capability_limit_exceeded", message_key: "capability.limit_exceeded", limit: name, value, maximum: LIMITS[name] };
|
||||||
|
return { status: "accepted", limit: name, value, maximum: LIMITS[name] };
|
||||||
|
}
|
||||||
58
web/worker/error-map.mjs
Normal file
58
web/worker/error-map.mjs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
export const ERROR_DEFINITIONS = Object.freeze({
|
||||||
|
0: { code: "ok", message_key: "ok", retryable: false, category: "none" },
|
||||||
|
[-1]: { code: "sim_invalid_argument", message_key: "sim.invalid_argument", retryable: false, category: "core" },
|
||||||
|
[-2]: { code: "sim_not_created", message_key: "sim.not_created", retryable: false, category: "core" },
|
||||||
|
[-3]: { code: "sim_buffer_too_small", message_key: "sim.buffer_too_small", retryable: true, category: "core" },
|
||||||
|
[-4]: { code: "sim_invalid_state", message_key: "sim.invalid_state", retryable: false, category: "core" },
|
||||||
|
[-5]: { code: "sim_unsupported", message_key: "sim.unsupported", retryable: false, category: "capability" },
|
||||||
|
[-100]: { code: "protocol_schema", message_key: "protocol.unsupported_schema", retryable: false, category: "protocol" },
|
||||||
|
[-101]: { code: "protocol_sequence", message_key: "protocol.sequence_gap", retryable: true, category: "protocol" },
|
||||||
|
[-102]: { code: "protocol_state", message_key: "protocol.invalid_state", retryable: false, category: "protocol" },
|
||||||
|
[-103]: { code: "protocol_operation_id", message_key: "protocol.operation_id_required", retryable: false, category: "protocol" },
|
||||||
|
[-104]: { code: "protocol_kind", message_key: "protocol.invalid_kind", retryable: false, category: "protocol" },
|
||||||
|
[-105]: { code: "protocol_argument", message_key: "protocol.invalid_argument", retryable: false, category: "protocol" },
|
||||||
|
[-106]: { code: "protocol_tick", message_key: "protocol.tick_regression", retryable: false, category: "protocol" },
|
||||||
|
[-200]: { code: "event_sequence", message_key: "event.sequence_gap", retryable: true, category: "event" },
|
||||||
|
[-201]: { code: "event_tick", message_key: "event.tick_regression", retryable: false, category: "event" },
|
||||||
|
[-202]: { code: "event_argument", message_key: "event.invalid_argument", retryable: false, category: "event" },
|
||||||
|
[-203]: { code: "event_full", message_key: "event.capacity_exceeded", retryable: true, category: "event" },
|
||||||
|
[-204]: { code: "event_buffer", message_key: "event.buffer_too_small", retryable: true, category: "event" },
|
||||||
|
});
|
||||||
|
|
||||||
|
export function mapCoreError(value, context = {}) {
|
||||||
|
const definition = ERROR_DEFINITIONS[value];
|
||||||
|
if (!definition) {
|
||||||
|
return {
|
||||||
|
status: "error",
|
||||||
|
code: "core_unknown_error",
|
||||||
|
message_key: "core.unknown_error",
|
||||||
|
category: "core",
|
||||||
|
retryable: false,
|
||||||
|
original_code: value,
|
||||||
|
operation_id: context.operation_id ?? null,
|
||||||
|
simulation_tick: context.simulation_tick ?? 0,
|
||||||
|
source: context.source ?? null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
status: value === 0 ? "ok" : "error",
|
||||||
|
...definition,
|
||||||
|
original_code: value,
|
||||||
|
operation_id: context.operation_id ?? null,
|
||||||
|
simulation_tick: context.simulation_tick ?? 0,
|
||||||
|
source: context.source ?? null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function realExcluded(capability, reason, substitute = null) {
|
||||||
|
return {
|
||||||
|
status: "REAL-EXCLUDED",
|
||||||
|
code: "real_hardware_excluded",
|
||||||
|
message_key: "capability.real_hardware_excluded",
|
||||||
|
category: "capability",
|
||||||
|
capability,
|
||||||
|
reason,
|
||||||
|
substitute,
|
||||||
|
retryable: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
125
web/worker/replay.mjs
Normal file
125
web/worker/replay.mjs
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
const EVENT_SCHEMA = "event-log.v1";
|
||||||
|
const SNAPSHOT_SCHEMA = "snapshot.v1";
|
||||||
|
|
||||||
|
export function canonicalJson(value) {
|
||||||
|
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
||||||
|
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
||||||
|
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fnv1a64(value) {
|
||||||
|
const bytes = new TextEncoder().encode(typeof value === "string" ? value : canonicalJson(value));
|
||||||
|
let hash = 1469598103934665603n;
|
||||||
|
for (const byte of bytes) {
|
||||||
|
hash ^= BigInt(byte);
|
||||||
|
hash = BigInt.asUintN(64, hash * 1099511628211n);
|
||||||
|
}
|
||||||
|
return `fnv1a64:${hash.toString(16).padStart(16, "0")}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function requireInteger(value, name) {
|
||||||
|
if (!Number.isSafeInteger(value) || value < 0) throw new Error(`invalid_${name}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export class EventLog {
|
||||||
|
constructor(events = []) {
|
||||||
|
this.events = [];
|
||||||
|
for (const event of events) this.append(event.seq, event.tick, event.kind, event.payload, event.payload_hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
append(seq, tick, kind, payload = {}, expectedHash = undefined) {
|
||||||
|
requireInteger(seq, "seq");
|
||||||
|
requireInteger(tick, "tick");
|
||||||
|
if (seq !== this.cursor + 1) throw new Error("event_sequence_gap");
|
||||||
|
if (tick < this.tick) throw new Error("event_tick_regression");
|
||||||
|
if (typeof kind !== "string" || kind.length === 0 || kind.length > 64) throw new Error("event_kind_invalid");
|
||||||
|
const payloadHash = fnv1a64(payload);
|
||||||
|
if (expectedHash !== undefined && expectedHash !== payloadHash) throw new Error("event_payload_hash_mismatch");
|
||||||
|
const event = { seq, tick, kind, payload, payload_hash: payloadHash };
|
||||||
|
this.events.push(event);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
|
|
||||||
|
get cursor() { return this.events.length === 0 ? 0 : this.events[this.events.length - 1].seq; }
|
||||||
|
get tick() { return this.events.length === 0 ? 0 : this.events[this.events.length - 1].tick; }
|
||||||
|
|
||||||
|
export() {
|
||||||
|
return { schema: EVENT_SCHEMA, cursor: this.cursor, tick: this.tick, events: this.events.map((event) => ({ ...event })) };
|
||||||
|
}
|
||||||
|
|
||||||
|
static import(value) {
|
||||||
|
if (!value || value.schema !== EVENT_SCHEMA || !Array.isArray(value.events)) throw new Error("event_log_schema");
|
||||||
|
const log = new EventLog(value.events);
|
||||||
|
if (log.cursor !== value.cursor || log.tick !== value.tick) throw new Error("event_log_cursor_mismatch");
|
||||||
|
return log;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SnapshotStore {
|
||||||
|
constructor(snapshots = []) {
|
||||||
|
this.snapshots = new Map();
|
||||||
|
for (const snapshot of snapshots) this.importSnapshot(snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
create(seq, tick, state, baseSnapshotId = null) {
|
||||||
|
requireInteger(seq, "snapshot_seq");
|
||||||
|
requireInteger(tick, "snapshot_tick");
|
||||||
|
if (baseSnapshotId !== null && !this.snapshots.has(baseSnapshotId)) throw new Error("snapshot_base_missing");
|
||||||
|
const stateHash = fnv1a64(state);
|
||||||
|
const snapshot = {
|
||||||
|
schema: SNAPSHOT_SCHEMA,
|
||||||
|
snapshot_id: `snap:${seq}:${stateHash}`,
|
||||||
|
base_snapshot_id: baseSnapshotId,
|
||||||
|
seq,
|
||||||
|
tick,
|
||||||
|
state,
|
||||||
|
state_hash: stateHash,
|
||||||
|
};
|
||||||
|
this.snapshots.set(snapshot.snapshot_id, snapshot);
|
||||||
|
return snapshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
importSnapshot(snapshot) {
|
||||||
|
if (!snapshot || snapshot.schema !== SNAPSHOT_SCHEMA || typeof snapshot.snapshot_id !== "string") throw new Error("snapshot_schema");
|
||||||
|
if (snapshot.base_snapshot_id !== null && !this.snapshots.has(snapshot.base_snapshot_id)) throw new Error("snapshot_base_missing");
|
||||||
|
if (fnv1a64(snapshot.state) !== snapshot.state_hash) throw new Error("snapshot_hash_mismatch");
|
||||||
|
if (snapshot.snapshot_id !== `snap:${snapshot.seq}:${snapshot.state_hash}`) throw new Error("snapshot_id_mismatch");
|
||||||
|
this.snapshots.set(snapshot.snapshot_id, { ...snapshot });
|
||||||
|
return snapshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
latest() {
|
||||||
|
return this.snapshots.size === 0 ? null : [...this.snapshots.values()][this.snapshots.size - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
export() {
|
||||||
|
return { schema: SNAPSHOT_SCHEMA, snapshots: [...this.snapshots.values()].map((snapshot) => ({ ...snapshot })) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReplayTimeline {
|
||||||
|
constructor(value = null) {
|
||||||
|
this.events = value ? EventLog.import(value.events) : new EventLog();
|
||||||
|
this.snapshots = value ? new SnapshotStore(value.snapshots.snapshots) : new SnapshotStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
appendEvent(seq, tick, kind, payload = {}) {
|
||||||
|
return this.events.append(seq, tick, kind, payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkpoint(seq, tick, state, baseSnapshotId = null) {
|
||||||
|
return this.snapshots.create(seq, tick, state, baseSnapshotId);
|
||||||
|
}
|
||||||
|
|
||||||
|
replay(initialState, apply) {
|
||||||
|
let state = initialState;
|
||||||
|
for (const event of this.events.events) state = apply(state, event);
|
||||||
|
return { state, state_hash: fnv1a64(state), cursor: this.events.cursor, tick: this.events.tick };
|
||||||
|
}
|
||||||
|
|
||||||
|
export() {
|
||||||
|
return { events: this.events.export(), snapshots: this.snapshots.export() };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { EVENT_SCHEMA, SNAPSHOT_SCHEMA };
|
||||||
144
web/worker/sim-session.mjs
Normal file
144
web/worker/sim-session.mjs
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
import { ReplayTimeline, fnv1a64 } from "./replay.mjs";
|
||||||
|
import { capabilities, validateLimit } from "./capabilities.mjs";
|
||||||
|
import { mapCoreError } from "./error-map.mjs";
|
||||||
|
|
||||||
|
const PROTOCOL_SCHEMA = 1;
|
||||||
|
const CONTEXT_ID = "linuxcnc-2.10.0-pre0-wasm-m0-c1";
|
||||||
|
|
||||||
|
function text(value) {
|
||||||
|
return typeof value === "string" && value.length > 0 ? value : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function call(core, name, ...args) {
|
||||||
|
if (args.some((value) => typeof value === "string") && typeof core.ccall === "function") {
|
||||||
|
return core.ccall(name, "number", args.map((value) => typeof value === "string" ? "string" : "number"), args);
|
||||||
|
}
|
||||||
|
const direct = core[`_${name}`] ?? core[name];
|
||||||
|
if (typeof direct === "function") return direct(...args);
|
||||||
|
if (typeof core.cwrap === "function") {
|
||||||
|
const wrapped = core.cwrap(name, "number", args.map((value) => typeof value === "string" ? "string" : "number"));
|
||||||
|
return wrapped(...args);
|
||||||
|
}
|
||||||
|
throw new Error(`missing core export: ${name}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function appendCoreEvent(core, seq, tick, kind, payload) {
|
||||||
|
if (typeof core.ccall !== "function") return 0;
|
||||||
|
const bytes = new TextEncoder().encode(canonicalPayload(payload));
|
||||||
|
return core.ccall("sim_event_append", "number", ["number", "number", "string", "array", "number"], [seq, tick, kind, bytes, bytes.length]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function canonicalPayload(value) {
|
||||||
|
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
||||||
|
if (Array.isArray(value)) return `[${value.map(canonicalPayload).join(",")}]`;
|
||||||
|
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalPayload(value[key])}`).join(",")}}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SimSession {
|
||||||
|
constructor(core, { contextId = CONTEXT_ID, sessionId = "" } = {}) {
|
||||||
|
this.core = core;
|
||||||
|
this.contextId = contextId;
|
||||||
|
this.sessionId = sessionId;
|
||||||
|
this.tick = 0;
|
||||||
|
this.created = false;
|
||||||
|
this.timeline = new ReplayTimeline();
|
||||||
|
call(core, "sim_protocol_reset");
|
||||||
|
if (typeof core.ccall === "function") core.ccall("sim_event_reset", null, [], []);
|
||||||
|
}
|
||||||
|
|
||||||
|
envelope(kind, input, payload, tick = this.tick) {
|
||||||
|
return {
|
||||||
|
schema_version: PROTOCOL_SCHEMA,
|
||||||
|
kind,
|
||||||
|
context_id: this.contextId,
|
||||||
|
session_id: this.sessionId,
|
||||||
|
seq: input.seq,
|
||||||
|
...(text(input.operation_id) ? { operation_id: input.operation_id } : {}),
|
||||||
|
simulation_tick: tick,
|
||||||
|
payload,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
error(input, code, messageKey, retryable = false) {
|
||||||
|
return this.envelope("ERROR", input, {
|
||||||
|
status: "error",
|
||||||
|
code,
|
||||||
|
message_key: messageKey,
|
||||||
|
retryable,
|
||||||
|
operation_id: input.operation_id ?? null,
|
||||||
|
simulation_tick: this.tick,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
coreError(input, result, source) {
|
||||||
|
const mapped = mapCoreError(result, { operation_id: input.operation_id, simulation_tick: this.tick, source });
|
||||||
|
return this.envelope("ERROR", input, mapped);
|
||||||
|
}
|
||||||
|
|
||||||
|
validateEnvelope(input) {
|
||||||
|
if (!input || typeof input !== "object") return ["protocol_argument", "invalid_envelope"];
|
||||||
|
if (input.schema_version !== PROTOCOL_SCHEMA) return ["protocol_schema", "unsupported_schema"];
|
||||||
|
if (input.context_id !== this.contextId) return ["protocol_context", "context_mismatch"];
|
||||||
|
if (!text(input.kind) || !Number.isSafeInteger(input.seq) || input.seq <= 0) return ["protocol_argument", "invalid_sequence_or_kind"];
|
||||||
|
if (this.sessionId && input.session_id !== this.sessionId) return ["protocol_session", "session_mismatch"];
|
||||||
|
if (!this.sessionId && text(input.session_id)) this.sessionId = input.session_id;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
accept(input) {
|
||||||
|
const invalid = this.validateEnvelope(input);
|
||||||
|
if (invalid) return this.error(input ?? {}, invalid[0], invalid[1]);
|
||||||
|
const result = call(this.core, "sim_protocol_accept", input.schema_version, input.seq, input.kind, input.operation_id ?? "", input.simulation_tick ?? this.tick);
|
||||||
|
if (result !== 0) return this.coreError(input, result, "sim_protocol_accept");
|
||||||
|
if (Number.isSafeInteger(input.simulation_tick) && input.simulation_tick >= this.tick) this.tick = input.simulation_tick;
|
||||||
|
const eventTick = input.kind === "SIM_STEP" && Number.isSafeInteger(input.payload?.cycles)
|
||||||
|
? this.tick + input.payload.cycles : this.tick;
|
||||||
|
try {
|
||||||
|
this.timeline.appendEvent(input.seq, eventTick, input.kind, input.payload ?? {});
|
||||||
|
} catch (error) {
|
||||||
|
return this.error(input, "event_log", String(error?.message ?? error));
|
||||||
|
}
|
||||||
|
const coreEventResult = appendCoreEvent(this.core, input.seq, eventTick, input.kind, input.payload ?? {});
|
||||||
|
if (coreEventResult !== 0) return this.error(input, "event_log", "core_event_append_failed");
|
||||||
|
|
||||||
|
switch (input.kind) {
|
||||||
|
case "HELLO":
|
||||||
|
return this.envelope("CAPABILITIES", input, capabilities(this.contextId));
|
||||||
|
case "SESSION_ATTACH":
|
||||||
|
if (!this.created) {
|
||||||
|
const createResult = call(this.core, "sim_create", 0, 0);
|
||||||
|
if (createResult !== 0) return this.coreError(input, createResult, "sim_create");
|
||||||
|
this.created = true;
|
||||||
|
}
|
||||||
|
return this.envelope("SESSION_READY", input, { state_hash: fnv1a64({ tick: this.tick }), subscriptions: [] });
|
||||||
|
case "LOAD_WORKSPACE": {
|
||||||
|
const rootPath = input.payload?.root_path;
|
||||||
|
if (!text(rootPath) || !rootPath.startsWith("/") || rootPath.includes("..")) return this.error(input, "workspace_path", "invalid_workspace_path");
|
||||||
|
const loadResult = call(this.core, "sim_load_workspace", rootPath);
|
||||||
|
return loadResult === 0 ? this.envelope("COMMAND_RESULT", input, { status: "verified", command: input.kind, state_hash: fnv1a64({ tick: this.tick }) }) : this.coreError(input, loadResult, "sim_load_workspace");
|
||||||
|
}
|
||||||
|
case "SIM_STEP": {
|
||||||
|
const cycles = input.payload?.cycles;
|
||||||
|
const limit = validateLimit("max_tick_step", cycles);
|
||||||
|
if (limit.status !== "accepted") return this.envelope("ERROR", input, { ...limit, operation_id: input.operation_id ?? null, simulation_tick: this.tick, retryable: false });
|
||||||
|
const stepResult = call(this.core, "sim_step", cycles);
|
||||||
|
if (stepResult !== 0) return this.coreError(input, stepResult, "sim_step");
|
||||||
|
this.tick += cycles;
|
||||||
|
const protocolTick = call(this.core, "sim_protocol_set_tick", this.tick);
|
||||||
|
if (protocolTick !== 0) return this.error(input, "protocol_tick", "tick_update_failed");
|
||||||
|
const snapshot = this.timeline.checkpoint(input.seq, this.tick, { tick: this.tick, cycles }, this.timeline.snapshots.latest()?.snapshot_id ?? null);
|
||||||
|
return this.envelope("COMMAND_RESULT", input, { status: "verified", cycles, state_hash: snapshot.state_hash, snapshot });
|
||||||
|
}
|
||||||
|
case "SNAPSHOT_REQUEST":
|
||||||
|
return this.envelope("STATE_SNAPSHOT", input, { snapshot_schema: 1, tick: this.tick, state_hash: fnv1a64({ tick: this.tick }), snapshot: this.timeline.snapshots.latest() });
|
||||||
|
case "DESTROY":
|
||||||
|
call(this.core, "sim_destroy");
|
||||||
|
this.created = false;
|
||||||
|
return this.envelope("COMMAND_RESULT", input, { status: "verified", destroyed: true, replay: this.timeline.export() });
|
||||||
|
default:
|
||||||
|
return this.envelope("COMMAND_RESULT", input, { status: "verified", command: input.kind });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { CONTEXT_ID, PROTOCOL_SCHEMA };
|
||||||
20
web/worker/sim-worker.mjs
Normal file
20
web/worker/sim-worker.mjs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import createModule from "../../build-wasm/linuxcnc-sim-core.js";
|
||||||
|
import { SimSession } from "./sim-session.mjs";
|
||||||
|
|
||||||
|
const core = await createModule();
|
||||||
|
const session = new SimSession(core);
|
||||||
|
|
||||||
|
self.onmessage = (event) => {
|
||||||
|
try {
|
||||||
|
self.postMessage(session.accept(event.data));
|
||||||
|
} catch (error) {
|
||||||
|
self.postMessage({
|
||||||
|
schema_version: 1,
|
||||||
|
kind: "ERROR",
|
||||||
|
context_id: session.contextId,
|
||||||
|
session_id: session.sessionId,
|
||||||
|
seq: event.data?.seq ?? 0,
|
||||||
|
payload: { status: "error", code: "worker_exception", message_key: String(error?.message ?? error), retryable: false },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
39
web/worker/test_replay.mjs
Normal file
39
web/worker/test_replay.mjs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { EventLog, ReplayTimeline, SnapshotStore, fnv1a64 } from "./replay.mjs";
|
||||||
|
|
||||||
|
function buildTimeline() {
|
||||||
|
const timeline = new ReplayTimeline();
|
||||||
|
timeline.appendEvent(1, 0, "SESSION_READY", {});
|
||||||
|
timeline.appendEvent(2, 5, "SIM_STEP", { cycles: 5 });
|
||||||
|
timeline.checkpoint(2, 5, { tick: 5, position: 5 });
|
||||||
|
timeline.appendEvent(3, 9, "SIM_STEP", { cycles: 4 });
|
||||||
|
const base = timeline.snapshots.latest().snapshot_id;
|
||||||
|
timeline.checkpoint(3, 9, { tick: 9, position: 9 }, base);
|
||||||
|
return timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
const first = buildTimeline();
|
||||||
|
const second = buildTimeline();
|
||||||
|
assert.deepEqual(first.export(), second.export());
|
||||||
|
const replay = first.replay({ tick: 0, position: 0 }, (state, event) => ({
|
||||||
|
tick: event.tick,
|
||||||
|
position: state.position + (event.payload.cycles ?? 0),
|
||||||
|
}));
|
||||||
|
assert.equal(replay.tick, 9);
|
||||||
|
assert.equal(replay.state.position, 9);
|
||||||
|
assert.equal(replay.state_hash, fnv1a64({ tick: 9, position: 9 }));
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
const log = new EventLog();
|
||||||
|
log.append(2, 0, "GAP", {});
|
||||||
|
}, /event_sequence_gap/);
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
const snapshots = new SnapshotStore();
|
||||||
|
snapshots.create(1, 1, { tick: 1 }, "snap:missing");
|
||||||
|
}, /snapshot_base_missing/);
|
||||||
|
|
||||||
|
const exported = first.export();
|
||||||
|
exported.snapshots.snapshots[0].state_hash = "fnv1a64:0000000000000000";
|
||||||
|
assert.throws(() => new ReplayTimeline(exported), /snapshot_hash_mismatch/);
|
||||||
|
console.log("replay=passed cursor=" + replay.cursor + " tick=" + replay.tick);
|
||||||
36
web/worker/test_runtime_mapping.mjs
Normal file
36
web/worker/test_runtime_mapping.mjs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { writeFile } from "node:fs/promises";
|
||||||
|
import { capabilities, validateLimit } from "./capabilities.mjs";
|
||||||
|
import { ERROR_DEFINITIONS, mapCoreError, realExcluded } from "./error-map.mjs";
|
||||||
|
|
||||||
|
const codes = Object.keys(ERROR_DEFINITIONS).map(Number);
|
||||||
|
assert.equal(codes.length, new Set(codes).size);
|
||||||
|
for (const code of codes) {
|
||||||
|
const mapped = mapCoreError(code, { operation_id: "op", simulation_tick: 7, source: "test" });
|
||||||
|
assert.equal(mapped.original_code, code);
|
||||||
|
assert.equal(mapped.operation_id, "op");
|
||||||
|
assert.equal(mapped.simulation_tick, 7);
|
||||||
|
assert.ok(mapped.message_key.includes("." ) || mapped.message_key === "ok");
|
||||||
|
}
|
||||||
|
const unknown = mapCoreError(-999);
|
||||||
|
assert.equal(unknown.code, "core_unknown_error");
|
||||||
|
assert.equal(unknown.retryable, false);
|
||||||
|
const caps = capabilities("ctx");
|
||||||
|
assert.equal(caps.context_id, "ctx");
|
||||||
|
assert.ok(caps.commands.includes("SIM_STEP"));
|
||||||
|
assert.equal(caps.exclusions.every((item) => item.status === "REAL-EXCLUDED"), true);
|
||||||
|
assert.equal(validateLimit("max_tick_step", 1000000).status, "accepted");
|
||||||
|
assert.equal(validateLimit("max_tick_step", 1000001).code, "capability_limit_exceeded");
|
||||||
|
assert.equal(validateLimit("missing", 1).code, "capability_unknown_limit");
|
||||||
|
assert.equal(realExcluded("pci", "no_device").code, "real_hardware_excluded");
|
||||||
|
|
||||||
|
const report = {
|
||||||
|
schema: "runtime-mapping-report.v1",
|
||||||
|
status: "passed",
|
||||||
|
mapped_error_codes: codes.length,
|
||||||
|
commands: caps.commands.length,
|
||||||
|
limits: Object.keys(caps.limits).length,
|
||||||
|
real_exclusions: caps.exclusions.length,
|
||||||
|
};
|
||||||
|
await writeFile(new URL("../../coverage/runtime-mapping.report.json", import.meta.url), `${JSON.stringify(report, null, 2)}\n`);
|
||||||
|
console.log(`runtime_mapping=passed errors=${codes.length} exclusions=${caps.exclusions.length}`);
|
||||||
36
web/worker/test_sim_session.mjs
Normal file
36
web/worker/test_sim_session.mjs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { SimSession, CONTEXT_ID } from "./sim-session.mjs";
|
||||||
|
|
||||||
|
const calls = [];
|
||||||
|
let lastSeq = 0;
|
||||||
|
const core = {
|
||||||
|
_sim_protocol_reset() { calls.push(["reset"]); },
|
||||||
|
_sim_protocol_accept(...args) {
|
||||||
|
calls.push(["accept", ...args]);
|
||||||
|
if (args[1] !== lastSeq + 1) return -101;
|
||||||
|
lastSeq = args[1];
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
_sim_create(...args) { calls.push(["create", ...args]); return 0; },
|
||||||
|
_sim_load_workspace(...args) { calls.push(["load", ...args]); return 0; },
|
||||||
|
_sim_step(...args) { calls.push(["step", ...args]); return 0; },
|
||||||
|
_sim_protocol_set_tick(...args) { calls.push(["set_tick", ...args]); return 0; },
|
||||||
|
_sim_destroy(...args) { calls.push(["destroy", ...args]); },
|
||||||
|
};
|
||||||
|
|
||||||
|
const session = new SimSession(core);
|
||||||
|
const base = { schema_version: 1, context_id: CONTEXT_ID, session_id: "s-1" };
|
||||||
|
let response = session.accept({ ...base, kind: "HELLO", seq: 1, payload: {} });
|
||||||
|
assert.equal(response.kind, "CAPABILITIES");
|
||||||
|
response = session.accept({ ...base, kind: "SESSION_ATTACH", seq: 2, payload: { project_id: "demo" } });
|
||||||
|
assert.equal(response.kind, "SESSION_READY");
|
||||||
|
response = session.accept({ ...base, kind: "LOAD_WORKSPACE", seq: 3, operation_id: "op-3", payload: { root_path: "/workspace" } });
|
||||||
|
assert.equal(response.payload.status, "verified");
|
||||||
|
response = session.accept({ ...base, kind: "SIM_STEP", seq: 4, operation_id: "op-4", payload: { cycles: 7 } });
|
||||||
|
assert.equal(response.simulation_tick, 7);
|
||||||
|
response = session.accept({ ...base, kind: "SNAPSHOT_REQUEST", seq: 5, payload: {} });
|
||||||
|
assert.equal(response.payload.tick, 7);
|
||||||
|
response = session.accept({ ...base, kind: "SIM_STEP", seq: 7, operation_id: "op-7", payload: { cycles: 1 } });
|
||||||
|
assert.equal(response.kind, "ERROR");
|
||||||
|
assert.equal(response.payload.code, "protocol_sequence");
|
||||||
|
console.log("sim_session=passed calls=" + calls.length);
|
||||||
20
web/worker/test_wasm_session.mjs
Normal file
20
web/worker/test_wasm_session.mjs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { readFile } from "node:fs/promises";
|
||||||
|
import createModule from "../../build-wasm/linuxcnc-sim-core.js";
|
||||||
|
import { SimSession, CONTEXT_ID } from "./sim-session.mjs";
|
||||||
|
|
||||||
|
const wasmBinary = await readFile(new URL("../../build-wasm/linuxcnc-sim-core.wasm", import.meta.url));
|
||||||
|
const core = await createModule({ wasmBinary });
|
||||||
|
const session = new SimSession(core, { sessionId: "s-real" });
|
||||||
|
const base = { schema_version: 1, context_id: CONTEXT_ID, session_id: "s-real" };
|
||||||
|
|
||||||
|
assert.equal(session.accept({ ...base, kind: "HELLO", seq: 1, payload: {} }).kind, "CAPABILITIES");
|
||||||
|
assert.equal(session.accept({ ...base, kind: "SESSION_ATTACH", seq: 2, operation_id: "op-2", payload: {} }).kind, "SESSION_READY");
|
||||||
|
assert.equal(session.accept({ ...base, kind: "LOAD_WORKSPACE", seq: 3, operation_id: "op-3", payload: { root_path: "/workspace" } }).payload.status, "verified");
|
||||||
|
const stepped = session.accept({ ...base, kind: "SIM_STEP", seq: 4, operation_id: "op-4", payload: { cycles: 11 } });
|
||||||
|
assert.equal(stepped.simulation_tick, 11);
|
||||||
|
assert.equal(core._sim_protocol_last_seq(), 4);
|
||||||
|
assert.equal(core._sim_protocol_tick(), 11);
|
||||||
|
assert.equal(core._sim_event_count(), 4);
|
||||||
|
assert.equal(session.accept({ ...base, kind: "SNAPSHOT_REQUEST", seq: 6, payload: {} }).payload.code, "protocol_sequence");
|
||||||
|
console.log("wasm_session=passed tick=" + stepped.simulation_tick);
|
||||||
140
web/workspace/journal.mjs
Normal file
140
web/workspace/journal.mjs
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
import { canonicalJson, fnv1a64 } from "../worker/replay.mjs";
|
||||||
|
|
||||||
|
export const JOURNAL_SCHEMA = "workspace-journal.v1";
|
||||||
|
|
||||||
|
export class MemoryStorage {
|
||||||
|
constructor(initial = {}) {
|
||||||
|
this.records = new Map(Object.entries(initial));
|
||||||
|
}
|
||||||
|
|
||||||
|
get(key) { return this.records.get(key); }
|
||||||
|
set(key, value) { this.records.set(key, value); }
|
||||||
|
entries() { return [...this.records.entries()].sort(([a], [b]) => a.localeCompare(b)); }
|
||||||
|
}
|
||||||
|
|
||||||
|
function pathOf(value) {
|
||||||
|
if (typeof value !== "string" || value.length === 0 || value.startsWith("/") || value.includes("\\")) throw new Error("workspace_path_invalid");
|
||||||
|
const parts = value.split("/").filter(Boolean);
|
||||||
|
if (parts.some((part) => part === "." || part === "..")) throw new Error("workspace_path_invalid");
|
||||||
|
return parts.join("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
function dataHash(data) {
|
||||||
|
if (typeof data !== "string") throw new Error("workspace_data_invalid");
|
||||||
|
return fnv1a64(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export class WorkspaceJournal {
|
||||||
|
constructor(storage = new MemoryStorage(), { projectId = "default", schemaVersion = 1 } = {}) {
|
||||||
|
this.storage = storage;
|
||||||
|
this.projectId = projectId;
|
||||||
|
this.schemaVersion = schemaVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
records() {
|
||||||
|
return this.storage.entries().map(([, value]) => typeof value === "string" ? JSON.parse(value) : structuredClone(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
nextSequence() {
|
||||||
|
return this.records().reduce((max, record) => Math.max(max, record.commit_seq ?? 0), 0) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare(operationId, changes) {
|
||||||
|
if (typeof operationId !== "string" || operationId.length === 0) throw new Error("operation_id_invalid");
|
||||||
|
if (!Array.isArray(changes) || changes.length === 0) throw new Error("workspace_changes_empty");
|
||||||
|
const existing = this.records().find((record) => record.operation_id === operationId && record.kind === "commit");
|
||||||
|
if (existing) throw new Error("operation_already_committed");
|
||||||
|
const normalized = changes.map((change) => {
|
||||||
|
const path = pathOf(change.path);
|
||||||
|
const data = change.data;
|
||||||
|
return { path, data, data_hash: dataHash(data) };
|
||||||
|
}).sort((left, right) => left.path.localeCompare(right.path));
|
||||||
|
const commitSeq = this.nextSequence();
|
||||||
|
const record = {
|
||||||
|
schema: JOURNAL_SCHEMA,
|
||||||
|
schema_version: this.schemaVersion,
|
||||||
|
project_id: this.projectId,
|
||||||
|
kind: "prepare",
|
||||||
|
commit_seq: commitSeq,
|
||||||
|
operation_id: operationId,
|
||||||
|
changes: normalized,
|
||||||
|
content_hash: fnv1a64({ commit_seq: commitSeq, operation_id: operationId, changes: normalized }),
|
||||||
|
};
|
||||||
|
this.storage.set(`journal/${String(commitSeq).padStart(12, "0")}.prepare`, canonicalJson(record));
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
|
commit(operationId) {
|
||||||
|
const records = this.records();
|
||||||
|
const prepare = records.find((record) => record.kind === "prepare" && record.operation_id === operationId);
|
||||||
|
if (!prepare) throw new Error("prepare_missing");
|
||||||
|
if (records.some((record) => record.kind === "commit" && record.operation_id === operationId)) throw new Error("operation_already_committed");
|
||||||
|
const expectedHash = fnv1a64({ commit_seq: prepare.commit_seq, operation_id: prepare.operation_id, changes: prepare.changes });
|
||||||
|
if (prepare.content_hash !== expectedHash) throw new Error("prepare_hash_mismatch");
|
||||||
|
const record = {
|
||||||
|
schema: JOURNAL_SCHEMA,
|
||||||
|
schema_version: this.schemaVersion,
|
||||||
|
project_id: this.projectId,
|
||||||
|
kind: "commit",
|
||||||
|
commit_seq: prepare.commit_seq,
|
||||||
|
operation_id: operationId,
|
||||||
|
prepare_hash: prepare.content_hash,
|
||||||
|
};
|
||||||
|
this.storage.set(`journal/${String(prepare.commit_seq).padStart(12, "0")}.commit`, canonicalJson(record));
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
|
abort(operationId) {
|
||||||
|
const prepare = this.records().find((record) => record.kind === "prepare" && record.operation_id === operationId);
|
||||||
|
if (!prepare) throw new Error("prepare_missing");
|
||||||
|
const record = { schema: JOURNAL_SCHEMA, schema_version: this.schemaVersion, project_id: this.projectId, kind: "abort", commit_seq: prepare.commit_seq, operation_id: operationId };
|
||||||
|
this.storage.set(`journal/${String(prepare.commit_seq).padStart(12, "0")}.abort`, canonicalJson(record));
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
|
recover() {
|
||||||
|
const records = this.records();
|
||||||
|
const incompatible = records.filter((record) => record.schema !== JOURNAL_SCHEMA || record.schema_version !== this.schemaVersion || record.project_id !== this.projectId);
|
||||||
|
if (incompatible.length > 0) {
|
||||||
|
return {
|
||||||
|
schema: "workspace-recovery.v1",
|
||||||
|
project_id: this.projectId,
|
||||||
|
status: "blocked",
|
||||||
|
files: {},
|
||||||
|
applied: [],
|
||||||
|
half_commits: [],
|
||||||
|
blocked: incompatible.map((record) => ({ commit_seq: record.commit_seq ?? null, reason: "schema_or_project_mismatch" })),
|
||||||
|
state_hash: fnv1a64({}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const prepares = new Map(records.filter((record) => record.kind === "prepare").map((record) => [record.commit_seq, record]));
|
||||||
|
const commits = records.filter((record) => record.kind === "commit").sort((left, right) => left.commit_seq - right.commit_seq);
|
||||||
|
const aborts = new Set(records.filter((record) => record.kind === "abort").map((record) => record.commit_seq));
|
||||||
|
const files = new Map();
|
||||||
|
const applied = [];
|
||||||
|
const blocked = [];
|
||||||
|
for (const commit of commits) {
|
||||||
|
const prepare = prepares.get(commit.commit_seq);
|
||||||
|
if (!prepare || aborts.has(commit.commit_seq)) { blocked.push({ commit_seq: commit.commit_seq, reason: "prepare_missing_or_aborted" }); continue; }
|
||||||
|
const expectedPrepareHash = fnv1a64({ commit_seq: prepare.commit_seq, operation_id: prepare.operation_id, changes: prepare.changes });
|
||||||
|
if (prepare.content_hash !== expectedPrepareHash || commit.prepare_hash !== expectedPrepareHash) { blocked.push({ commit_seq: commit.commit_seq, reason: "hash_mismatch" }); continue; }
|
||||||
|
for (const change of prepare.changes) {
|
||||||
|
if (dataHash(change.data) !== change.data_hash) { blocked.push({ commit_seq: commit.commit_seq, reason: "data_hash_mismatch", path: change.path }); continue; }
|
||||||
|
files.set(change.path, change.data);
|
||||||
|
}
|
||||||
|
applied.push({ commit_seq: commit.commit_seq, operation_id: commit.operation_id, content_hash: expectedPrepareHash });
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
schema: "workspace-recovery.v1",
|
||||||
|
project_id: this.projectId,
|
||||||
|
status: blocked.length === 0 ? "recovered" : "blocked",
|
||||||
|
files: Object.fromEntries([...files.entries()].sort(([a], [b]) => a.localeCompare(b))),
|
||||||
|
applied,
|
||||||
|
half_commits: [...prepares.values()].filter((prepare) => !commits.some((commit) => commit.commit_seq === prepare.commit_seq) && !aborts.has(prepare.commit_seq)).map((prepare) => prepare.commit_seq),
|
||||||
|
blocked,
|
||||||
|
state_hash: fnv1a64(Object.fromEntries([...files.entries()].sort(([a], [b]) => a.localeCompare(b)))),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { canonicalJson, dataHash, pathOf };
|
||||||
6
web/workspace/recovery.mjs
Normal file
6
web/workspace/recovery.mjs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { WorkspaceJournal } from "./journal.mjs";
|
||||||
|
|
||||||
|
export function recoverWorkspace(storage, options = {}) {
|
||||||
|
const journal = new WorkspaceJournal(storage, options);
|
||||||
|
return journal.recover();
|
||||||
|
}
|
||||||
46
web/workspace/test_recovery.mjs
Normal file
46
web/workspace/test_recovery.mjs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { writeFile } from "node:fs/promises";
|
||||||
|
import { MemoryStorage, WorkspaceJournal, canonicalJson } from "./journal.mjs";
|
||||||
|
import { recoverWorkspace } from "./recovery.mjs";
|
||||||
|
|
||||||
|
const storage = new MemoryStorage();
|
||||||
|
const journal = new WorkspaceJournal(storage, { projectId: "demo" });
|
||||||
|
const prepared = journal.prepare("op-1", [{ path: "config/main.ini", data: "[EMC]\n" }, { path: "programs/main.ngc", data: "G0 X1\n" }]);
|
||||||
|
journal.commit("op-1");
|
||||||
|
let recovered = recoverWorkspace(storage, { projectId: "demo" });
|
||||||
|
assert.equal(recovered.status, "recovered");
|
||||||
|
assert.deepEqual(recovered.files, { "config/main.ini": "[EMC]\n", "programs/main.ngc": "G0 X1\n" });
|
||||||
|
assert.equal(recovered.applied[0].commit_seq, prepared.commit_seq);
|
||||||
|
|
||||||
|
const halfStorage = new MemoryStorage();
|
||||||
|
const halfJournal = new WorkspaceJournal(halfStorage, { projectId: "half" });
|
||||||
|
halfJournal.prepare("op-half", [{ path: "config/half.ini", data: "half" }]);
|
||||||
|
recovered = recoverWorkspace(halfStorage, { projectId: "half" });
|
||||||
|
assert.equal(recovered.status, "recovered");
|
||||||
|
assert.deepEqual(recovered.files, {});
|
||||||
|
assert.deepEqual(recovered.half_commits, [1]);
|
||||||
|
|
||||||
|
assert.throws(() => journal.prepare("op-path", [{ path: "../escape", data: "x" }]), /workspace_path_invalid/);
|
||||||
|
assert.throws(() => journal.prepare("op-data", [{ path: "config/bad", data: 1 }]), /workspace_data_invalid/);
|
||||||
|
assert.throws(() => journal.commit("missing"), /prepare_missing/);
|
||||||
|
|
||||||
|
const corrupted = new MemoryStorage(Object.fromEntries(storage.entries()));
|
||||||
|
const commitKey = [...corrupted.records.keys()].find((key) => key.endsWith(".commit"));
|
||||||
|
const commit = JSON.parse(corrupted.get(commitKey));
|
||||||
|
commit.prepare_hash = "fnv1a64:0000000000000000";
|
||||||
|
corrupted.set(commitKey, canonicalJson(commit));
|
||||||
|
recovered = recoverWorkspace(corrupted, { projectId: "demo" });
|
||||||
|
assert.equal(recovered.status, "blocked");
|
||||||
|
assert.equal(recovered.blocked[0].reason, "hash_mismatch");
|
||||||
|
|
||||||
|
const firstBytes = canonicalJson([...storage.entries()]);
|
||||||
|
const secondBytes = canonicalJson([...storage.entries()]);
|
||||||
|
assert.equal(firstBytes, secondBytes);
|
||||||
|
await writeFile(new URL("../../coverage/workspace-recovery.report.json", import.meta.url), `${JSON.stringify({ schema: "workspace-recovery-report.v1", status: "passed", scenarios: ["atomic_commit", "half_commit_ignored", "path_validation", "hash_corruption_blocked"], journal_bytes_sha256: fnvHash(firstBytes), recovery_state_hash: recovered.state_hash }, null, 2)}\n`);
|
||||||
|
console.log("workspace_recovery=passed commit=" + prepared.commit_seq);
|
||||||
|
|
||||||
|
function fnvHash(value) {
|
||||||
|
let hash = 1469598103934665603n;
|
||||||
|
for (const byte of new TextEncoder().encode(value)) hash = BigInt.asUintN(64, (hash ^ BigInt(byte)) * 1099511628211n);
|
||||||
|
return `fnv1a64:${hash.toString(16).padStart(16, "0")}`;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user