checkwright 0.20.0 → 0.22.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 (250) hide show
  1. package/README.md +385 -19
  2. package/lib/common/digest.sh +18 -0
  3. package/lib/common/lock.sh +11 -0
  4. package/lib/common/recipe.sh +8 -11
  5. package/lib/doctor.sh +49 -0
  6. package/lib/init.sh +152 -29
  7. package/package.json +2 -2
  8. package/payload/artifact/targets.list +30 -0
  9. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/canon-kit/README.md +1 -0
  12. package/payload/canon-kit/SPEC.md +281 -26
  13. package/payload/canon-kit/checks/check-comment-tier.sh +7 -2
  14. package/payload/canon-kit/checks/check-docs-link-convention.sh +11 -4
  15. package/payload/canon-kit/checks/check-md-refs.sh +22 -9
  16. package/payload/canon-kit/checks/check-payload-claim.sh +133 -0
  17. package/payload/canon-kit/checks/check-prose-enum.sh +1 -1
  18. package/payload/canon-kit/checks/check-spec-pointer.sh +15 -4
  19. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  20. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +26 -3
  21. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
  22. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  23. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
  24. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
  25. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
  26. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +5 -3
  27. package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
  28. package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
  29. package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
  30. package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
  31. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
  32. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
  33. package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
  34. package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
  35. package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
  36. package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
  37. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
  38. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
  39. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +24 -1
  40. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
  41. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
  42. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
  43. package/payload/canon-kit/lib/spec.sh +22 -12
  44. package/payload/canon-kit/smoke/install.sh +20 -1
  45. package/payload/canon-kit/templates/SPEC-amendment.md +5 -1
  46. package/payload/context-kit/SPEC.md +38 -7
  47. package/payload/context-kit/lib/toolfloor.sh +1 -1
  48. package/payload/context-kit/smoke/install.sh +3 -1
  49. package/payload/delegation-kit/README.md +2 -1
  50. package/payload/delegation-kit/SPEC.md +590 -48
  51. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
  52. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +61 -0
  53. package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -1
  54. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/silent.md +7 -0
  55. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/args +1 -0
  56. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/expect.txt +1 -0
  57. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-cheap.md +7 -0
  58. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-inherit.md +8 -0
  59. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/args +1 -0
  60. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/expect.txt +1 -0
  61. package/payload/delegation-kit/lib/delegation.sh +3 -0
  62. package/payload/delegation-kit/smoke/install.sh +3 -1
  63. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
  64. package/payload/delegation-kit/templates/agent-execution.md +171 -15
  65. package/payload/delegation-kit/templates/delegation-config.sh +4 -0
  66. package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
  67. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
  68. package/payload/doctrine-kit/DOCTRINE.md +27 -0
  69. package/payload/doctrine-kit/README.md +5 -0
  70. package/payload/doctrine-kit/SPEC.md +62 -3
  71. package/payload/doctrine-kit/bin/install-doctrine.sh +84 -4
  72. package/payload/doctrine-kit/smoke/install.sh +77 -1
  73. package/payload/drift-kit/README.md +3 -2
  74. package/payload/drift-kit/SPEC.md +253 -20
  75. package/payload/drift-kit/bin/stage-economics.sh +157 -3
  76. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
  77. package/payload/drift-kit/smoke/install.sh +155 -1
  78. package/payload/drift-kit/templates/economics.md +9 -0
  79. package/payload/drift-kit/templates/kpis.list +6 -1
  80. package/payload/evidence-kit/README.md +20 -6
  81. package/payload/evidence-kit/SPEC.md +355 -17
  82. package/payload/evidence-kit/bin/run-validate.sh +51 -9
  83. package/payload/evidence-kit/checks/check-battery-roster.sh +86 -0
  84. package/payload/evidence-kit/checks/check-producer-liveness.sh +34 -0
  85. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
  86. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  87. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
  88. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
  89. package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
  90. package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
  91. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
  92. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
  93. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
  94. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
  95. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
  96. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
  97. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
  98. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
  99. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
  100. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
  101. package/payload/evidence-kit/lib/evidence.sh +18 -0
  102. package/payload/evidence-kit/smoke/install.sh +17 -3
  103. package/payload/gate-sdk/README.md +4 -1
  104. package/payload/gate-sdk/SPEC.md +1955 -79
  105. package/payload/gate-sdk/bin/gen-pre-commit.sh +13 -3
  106. package/payload/gate-sdk/bin/run-consumer-smoke.sh +121 -1
  107. package/payload/gate-sdk/bin/run-gate-tests.sh +40 -9
  108. package/payload/gate-sdk/bin/run-gates.sh +32 -3
  109. package/payload/gate-sdk/bin/upgrade-smoke.sh +3 -3
  110. package/payload/gate-sdk/checks/check-action-gh-repo.gate +2 -0
  111. package/payload/gate-sdk/checks/check-action-pinning.gate +2 -0
  112. package/payload/gate-sdk/checks/check-action-run-shell.sh +3 -1
  113. package/payload/gate-sdk/checks/check-core-files.sh +27 -4
  114. package/payload/gate-sdk/checks/check-exec-bit.sh +20 -1
  115. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +106 -0
  116. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +6 -7
  117. package/payload/gate-sdk/checks/check-gate-output.sh +9 -1
  118. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +302 -0
  119. package/payload/gate-sdk/checks/check-graph.sh +7 -8
  120. package/payload/gate-sdk/checks/check-readme-roster.sh +5 -0
  121. package/payload/gate-sdk/checks/check-reads-couples.sh +73 -22
  122. package/payload/gate-sdk/checks/check-template-registry-parity.sh +81 -0
  123. package/payload/gate-sdk/checks/check-tree-terms.sh +11 -7
  124. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
  125. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
  126. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
  127. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
  128. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
  129. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
  130. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
  131. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
  132. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
  133. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
  134. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
  135. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
  136. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
  137. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
  138. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
  139. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
  140. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
  141. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
  142. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
  143. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
  144. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
  145. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
  146. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  147. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
  148. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
  149. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  150. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
  154. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
  155. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
  156. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
  157. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
  158. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
  159. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
  160. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
  161. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
  162. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
  163. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
  164. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
  165. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
  166. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
  167. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
  168. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
  169. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
  170. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
  171. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
  172. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
  173. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  174. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
  175. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
  176. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +123 -0
  177. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
  178. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
  179. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
  180. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
  181. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
  182. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
  183. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
  184. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
  185. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
  186. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
  187. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
  188. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
  189. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
  190. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
  191. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
  192. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
  193. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +41 -1
  194. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
  195. package/payload/gate-sdk/lib/consumer-smoke.sh +26 -1
  196. package/payload/gate-sdk/lib/gate.sh +104 -13
  197. package/payload/gate-sdk/lib/inject.sh +21 -1
  198. package/payload/gate-sdk/smoke/install.sh +19 -1
  199. package/payload/guard-kit/README.md +4 -3
  200. package/payload/guard-kit/SPEC.md +88 -10
  201. package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
  202. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
  203. package/payload/guard-kit/lib/guard.sh +1 -0
  204. package/payload/guard-kit/templates/close-triage.md +35 -7
  205. package/payload/guard-kit/templates/guard-config.sh +3 -0
  206. package/payload/lifecycle-kit/README.md +1 -0
  207. package/payload/lifecycle-kit/SPEC.md +589 -33
  208. package/payload/lifecycle-kit/bin/enter-stage.sh +13 -3
  209. package/payload/lifecycle-kit/bin/file-gap.sh +42 -1
  210. package/payload/lifecycle-kit/bin/file-survey.sh +50 -0
  211. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +1 -1
  212. package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
  213. package/payload/lifecycle-kit/checks/check-survey-record.sh +102 -0
  214. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
  215. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
  216. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +1 -0
  217. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
  218. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  219. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
  220. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
  221. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
  222. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
  223. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +84 -0
  224. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +94 -0
  225. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
  226. package/payload/lifecycle-kit/lib/stages.sh +8 -2
  227. package/payload/lifecycle-kit/smoke/install.sh +17 -1
  228. package/payload/lifecycle-kit/templates/consult.md +73 -0
  229. package/payload/lifecycle-kit/templates/lead.md +141 -10
  230. package/payload/lifecycle-kit/templates/stages/align.md +12 -0
  231. package/payload/lifecycle-kit/templates/stages/build.md +8 -0
  232. package/payload/lifecycle-kit/templates/stages/close.md +25 -4
  233. package/payload/lifecycle-kit/templates/stages/scope.md +34 -0
  234. package/payload/lifecycle-kit/templates/stages/spec.md +8 -0
  235. package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
  236. package/payload/queue-kit/README.md +4 -1
  237. package/payload/queue-kit/SPEC.md +230 -6
  238. package/payload/queue-kit/bin/queue-edges.sh +78 -0
  239. package/payload/queue-kit/checks/check-queue-entry-budget.sh +5 -3
  240. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
  241. package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
  242. package/payload/queue-kit/smoke/install.sh +4 -1
  243. package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
  244. package/payload/site-kit/SPEC.md +135 -29
  245. package/payload/site-kit/checks/check-docs-render-fidelity.sh +100 -27
  246. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +158 -0
  247. package/payload/site-kit/lib/site.sh +16 -2
  248. package/payload/site-kit/smoke/install.sh +9 -1
  249. package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
  250. package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
@@ -0,0 +1,133 @@
1
+ #!/usr/bin/env bash
2
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,SECURITY.md,docs/*.md,scripts/*.sh dir=one valve=none tier=precommit
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
4
+ #
5
+ # usage: check-payload-claim.sh [scan-root] (default '.')
6
+ # Scans the manifest set (lib/spec.sh) minus CANON_KIT_MDREF_EXCLUDE and
7
+ # CANON_KIT_PAYLOAD_CLAIM_EXCLUDE. Unconfigured claim vocabulary: no-op.
8
+ set -uo pipefail
9
+
10
+ KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
+ SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
12
+ # shellcheck source=../../gate-sdk/lib/gate.sh
13
+ source "$SDK/lib/gate.sh"
14
+ # shellcheck source=../lib/spec.sh
15
+ source "$KIT/lib/spec.sh"
16
+
17
+ ROOT="${1:-.}"
18
+ [[ -d "$ROOT" ]] || { echo "check-payload-claim: not a directory: $ROOT" >&2; exit 2; }
19
+
20
+ # spec: canon-kit/SPEC.md §check-payload-claim — the disclosure vocabulary is consumer config with no kit default, so an empty command is the clean skip for a tree whose payload discloses one thing only
21
+ if [[ -z "$CANON_KIT_PAYLOAD_CLAIMS_CMD" ]]; then
22
+ echo "PAYLOAD-CLAIM: clean (no disclosure vocabulary configured — nothing to hold)"
23
+ exit 0
24
+ fi
25
+
26
+ claims="$(spec_claim_vocabulary "$CANON_KIT_PAYLOAD_CLAIMS_CMD" CANON_KIT_PAYLOAD_CLAIMS_CMD)"; st=$?
27
+ fail_closed "$st" check-payload-claim "CANON_KIT_PAYLOAD_CLAIMS_CMD"
28
+ [[ -n "$claims" ]] || { echo "PAYLOAD-CLAIM: clean (CANON_KIT_PAYLOAD_CLAIMS_CMD declared no disclosure classes)"; exit 0; }
29
+
30
+ excluded() {
31
+ local rel="$1" g
32
+ for g in "${CANON_KIT_MDREF_EXCLUDE[@]+"${CANON_KIT_MDREF_EXCLUDE[@]}"}" \
33
+ "${CANON_KIT_PAYLOAD_CLAIM_EXCLUDE[@]+"${CANON_KIT_PAYLOAD_CLAIM_EXCLUDE[@]}"}"; do
34
+ # shellcheck disable=SC2053 # $g is the exclude glob, matched unquoted on purpose
35
+ [[ "$rel" == $g ]] && return 0
36
+ done
37
+ return 1
38
+ }
39
+
40
+ files=()
41
+ while IFS= read -r f; do
42
+ rel="${f#./}"; rel="${rel#"$ROOT"/}"
43
+ excluded "$rel" || files+=("$f")
44
+ done < <(spec_manifest_files "$ROOT" | sort -u)
45
+ [[ ${#files[@]} -eq 0 ]] && { echo "PAYLOAD-CLAIM: clean (0 governed doc(s) found)"; exit 0; }
46
+
47
+ DECL_RE='^[[:space:]]*<!--[[:space:]]*payload-discloses:[[:space:]]*([a-z0-9][a-z0-9-]*)[[:space:]]*-->[[:space:]]*$'
48
+
49
+ decls="$(grep -nE "$DECL_RE" -- "${files[@]}" /dev/null)"; st=$?
50
+ [[ $st -le 1 ]] || { echo "check-payload-claim: grep failed scanning the governed doc set" >&2; exit 2; }
51
+
52
+ ndecl=0
53
+ [[ -n "$decls" ]] && ndecl="$(printf '%s\n' "$decls" | wc -l)"
54
+
55
+ # assertion A: exactly one governed doc declares the disclosure class
56
+ if [[ "$ndecl" -eq 0 ]]; then
57
+ echo "check-payload-claim: no governed doc declares what the vendored payload discloses:"
58
+ echo " 0 'payload-discloses:' declarations across ${#files[@]} governed doc(s)"
59
+ echo " help: an unowned disclosure claim is how an unbounded number of surfaces drift into"
60
+ echo " promising the consumer something else, with nothing watching. Put one full-line"
61
+ echo " '<!-- payload-discloses: <claim-id> -->' in the section that rules the fact,"
62
+ echo " naming a class CANON_KIT_PAYLOAD_CLAIMS_CMD emits."
63
+ exit 1
64
+ fi
65
+ if [[ "$ndecl" -gt 1 ]]; then
66
+ echo "check-payload-claim: the payload-disclosure claim has $ndecl owners; exactly one is required:"
67
+ printf '%s\n' "$decls" | sed 's/^/ /'
68
+ echo " help: keep the declaration in the section that rules the fact and delete the others;"
69
+ echo " two owners is the same unowned-claim defect wearing a different shape."
70
+ exit 1
71
+ fi
72
+
73
+ decl_site="${decls%%:*}"
74
+ decl_line="$(printf '%s\n' "$decls" | cut -d: -f2)"
75
+ declared="$(printf '%s\n' "$decls" | sed -E "s/.*payload-discloses:[[:space:]]*([a-z0-9][a-z0-9-]*).*/\1/")"
76
+
77
+ # spec: canon-kit/SPEC.md §check-payload-claim — an id outside the configured vocabulary is fail-closed, not a violation: with no resolvable declared class the gate holds nothing to compare a line against, so it must not run rather than pass
78
+ if ! printf '%s\n' "$claims" | cut -f1 | grep -qxF -- "$declared"; then
79
+ echo "check-payload-claim: declared class '$declared' ($decl_site:$decl_line) is not a configured disclosure class:" >&2
80
+ printf '%s\n' "$claims" | cut -f1 | sed 's/^/ /' >&2
81
+ exit 2
82
+ fi
83
+
84
+ export SK_CLAIMS="$claims"
85
+ export SK_DECLARED="$declared"
86
+ export SK_DECL_RE="$DECL_RE"
87
+
88
+ # assertion B: no scanned line asserts a disclosure class other than the declared one
89
+ # spec: canon-kit/SPEC.md §check-payload-claim — membership over the whole document rather than position inside a section: a non-declared class is wrong wherever it appears. Fenced content is scanned, because a quoted recipe is exactly where a disclosure claim shows up in passing; the declaration line is skipped, since a claim is not evidence for itself.
90
+ read -r -d '' AWKSRC <<'AWK' || true
91
+ BEGIN {
92
+ n = split(ENVIRON["SK_CLAIMS"], cl, "\n")
93
+ for (i = 1; i <= n; i++) {
94
+ if (cl[i] == "") continue
95
+ tp = index(cl[i], "\t")
96
+ cid = substr(cl[i], 1, tp - 1)
97
+ if (cid == ENVIRON["SK_DECLARED"]) continue
98
+ nc++
99
+ oid[nc] = cid
100
+ ore[nc] = substr(cl[i], tp + 1)
101
+ }
102
+ declre = ENVIRON["SK_DECL_RE"]
103
+ }
104
+ {
105
+ if ($0 ~ declre) next
106
+ for (i = 1; i <= nc; i++) {
107
+ if ($0 !~ ore[i]) continue
108
+ printf " %s:%d: asserts '%s', not the declared '%s'\n", \
109
+ FILENAME, FNR, oid[i], ENVIRON["SK_DECLARED"]
110
+ break
111
+ }
112
+ }
113
+ END { printf "%d other class(es) held\n", nc }
114
+ AWK
115
+
116
+ out="$(awk "$AWKSRC" "${files[@]}")"; st=$?
117
+ fail_closed "$st" check-payload-claim awk
118
+
119
+ findings="$(printf '%s\n' "$out" | grep '^ ' || true)"
120
+ held="$(printf '%s\n' "$out" | tail -n1)"
121
+
122
+ if [[ -n "$findings" ]]; then
123
+ echo "check-payload-claim: a governed doc asserts a disclosure class the declared claim does not name:"
124
+ printf '%s\n' "$findings"
125
+ echo " help: correct the sentence to the declared class, or move the declaration"
126
+ echo " ($decl_site:$decl_line) to the class the payload actually discloses."
127
+ echo " The declared class is what the payload ships; every other class is wrong"
128
+ echo " wherever it appears, whichever section it sits in."
129
+ exit 1
130
+ fi
131
+
132
+ echo "PAYLOAD-CLAIM: clean (${#files[@]} governed doc(s), $held; '$declared' declared at $decl_site:$decl_line, and no scanned line asserts another class)"
133
+ exit 0
@@ -51,7 +51,7 @@ function _sk_present(low, m, lm, start, idx, pp, bc, ac) {
51
51
  pp = start + idx - 1
52
52
  bc = (pp > 1) ? substr(low, pp - 1, 1) : " "
53
53
  ac = (pp + lm <= length(low)) ? substr(low, pp + lm, 1) : " "
54
- if (bc !~ /[[:alnum:]-]/ && ac !~ /[[:alnum:]-]/) return pp
54
+ if (bc !~ /[[:alnum:]_-]/ && ac !~ /[[:alnum:]_-]/) return pp
55
55
  start = pp + 1
56
56
  }
57
57
  }
@@ -99,9 +99,14 @@ FNR == 1 { flush(); fence = 0 }
99
99
  END { flush() }
100
100
  AWK
101
101
 
102
+ # spec: canon-kit/SPEC.md §check-spec-pointer — the tracked-file membership set, filled once from a single git ls-files pass rather than a per-pointer `git ls-files --error-unmatch` exec
103
+ declare -A TRACKED=()
104
+ while IFS= read -r -d '' _tf; do TRACKED["$_tf"]=1; done < <(git -C "$ROOT" ls-files -z)
105
+
102
106
  errors=()
103
107
  scanned=0
104
108
  pointers=0
109
+ markers=0
105
110
  while IFS= read -r f; do
106
111
  [[ -n "$f" ]] || continue
107
112
  rel="${f#"$ROOT"/}"; rel="${rel#./}"
@@ -111,8 +116,14 @@ while IFS= read -r f; do
111
116
  fail_closed "$st" SPEC-POINTER "awk extract ($rel)"
112
117
  while IFS=$'\t' read -r _file lineno body; do
113
118
  [[ -n "$body" ]] || continue
114
- pointers=$((pointers + 1))
115
119
  if [[ "$body" == spec:* ]]; then after="${body#spec:}"; else after="${body#contract:}"; fi
120
+ # spec: gate-sdk/SPEC.md §The workflow directory — contract: rules two payloads, and the version-marker form is a wire-format version its owning gate parses rather than a doc pointer, so it names no path to resolve
121
+ payload="${after#"${after%%[![:space:]]*}"}"; payload="${payload%"${payload##*[![:space:]]}"}"
122
+ if [[ "$body" == contract:* && "$payload" =~ ^[a-z0-9-]+\ v[0-9]+$ ]]; then
123
+ markers=$((markers + 1))
124
+ continue
125
+ fi
126
+ pointers=$((pointers + 1))
116
127
  # comment-tier-exempt: a § inside the em-dash prose tail is not a heading marker
117
128
  sig="${after%% — *}"; sig="${sig%% -- *}"
118
129
  read -r path prest <<< "$sig"
@@ -133,7 +144,7 @@ while IFS= read -r f; do
133
144
  errors+=("$rel:$lineno: target file not found: $path")
134
145
  continue
135
146
  fi
136
- if ! git -C "$ROOT" ls-files --error-unmatch -- "$path" >/dev/null 2>&1; then
147
+ if [[ -z "${TRACKED[$path]:-}" ]]; then
137
148
  errors+=("$rel:$lineno: target file untracked: $path")
138
149
  continue
139
150
  fi
@@ -156,7 +167,7 @@ if [[ ${#manifest_files[@]} -gt 0 ]]; then
156
167
  while IFS=$'\t' read -r pfile plineno ppath pfrag; do
157
168
  [[ -n "$ppath" ]] || continue
158
169
  [[ -f "$ROOT/$ppath" ]] || continue
159
- git -C "$ROOT" ls-files --error-unmatch -- "$ppath" >/dev/null 2>&1 || continue
170
+ [[ -n "${TRACKED[$ppath]:-}" ]] || continue
160
171
  prose_cites=$((prose_cites + 1))
161
172
  [[ -n "$pfrag" ]] || continue
162
173
  if ! heading_present "$ROOT/$ppath" "$pfrag" prefix; then
@@ -172,5 +183,5 @@ if [[ ${#errors[@]} -gt 0 ]]; then
172
183
  echo " help: a spec:/contract: directive and a free-prose <path>.md §<heading> citation each bind a site to the requirement that governs it — the binding is only live if it resolves. Fix the <path> (repo-relative, tracked) or the §<heading> to name the current target, or drop the § fragment for a file-only pointer. A renamed heading updates every inbound pointer and citation in the same commit."
173
184
  exit 1
174
185
  fi
175
- echo "SPEC-POINTER: clean ($pointers directive pointer(s) across $scanned governed source(s); $prose_cites prose citation(s) across $manifests manifest file(s); every target file tracked and named §heading present)"
186
+ echo "SPEC-POINTER: clean ($pointers directive pointer(s) across $scanned governed source(s), $markers version-marker header(s) skipped as naming no path; $prose_cites prose citation(s) across $manifests manifest file(s); every target file tracked and named §heading present)"
176
187
  exit 0
@@ -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.
@@ -10,8 +10,9 @@
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
@@ -94,6 +95,26 @@ cat >"$SANDBOX/tmpl-bad/templates/narration.sh" <<'EOF'
94
95
  #YOUR_KIT_KNOB=default
95
96
  EOF
96
97
 
98
+ # A workflow-dir markdown member whose records are '## ' blocks: the headings are
99
+ # the surface's own block grammar and must not be read as untagged comments, while
100
+ # a single-'#' line on the same member stays governed by the restricted roster.
101
+ mkdir -p "$SANDBOX/wf-good/.workflow" "$SANDBOX/wf-bad/.workflow"
102
+ cat >"$SANDBOX/wf-good/.workflow/record.md" <<'EOF'
103
+ # contract: some/SPEC.md §record — the md roster blesses this header
104
+
105
+ ## 2026-01-02 scope — a block heading is structure, not a comment
106
+ - corpus: checks/
107
+ - finding: carried across the stage boundary
108
+ EOF
109
+ cat >"$SANDBOX/wf-bad/.workflow/record.md" <<'EOF'
110
+ # contract: some/SPEC.md §record — the md roster blesses this header
111
+
112
+ ## 2026-01-02 scope — a block heading is structure, not a comment
113
+ - corpus: checks/
114
+ # this single-hash line on the md member is still an untagged comment
115
+ EOF
116
+ mkcfg "$SANDBOX/wfmd.sh" 'CANON_KIT_COMMENT_SURFACE=(.workflow/record.md)'
117
+
97
118
  check_case() { # $1=label $2=cfg $3=want-rc $4=want-substring $5=root(default SANDBOX)
98
119
  local label="$1" cfg="$2" want="$3" sub="$4" root="${5:-$SANDBOX}" out rc
99
120
  out="$(env CANON_KIT_CONFIG_FILE="$SANDBOX/$cfg" "$GATE" "$root" 2>&1)"; rc=$?
@@ -113,6 +134,8 @@ check_case "templates-thinned-ok" derived.sh 0 "COMMENT-TIER: clean" "
113
134
  check_case "templates-narration-red" derived.sh 1 "the tier gate scans templates" "$SANDBOX/tmpl-bad"
114
135
  check_case "count-exempt-valve" exempt-cfg.sh 0 "COMMENT-TIER: clean"
115
136
  check_case "count-survives-positional-rescue" pos-cfg.sh 1 "restated collection total: six gates"
137
+ check_case "workflow-md-headings-are-structure" wfmd.sh 0 "COMMENT-TIER: clean" "$SANDBOX/wf-good"
138
+ check_case "workflow-md-single-hash-governed" wfmd.sh 1 "still an untagged comment" "$SANDBOX/wf-bad"
116
139
 
117
140
  # The bad fixture's expect.txt asserts the count override, so the window-spill
118
141
  # half of the pair keeps its assertion here.
@@ -142,5 +165,5 @@ if [[ "$fails" -gt 0 ]]; then
142
165
  echo "check-comment-tier.test.sh: $fails case(s) failed"
143
166
  exit 1
144
167
  fi
145
- echo "check-comment-tier.test.sh: clean (slash surface + positional rescue + txt restricted roster + templates/ governance + count override edges + paragraph-join wrap)"
168
+ 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
169
  exit 0
@@ -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
@@ -7,9 +7,11 @@
7
7
  # fixture. The good/bad pair covers the cardinal+noun shapes (adjacent, wedged,
8
8
  # noun-then-range, wrapped) and the mechanical exemptions (threshold, per,
9
9
  # partition, partitive, inline-code, fence, per-site marker); these cases cover
10
- # the knobs, plus the paragraph-join edges the pair's expect.txt substring
11
- # cannot pin: which physical line a wrapped span reports at, that the join never
12
- # double-reports a same-line hit, and that a paragraph break blocks the join.
10
+ # the knobs, plus the paragraph-join edges. Two reasons hold those here, and
11
+ # neither is expect.txt's old single-substring limit (lines are a conjunction
12
+ # now): they need their own scan root, which run-gate-tests gives no fixture
13
+ # beyond the one pair, and "the join never double-reports a same-line hit" is a
14
+ # negative — expect.txt asserts presence only, so absence has no pair spelling.
13
15
  #
14
16
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
15
17
  set -uo pipefail
@@ -0,0 +1,15 @@
1
+ # widget
2
+
3
+ The section that rules what a widget gate puts in front of the consumer it
4
+ judges, and the one owner of that claim.
5
+
6
+ ## Consumer payload
7
+
8
+ A gate whose rule is compiled reaches you as its declaration, the specification
9
+ section behind it, its fixture pair, and a prebuilt binary checked against a
10
+ published digest before it is written. Its implementation source does not ship.
11
+
12
+ <!-- payload-discloses: predicate-withheld -->
13
+
14
+ The marker above is the machine tier of the sentence beside it. The claim is
15
+ raised cost of analysis relative to running, never secrecy.
@@ -0,0 +1,2 @@
1
+ install.md:15: asserts 'all-source', not the declared 'predicate-withheld'
2
+ help:
@@ -0,0 +1,19 @@
1
+ # Install widget
2
+
3
+ The kit directories live in your repository as committed source, and a gate
4
+ whose implementation is compiled arrives as a binary instead — the near miss
5
+ this case pins, since a sentence about what the vendoring model copies stays
6
+ true and must not match the overclaiming class.
7
+
8
+ Two more near misses, both silent: alongside readable source the fixture pair
9
+ was a convenience, and there is a difference between vendored source that is
10
+ merely committed and vendored source that is auditable.
11
+
12
+ ## Quick start
13
+
14
+ Download, verify, extract, run. One command, and what governs your tree
15
+ afterwards is committed source you can read.
16
+
17
+ ```bash
18
+ tar -xzf widget.tgz && bash package/bin/widget.sh init
19
+ ```
@@ -0,0 +1,6 @@
1
+ # widget vX.Y.Z
2
+
3
+ A published dated note, immutable by nature: it states what was true when it was
4
+ published, and what was true then is that what governs your tree afterwards is
5
+ committed source you can read. The path valve is what keeps that out of the
6
+ scanned set — without it this line alone would red the case.
@@ -0,0 +1,8 @@
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture consumer config: two disclosure classes and the published-notes valve the pair proves is load-bearing
3
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
4
+ CANON_KIT_MANIFEST_FILES=("*.md" "posts/*.md")
5
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
6
+ CANON_KIT_PAYLOAD_CLAIMS_CMD="bash scripts/payload-claims.sh"
7
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
8
+ CANON_KIT_PAYLOAD_CLAIM_EXCLUDE=("posts/*")
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture disclosure vocabulary: one pattern per class, each recognizing its own class's phrasings without reaching into a sentence about what the vendoring model copies
3
+ set -uo pipefail
4
+
5
+ printf '%s\t%s\n' \
6
+ predicate-withheld 'implementation source does not ship|verified against a published digest' \
7
+ all-source 'you read (before|all of it)|(source|copy) you can read'
@@ -0,0 +1,15 @@
1
+ # widget
2
+
3
+ The section that rules what a widget gate puts in front of the consumer it
4
+ judges, and the one owner of that claim.
5
+
6
+ ## Consumer payload
7
+
8
+ A gate whose rule is compiled reaches you as its declaration, the specification
9
+ section behind it, its fixture pair, and a prebuilt binary checked against a
10
+ published digest before it is written. Its implementation source does not ship.
11
+
12
+ <!-- payload-discloses: predicate-withheld -->
13
+
14
+ The marker above is the machine tier of the sentence beside it. The claim is
15
+ raised cost of analysis relative to running, never secrecy.
@@ -0,0 +1,2 @@
1
+ PAYLOAD-CLAIM: clean
2
+ 'predicate-withheld' declared at
@@ -0,0 +1,20 @@
1
+ # Install widget
2
+
3
+ The kit directories live in your repository as committed source, and a gate
4
+ whose implementation is compiled arrives as a binary instead — the near miss
5
+ this case pins, since a sentence about what the vendoring model copies stays
6
+ true and must not match the overclaiming class.
7
+
8
+ Two more near misses, both silent: alongside readable source the fixture pair
9
+ was a convenience, and there is a difference between vendored source that is
10
+ merely committed and vendored source that is auditable.
11
+
12
+ ## Quick start
13
+
14
+ Download, verify, extract, run. Every artifact written to your tree is verified
15
+ against a published digest first, and what governs your tree afterwards is
16
+ committed and auditable on the terms §Consumer payload sets.
17
+
18
+ ```bash
19
+ tar -xzf widget.tgz && bash package/bin/widget.sh init
20
+ ```
@@ -0,0 +1,6 @@
1
+ # widget vX.Y.Z
2
+
3
+ A published dated note, immutable by nature: it states what was true when it was
4
+ published, and what was true then is that what governs your tree afterwards is
5
+ committed source you can read. The path valve is what keeps that out of the
6
+ scanned set — without it this line alone would red the case.
@@ -0,0 +1,8 @@
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture consumer config: two disclosure classes and the published-notes valve the pair proves is load-bearing
3
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
4
+ CANON_KIT_MANIFEST_FILES=("*.md" "posts/*.md")
5
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
6
+ CANON_KIT_PAYLOAD_CLAIMS_CMD="bash scripts/payload-claims.sh"
7
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
8
+ CANON_KIT_PAYLOAD_CLAIM_EXCLUDE=("posts/*")
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture disclosure vocabulary: one pattern per class, each recognizing its own class's phrasings without reaching into a sentence about what the vendoring model copies
3
+ set -uo pipefail
4
+
5
+ printf '%s\t%s\n' \
6
+ predicate-withheld 'implementation source does not ship|verified against a published digest' \
7
+ all-source 'you read (before|all of it)|(source|copy) you can read'
@@ -119,9 +119,32 @@ The fast pair alpha/beta short-circuits.
119
119
  EOF
120
120
  check_case "per-site-exempt-escape" 0 "PROSE-ENUM: clean" CANON_KIT_CONFIG_FILE="$SANDBOX/three.sh"
121
121
 
122
+ # The identifier boundary: an underscore separates two names, so a member must
123
+ # not read as present inside a longer sibling. Only a declared set can hold
124
+ # underscore members, so the pair — which runs on the repo's own hyphenated
125
+ # config — cannot reach this at all.
126
+ cat >"$SANDBOX/guards.sh" <<'EOF'
127
+ CANON_KIT_ENUM_SETS_CMD='printf "guard\tguard_allow\nguard\tguard_allow_match\nguard\tguard_deny\n"'
128
+ EOF
129
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
130
+ # prefix sibling
131
+
132
+ The guard_allow_match, guard_deny pair covers the whole surface.
133
+ EOF
134
+ check_case "prefix-sibling-trips" 1 "but omits: guard_allow" CANON_KIT_CONFIG_FILE="$SANDBOX/guards.sh"
135
+
136
+ # The mirror: spelled in its own right the member is present, so the boundary is
137
+ # a boundary and not a blanket non-match.
138
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
139
+ # prefix sibling complete
140
+
141
+ The guard_allow, guard_allow_match, guard_deny trio is the whole surface.
142
+ EOF
143
+ check_case "prefix-sibling-complete-clean" 0 "PROSE-ENUM: clean" CANON_KIT_CONFIG_FILE="$SANDBOX/guards.sh"
144
+
122
145
  if [[ "$fails" -gt 0 ]]; then
123
146
  echo "check-prose-enum.test.sh: $fails case(s) failed"
124
147
  exit 1
125
148
  fi
126
- echo "check-prose-enum.test.sh: clean (empty-skip + fail-closed error/parse + bracketed match + scattered non-engage + multiset independence + subset/partitive/per-site escapes)"
149
+ echo "check-prose-enum.test.sh: clean (empty-skip + fail-closed error/parse + bracketed match + scattered non-engage + multiset independence + subset/partitive/per-site escapes + identifier boundary)"
127
150
  exit 0
@@ -1 +1,2 @@
1
1
  §heading not found in SPEC-target.md
2
+ target file not found: widget-manifest
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=X dir=one valve=none tier=precommit
3
3
  # spec: SPEC-widget.md §The missing contract — points at a heading the file lacks
4
+ # spec: widget-manifest v2 — the version-marker payload is a contract: form only, so a spec: directive wearing its shape still resolves as a path
4
5
  set -uo pipefail
5
6
  echo hi
@@ -2,5 +2,6 @@
2
2
  # graph: couples=X dir=one valve=none tier=precommit
3
3
  # spec: SPEC-widget.md §The widget contract — a live pointer: file tracked, heading present
4
4
  # contract: SPEC-widget.md — a file-only pointer resolves without a § fragment
5
+ # contract: widget-manifest v1
5
6
  set -uo pipefail
6
7
  echo hi