checkwright 0.22.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 (346) hide show
  1. package/README.md +687 -90
  2. package/lib/common/lock.sh +38 -9
  3. package/lib/common/profile.sh +33 -0
  4. package/lib/common/recipe.sh +49 -33
  5. package/lib/diff.sh +64 -0
  6. package/lib/doctor.sh +67 -42
  7. package/lib/init.sh +23 -31
  8. package/lib/uninstall.sh +212 -0
  9. package/lib/update.sh +34 -0
  10. package/package.json +2 -2
  11. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  12. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  13. package/payload/canon-kit/README.md +1 -0
  14. package/payload/canon-kit/SPEC.md +410 -58
  15. package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
  16. package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
  17. package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
  18. package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
  19. package/payload/canon-kit/checks/check-docs-link-convention.sh +1 -0
  20. package/payload/canon-kit/checks/check-install-claim.gate +3 -0
  21. package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
  22. package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
  23. package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
  24. package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
  25. package/payload/canon-kit/checks/check-md-refs.gate +3 -0
  26. package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
  27. package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
  28. package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
  29. package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
  30. package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
  31. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
  32. package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
  33. package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
  34. package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
  35. package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
  36. package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
  37. package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
  38. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  39. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  45. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
  49. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  50. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  51. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  52. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  53. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  62. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  63. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  64. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +27 -5
  65. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  66. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  67. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  68. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  69. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  70. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  71. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  72. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  73. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +3 -3
  74. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  75. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  76. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  77. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  78. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +3 -0
  79. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  80. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  81. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  82. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  83. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  84. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  85. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  86. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  87. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  88. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  89. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  90. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  91. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  92. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  93. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  94. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  95. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  96. package/payload/canon-kit/lib/spec.sh +91 -62
  97. package/payload/canon-kit/smoke/install.sh +1 -0
  98. package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
  99. package/payload/context-kit/README.md +4 -1
  100. package/payload/context-kit/SPEC.md +143 -10
  101. package/payload/context-kit/bin/env-probe.sh +19 -6
  102. package/payload/context-kit/checks/check-brevity.sh +1 -0
  103. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
  104. package/payload/context-kit/checks/check-memory-off.sh +1 -0
  105. package/payload/context-kit/checks/check-settings-paths.sh +94 -0
  106. package/payload/context-kit/checks/check-settings-pins.sh +1 -0
  107. package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
  108. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  109. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  110. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  111. package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
  112. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  113. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  114. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  115. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  116. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  117. package/payload/context-kit/lib/toolfloor.sh +15 -4
  118. package/payload/context-kit/smoke/agents-md.sh +12 -1
  119. package/payload/context-kit/smoke/install.sh +1 -0
  120. package/payload/delegation-kit/README.md +3 -3
  121. package/payload/delegation-kit/SPEC.md +116 -13
  122. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
  123. package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -0
  124. package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
  125. package/payload/delegation-kit/templates/agent-execution.md +38 -14
  126. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  127. package/payload/doctrine-kit/DOCTRINE.md +86 -12
  128. package/payload/doctrine-kit/README.md +7 -3
  129. package/payload/doctrine-kit/SPEC.md +102 -9
  130. package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
  131. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
  132. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  133. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  134. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
  135. package/payload/doctrine-kit/smoke/install.sh +90 -0
  136. package/payload/drift-kit/SPEC.md +13 -4
  137. package/payload/drift-kit/bin/kfric.sh +21 -2
  138. package/payload/drift-kit/smoke/install.sh +28 -0
  139. package/payload/evidence-kit/checks/check-battery-roster.sh +1 -0
  140. package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
  141. package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
  142. package/payload/evidence-kit/checks/check-producer-liveness.sh +1 -0
  143. package/payload/gate-sdk/README.md +13 -0
  144. package/payload/gate-sdk/SPEC.md +2611 -151
  145. package/payload/gate-sdk/bin/build-native.sh +38 -0
  146. package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
  147. package/payload/gate-sdk/bin/gen-pre-commit.sh +23 -3
  148. package/payload/gate-sdk/bin/port-blockers.sh +445 -0
  149. package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
  150. package/payload/gate-sdk/bin/run-gate-tests.sh +26 -5
  151. package/payload/gate-sdk/bin/run-gates.sh +8 -2
  152. package/payload/gate-sdk/bin/upgrade-smoke.sh +52 -4
  153. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
  154. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
  155. package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
  156. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  157. package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
  158. package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
  159. package/payload/gate-sdk/checks/check-core-files.sh +1 -0
  160. package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
  161. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
  162. package/payload/gate-sdk/checks/check-exec-bit.sh +1 -0
  163. package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
  164. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +2 -1
  165. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +1 -0
  166. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
  167. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
  168. package/payload/gate-sdk/checks/check-gate-output.sh +33 -3
  169. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +36 -5
  170. package/payload/gate-sdk/checks/check-graph.sh +1 -0
  171. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
  172. package/payload/gate-sdk/checks/check-identity.sh +1 -0
  173. package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
  174. package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
  175. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  176. package/payload/gate-sdk/checks/check-readme-roster.sh +1 -0
  177. package/payload/gate-sdk/checks/check-reads-couples.sh +3 -2
  178. package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
  179. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  180. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  181. package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
  182. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  183. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  184. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  185. package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
  186. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  187. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  188. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  189. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  190. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  191. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  192. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  193. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  194. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  195. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  196. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  197. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  198. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  199. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  200. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  201. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -1
  202. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  203. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  204. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  205. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
  206. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +1 -1
  207. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +65 -4
  208. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  209. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  210. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  211. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  212. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  213. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  214. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  215. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  216. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  217. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  218. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  219. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  220. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  221. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  222. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  223. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  224. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  225. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  226. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +111 -1
  227. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  228. package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
  229. package/payload/gate-sdk/lib/gate.sh +135 -11
  230. package/payload/gate-sdk/lib/inject.sh +25 -0
  231. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  232. package/payload/gate-sdk/smoke/install.sh +42 -0
  233. package/payload/guard-kit/README.md +14 -11
  234. package/payload/guard-kit/SPEC.md +278 -62
  235. package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
  236. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  237. package/payload/guard-kit/guard-tests/cases.tsv +49 -7
  238. package/payload/guard-kit/lib/guard.sh +276 -54
  239. package/payload/guard-kit/templates/close-triage.md +5 -5
  240. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  241. package/payload/lifecycle-kit/README.md +11 -1
  242. package/payload/lifecycle-kit/SPEC.md +441 -37
  243. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  244. package/payload/lifecycle-kit/bin/enter-stage.sh +126 -10
  245. package/payload/lifecycle-kit/bin/file-gap.sh +27 -10
  246. package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
  247. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
  248. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  249. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  250. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  251. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  252. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  253. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  254. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  255. package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
  256. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  257. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  258. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  259. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
  260. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  261. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  262. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  263. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  264. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  265. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  266. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  267. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  268. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -3
  269. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  270. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  271. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  272. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  273. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  274. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  275. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  276. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  277. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
  278. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
  279. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -3
  280. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
  281. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  282. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  283. package/payload/lifecycle-kit/lib/stages.sh +4 -0
  284. package/payload/lifecycle-kit/smoke/install.sh +67 -4
  285. package/payload/lifecycle-kit/templates/lead.md +36 -0
  286. package/payload/lifecycle-kit/templates/stages/close.md +30 -11
  287. package/payload/lifecycle-kit/templates/stages/scope.md +9 -4
  288. package/payload/lifecycle-kit/templates/stages/spec.md +5 -1
  289. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  290. package/payload/queue-kit/README.md +3 -1
  291. package/payload/queue-kit/SPEC.md +123 -3
  292. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  293. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  294. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  295. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
  296. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  297. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  298. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  299. package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
  300. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  301. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  302. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  303. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  304. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  305. package/payload/queue-kit/lib/queue.sh +4 -19
  306. package/payload/site-kit/SPEC.md +23 -0
  307. package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
  308. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  309. package/profiles.list +36 -8
  310. package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
  311. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  312. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  313. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  314. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  315. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  316. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  317. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  318. package/payload/canon-kit/checks/check-payload-claim.sh +0 -133
  319. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  320. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  321. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  322. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  323. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -187
  324. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  325. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  326. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  327. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  328. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  329. package/payload/gate-sdk/checks/check-template-registry-parity.sh +0 -81
  330. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  331. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  332. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  333. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  334. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  335. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  336. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  337. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  338. package/payload/lifecycle-kit/checks/check-survey-record.sh +0 -102
  339. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
  340. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  341. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  342. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  343. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  344. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  345. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  346. package/payload/queue-kit/checks/check-task-names.sh +0 -128
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of the arms the one-pair good/bad harness cannot hold: every
3
+ # fail-closed exit. A pair asserts one exit code per case dir and the crate's
4
+ # read-set unit test asserts no member exits 2 on its own fixtures, so arm B (an
5
+ # unemitted key), the ambiguity fail-close and a malformed marker have no pair
6
+ # spelling. The inactive-by-default posture is here for the same reason: it needs
7
+ # a config the pair's own canon-config.sh cannot also be.
8
+ #
9
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
10
+ set -uo pipefail
11
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
12
+
13
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
14
+ SANDBOX="$(mktemp -d)"
15
+ trap 'rm -rf "$SANDBOX"' EXIT
16
+
17
+ fails=0
18
+
19
+ cat >"$SANDBOX/cfg.sh" <<'EOF'
20
+ CANON_KIT_MEASURED_CLAIMS_CMD='printf "gate-total\t7\n"'
21
+ CANON_KIT_MEASURED_SURFACE_GLOBS=("*.md")
22
+ EOF
23
+
24
+ cat >"$SANDBOX/off.sh" <<'EOF'
25
+ CANON_KIT_MEASURED_SURFACE_GLOBS=("*.md")
26
+ EOF
27
+
28
+ check_case() { # $1=label $2=want-rc $3=want-substring $4=config
29
+ local label="$1" want="$2" sub="$3" cfg="$4"
30
+ local out rc
31
+ out="$(cd "$SANDBOX" && gate_env CANON_KIT_CONFIG_FILE="$SANDBOX/$cfg" \
32
+ && gate_run check-measured-claim "$DIR/checks" 2>&1)"; rc=$?
33
+ if [[ "$rc" -ne "$want" ]]; then
34
+ echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
35
+ fi
36
+ if [[ -n "$sub" ]] && ! grep -qF -- "$sub" <<<"$out"; then
37
+ echo " FAIL [$label]: exit $rc OK but output lacks '$sub':"; printf ' %s\n' "$out"
38
+ fails=$((fails + 1))
39
+ fi
40
+ }
41
+
42
+ # Arm B: a marker naming a key the emitter does not carry is a claim with no
43
+ # oracle wearing the costume of one, so it fails closed rather than reading as
44
+ # an agreement nobody could have checked.
45
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
46
+ # consumer — SPEC
47
+
48
+ <!-- measured: gate-tally=7 -->
49
+ The registry holds 7 gates today.
50
+ EOF
51
+ check_case "unknown-key-fails-closed" 2 "key 'gate-tally' is absent from the emitter's roster" cfg.sh
52
+
53
+ # The authoring contract arm C prices: a bound claim carrying more than one
54
+ # distinct cardinal is ambiguous, and the gate refuses to guess which one the
55
+ # marker holds.
56
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
57
+ # consumer — SPEC
58
+
59
+ <!-- measured: gate-total=7 -->
60
+ The registry holds 7 gates across 3 kits today.
61
+ EOF
62
+ check_case "ambiguous-claim-fails-closed" 2 "2 distinct cardinals" cfg.sh
63
+
64
+ # A marker that does not parse is an authoring error, never a site to skip: a
65
+ # skipped malformed marker is an unchecked claim that looks checked.
66
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
67
+ # consumer — SPEC
68
+
69
+ <!-- measured: gate-total -->
70
+ The registry holds 7 gates today.
71
+ EOF
72
+ check_case "malformed-marker-fails-closed" 2 "marker does not parse" cfg.sh
73
+
74
+ # Inactive by default: with no oracle command the gate has nothing to check a
75
+ # marker against, and reports clean rather than reddening every marker in a
76
+ # tree that never configured it.
77
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
78
+ # consumer — SPEC
79
+
80
+ <!-- measured: gate-total=7 -->
81
+ The registry holds 7 gates today.
82
+ EOF
83
+ check_case "no-oracle-is-clean" 0 "MEASURED-CLAIM: clean" off.sh
84
+
85
+ if [[ "$fails" -gt 0 ]]; then
86
+ echo "check-measured-claim.test.sh: $fails case(s) failed"
87
+ exit 1
88
+ fi
89
+ echo "check-measured-claim.test.sh: clean (unknown key + ambiguous claim + malformed marker all fail closed; an unset oracle is inactive)"
90
+ 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-prose-enum.sh"
16
15
  SANDBOX="$(mktemp -d)"
17
16
  trap 'rm -rf "$SANDBOX"' EXIT
18
17
 
@@ -21,7 +20,7 @@ fails=0
21
20
  check_case() { # $1=label $2=want-rc $3=want-substring $4..=env assignments
22
21
  local label="$1" want="$2" sub="$3"; shift 3
23
22
  local out rc
24
- out="$(cd "$SANDBOX" && env "$@" "$GATE" 2>&1)"; rc=$?
23
+ out="$(cd "$SANDBOX" && gate_env "$@" && gate_run check-prose-enum "$DIR/checks" 2>&1)"; rc=$?
25
24
  if [[ "$rc" -ne "$want" ]]; then
26
25
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
27
26
  fi
@@ -88,7 +87,8 @@ cat >"$SANDBOX/SPEC.md" <<'EOF'
88
87
  The colors red, green are complete; the signals alpha, beta drop one.
89
88
  EOF
90
89
  check_case "multiset-only-drifted-trips" 1 "set 'sig' lists 2 of 3" CANON_KIT_CONFIG_FILE="$SANDBOX/two.sh"
91
- out="$(cd "$SANDBOX" && env CANON_KIT_CONFIG_FILE="$SANDBOX/two.sh" "$GATE" 2>&1)"
90
+ out="$(cd "$SANDBOX" && gate_env CANON_KIT_CONFIG_FILE="$SANDBOX/two.sh" \
91
+ && gate_run check-prose-enum "$DIR/checks" 2>&1)"
92
92
  if grep -qF -- "set 'col'" <<<"$out"; then
93
93
  echo " FAIL [multiset-complete-quiet]: the complete 'col' set was flagged:"
94
94
  printf ' %s\n' "$out"; fails=$((fails + 1))
@@ -11,7 +11,6 @@ set -uo pipefail
11
11
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
12
12
 
13
13
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
14
- GATE="$DIR/checks/check-spec-dod-singleton.sh"
15
14
  SANDBOX="$(mktemp -d)"
16
15
  trap 'rm -rf "$SANDBOX"' EXIT
17
16
 
@@ -33,10 +32,12 @@ cat >"$SANDBOX/vendored-kit/SPEC.md" <<'EOF'
33
32
  Documents a dependency's contract; carries no Definition-of-Done checklist.
34
33
  EOF
35
34
 
36
- check_case() { # $1=label $2=want-rc $3=want-substring $4..=env assignments
37
- local label="$1" want="$2" sub="$3"; shift 3
35
+ check_case() { # $1=label $2=want-rc $3=want-substring $4=cwd $5=root-arg $6..=env assignments
36
+ local label="$1" want="$2" sub="$3" cwd="$4" rootarg="$5"; shift 5
38
37
  local out rc
39
- out="$(cd "$SANDBOX" && env "$@" "$GATE" 2>&1)"; rc=$?
38
+ # spec: gate-sdk/SPEC.md §run-gate-tests — the gate is named, never spelled as a script
39
+ # path: gate_run resolves whichever substrate declares it, under this case's own env
40
+ out="$(cd "$cwd" && gate_env "$@" && gate_run check-spec-dod-singleton "$DIR/checks" ${rootarg:+"$rootarg"} 2>&1)"; rc=$?
40
41
  if [[ "$rc" -ne "$want" ]]; then
41
42
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
42
43
  fi
@@ -48,16 +49,29 @@ check_case() { # $1=label $2=want-rc $3=want-substring $4..=env assignments
48
49
 
49
50
  # Default (CANON_KIT_SCAN_KIT_ROOTS unset ⇒ 0): the vendored kit root is pruned,
50
51
  # so only the consumer spec is scanned — exactly-one holds, clean.
51
- check_case "prune-default" 0 "1 SPEC.md scanned" GATE_SDK_KIT_DIRS=vendored-kit
52
+ check_case "prune-default" 0 "1 SPEC.md scanned" "$SANDBOX" "" GATE_SDK_KIT_DIRS=vendored-kit
52
53
 
53
54
  # Knob on: the kit root is re-included, so its DoD-less SPEC.md now trips
54
55
  # exactly-one — the flag a first-party corpus (this repo) accepts by choice.
55
- check_case "scan-kit-roots" 1 "vendored-kit/SPEC.md" \
56
+ check_case "scan-kit-roots" 1 "vendored-kit/SPEC.md" "$SANDBOX" "" \
56
57
  GATE_SDK_KIT_DIRS=vendored-kit CANON_KIT_SCAN_KIT_ROOTS=1
57
58
 
59
+ # A scan root that climbs: the same tree reached as '..' from a subdirectory. The prune is a
60
+ # prefix test, so it is correct only while the scan root, the kit roots and the walked files
61
+ # are all spelled the same way — normalising some and not others prunes nothing at all, a
62
+ # silent widening of the corpus rather than a red. The eighth cohort's edge-root parity run
63
+ # found exactly that asymmetry (gate-sdk/SPEC.md §The canonical-spec `spec_canonical_specs`
64
+ # cohort). What this case holds is the *compiled* prune, since the member now dispatches to
65
+ # the binary; it was verified to red under an asymmetric break and to stay green under a
66
+ # symmetric one, which is the defect shape it can and cannot see. The shell twin the surviving
67
+ # `_spec_prune_kit_roots` callers use is covered by nothing — `spec-prune-normalisation-shell-oracle`.
68
+ mkdir -p "$SANDBOX/sub"
69
+ check_case "prune-through-dotdot" 0 "1 SPEC.md scanned" "$SANDBOX/sub" ".." \
70
+ GATE_SDK_KIT_DIRS="$SANDBOX/vendored-kit"
71
+
58
72
  if [[ "$fails" -gt 0 ]]; then
59
73
  echo "check-spec-dod-singleton.test.sh: $fails case(s) failed"
60
74
  exit 1
61
75
  fi
62
- echo "check-spec-dod-singleton.test.sh: clean (kit-root prune default + CANON_KIT_SCAN_KIT_ROOTS re-include, 2 cases)"
76
+ echo "check-spec-dod-singleton.test.sh: clean (kit-root prune default + CANON_KIT_SCAN_KIT_ROOTS re-include + '..' scan-root normalisation, 3 cases)"
63
77
  exit 0
@@ -0,0 +1,2 @@
1
+ # contract: SPEC-target.md §The heading that drifted away — the workflow tier's dangling member
2
+ fixture data line
@@ -0,0 +1,2 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # spec: SPEC-widget.md §The missing contract — the descriptor arm's pointer dangles
@@ -0,0 +1,4 @@
1
+ // spec: no-such-file.md §Whatever — the crate arm's pointer names no tracked file
2
+ pub fn widget() -> usize {
3
+ 1
4
+ }
@@ -1,2 +1,5 @@
1
1
  §heading not found in SPEC-target.md
2
2
  target file not found: widget-manifest
3
+ bad.gate:2: §heading not found in SPEC-widget.md
4
+ bad.rs:1: target file not found: no-such-file.md
5
+ .workflow/fixture-state.txt:1: §heading not found in SPEC-target.md
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # spec: SPEC-target.md §The heading that drifted away — a templates/ stub the
3
+ # pruned surface exempts, so this dangling pointer is never scanned
4
+ set -uo pipefail
5
+ echo stub
@@ -0,0 +1,2 @@
1
+ # contract: SPEC-target.md §The landed heading — the workflow tier's tracked member
2
+ fixture data line
@@ -1 +1 @@
1
- SPEC-POINTER: clean
1
+ SPEC-POINTER: clean (5 directive pointer(s) across 5 governed source(s)
@@ -0,0 +1,2 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # spec: SPEC-widget.md §The widget contract — the descriptor arm's pointer resolves
@@ -0,0 +1,4 @@
1
+ // spec: SPEC-widget.md §The widget contract — the crate arm's pointer resolves
2
+ pub fn widget() -> usize {
3
+ 1
4
+ }
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # spec: SPEC-target.md §The heading that drifted away — a templates/ stub the
3
+ # pruned surface exempts, so this dangling pointer is never scanned
4
+ set -uo pipefail
5
+ echo stub
@@ -0,0 +1,3 @@
1
+ # contract: fixture-state v1
2
+ # TODO(task: never-filed-either) the workflow tier's marker resolves to nothing
3
+ fixture data line
@@ -0,0 +1,2 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # TODO(task: old-shipped-thing) the descriptor arm's marker is stale
@@ -0,0 +1,4 @@
1
+ // TODO(task: never-filed) the crate arm's marker resolves to nothing
2
+ pub fn widget() -> usize {
3
+ 1
4
+ }
@@ -1 +1,4 @@
1
1
  task 'old-shipped-thing' is done
2
+ bad.gate:2: TODO(task: old-shipped-thing)
3
+ bad.rs:1: TODO(task: never-filed)
4
+ .workflow/fixture-state.txt:2: TODO(task: never-filed-either)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # TODO(task: never-filed) a templates/ stub the pruned surface exempts, so this
3
+ # unresolvable marker is never scanned
4
+ set -uo pipefail
5
+ echo stub
@@ -0,0 +1,3 @@
1
+ # contract: fixture-state v1
2
+ # TODO(task: wire-the-widget) the workflow tier's tracked member resolves
3
+ fixture data line
@@ -1 +1 @@
1
- TODO-TASK-LIVENESS: clean
1
+ TODO-TASK-LIVENESS: clean (4 governed source(s)
@@ -0,0 +1,2 @@
1
+ # graph: couples=X dir=one valve=none tier=precommit
2
+ # TODO(task: flaky-retry) the descriptor arm's marker resolves to a live task
@@ -0,0 +1,4 @@
1
+ // TODO(task: later-thing) the crate arm's marker resolves to a deferred task
2
+ pub fn widget() -> usize {
3
+ 1
4
+ }
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # TODO(task: never-filed) a templates/ stub the pruned surface exempts, so this
3
+ # unresolvable marker is never scanned
4
+ set -uo pipefail
5
+ echo stub
@@ -13,7 +13,6 @@ set -uo pipefail
13
13
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
14
14
 
15
15
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # canon-kit/
16
- GATE="$DIR/checks/check-tracking-claim.sh"
17
16
  SANDBOX="$(mktemp -d)"
18
17
  trap 'rm -rf "$SANDBOX"' EXIT
19
18
 
@@ -21,7 +20,7 @@ fails=0
21
20
 
22
21
  check_case() { # $1=label $2=dir $3=want-rc $4=want-substring
23
22
  local out rc
24
- out="$("$GATE" "$2" 2>&1)"; rc=$?
23
+ out="$(gate_run check-tracking-claim "$DIR/checks" "$2" 2>&1)"; rc=$?
25
24
  if [[ "$rc" -ne "$3" ]]; then
26
25
  echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
27
26
  fi
@@ -100,6 +100,9 @@ declare -p CANON_KIT_INSTALL_CLAIM_EXCLUDE &>/dev/null || CANON_KIT_INSTALL_CLAI
100
100
  [[ -v CANON_KIT_PAYLOAD_CLAIMS_CMD ]] || CANON_KIT_PAYLOAD_CLAIMS_CMD=""
101
101
  declare -p CANON_KIT_PAYLOAD_CLAIM_EXCLUDE &>/dev/null || CANON_KIT_PAYLOAD_CLAIM_EXCLUDE=()
102
102
 
103
+ [[ -v CANON_KIT_MEASURED_CLAIMS_CMD ]] || CANON_KIT_MEASURED_CLAIMS_CMD=""
104
+ declare -p CANON_KIT_MEASURED_SURFACE_GLOBS &>/dev/null || CANON_KIT_MEASURED_SURFACE_GLOBS=()
105
+
103
106
  declare -p CANON_KIT_COMMENT_MACHINE &>/dev/null || CANON_KIT_COMMENT_MACHINE=()
104
107
  declare -p CANON_KIT_COMMENT_REASON &>/dev/null || CANON_KIT_COMMENT_REASON=()
105
108
  declare -p CANON_KIT_COMMENT_SURFACE &>/dev/null || CANON_KIT_COMMENT_SURFACE=()
@@ -128,8 +131,10 @@ declare -p CANON_KIT_PROSE_TELL_ABBR_ALLOW &>/dev/null || CANON_KIT_PROSE_TELL_A
128
131
  # spec: canon-kit/SPEC.md §Layout and configuration — the _EXTRA arrays union onto the base sets after the base defaults resolve, so a consumer adding a token need not restate the bundled default; replacing a base array stays the narrowing valve
129
132
  declare -p CANON_KIT_PROSE_TELL_PHRASES_EXTRA &>/dev/null || CANON_KIT_PROSE_TELL_PHRASES_EXTRA=()
130
133
  declare -p CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA &>/dev/null || CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA=()
134
+ declare -p CANON_KIT_TEMPORAL_MARKERS_EXTRA &>/dev/null || CANON_KIT_TEMPORAL_MARKERS_EXTRA=()
131
135
  CANON_KIT_PROSE_TELL_PHRASES+=(${CANON_KIT_PROSE_TELL_PHRASES_EXTRA[@]+"${CANON_KIT_PROSE_TELL_PHRASES_EXTRA[@]}"})
132
136
  CANON_KIT_PROSE_TELL_ABBR_ALLOW+=(${CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA[@]+"${CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA[@]}"})
137
+ CANON_KIT_TEMPORAL_MARKERS+=(${CANON_KIT_TEMPORAL_MARKERS_EXTRA[@]+"${CANON_KIT_TEMPORAL_MARKERS_EXTRA[@]}"})
133
138
 
134
139
  spec_alt() { local IFS='|'; printf '%s' "$*"; }
135
140
 
@@ -146,19 +151,20 @@ unset _sk_dp
146
151
  # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
147
152
  SPEC_SECTION_RE="^## "
148
153
 
149
- # spec: canon-kit/SPEC.md §lib/spec.sh — the queue-resolution pass both liveness gates read: one walk emits "<live|done>\t<slug>", live for a bold lead-in bullet in an active/deferred section and done for a bare-slug bullet outside them (the queue-kit format). Each caller builds its own live/done map and fail-closes on the awk status.
150
- spec_queue_slugs() { # $1=queue-file
151
- awk -v activere="$SPEC_ACTIVE_RE" -v defre="$SPEC_DEFERRED_RE" -v sectre="$SPEC_SECTION_RE" '
152
- $0 ~ sectre { active = ($0 ~ activere || $0 ~ defre); next }
153
- active && $0 ~ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
154
- match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
155
- printf "live\t%s\n", substr($0, RSTART + 2, RLENGTH - 4); next
156
- }
157
- !active && $0 ~ /^[[:space:]]*-[[:space:]]+[a-z0-9][a-z0-9-]*[[:space:]]*$/ {
158
- line = $0; sub(/^[[:space:]]*-[[:space:]]+/, "", line); sub(/[[:space:]]*$/, "", line)
159
- printf "done\t%s\n", line
160
- }
161
- ' "$1"
154
+ # spec: canon-kit/SPEC.md §lib/spec.sh — lexical normalisation of an absolute path, the shell
155
+ # twin of the crate's `walk::normalize_abs`: an empty or `.` component drops, `..` pops, and
156
+ # no symlink resolves. Every path the prune below compares crosses it, or none do.
157
+ _spec_norm_abs() { # sets _SPEC_NORM
158
+ local p="${1%/}/" seg out=""
159
+ while [[ -n "$p" ]]; do
160
+ seg="${p%%/*}"; p="${p#*/}"
161
+ case "$seg" in
162
+ ''|.) ;;
163
+ ..) out="${out%/*}" ;;
164
+ *) out="$out/$seg" ;;
165
+ esac
166
+ done
167
+ _SPEC_NORM="${out:-/}"
162
168
  }
163
169
 
164
170
  # spec: canon-kit/SPEC.md §lib/spec.sh — finders skip templates/ stubs and vendored kit roots under the scan root (an ancestor kit root never prunes)
@@ -171,13 +177,13 @@ _spec_prune_kit_roots() {
171
177
  ./*) root_abs="$PWD/${root#./}" ;;
172
178
  *) root_abs="$PWD/$root" ;;
173
179
  esac
174
- root_abs="${root_abs%/}"
180
+ _spec_norm_abs "$root_abs"; root_abs="$_SPEC_NORM"
175
181
  local -a roots=()
176
182
  local r rabs f fabs keep
177
183
  while IFS= read -r r; do
178
184
  [[ -n "$r" ]] || continue
179
185
  [[ "$r" == /* ]] && rabs="$r" || rabs="$PWD/$r"
180
- rabs="${rabs%/}"
186
+ _spec_norm_abs "$rabs"; rabs="$_SPEC_NORM"
181
187
  [[ "$rabs" == "$root_abs/"* ]] || continue # only a vendored subtree prunes
182
188
  roots+=("$rabs")
183
189
  done < <(gate_kit_roots)
@@ -185,6 +191,7 @@ _spec_prune_kit_roots() {
185
191
  while IFS= read -r f; do
186
192
  [[ -n "$f" ]] || continue
187
193
  [[ "$f" == /* ]] && fabs="$f" || fabs="$PWD/${f#./}"
194
+ _spec_norm_abs "$fabs"; fabs="$_SPEC_NORM"
188
195
  keep=1
189
196
  for r in "${roots[@]}"; do
190
197
  [[ "$fabs" == "$r/"* ]] && { keep=0; break; }
@@ -202,7 +209,7 @@ spec_amendments() { gate_find "$1" -name "$CANON_KIT_AMENDMENT_GLOB" -type f 2>/
202
209
  # lifecycle-kit/SPEC.md §templates/stages/ owns), no `CONSUMER BINDING` header.
203
210
  _spec_slot_free() { ! grep -qE '\*<[a-z][a-z0-9-]*:|^CONSUMER BINDING' -- "$1"; }
204
211
 
205
- # spec: canon-kit/SPEC.md §lib/spec.sh — the manifest set shared by the manifest-narration gate family: canonical specs (kit-root pruned per CANON_KIT_SCAN_KIT_ROOTS) plus README.md at any depth and CLAUDE.md; explicit globs when CANON_KIT_MANIFEST_FILES is set. Amendments are excluded by construction — a transition artifact describes change. Slot-free CANON_KIT_PROSE_SURFACE_GLOBS candidates join the set (canon-kit/SPEC.md §check-spec-pointer).
212
+ # spec: canon-kit/SPEC.md §lib/spec.sh — the manifest set shared by the manifest-narration gate family: canonical specs and README.md at any depth (both kit-root pruned per CANON_KIT_SCAN_KIT_ROOTS — a vendored kit's own README is its documentation, not the consumer's governed content) plus CLAUDE.md; explicit globs when CANON_KIT_MANIFEST_FILES is set. Amendments are excluded by construction — a transition artifact describes change. Slot-free CANON_KIT_PROSE_SURFACE_GLOBS candidates join the set (canon-kit/SPEC.md §check-spec-pointer).
206
213
  spec_manifest_files() {
207
214
  local root="${1:-.}" g f
208
215
  if [[ ${#CANON_KIT_MANIFEST_FILES[@]} -gt 0 ]]; then
@@ -213,7 +220,7 @@ spec_manifest_files() {
213
220
  shopt -u nullglob globstar
214
221
  else
215
222
  spec_canonical_specs "$root"
216
- gate_find "$root" -name 'README.md' -type f 2>/dev/null | grep -v '/templates/' || true
223
+ gate_find "$root" -name 'README.md' -type f 2>/dev/null | grep -v '/templates/' | _spec_prune_kit_roots "$root" || true
217
224
  gate_find "$root" -name 'CLAUDE.md' -type f 2>/dev/null || true
218
225
  fi
219
226
  if [[ ${#CANON_KIT_PROSE_SURFACE_GLOBS[@]} -gt 0 ]]; then
@@ -227,51 +234,6 @@ spec_manifest_files() {
227
234
  fi
228
235
  }
229
236
 
230
- # spec: canon-kit/SPEC.md §lib/spec.sh — the two governed comment surfaces: the
231
- # tier gate scans _with_templates, the pointer gate scans the pruned surface
232
- # (templates exempt as placeholders-by-design).
233
- _spec_comment_surface() { # $1=root $2=1 keeps templates/ shell sources, else prunes them
234
- local root="${1:-.}" incl="${2:-0}" g f
235
- if [[ ${#CANON_KIT_COMMENT_SURFACE[@]} -gt 0 ]]; then
236
- shopt -s nullglob globstar
237
- for g in "${CANON_KIT_COMMENT_SURFACE[@]}"; do
238
- for f in "$root"/$g; do [[ -f "$f" ]] && printf '%s\n' "$f"; done
239
- done
240
- shopt -u nullglob globstar
241
- else
242
- # spec: canon-kit/SPEC.md §lib/spec.sh — the governed-source corpus spans
243
- # both gate declaration spellings and the ported implementation
244
- if [[ "$incl" == "1" ]]; then
245
- gate_find "$root" \( -name '*.sh' -o -name '*.gate' -o -name '*.rs' \) -type f 2>/dev/null | _spec_prune_kit_roots "$root" | sort
246
- else
247
- gate_find "$root" \( -name '*.sh' -o -name '*.gate' -o -name '*.rs' \) -type f 2>/dev/null | grep -v '/templates/' | _spec_prune_kit_roots "$root" | sort
248
- fi
249
- # spec: canon-kit/SPEC.md §check-spec-pointer — the workflow directory's
250
- # tracked tier, whatever the extension: the capture tier is gitignored
251
- # and carries no header (gate-sdk/SPEC.md §The workflow directory).
252
- shopt -s nullglob
253
- for f in "$root/${GATE_SDK_WORKFLOW_DIR:-.workflow}"/*; do
254
- [[ -f "$f" ]] || continue
255
- git -C "$root" ls-files --error-unmatch -- "${f#"$root"/}" >/dev/null 2>&1 || continue
256
- printf '%s\n' "$f"
257
- done
258
- shopt -u nullglob
259
- fi
260
- }
261
-
262
- spec_comment_surface() { _spec_comment_surface "$1" 0; }
263
-
264
- spec_comment_surface_with_templates() { _spec_comment_surface "$1" 1; }
265
-
266
- spec_comment_whitelisted() { # $1=root-relative path — true when it matches a consumer whitelist glob
267
- local rel="$1" g
268
- for g in "${CANON_KIT_COMMENT_WHITELIST[@]}"; do
269
- # shellcheck disable=SC2053 # intentional glob match: $g is a pattern
270
- [[ "$rel" == $g ]] && return 0
271
- done
272
- return 1
273
- }
274
-
275
237
  # spec: canon-kit/SPEC.md §lib/spec.sh — the count grammar the restated-total gate family shares: one cardinal alternation, one consumer noun vocabulary, two match shapes
276
238
  SPEC_COUNT_CARDINAL_RE='([0-9]+|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve)'
277
239
 
@@ -480,6 +442,11 @@ spec_install_transports() {
480
442
  spec_claim_vocabulary "$CANON_KIT_INSTALL_TRANSPORTS_CMD" CANON_KIT_INSTALL_TRANSPORTS_CMD
481
443
  }
482
444
 
445
+ # spec: canon-kit/SPEC.md §check-measured-claim — the measured-claim oracle's roster, the third caller of the general loader above; a key is slug-shaped and a value is one non-empty tab-free field, which is that function's contract rather than a second one here.
446
+ spec_measured_claims() {
447
+ spec_claim_vocabulary "$CANON_KIT_MEASURED_CLAIMS_CMD" CANON_KIT_MEASURED_CLAIMS_CMD
448
+ }
449
+
483
450
  _sk_errs=()
484
451
  [[ -n "$CANON_KIT_SPEC_NAME" ]] || _sk_errs+=("CANON_KIT_SPEC_NAME is empty")
485
452
  [[ -n "$CANON_KIT_AMENDMENT_GLOB" ]] || _sk_errs+=("CANON_KIT_AMENDMENT_GLOB is empty")
@@ -513,3 +480,65 @@ if [[ ${#_sk_errs[@]} -gt 0 ]]; then
513
480
  exit 2
514
481
  fi
515
482
  unset _sk_errs
483
+
484
+ # spec: canon-kit/SPEC.md §lib/spec.sh — the emitter-backed vocabularies as bridgeable
485
+ # variables, so a compiled member receives the consumer command's *output* and never spawns
486
+ # an interpreter to read consumer config
487
+ # spec: gate-sdk/SPEC.md §lib/gate.sh — index-aligned arrays because the wire format's own
488
+ # separator is the tab, and gated on GATE_SDK_RESOLVING_KNOB because resolution runs a
489
+ # subprocess and this library is sourced once per declared knob per gate
490
+ declare -p CANON_KIT_ENUM_SET_NAMES &>/dev/null || CANON_KIT_ENUM_SET_NAMES=()
491
+ declare -p CANON_KIT_ENUM_SET_MEMBERS &>/dev/null || CANON_KIT_ENUM_SET_MEMBERS=()
492
+ if [[ "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_ENUM_SET_NAMES \
493
+ || "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_ENUM_SET_MEMBERS ]] \
494
+ && [[ -n "$CANON_KIT_ENUM_SETS_CMD" ]]; then
495
+ _sk_sets="$(spec_enum_sets)" || exit 2
496
+ while IFS=$'\t' read -r _sk_n _sk_m; do
497
+ [[ -n "$_sk_n" ]] || continue
498
+ CANON_KIT_ENUM_SET_NAMES+=("$_sk_n")
499
+ CANON_KIT_ENUM_SET_MEMBERS+=("$_sk_m")
500
+ done <<<"$_sk_sets"
501
+ unset _sk_sets _sk_n _sk_m
502
+ fi
503
+
504
+ declare -p CANON_KIT_MEASURED_KEYS &>/dev/null || CANON_KIT_MEASURED_KEYS=()
505
+ declare -p CANON_KIT_MEASURED_VALUES &>/dev/null || CANON_KIT_MEASURED_VALUES=()
506
+ if [[ "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_MEASURED_KEYS \
507
+ || "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_MEASURED_VALUES ]] \
508
+ && [[ -n "$CANON_KIT_MEASURED_CLAIMS_CMD" ]]; then
509
+ _sk_meas="$(spec_measured_claims)" || exit 2
510
+ while IFS=$'\t' read -r _sk_k _sk_v; do
511
+ [[ -n "$_sk_k" ]] || continue
512
+ CANON_KIT_MEASURED_KEYS+=("$_sk_k")
513
+ CANON_KIT_MEASURED_VALUES+=("$_sk_v")
514
+ done <<<"$_sk_meas"
515
+ unset _sk_meas _sk_k _sk_v
516
+ fi
517
+
518
+ declare -p CANON_KIT_INSTALL_TRANSPORT_IDS &>/dev/null || CANON_KIT_INSTALL_TRANSPORT_IDS=()
519
+ declare -p CANON_KIT_INSTALL_TRANSPORT_PATTERNS &>/dev/null || CANON_KIT_INSTALL_TRANSPORT_PATTERNS=()
520
+ if [[ "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_INSTALL_TRANSPORT_IDS \
521
+ || "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_INSTALL_TRANSPORT_PATTERNS ]] \
522
+ && [[ -n "$CANON_KIT_INSTALL_TRANSPORTS_CMD" ]]; then
523
+ _sk_tr="$(spec_install_transports)" || exit 2
524
+ while IFS=$'\t' read -r _sk_i _sk_p; do
525
+ [[ -n "$_sk_i" ]] || continue
526
+ CANON_KIT_INSTALL_TRANSPORT_IDS+=("$_sk_i")
527
+ CANON_KIT_INSTALL_TRANSPORT_PATTERNS+=("$_sk_p")
528
+ done <<<"$_sk_tr"
529
+ unset _sk_tr _sk_i _sk_p
530
+ fi
531
+
532
+ declare -p CANON_KIT_PAYLOAD_CLAIM_IDS &>/dev/null || CANON_KIT_PAYLOAD_CLAIM_IDS=()
533
+ declare -p CANON_KIT_PAYLOAD_CLAIM_PATTERNS &>/dev/null || CANON_KIT_PAYLOAD_CLAIM_PATTERNS=()
534
+ if [[ "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_PAYLOAD_CLAIM_IDS \
535
+ || "${GATE_SDK_RESOLVING_KNOB:-}" == CANON_KIT_PAYLOAD_CLAIM_PATTERNS ]] \
536
+ && [[ -n "$CANON_KIT_PAYLOAD_CLAIMS_CMD" ]]; then
537
+ _sk_pc="$(spec_claim_vocabulary "$CANON_KIT_PAYLOAD_CLAIMS_CMD" CANON_KIT_PAYLOAD_CLAIMS_CMD)" || exit 2
538
+ while IFS=$'\t' read -r _sk_c _sk_r; do
539
+ [[ -n "$_sk_c" ]] || continue
540
+ CANON_KIT_PAYLOAD_CLAIM_IDS+=("$_sk_c")
541
+ CANON_KIT_PAYLOAD_CLAIM_PATTERNS+=("$_sk_r")
542
+ done <<<"$_sk_pc"
543
+ unset _sk_pc _sk_c _sk_r
544
+ fi
@@ -21,6 +21,7 @@ check-knob-default-coupling
21
21
  check-manifest-count
22
22
  check-manifest-temporal
23
23
  check-md-refs
24
+ check-measured-claim
24
25
  check-payload-claim
25
26
  check-prose-enum
26
27
  check-prose-tells
@@ -28,7 +28,10 @@
28
28
  — Consumer: the component that receives it, by what mechanism.
29
29
  — Every field has a named reader: for each field on a new message, the
30
30
  consumer that reads it and the transition where it is read (a field with
31
- no reader is removed). -->
31
+ no reader is removed).
32
+ — Narrowing a corpus? name each reader's RED CONDITION, not its subject:
33
+ only a monotone verdict is clearable by inspection (SPEC §The
34
+ causal-completeness check, point 5). -->
32
35
 
33
36
  ## Existing sections updated
34
37
 
@@ -30,6 +30,7 @@ hook approximation and the session-context template also expect
30
30
  ```
31
31
  check-brevity
32
32
  check-settings-pins
33
+ check-settings-paths
33
34
  check-memory-off
34
35
  check-footprint-fresh
35
36
  ```
@@ -41,7 +42,9 @@ hook approximation and the session-context template also expect
41
42
  The memory-off gates are inert until you opt in — `check-settings-pins`
42
43
  skips clean with no pins file, so create `settings-pins.conf` (one
43
44
  `<jq path> = <expected JSON>` per line) naming the keys to hold, e.g. the
44
- auto-memory-disabling ones. `check-footprint-fresh` byte-gates a committed
45
+ auto-memory-disabling ones. `check-settings-paths` needs no manifest: it
46
+ reads the same settings file and holds every allow-list grant naming a
47
+ literal `.sh` path against the tree. `check-footprint-fresh` byte-gates a committed
45
48
  `docs/footprint.md` against `bin/footprint.sh --emit`; register it when you
46
49
  publish that projection.
47
50