checkwright 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. package/README.md +1013 -50
  2. package/lib/common/digest.sh +18 -0
  3. package/lib/common/lock.sh +40 -0
  4. package/lib/common/profile.sh +33 -0
  5. package/lib/common/recipe.sh +56 -43
  6. package/lib/diff.sh +64 -0
  7. package/lib/doctor.sh +81 -7
  8. package/lib/init.sh +167 -52
  9. package/lib/uninstall.sh +212 -0
  10. package/lib/update.sh +34 -0
  11. package/package.json +2 -2
  12. package/payload/artifact/targets.list +30 -0
  13. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  15. package/payload/canon-kit/README.md +2 -0
  16. package/payload/canon-kit/SPEC.md +666 -59
  17. package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
  18. package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
  19. package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
  20. package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
  21. package/payload/canon-kit/checks/check-docs-link-convention.sh +12 -4
  22. package/payload/canon-kit/checks/check-install-claim.gate +3 -0
  23. package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
  24. package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
  25. package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
  26. package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
  27. package/payload/canon-kit/checks/check-md-refs.gate +3 -0
  28. package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
  29. package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
  30. package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
  31. package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
  32. package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
  33. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
  34. package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
  35. package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
  36. package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
  37. package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
  38. package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
  39. package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  45. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  49. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  50. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  51. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +29 -5
  52. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  53. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  62. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  63. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  64. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  65. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
  66. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  67. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
  68. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
  69. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
  70. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  71. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  72. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +32 -8
  73. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  74. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  75. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  76. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  77. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  78. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  79. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  80. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  81. package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
  82. package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
  83. package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
  84. package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
  85. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
  86. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
  87. package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
  88. package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
  89. package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
  90. package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
  91. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
  92. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
  93. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +27 -4
  94. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  95. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  96. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  97. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  98. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  99. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  100. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
  101. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  102. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  103. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  104. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  105. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  106. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
  107. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  108. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  109. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  110. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  111. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  112. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  113. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  114. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  115. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  116. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  117. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  118. package/payload/canon-kit/lib/spec.sh +109 -70
  119. package/payload/canon-kit/smoke/install.sh +21 -1
  120. package/payload/canon-kit/templates/SPEC-amendment.md +9 -2
  121. package/payload/context-kit/README.md +4 -1
  122. package/payload/context-kit/SPEC.md +166 -9
  123. package/payload/context-kit/bin/env-probe.sh +19 -6
  124. package/payload/context-kit/checks/check-brevity.sh +1 -0
  125. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
  126. package/payload/context-kit/checks/check-memory-off.sh +1 -0
  127. package/payload/context-kit/checks/check-settings-paths.sh +94 -0
  128. package/payload/context-kit/checks/check-settings-pins.sh +1 -0
  129. package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
  130. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  131. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  132. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  133. package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
  134. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  135. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  136. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  137. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  138. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  139. package/payload/context-kit/lib/toolfloor.sh +15 -4
  140. package/payload/context-kit/smoke/agents-md.sh +12 -1
  141. package/payload/context-kit/smoke/install.sh +4 -1
  142. package/payload/delegation-kit/README.md +3 -3
  143. package/payload/delegation-kit/SPEC.md +499 -26
  144. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
  145. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
  146. package/payload/delegation-kit/checks/check-gate-tamper.sh +2 -1
  147. package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
  148. package/payload/delegation-kit/lib/delegation.sh +1 -0
  149. package/payload/delegation-kit/smoke/install.sh +2 -1
  150. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
  151. package/payload/delegation-kit/templates/agent-execution.md +127 -12
  152. package/payload/delegation-kit/templates/delegation-config.sh +4 -0
  153. package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
  154. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  155. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
  156. package/payload/doctrine-kit/DOCTRINE.md +112 -11
  157. package/payload/doctrine-kit/README.md +12 -3
  158. package/payload/doctrine-kit/SPEC.md +163 -11
  159. package/payload/doctrine-kit/bin/install-doctrine.sh +167 -17
  160. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
  161. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  162. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  163. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
  164. package/payload/doctrine-kit/smoke/install.sh +167 -1
  165. package/payload/drift-kit/README.md +3 -2
  166. package/payload/drift-kit/SPEC.md +264 -22
  167. package/payload/drift-kit/bin/kfric.sh +21 -2
  168. package/payload/drift-kit/bin/stage-economics.sh +157 -3
  169. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
  170. package/payload/drift-kit/smoke/install.sh +183 -1
  171. package/payload/drift-kit/templates/economics.md +9 -0
  172. package/payload/drift-kit/templates/kpis.list +6 -1
  173. package/payload/evidence-kit/README.md +20 -6
  174. package/payload/evidence-kit/SPEC.md +355 -17
  175. package/payload/evidence-kit/bin/run-validate.sh +51 -9
  176. package/payload/evidence-kit/checks/check-battery-roster.sh +87 -0
  177. package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
  178. package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
  179. package/payload/evidence-kit/checks/check-producer-liveness.sh +35 -0
  180. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
  181. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  182. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
  183. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
  184. package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
  185. package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
  186. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
  187. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
  188. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
  189. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
  190. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
  191. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
  192. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
  193. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
  194. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
  195. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
  196. package/payload/evidence-kit/lib/evidence.sh +18 -0
  197. package/payload/evidence-kit/smoke/install.sh +17 -3
  198. package/payload/gate-sdk/README.md +17 -1
  199. package/payload/gate-sdk/SPEC.md +4427 -92
  200. package/payload/gate-sdk/bin/build-native.sh +38 -0
  201. package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
  202. package/payload/gate-sdk/bin/gen-pre-commit.sh +32 -2
  203. package/payload/gate-sdk/bin/port-blockers.sh +445 -0
  204. package/payload/gate-sdk/bin/run-consumer-smoke.sh +129 -2
  205. package/payload/gate-sdk/bin/run-gate-tests.sh +61 -9
  206. package/payload/gate-sdk/bin/run-gates.sh +37 -2
  207. package/payload/gate-sdk/bin/upgrade-smoke.sh +55 -7
  208. package/payload/gate-sdk/checks/check-action-gh-repo.gate +3 -0
  209. package/payload/gate-sdk/checks/check-action-pinning.gate +3 -0
  210. package/payload/gate-sdk/checks/check-action-run-shell.sh +4 -1
  211. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  212. package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
  213. package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
  214. package/payload/gate-sdk/checks/check-core-files.sh +28 -4
  215. package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
  216. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
  217. package/payload/gate-sdk/checks/check-exec-bit.sh +21 -1
  218. package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
  219. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +107 -0
  220. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +7 -7
  221. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
  222. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
  223. package/payload/gate-sdk/checks/check-gate-output.sh +41 -3
  224. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +333 -0
  225. package/payload/gate-sdk/checks/check-graph.sh +5 -5
  226. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
  227. package/payload/gate-sdk/checks/check-identity.sh +1 -0
  228. package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
  229. package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
  230. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  231. package/payload/gate-sdk/checks/check-readme-roster.sh +6 -0
  232. package/payload/gate-sdk/checks/check-reads-couples.sh +71 -21
  233. package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
  234. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  235. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  236. package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
  237. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  238. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  239. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  240. package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
  241. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
  242. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
  243. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  244. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  245. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  246. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  247. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  248. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  249. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  250. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  251. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  252. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
  253. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
  254. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
  255. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
  256. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
  257. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
  258. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
  259. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
  260. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
  261. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
  262. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
  263. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
  264. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
  265. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
  266. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
  267. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
  268. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
  269. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
  270. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
  271. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
  272. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  273. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  274. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
  275. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  276. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  277. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  278. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  279. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  280. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
  281. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  282. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  283. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  284. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  285. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
  286. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
  287. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
  288. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
  289. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
  290. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
  291. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
  292. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
  293. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
  294. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
  295. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
  296. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
  297. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
  298. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
  299. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
  300. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
  301. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
  302. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
  303. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
  304. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
  305. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
  306. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
  307. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
  308. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
  309. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  310. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
  311. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
  312. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +184 -0
  313. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  314. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  315. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  316. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  317. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  318. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  320. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  321. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  322. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  323. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  324. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  325. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  326. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  327. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  328. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  329. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  330. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
  331. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
  332. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
  333. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
  334. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
  335. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
  336. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
  337. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
  338. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
  339. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
  341. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
  342. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
  343. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
  344. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
  345. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  346. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
  347. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +151 -1
  348. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  349. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
  350. package/payload/gate-sdk/lib/consumer-smoke.sh +41 -4
  351. package/payload/gate-sdk/lib/gate.sh +208 -9
  352. package/payload/gate-sdk/lib/inject.sh +46 -1
  353. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  354. package/payload/gate-sdk/smoke/install.sh +61 -1
  355. package/payload/guard-kit/README.md +18 -14
  356. package/payload/guard-kit/SPEC.md +366 -72
  357. package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
  358. package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
  359. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
  360. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  361. package/payload/guard-kit/guard-tests/cases.tsv +49 -7
  362. package/payload/guard-kit/lib/guard.sh +277 -54
  363. package/payload/guard-kit/templates/close-triage.md +38 -10
  364. package/payload/guard-kit/templates/guard-config.sh +3 -0
  365. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  366. package/payload/lifecycle-kit/README.md +12 -1
  367. package/payload/lifecycle-kit/SPEC.md +991 -41
  368. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  369. package/payload/lifecycle-kit/bin/enter-stage.sh +139 -13
  370. package/payload/lifecycle-kit/bin/file-gap.sh +60 -2
  371. package/payload/lifecycle-kit/bin/file-survey.sh +69 -0
  372. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
  373. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  374. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  375. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  376. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  377. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  378. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  379. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  380. package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
  381. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  382. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  383. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  384. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
  385. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  386. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  387. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  388. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  389. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  390. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  391. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  392. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  393. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
  394. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
  395. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +3 -3
  396. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  397. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  398. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  399. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  400. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  401. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  402. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  403. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  404. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
  405. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
  406. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
  407. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  408. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
  409. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
  410. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
  411. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
  412. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +83 -0
  413. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +122 -0
  414. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  415. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
  416. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  417. package/payload/lifecycle-kit/lib/stages.sh +12 -2
  418. package/payload/lifecycle-kit/smoke/install.sh +83 -4
  419. package/payload/lifecycle-kit/templates/consult.md +73 -0
  420. package/payload/lifecycle-kit/templates/lead.md +139 -7
  421. package/payload/lifecycle-kit/templates/stages/align.md +12 -0
  422. package/payload/lifecycle-kit/templates/stages/build.md +8 -0
  423. package/payload/lifecycle-kit/templates/stages/close.md +45 -5
  424. package/payload/lifecycle-kit/templates/stages/scope.md +42 -3
  425. package/payload/lifecycle-kit/templates/stages/spec.md +13 -1
  426. package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
  427. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  428. package/payload/queue-kit/README.md +6 -1
  429. package/payload/queue-kit/SPEC.md +350 -6
  430. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  431. package/payload/queue-kit/bin/queue-edges.sh +78 -0
  432. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  433. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  434. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
  435. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  436. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  437. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  438. package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
  439. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  440. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  441. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  442. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
  443. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  444. package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
  445. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  446. package/payload/queue-kit/lib/queue.sh +4 -19
  447. package/payload/queue-kit/smoke/install.sh +4 -1
  448. package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
  449. package/payload/site-kit/SPEC.md +64 -27
  450. package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
  451. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  452. package/payload/site-kit/smoke/install.sh +9 -1
  453. package/profiles.list +36 -8
  454. package/payload/canon-kit/checks/check-comment-tier.sh +0 -211
  455. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  456. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  457. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  458. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  459. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  460. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  461. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  462. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  463. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  464. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  465. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  466. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -180
  467. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  468. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  469. package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
  470. package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
  471. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  472. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  473. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  474. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  475. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  476. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  477. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  478. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  479. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  480. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  481. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  482. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -104
  483. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  484. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  485. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  486. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  487. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  488. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  489. package/payload/queue-kit/checks/check-task-names.sh +0 -128
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=TASK-QUEUE.md,SPEC-*.md,*/SPEC-*.md dir=bi valve=none tier=precommit
3
+ # install: zero-config
3
4
  # spec: canon-kit/SPEC.md §check-amendment-queue — the Task↔amendment bidirectional rule and spec-readiness
4
5
  #
5
6
  # usage: check-amendment-queue.sh [queue-file [scan-root]]
@@ -0,0 +1,3 @@
1
+ # graph: couples=scripts/*.sh,kit:*.sh,*.gate,*.rs,.workflow/* dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-comment-tier — every full-line comment on a governed surface is a machine/reason directive, rides a directive's bounded window, is comment-tier-exempt, or justifies a positional construct
@@ -0,0 +1,3 @@
1
+ # graph: couples=scripts/*.sh,kit:*.sh,*.gate,*.rs,.workflow/*,TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: canon-kit/SPEC.md §check-deprecation-task — every deprecation marker on a governed source binds task: <slug> to a live queue task
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-docs-cmd — every fenced invoked repo-relative .sh path and every backticked/fenced kit-prefixed env knob in the governed doc set resolves against the tree
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=docs/*.md,docs/*/index.md,docs/posts/*.md dir=one valve=none tier=precommit
3
- # spec: canon-kit/SPEC.md §check-docs-link-convention — docs pages cite downward: no directory-target relative link (name the file), a kit page's back-link to its own README/SPEC carries a #section anchor
3
+ # install: on-surface
4
+ # spec: canon-kit/SPEC.md §check-docs-link-convention — docs pages cite downward: no directory-target relative link (name the file), a kit page's back-link to its own README/SPEC carries a #section anchor, no relative link to a target resolving outside the docs root
4
5
  #
5
6
  # usage: check-docs-link-convention.sh [docs-root] (default CANON_KIT_LINK_ROOT;
6
7
  # the optional arg points the fixture pair at a synthetic docs tree)
@@ -51,6 +52,11 @@ for f in "${pages[@]}"; do
51
52
  exempt "$f" "$lno" || bad+=("$f:$lno: directory-target link '$tgt' → $p/ — name the file (e.g. $tgt/index.md), not the directory")
52
53
  continue
53
54
  fi
55
+ if [[ -e "$p" && "$p" != "$ROOT"/* ]]; then
56
+ exempt "$f" "$lno" \
57
+ || bad+=("$f:$lno: off-root relative link '$tgt' → $p — resolves outside $ROOT/, so it 404s on a site served from $ROOT/ alone; cite it in the absolute self-repo blob form")
58
+ continue
59
+ fi
54
60
  if [[ -n "$kit" && -z "$anchor" ]]; then
55
61
  b="$(basename "$p")"
56
62
  [[ ( "$b" == README.md || "$b" == SPEC.md ) && "$(basename "$(dirname "$p")")" == "$kit" ]] \
@@ -63,9 +69,11 @@ if [[ ${#bad[@]} -gt 0 ]]; then
63
69
  echo "check-docs-link-convention: docs page link(s) break a shape convention (resolution is check-md-refs' job; this gate owns shape):"
64
70
  printf ' %s\n' "${bad[@]}"
65
71
  echo " help: name the file a directory link points at (kit/index.md, not kit/); give a kit page's"
66
- echo " back-link to its own README/SPEC a #section anchor. Per-site valve: a 'docs-link-exempt:"
67
- echo " <reason>' HTML comment on the link line or the one above."
72
+ echo " back-link to its own README/SPEC a #section anchor; cite a target outside the docs"
73
+ echo " root with the absolute self-repo blob form (canon-kit/SPEC.md §The reference-link"
74
+ echo " grammar) rather than relatively. Per-site valve: a 'docs-link-exempt: <reason>'"
75
+ echo " HTML comment on the link line or the one above."
68
76
  exit 1
69
77
  fi
70
- echo "DOCS-LINK-CONVENTION: clean (${#pages[@]} docs page(s), $links relative link(s); no directory target, kit back-links anchored)"
78
+ echo "DOCS-LINK-CONVENTION: clean (${#pages[@]} docs page(s), $links relative link(s); no directory target, kit back-links anchored, no off-root relative target)"
71
79
  exit 0
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,docs/*.md,scripts/*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: canon-kit/SPEC.md §check-install-claim — exactly one governed doc declares the primary install transport, and no scanned install section leads with a different one
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-knob-citation — no kit knob stated with its value in manifest prose outside the owning kit's SPEC
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=kit:*.sh,kit:SPEC.md dir=one valve=none tier=precommit
3
+ # install: zero-config
3
4
  # spec: canon-kit/SPEC.md §check-knob-default-coupling — every literal kit-knob default in kit source agrees across its sites and with the default the owning SPEC states
4
5
  #
5
6
  # usage: check-knob-default-coupling.sh (no args — the roster is gate_kit_roots)
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-manifest-count — no bare cardinal quantifying a governed collection noun in manifest prose outside an exempt site
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-manifest-temporal — no temporal-narration marker in governed manifest prose outside an exempt site
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-md-refs — every internal markdown link in the governed doc set resolves (relative path to a tracked file/dir, #anchor to a heading slug)
@@ -0,0 +1,3 @@
1
+ # graph: couples=*.md,scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: canon-kit/SPEC.md §check-measured-claim — a `measured:` marker binds a prose claim to an oracle key, and the gate re-runs the oracle: an unknown key or an ambiguous claim fails closed, a value the oracle no longer reports or a cardinal missing from the sentence is red
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,SECURITY.md,docs/*.md,scripts/*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: canon-kit/SPEC.md §check-payload-claim — exactly one governed doc declares what a gate on the vendored payload discloses, and no scanned governed doc asserts a different disclosure class
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,scripts/*.sh,kit:*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: canon-kit/SPEC.md §check-prose-enum — within one manifest-prose paragraph, naming two or more members of a declared governed set must name every member, unless an exempt site holds
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=docs/*.md dir=one valve=none tier=precommit
3
+ # install: on-surface
3
4
  # spec: canon-kit/SPEC.md §check-prose-tells — the mechanical AI-prose tells over the consumer-configured prose surfaces, each threshold-gated, with the prose-tell-exempt valve
4
5
  #
5
6
  # usage: check-prose-tells.sh [scan-root] (default '.')
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md dir=one valve=none tier=align-only
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-spec-derivable-section — a banned-heading section may not be a fenced code dump above the density budget
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md dir=one valve=none tier=align-only
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-spec-dod-singleton — a canonical spec carries the Definition-of-Done heading the configured number of times
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=*SPEC*.md,*.rs,*.toml,*.sql,*.rego,*.ts,*.tsx,*.yaml,*.yml,*.proto,*.sh,Dockerfile dir=one valve=none tier=precommit
3
+ # install: zero-config
3
4
  # spec: canon-kit/SPEC.md §check-spec-embedded-source — a canonical spec's fenced block must not verbatim-copy a tracked source file
4
5
  set -uo pipefail
5
6
 
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-spec-fence-balance — every governed markdown file has an even fence-delimiter count, so the fence-skipping parsers never desync and fail open
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,scripts/*.sh,kit:*.sh,*.gate,*.rs,.workflow/* dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-spec-pointer — every spec:/contract: directive on a governed source and every free-prose <path>.md §<heading> citation on a governed manifest resolves: the target file is tracked and a §heading fragment names a heading the file carries
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=GLOSSARY.md,VISION.md,*SPEC*.md dir=bi valve=none tier=align-only
3
+ # install: on-surface
3
4
  # spec: canon-kit/SPEC.md §check-surface-duplication — a non-glossary surface may not carry a glossary term's bold-lead-in definition
4
5
  set -uo pipefail
5
6
 
@@ -0,0 +1,3 @@
1
+ # graph: couples=scripts/*.sh,kit:*.sh,*.gate,*.rs,.workflow/*,TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-todo-task-liveness — every TODO(task: <slug>) marker on a governed source resolves to a live queue task, stale-flagged on a done slug
@@ -0,0 +1,3 @@
1
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,.gitignore dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: canon-kit/SPEC.md §check-tracking-claim — every fixed-vocabulary tracking claim on a governed manifest surface agrees with git
@@ -0,0 +1,4 @@
1
+ # contract: some/SPEC.md §thing — the blessed header form
2
+
3
+ # this workflow-tier comment is prose the txt surface never blesses
4
+ fixture data line
@@ -0,0 +1,4 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+
4
+ # this descriptor comment cites no owning section and carries no directive
@@ -0,0 +1,5 @@
1
+ // spec: some/SPEC.md §thing — the crate arm's own header directive
2
+ pub fn widget() -> usize {
3
+ // this crate comment restates the line below it and cites no owning section
4
+ 1
5
+ }
@@ -1 +1,5 @@
1
1
  restated collection total: rules 1-8
2
+ bad.gate:4: this descriptor comment cites no owning section and carries no directive
3
+ bad.rs:3: this crate comment restates the line below it and cites no owning section
4
+ templates/bad-tmpl.sh:2: this templates stub comment paraphrases its own body and carries no directive
5
+ .workflow/fixture-state.txt:3: this workflow-tier comment is prose the txt surface never blesses
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ # this templates stub comment paraphrases its own body and carries no directive
3
+ set -uo pipefail
4
+ echo stub
@@ -0,0 +1,3 @@
1
+ # contract: some/SPEC.md §thing — the workflow tier blesses a header directive
2
+ # comment-tier-exempt: and the universal escape, and nothing else
3
+ fixture data line
@@ -1 +1 @@
1
- COMMENT-TIER: clean
1
+ COMMENT-TIER: clean (5 governed source(s)
@@ -0,0 +1,4 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # spec: some/SPEC.md §thing — the descriptor arm of the governed corpus: a
4
+ # declaration file is directives end to end, and the run cap covers this wrap.
@@ -0,0 +1,5 @@
1
+ // spec: some/SPEC.md §thing — the crate arm of the governed corpus, on the slash surface
2
+ pub fn widget() -> usize {
3
+ /* spec: some/SPEC.md §thing — a block comment opens its own directive window */
4
+ 1
5
+ }
@@ -22,6 +22,9 @@ EOF
22
22
  # comment-tier-exempt: a genuinely unavoidable note with no owning section
23
23
  bar() { echo bye; }
24
24
 
25
+ # smoke-unregistered: check-example — a machine directive run-consumer-smoke.sh parses off the vendored copy, so it is blessed by name like graph:/contract: rather than needing an exempt tag
26
+ baz() { echo sm; }
27
+
25
28
  # spec: some/SPEC.md §bounds — a directive blesses at most three checks per run,
26
29
  # a bound rather than a total; three of the twelve gates below stay partitive,
27
30
  # and the inline-code `six gates` reads as a meta-reference.
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # spec: some/SPEC.md §thing — a templates/ stub this gate governs where the
3
+ # pruned surface exempts it, which is the arm the _with_templates variant adds
4
+ set -uo pipefail
5
+ echo stub
@@ -10,15 +10,15 @@
10
10
  # run-gate-tests passes to neither. The good/bad pair covers the shell classifier
11
11
  # (directive run, exempt, heredoc skip) and the count override's mainline; these
12
12
  # cover the mechanism a consumer activates by widening the surface, plus the
13
- # paragraph-join wrap the pair's single-substring expect.txt cannot pin —
14
- # which line a wrapped total reports at, and that the exempt valve reaches it.
13
+ # paragraph-join wrap — which line a wrapped total reports at, and that the
14
+ # exempt valve reaches it. Those two are here for the same config reason as the
15
+ # rest: each pins CANON_KIT_COMMENT_SURFACE to its own one-file roster.
15
16
  #
16
17
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
17
18
  set -uo pipefail
18
19
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
19
20
 
20
21
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
21
- GATE="$DIR/checks/check-comment-tier.sh"
22
22
  SANDBOX="$(mktemp -d)"
23
23
  trap 'rm -rf "$SANDBOX"' EXIT
24
24
 
@@ -94,9 +94,31 @@ cat >"$SANDBOX/tmpl-bad/templates/narration.sh" <<'EOF'
94
94
  #YOUR_KIT_KNOB=default
95
95
  EOF
96
96
 
97
+ # A workflow-dir markdown member whose records are '## ' blocks: the headings are
98
+ # the surface's own block grammar and must not be read as untagged comments, while
99
+ # a single-'#' line on the same member stays governed by the restricted roster.
100
+ mkdir -p "$SANDBOX/wf-good/.workflow" "$SANDBOX/wf-bad/.workflow"
101
+ cat >"$SANDBOX/wf-good/.workflow/record.md" <<'EOF'
102
+ # contract: some/SPEC.md §record — the md roster blesses this header
103
+
104
+ ## 2026-01-02 scope — a block heading is structure, not a comment
105
+ - corpus: checks/
106
+ - finding: carried across the stage boundary
107
+ EOF
108
+ cat >"$SANDBOX/wf-bad/.workflow/record.md" <<'EOF'
109
+ # contract: some/SPEC.md §record — the md roster blesses this header
110
+
111
+ ## 2026-01-02 scope — a block heading is structure, not a comment
112
+ - corpus: checks/
113
+ # this single-hash line on the md member is still an untagged comment
114
+ EOF
115
+ mkcfg "$SANDBOX/wfmd.sh" 'CANON_KIT_COMMENT_SURFACE=(.workflow/record.md)'
116
+
97
117
  check_case() { # $1=label $2=cfg $3=want-rc $4=want-substring $5=root(default SANDBOX)
98
118
  local label="$1" cfg="$2" want="$3" sub="$4" root="${5:-$SANDBOX}" out rc
99
- out="$(env CANON_KIT_CONFIG_FILE="$SANDBOX/$cfg" "$GATE" "$root" 2>&1)"; rc=$?
119
+ # spec: gate-sdk/SPEC.md §run-gate-tests — the gate is named, never spelled as a script
120
+ # path: gate_run resolves whichever substrate declares it, under this case's own env
121
+ out="$(gate_env CANON_KIT_CONFIG_FILE="$SANDBOX/$cfg" && gate_run check-comment-tier "$DIR/checks" "$root" 2>&1)"; rc=$?
100
122
  if [[ "$rc" -ne "$want" ]]; then
101
123
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
102
124
  fi
@@ -113,6 +135,8 @@ check_case "templates-thinned-ok" derived.sh 0 "COMMENT-TIER: clean" "
113
135
  check_case "templates-narration-red" derived.sh 1 "the tier gate scans templates" "$SANDBOX/tmpl-bad"
114
136
  check_case "count-exempt-valve" exempt-cfg.sh 0 "COMMENT-TIER: clean"
115
137
  check_case "count-survives-positional-rescue" pos-cfg.sh 1 "restated collection total: six gates"
138
+ check_case "workflow-md-headings-are-structure" wfmd.sh 0 "COMMENT-TIER: clean" "$SANDBOX/wf-good"
139
+ check_case "workflow-md-single-hash-governed" wfmd.sh 1 "still an untagged comment" "$SANDBOX/wf-bad"
116
140
 
117
141
  # The bad fixture's expect.txt asserts the count override, so the window-spill
118
142
  # half of the pair keeps its assertion here.
@@ -142,5 +166,5 @@ if [[ "$fails" -gt 0 ]]; then
142
166
  echo "check-comment-tier.test.sh: $fails case(s) failed"
143
167
  exit 1
144
168
  fi
145
- echo "check-comment-tier.test.sh: clean (slash surface + positional rescue + txt restricted roster + templates/ governance + count override edges + paragraph-join wrap)"
169
+ echo "check-comment-tier.test.sh: clean (slash surface + positional rescue + txt restricted roster + templates/ governance + count override edges + paragraph-join wrap + workflow-dir markdown headings as structure with its single-hash lines still governed)"
146
170
  exit 0
@@ -0,0 +1,3 @@
1
+ # contract: fixture-state v1
2
+ # @deprecated task: never-filed — the workflow tier's binding resolves to nothing
3
+ fixture data line
@@ -0,0 +1,2 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # @deprecated task: old-shipped-thing — the descriptor arm's binding is done
@@ -0,0 +1,4 @@
1
+ // @deprecated the crate arm's marker carries no decommission binding at all
2
+ pub fn widget() -> usize {
3
+ 1
4
+ }
@@ -1 +1,4 @@
1
1
  task: old-shipped-thing is done
2
+ bad.gate:2: deprecation marker '@deprecated' → task: old-shipped-thing is done
3
+ bad.rs:1: deprecation marker '@deprecated' — no 'task: <slug>' binding on the line
4
+ .workflow/fixture-state.txt:2: deprecation marker '@deprecated' → no live task 'never-filed'
@@ -1,5 +1,6 @@
1
- # Fixture consumer config: a deprecation-marker vocabulary plus a comment
2
- # surface narrowed to the top-level fixture source, so this config file (a
3
- # .sh under scripts/) is not itself scanned for markers.
4
- CANON_KIT_DEPRECATION_MARKERS=('@deprecated')
5
- CANON_KIT_COMMENT_SURFACE=("*.sh")
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-deprecation-task — the marker literal is spelled
3
+ # in two pieces because the default corpus derivation scans this config file
4
+ # too, and a contiguous spelling here would be an occurrence of the vocabulary
5
+ # it declares
6
+ CANON_KIT_DEPRECATION_MARKERS=("@dep"'recated')
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # @deprecated a templates/ stub the pruned surface exempts, so this unbound
3
+ # marker is never scanned
4
+ set -uo pipefail
5
+ echo stub
@@ -0,0 +1,3 @@
1
+ # contract: fixture-state v1
2
+ # @deprecated task: retire-legacy-widget — the workflow tier's binding is live
3
+ fixture data line
@@ -1 +1 @@
1
- DEPRECATION-TASK: clean
1
+ DEPRECATION-TASK: clean (5 governed source(s)
@@ -0,0 +1,2 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # @deprecated task: retire-legacy-widget — the descriptor arm's binding is live
@@ -0,0 +1,4 @@
1
+ // @deprecated task: later-teardown — the crate arm's binding is a deferred task
2
+ pub fn widget() -> usize {
3
+ 1
4
+ }
@@ -1,5 +1,6 @@
1
- # Fixture consumer config: a deprecation-marker vocabulary plus a comment
2
- # surface narrowed to the top-level fixture source, so this config file (a
3
- # .sh under scripts/) is not itself scanned for markers.
4
- CANON_KIT_DEPRECATION_MARKERS=('@deprecated')
5
- CANON_KIT_COMMENT_SURFACE=("*.sh")
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-deprecation-task — the marker literal is spelled
3
+ # in two pieces because the default corpus derivation scans this config file
4
+ # too, and a contiguous spelling here would be an occurrence of the vocabulary
5
+ # it declares
6
+ CANON_KIT_DEPRECATION_MARKERS=("@dep"'recated')
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # @deprecated a templates/ stub the pruned surface exempts, so this unbound
3
+ # marker is never scanned
4
+ set -uo pipefail
5
+ echo stub
@@ -14,7 +14,6 @@ set -uo pipefail
14
14
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
15
15
 
16
16
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
17
- GATE="$DIR/checks/check-deprecation-task.sh"
18
17
  SANDBOX="$(mktemp -d)"
19
18
  trap 'rm -rf "$SANDBOX"' EXIT
20
19
 
@@ -59,7 +58,9 @@ EOF
59
58
  check_case() { # $1=label $2=want-rc $3=want-substring $4..=env assignments
60
59
  local label="$1" want="$2" sub="$3"; shift 3
61
60
  local out rc
62
- out="$(cd "$SANDBOX" && env "$@" "$GATE" 2>&1)"; rc=$?
61
+ # spec: gate-sdk/SPEC.md §run-gate-tests — the gate is named, never spelled as a script
62
+ # path: gate_run resolves whichever substrate declares it, under this case's own env
63
+ out="$(cd "$SANDBOX" && gate_env "$@" && gate_run check-deprecation-task "$DIR/checks" 2>&1)"; rc=$?
63
64
  if [[ "$rc" -ne "$want" ]]; then
64
65
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
65
66
  fi
@@ -80,7 +81,7 @@ check_case "absent-slug" 1 "no live task 'ghost-teardown'" CANON_KIT_CO
80
81
  check_case "unbound-marker" 1 "no 'task: <slug>' binding" CANON_KIT_CONFIG_FILE="$SANDBOX/cfg.sh"
81
82
 
82
83
  # The live-bound marker never appears in the findings — a resolved slug is clean.
83
- out="$(cd "$SANDBOX" && env CANON_KIT_CONFIG_FILE="$SANDBOX/cfg.sh" "$GATE" 2>&1)"
84
+ out="$(cd "$SANDBOX" && gate_env CANON_KIT_CONFIG_FILE="$SANDBOX/cfg.sh" && gate_run check-deprecation-task "$DIR/checks" 2>&1)"
84
85
  if grep -qF -- "live-teardown" <<<"$out"; then
85
86
  echo " FAIL [live-bound-clean]: a resolved marker was flagged:"; printf ' %s\n' "$out"
86
87
  fails=$((fails + 1))
@@ -0,0 +1,4 @@
1
+ # A file outside the fixture's docs root
2
+
3
+ The bad tree reaches it with a bare relative link, which resolves on disk and
4
+ 404s on a site served from the docs root alone.
@@ -1,3 +1,6 @@
1
1
  # Fixture docs index
2
2
 
3
3
  Read the [demokit](demokit/index.md) page.
4
+
5
+ This one resolves outside the docs root with a bare relative link, which is the
6
+ third rule's violation: [the outside file](../OUTSIDE.md).
@@ -0,0 +1,4 @@
1
+ # A file outside the fixture's docs root
2
+
3
+ It exists, so a relative link reaching it resolves — which is the precondition
4
+ the off-root rule fires on. The good tree reaches it in the blob form instead.
@@ -1,3 +1,11 @@
1
1
  # Methodology
2
2
 
3
3
  A synthetic living page; its links stay file-targeted.
4
+
5
+ An off-root target is cited in the absolute self-repo blob form, which the gate
6
+ skips as an absolute URL — so the form the rule demands cannot itself red the
7
+ rule: [the outside file](https://github.com/owner/repo/blob/master/OUTSIDE.md).
8
+
9
+ A `../`-prefixed link that resolves back *under* the root is correct and stays
10
+ silent, because the rule turns on the resolved path rather than the link text:
11
+ [the index](../docs/index.md).
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of the off-root rule in canon-kit/checks/check-docs-link-convention.sh.
3
+ # The good/bad pair grows a case per direction, but its single expect string
4
+ # cannot pin three rules at once, and the off-root rule's whole design is its
5
+ # boundary predicate — each edge below is a ruled edge, so each is tested rather
6
+ # than left to the implementer's reading.
7
+ #
8
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
9
+ set -uo pipefail
10
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
11
+
12
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
13
+ GATE="$ROOT/canon-kit/checks/check-docs-link-convention.sh"
14
+
15
+ fails=0
16
+ tmp="$(mktemp -d)"
17
+ trap 'rm -rf "$tmp"' EXIT
18
+
19
+ # $1=case dir $2=body of docs/page.md
20
+ scaffold() {
21
+ mkdir -p "$1/docs"
22
+ printf '# Outside\n' >"$1/OUTSIDE.md"
23
+ mkdir -p "$1/outsidedir"
24
+ printf '# Inside\n' >"$1/docs/other.md"
25
+ printf '%s\n' "$2" >"$1/docs/page.md"
26
+ }
27
+
28
+ # $1=label $2=dir $3=want-rc $4=want-substring
29
+ check_case() {
30
+ local out rc
31
+ out="$(cd "$2" && "$GATE" docs 2>&1)"; rc=$?
32
+ if [[ "$rc" -ne "$3" ]]; then
33
+ echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
34
+ fi
35
+ if [[ -n "$4" ]] && ! grep -qF -- "$4" <<<"$out"; then
36
+ echo " FAIL [$1]: exit $rc OK but output lacks '$4': $out"; fails=$((fails + 1))
37
+ fi
38
+ }
39
+
40
+ # A — the violation itself: a relative link resolving to an existing file outside
41
+ # the root. This is what 404s on a site served from the root alone.
42
+ scaffold "$tmp/a" 'See [outside](../OUTSIDE.md).'
43
+ check_case "off-root-file-reds" "$tmp/a" 1 "off-root relative link"
44
+
45
+ # B — resolving back under the root is silent. Keying on the '../' text instead of
46
+ # the resolved path would red the majority of correct links in a real corpus.
47
+ scaffold "$tmp/b" 'See [other](../docs/other.md).'
48
+ check_case "resolves-back-under-root-silent" "$tmp/b" 0 "DOCS-LINK-CONVENTION: clean"
49
+
50
+ # C — the blob form the rule demands cannot itself red the rule: it is an
51
+ # absolute URL, already outside this gate's scope.
52
+ scaffold "$tmp/c" 'See [outside](https://github.com/owner/repo/blob/master/OUTSIDE.md).'
53
+ check_case "blob-form-silent" "$tmp/c" 0 "DOCS-LINK-CONVENTION: clean"
54
+
55
+ # D — a pure anchor has no path to resolve.
56
+ scaffold "$tmp/d" 'See [a section](#somewhere).'
57
+ check_case "pure-anchor-silent" "$tmp/d" 0 "DOCS-LINK-CONVENTION: clean"
58
+
59
+ # E — anti-double-report: a relative target that resolves to nothing is
60
+ # check-md-refs' finding and must stay only its finding.
61
+ scaffold "$tmp/e" 'See [nothing](../NOSUCHFILE.md).'
62
+ check_case "nonexistent-target-not-ours" "$tmp/e" 0 "DOCS-LINK-CONVENTION: clean"
63
+
64
+ # F — a directory target outside the root satisfies the first rule's predicate
65
+ # first, is reported there once, and this rule does not double-report it.
66
+ scaffold "$tmp/f" 'See [a dir](../outsidedir).'
67
+ check_case "off-root-directory-is-rule-one" "$tmp/f" 1 "directory-target link"
68
+ out_f="$(cd "$tmp/f" && "$GATE" docs 2>&1)"
69
+ if grep -qF -- "off-root relative link" <<<"$out_f"; then
70
+ echo " FAIL [off-root-directory-not-double-reported]: rule three also fired: $out_f"
71
+ fails=$((fails + 1))
72
+ fi
73
+
74
+ # G — the existing valve suppresses this rule as it does the other two; no second
75
+ # valve and no rule-specific escape.
76
+ scaffold "$tmp/g" '<!-- docs-link-exempt: deliberate, for the test -->
77
+ See [outside](../OUTSIDE.md).'
78
+ check_case "existing-valve-suppresses" "$tmp/g" 0 "DOCS-LINK-CONVENTION: clean"
79
+
80
+ # H — a generated mirror page is in scope deliberately: its conformance is a
81
+ # property of the generator, and a generator can regress.
82
+ scaffold "$tmp/h" '---
83
+ generated: true
84
+ ---
85
+
86
+ See [outside](../OUTSIDE.md).'
87
+ check_case "generated-page-in-scope" "$tmp/h" 1 "off-root relative link"
88
+
89
+ if [[ "$fails" -gt 0 ]]; then
90
+ echo "check-docs-link-convention.test: $fails assertion(s) failed"
91
+ exit 1
92
+ fi
93
+ echo "check-docs-link-convention.test: ok (an off-root relative link to an existing target reds; a ../ link resolving back under the root, the blob form, a pure anchor, and a target that resolves to nothing are all silent; an off-root directory target stays the directory rule's single finding; the existing docs-link-exempt valve suppresses it; a generated mirror page is in scope)"
94
+ exit 0
@@ -12,7 +12,6 @@ set -uo pipefail
12
12
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
13
13
 
14
14
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
15
- GATE="$DIR/checks/check-knob-citation.sh"
16
15
  SANDBOX="$(mktemp -d)"
17
16
  trap 'rm -rf "$SANDBOX"' EXIT
18
17
 
@@ -25,7 +24,8 @@ EOF
25
24
 
26
25
  check_case() { # $1=label $2=want-rc $3=want-substring
27
26
  local label="$1" want="$2" sub="$3" out rc
28
- out="$(cd "$SANDBOX" && env GATE_SDK_KIT_DIRS="widget-kit" CANON_KIT_CONFIG_FILE="$SANDBOX/cfg.sh" "$GATE" 2>&1)"; rc=$?
27
+ out="$(cd "$SANDBOX" && gate_env GATE_SDK_KIT_DIRS="widget-kit" CANON_KIT_CONFIG_FILE="$SANDBOX/cfg.sh" \
28
+ && gate_run check-knob-citation "$DIR/checks" 2>&1)"; rc=$?
29
29
  if [[ "$rc" -ne "$want" ]]; then
30
30
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
31
31
  fi
@@ -35,3 +35,7 @@ contracts reads clean.
35
35
 
36
36
  <!-- manifest-count-exempt: this line legitimately fixes the historical total -->
37
37
  The pilot shipped with six gates before the registry existed.
38
+
39
+ <!-- measured: gate-total=7 -->
40
+ The registry holds 7 gates today — the sanctioned discharge, because the
41
+ objection the ban encodes is answered by an oracle rather than suppressed.