diff --git a/check-linuxcnc-workstreams-source-map.sh b/check-linuxcnc-workstreams-source-map.sh index 20fd160..bf7d258 100755 --- a/check-linuxcnc-workstreams-source-map.sh +++ b/check-linuxcnc-workstreams-source-map.sh @@ -41,13 +41,26 @@ grep -F 'must not add CNC' docs/linuxcnc-workstreams-source-map.md >/dev/null grep -F 'temporary smoke parser' docs/linuxcnc-workstreams-source-map.md >/dev/null grep -F 'Every active workstream must have at least one source-map document and guard' \ docs/linuxcnc-workstreams-source-map.md >/dev/null +grep -F 'docs/linuxcnc-source-policy.md` must keep the same one-context workflow' \ + docs/linuxcnc-workstreams-source-map.md >/dev/null grep -F 'Browser filesystem persistence remains OPFS-only.' docs/linuxcnc-workstreams-source-map.md >/dev/null grep -F 'Smoke coverage remains verification only' docs/linuxcnc-workstreams-source-map.md >/dev/null +grep -F 'Keep the change inside one active workstream context unless a dependency is' \ + docs/linuxcnc-source-policy.md >/dev/null +grep -F 'Each pass should advance one reasonable, reviewable context.' \ + docs/linuxcnc-source-policy.md >/dev/null +grep -F 'Smoke tests are verification guardrails. They must not be expanded with new' \ + docs/linuxcnc-source-policy.md >/dev/null +grep -F 'Do not mix generator/table work, manifests, OPFS/browser work, and build' \ + docs/linuxcnc-source-policy.md >/dev/null +grep -F 'Browser-side wasm filesystem behavior must use OPFS-backed storage.' \ + docs/linuxcnc-source-policy.md >/dev/null python3 - <<'PY' from pathlib import Path doc = Path("docs/linuxcnc-workstreams-source-map.md").read_text(encoding="utf-8") +policy = Path("docs/linuxcnc-source-policy.md").read_text(encoding="utf-8") expected = { "switchkins/remap": [ "docs/linuxcnc-switchkins-remap-source-map.md", @@ -87,6 +100,16 @@ expected = { for workstream, paths in expected.items(): if workstream not in doc: raise SystemExit(f"missing workstream row in docs/linuxcnc-workstreams-source-map.md: {workstream}") + policy_terms = { + "switchkins/remap": ["switchkins/remap", "M428/M429/M430"], + "linuxcnc-kinematics": ["kinematics manifest", "RTCP coverage"], + "WASM filesystem and OPFS persistence": ["OPFS", "filesystem"], + "browser app integration": ["Browser app", "wasm bridge"], + "Node and browser smoke coverage": ["Smoke tests are verification guardrails", "temporary smoke parser"], + "source-link, build, and documentation constraints": ["source-link", "build-policy"], + }[workstream] + if not any(term in policy for term in policy_terms): + raise SystemExit(f"docs/linuxcnc-source-policy.md no longer references workstream boundary: {workstream}") for path in paths: if path not in doc: raise SystemExit(f"missing source-map path in workstream index: {path}") diff --git a/docs/linuxcnc-workstreams-source-map.md b/docs/linuxcnc-workstreams-source-map.md index 7a0ea72..5088b5d 100644 --- a/docs/linuxcnc-workstreams-source-map.md +++ b/docs/linuxcnc-workstreams-source-map.md @@ -32,6 +32,8 @@ the temporary smoke parser. - Every active workstream must have at least one source-map document and guard script. +- `docs/linuxcnc-source-policy.md` must keep the same one-context workflow + boundary and smoke-verification-only rule used by this index. - `test-native.sh` and `test-linuxcnc-source-link.sh` must run the workstream source-map guard before consuming generated config aliases or source-linked LinuxCNC objects. diff --git a/test-all-native.sh b/test-all-native.sh index a5a3412..d0adfa0 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -257,6 +257,8 @@ grep -F 'The visible backend selector must stay limited to the LinuxCNC RS274 ba grep -F 'LinuxCNC workstreams source map' docs/linuxcnc-workstreams-source-map.md >/dev/null grep -F '| `switchkins/remap` generator and tables | `docs/linuxcnc-switchkins-remap-source-map.md` |' docs/linuxcnc-workstreams-source-map.md >/dev/null grep -F 'Every active workstream must have at least one source-map document and guard' docs/linuxcnc-workstreams-source-map.md >/dev/null +grep -F 'docs/linuxcnc-source-policy.md` must keep the same one-context workflow' docs/linuxcnc-workstreams-source-map.md >/dev/null +grep -F 'Smoke tests are verification guardrails. They must not be expanded with new' docs/linuxcnc-source-policy.md >/dev/null grep -F 'LinuxCNC tooldata source map' docs/linuxcnc-tooldata-source-map.md >/dev/null grep -F '`src/emc/tooldata/Submakefile` selects `tooldata_mmap.cc`' docs/linuxcnc-tooldata-source-map.md >/dev/null grep -F 'Tool table files referenced by switchkins INI files are source coverage only' docs/linuxcnc-tooldata-source-map.md >/dev/null