checkwright 0.23.0 → 0.25.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 (375) hide show
  1. package/README.md +175 -13
  2. package/lib/common/lock.sh +7 -0
  3. package/lib/common/recipe.sh +1 -1
  4. package/lib/diff.sh +2 -0
  5. package/lib/init.sh +40 -16
  6. package/lib/uninstall.sh +2 -0
  7. package/package.json +2 -2
  8. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  9. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  10. package/payload/canon-kit/README.md +2 -0
  11. package/payload/canon-kit/SPEC.md +454 -28
  12. package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
  13. package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
  14. package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
  15. package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
  16. package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
  17. package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
  18. package/payload/canon-kit/checks/check-unmarked-claim.gate +3 -0
  19. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
  20. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
  21. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
  22. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
  23. package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
  24. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
  25. package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
  26. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
  27. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
  28. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  29. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  30. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
  31. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
  32. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
  33. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
  34. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
  35. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
  36. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
  37. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
  38. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +11 -0
  39. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +3 -0
  40. package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +6 -0
  41. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +18 -0
  42. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
  43. package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +6 -0
  44. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +85 -0
  45. package/payload/canon-kit/lib/spec.sh +16 -0
  46. package/payload/canon-kit/smoke/install.sh +3 -1
  47. package/payload/canon-kit/templates/SPEC-amendment.md +17 -2
  48. package/payload/context-kit/README.md +6 -4
  49. package/payload/context-kit/SPEC.md +256 -76
  50. package/payload/context-kit/bin/always-loaded.sh +5 -21
  51. package/payload/context-kit/bin/env-probe.sh +2 -17
  52. package/payload/context-kit/checks/check-brevity.gate +3 -0
  53. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
  54. package/payload/context-kit/checks/check-memory-off.gate +3 -0
  55. package/payload/context-kit/checks/check-settings-paths.gate +3 -0
  56. package/payload/context-kit/checks/check-settings-pins.gate +3 -0
  57. package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
  58. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
  59. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
  60. package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
  61. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
  62. package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
  63. package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
  64. package/payload/context-kit/lib/context.sh +56 -0
  65. package/payload/context-kit/lib/toolfloor.sh +1 -1
  66. package/payload/context-kit/smoke/agents-md.sh +16 -4
  67. package/payload/context-kit/smoke/install.sh +3 -2
  68. package/payload/context-kit/templates/session-context.sh +5 -5
  69. package/payload/delegation-kit/README.md +11 -1
  70. package/payload/delegation-kit/SPEC.md +652 -11
  71. package/payload/delegation-kit/bin/wait-probe.sh +184 -0
  72. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
  73. package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
  74. package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
  75. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
  76. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
  77. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
  78. package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +99 -0
  79. package/payload/delegation-kit/smoke/install.sh +21 -1
  80. package/payload/delegation-kit/templates/agent-execution.md +88 -4
  81. package/payload/delegation-kit/templates/subagent-stop-liveness.sh +56 -0
  82. package/payload/doctrine-kit/SPEC.md +1 -1
  83. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
  84. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
  85. package/payload/doctrine-kit/smoke/install.sh +17 -4
  86. package/payload/drift-kit/README.md +2 -2
  87. package/payload/drift-kit/SPEC.md +71 -7
  88. package/payload/drift-kit/bin/stage-economics.sh +1 -1
  89. package/payload/drift-kit/lib/drift.sh +43 -0
  90. package/payload/drift-kit/smoke/install.sh +21 -14
  91. package/payload/evidence-kit/README.md +3 -1
  92. package/payload/evidence-kit/SPEC.md +160 -19
  93. package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
  94. package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
  95. package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
  96. package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
  97. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
  98. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
  99. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
  100. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
  101. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
  102. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
  103. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
  104. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
  105. package/payload/evidence-kit/lib/evidence.sh +2 -0
  106. package/payload/evidence-kit/smoke/install.sh +1 -1
  107. package/payload/gate-sdk/README.md +17 -9
  108. package/payload/gate-sdk/SPEC.md +4680 -295
  109. package/payload/gate-sdk/bin/build-native.sh +66 -1
  110. package/payload/gate-sdk/bin/install-hooks.sh +14 -2
  111. package/payload/gate-sdk/bin/port-blockers.sh +37 -9
  112. package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
  113. package/payload/gate-sdk/bin/run-gates.sh +137 -13
  114. package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
  115. package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -1
  116. package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
  117. package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
  118. package/payload/gate-sdk/checks/check-core-files.gate +3 -0
  119. package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
  120. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
  121. package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
  122. package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
  123. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
  124. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
  125. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
  126. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
  127. package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
  128. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +132 -15
  129. package/payload/gate-sdk/checks/check-graph.gate +3 -0
  130. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
  131. package/payload/gate-sdk/checks/check-identity.gate +3 -0
  132. package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
  133. package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
  134. package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
  135. package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
  136. package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
  137. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  138. package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
  139. package/payload/gate-sdk/checks/check-tree-terms.gate +3 -0
  140. package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
  141. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
  142. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
  143. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
  144. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
  145. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
  146. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
  147. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
  148. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
  149. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
  150. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  154. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +27 -0
  155. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
  156. package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
  157. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
  158. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
  159. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
  160. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
  161. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
  162. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
  163. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
  164. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
  165. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
  166. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
  167. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
  168. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
  169. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
  170. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
  171. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
  172. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +9 -0
  173. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
  174. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
  175. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
  176. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
  177. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
  178. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
  179. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
  180. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
  181. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
  182. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
  183. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  184. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
  185. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
  186. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +5 -0
  187. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
  188. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
  189. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
  190. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
  191. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
  192. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
  193. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
  194. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
  195. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
  196. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
  197. package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
  198. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
  199. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
  200. package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
  201. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
  202. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
  203. package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
  204. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
  205. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
  206. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
  207. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  208. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
  209. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
  210. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
  211. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
  212. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
  213. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
  214. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
  215. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
  216. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
  217. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
  218. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
  219. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
  220. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
  221. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
  222. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
  223. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
  224. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
  225. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +5 -0
  226. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
  227. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
  228. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  229. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
  230. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +4 -0
  231. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
  232. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
  233. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
  234. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +94 -0
  235. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
  236. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
  237. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
  238. package/payload/gate-sdk/lib/gate.sh +232 -25
  239. package/payload/gate-sdk/smoke/install.sh +28 -1
  240. package/payload/guard-kit/README.md +4 -3
  241. package/payload/guard-kit/SPEC.md +578 -47
  242. package/payload/guard-kit/bin/compare-settings-allow.sh +36 -12
  243. package/payload/guard-kit/bin/run-guard-tests.sh +27 -4
  244. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +46 -1
  245. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
  246. package/payload/guard-kit/guard-tests/background-cases.tsv +14 -0
  247. package/payload/guard-kit/guard-tests/cases.tsv +67 -9
  248. package/payload/guard-kit/lib/guard.sh +361 -18
  249. package/payload/guard-kit/templates/bash-guard.sh +2 -0
  250. package/payload/guard-kit/templates/close-triage.md +10 -3
  251. package/payload/guard-kit/templates/guard-config.sh +3 -0
  252. package/payload/lifecycle-kit/README.md +3 -2
  253. package/payload/lifecycle-kit/SPEC.md +509 -77
  254. package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
  255. package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
  256. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
  257. package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
  258. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
  259. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
  260. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
  261. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
  262. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
  263. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
  264. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
  265. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
  266. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
  267. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
  268. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
  269. package/payload/lifecycle-kit/lib/stages.sh +5 -0
  270. package/payload/lifecycle-kit/smoke/install.sh +29 -15
  271. package/payload/lifecycle-kit/templates/lead.md +32 -0
  272. package/payload/lifecycle-kit/templates/stages/align.md +20 -2
  273. package/payload/lifecycle-kit/templates/stages/build.md +3 -3
  274. package/payload/lifecycle-kit/templates/stages/close.md +20 -6
  275. package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
  276. package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
  277. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  278. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
  279. package/payload/queue-kit/README.md +10 -10
  280. package/payload/queue-kit/SPEC.md +379 -84
  281. package/payload/queue-kit/bin/queue-counts.sh +1 -1
  282. package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
  283. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
  284. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
  285. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
  286. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
  287. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
  288. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
  289. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
  290. package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
  291. package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
  292. package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
  293. package/payload/queue-kit/lib/queue.sh +0 -49
  294. package/payload/queue-kit/smoke/install.sh +1 -1
  295. package/payload/site-kit/SPEC.md +41 -2
  296. package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
  297. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  298. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
  299. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
  300. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
  301. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
  302. package/payload/site-kit/smoke/install.sh +1 -1
  303. package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
  304. package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
  305. package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
  306. package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
  307. package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
  308. package/payload/context-kit/bin/footprint.sh +0 -144
  309. package/payload/context-kit/checks/check-brevity.sh +0 -124
  310. package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
  311. package/payload/context-kit/checks/check-memory-off.sh +0 -113
  312. package/payload/context-kit/checks/check-settings-paths.sh +0 -94
  313. package/payload/context-kit/checks/check-settings-pins.sh +0 -111
  314. package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
  315. package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
  316. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
  317. package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
  318. package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
  319. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
  320. package/payload/drift-kit/bin/trajectory.sh +0 -242
  321. package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
  322. package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
  323. package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
  324. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
  325. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
  326. package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
  327. package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
  328. package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
  329. package/payload/gate-sdk/checks/check-core-files.sh +0 -76
  330. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
  331. package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
  332. package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -148
  333. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
  334. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
  335. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
  336. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
  337. package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
  338. package/payload/gate-sdk/checks/check-graph.sh +0 -632
  339. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
  340. package/payload/gate-sdk/checks/check-identity.sh +0 -135
  341. package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
  342. package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
  343. package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
  344. package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
  345. package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
  346. package/payload/gate-sdk/checks/check-tree-terms.sh +0 -66
  347. package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
  348. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
  349. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
  350. package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
  351. package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
  352. package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
  353. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
  354. package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
  355. package/payload/queue-kit/bin/queue-index.sh +0 -182
  356. package/payload/queue-kit/bin/roadmap.sh +0 -76
  357. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
  358. package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
  359. package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
  360. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
  361. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
  362. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
  363. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  364. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  365. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
  366. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
  367. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  368. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  369. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
  370. /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
  371. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
  372. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
  373. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
  374. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
  375. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env bash
2
+ # The `gh-account` kind's graded absence postures, which the good/bad pair cannot
3
+ # express: the pair fixes the match/mismatch axis, and this holds the three
4
+ # verdicts gate-sdk/SPEC.md §check-identity grades an absent, unreadable or
5
+ # host-block-less CLI config into — plus the `users`/`user` key collision, whose
6
+ # whole point is that a wrong implementation still passes the pair.
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]}")/../lib/test-hermetic.sh"
11
+
12
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
13
+ SANDBOX="$(mktemp -d)"
14
+ trap 'chmod -R u+rwX "$SANDBOX" 2>/dev/null; rm -rf "$SANDBOX"' EXIT
15
+
16
+ fails=0
17
+
18
+ printf 'dev@example.com\n' >"$SANDBOX/git-config-email"
19
+ printf 'origin git@github.com:example/example.git\n' >"$SANDBOX/git-remotes"
20
+
21
+ check_case() { # $1=label $2=want-rc $3=want-substring $4=hosts-file path $5=manifest body
22
+ local label="$1" want="$2" sub="$3" hosts="$4" body="$5"
23
+ printf '%s\n' "$body" >"$SANDBOX/identity.conf"
24
+ local out rc
25
+ # spec: gate-sdk/SPEC.md §check-identity — the knobs are the ported member's only
26
+ # redirection, so a case sets them where it used to pass `--fixture <dir>`
27
+ out="$(
28
+ gate_env \
29
+ GATE_SDK_IDENTITY_FILE="$SANDBOX/identity.conf" \
30
+ GATE_SDK_GIT_EMAIL_FILE="$SANDBOX/git-config-email" \
31
+ GATE_SDK_GIT_REMOTES_FILE="$SANDBOX/git-remotes" \
32
+ GATE_SDK_GH_HOSTS_FILE="$hosts" \
33
+ GATE_SDK_GH_HOST="host.example"
34
+ gate_run check-identity "$DIR/checks" 2>&1
35
+ )"; rc=$?
36
+ if [[ "$rc" -ne "$want" ]]; then
37
+ echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
38
+ fi
39
+ if [[ -n "$sub" ]] && ! grep -qF -- "$sub" <<<"$out"; then
40
+ echo " FAIL [$label]: exit $rc OK but output lacks '$sub':"; printf ' %s\n' "$out"
41
+ fails=$((fails + 1))
42
+ fi
43
+ }
44
+
45
+ # The whole manifest, so the two established kinds stay clean and the account
46
+ # kind is the only axis each case moves.
47
+ MANIFEST='email dev@example.com
48
+ remote-host origin github.com
49
+ gh-account example-dev'
50
+
51
+ # Posture 1 — absent hosts file: clean, and the fail-open caveat is named in the
52
+ # clean line rather than left for a reader to infer from a bare `clean`.
53
+ check_case "absent-clean-with-caveat" 0 "unverified" "$SANDBOX/nonexistent-hosts.yml" "$MANIFEST"
54
+
55
+ # The count in that clean line excludes the expectation it could not verify — a
56
+ # clean claiming three matches where one was never read is the false clean the
57
+ # caveat exists to prevent.
58
+ check_case "absent-count-excludes-unverified" 0 "2 expectation(s) match" \
59
+ "$SANDBOX/nonexistent-hosts.yml" "$MANIFEST"
60
+
61
+ # Posture 2 — present and unreadable: fail-closed. A directory at the path is
62
+ # present and unreadable whatever uid runs the battery, where a chmod-000 file
63
+ # is readable by root and would make this case pass vacuously in a container.
64
+ mkdir -p "$SANDBOX/hosts-is-a-dir"
65
+ check_case "unreadable-fail-closed" 2 "not readable" "$SANDBOX/hosts-is-a-dir" "$MANIFEST"
66
+
67
+ # Posture 3 — present, no block for the configured host: a violation. The
68
+ # manifest says the account should be one thing and this machine is not logged
69
+ # in to that host at all, which is inside the manifest's authority.
70
+ cat >"$SANDBOX/other-host-only.yml" <<'EOF'
71
+ elsewhere.example:
72
+ user: example-dev
73
+ EOF
74
+ check_case "no-host-block-violation" 1 "carries no block for host.example" \
75
+ "$SANDBOX/other-host-only.yml" "$MANIFEST"
76
+
77
+ # An unrecognized shape is fail-closed rather than clean — the one posture that
78
+ # keeps a CLI config-format change from silently retiring the assertion.
79
+ cat >"$SANDBOX/no-user-key.yml" <<'EOF'
80
+ host.example:
81
+ git_protocol: ssh
82
+ EOF
83
+ check_case "unrecognized-shape-fail-closed" 2 "no active-account key" \
84
+ "$SANDBOX/no-user-key.yml" "$MANIFEST"
85
+
86
+ # The collision the parse is ruled over: `users` is the map of accounts available
87
+ # on this machine and the CLI writes it *before* the active-account key, so a
88
+ # startswith or substring match on `user` reads a structural key as a login. A
89
+ # login literally spelled `user` inside that map is reachable the same way, which
90
+ # is why the match is on the exact key token at the block's own indent.
91
+ cat >"$SANDBOX/collision.yml" <<'EOF'
92
+ host.example:
93
+ users:
94
+ example-dev:
95
+ oauth_token: fixture-token
96
+ user:
97
+ oauth_token: fixture-token
98
+ git_protocol: ssh
99
+ user: example-dev
100
+ EOF
101
+ check_case "users-map-is-not-read-as-a-login" 0 "3 expectation(s) match" \
102
+ "$SANDBOX/collision.yml" "$MANIFEST"
103
+
104
+ # The field count is fail-closed by the arm the manifest already had, not by a
105
+ # new one — a `gh-account` line carrying a host as well as a login is malformed.
106
+ check_case "wrong-field-count-fail-closed" 2 "malformed line(s)" \
107
+ "$SANDBOX/collision.yml" 'gh-account host.example example-dev'
108
+
109
+ if [[ "$fails" -gt 0 ]]; then
110
+ echo "check-identity.test.sh: $fails case(s) failed"
111
+ exit 1
112
+ fi
113
+ echo "check-identity.test.sh: clean (absent clean-with-caveat, count excludes unverified, unreadable fail-closed, no-host-block red, unrecognized-shape fail-closed, users-map collision, wrong-field-count fail-closed, 7 cases)"
114
+ exit 0
@@ -0,0 +1,3 @@
1
+ # graph: couples=gate-sdk/lib/gate.sh,canon-kit/lib/gate.sh dir=one valve=none tier=precommit
2
+ # no-fixture: fixture descriptor (scanned as text): a .gate-dispatched member whose couples= hand-lists two kit roots for one glob, complete because no other kit root carries a tracked lib/gate.sh
3
+ # spec: gate-sdk/SPEC.md §check-kit-enum — the manifest is read off whichever spelling resolved, so a descriptor's hand list is grouped exactly as a script's is
@@ -1,4 +1,7 @@
1
1
  # Fixture registry: check-sample hand-lists only two kit roots for the *.sh
2
2
  # suffix while other kit roots carry matching tracked files — the drift the
3
- # kit:*.sh token closes — so check-kit-enum must REJECT.
3
+ # kit:*.sh token closes — so check-kit-enum must REJECT. check-native-sample is
4
+ # a complete .gate-declared group beside it, so the descriptor arm runs on the
5
+ # rejecting case too and the finding named below is check-sample's alone.
4
6
  check-sample
7
+ check-native-sample
@@ -0,0 +1,3 @@
1
+ # graph: couples=gate-sdk/lib/gate.sh,canon-kit/lib/gate.sh dir=one valve=none tier=precommit
2
+ # no-fixture: fixture descriptor (scanned as text): a .gate-dispatched member whose couples= hand-lists two kit roots for one glob, complete because no other kit root carries a tracked lib/gate.sh
3
+ # spec: gate-sdk/SPEC.md §check-kit-enum — the manifest is read off whichever spelling resolved, so a descriptor's hand list is grouped exactly as a script's is
@@ -1 +1 @@
1
- KIT-ENUM: clean
1
+ KIT-ENUM: clean (1 multi-kit hand-list group(s) complete; kit:<glob> keeps them so)
@@ -1,3 +1,6 @@
1
- # Fixture registry: check-sample couples the kit surface through the kit:*.sh
2
- # token — no literal per-kit hand list — so check-kit-enum must ACCEPT.
1
+ # Fixture registry (scanned as text, never executed): check-sample couples the
2
+ # kit surface through the kit:*.sh token — no literal per-kit hand list — and
3
+ # check-native-sample is a .gate descriptor whose two-root hand list for one
4
+ # glob is complete. check-kit-enum must ACCEPT.
3
5
  check-sample
6
+ check-native-sample
@@ -1,4 +1,6 @@
1
1
  # Same synthetic-tree steer as good/. alpha-kit's roster omits shipped
2
2
  # check-alpha-two and names the unshipped check-alpha-ghost (both parity
3
- # directions); gamma-kit ships checks/ but its README has no marker block.
3
+ # directions); gamma-kit ships checks/ but its README has no marker block;
4
+ # delta-kit drifts both directions over the ported spelling — a shipped .gate
5
+ # absent from the roster, and a roster name matching neither glob.
4
6
  .
@@ -0,0 +1,15 @@
1
+ # delta-kit (fixture)
2
+
3
+ A synthetic mixed-spelling kit whose roster drifted across both globs —
4
+ `check-readme-roster` must REJECT in both directions over the ported spelling:
5
+ shipped `check-delta-one` (a `.gate` descriptor) is absent from the roster, and
6
+ `check-delta-ghost` names no shipped check of either spelling.
7
+
8
+ 1. Register the gates — add to your `gates.list`:
9
+
10
+ <!-- gate-roster:begin -->
11
+ ```
12
+ check-delta-two # the surviving shell declaration
13
+ check-delta-ghost # ported-away gate the roster never dropped
14
+ ```
15
+ <!-- gate-roster:end -->
@@ -0,0 +1,2 @@
1
+ # graph: couples=delta-kit/README.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-readme-roster — fixture descriptor; only the basename is read
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+ # Fixture gate body — never executed; only the basename is read.
3
+ exit 0
@@ -1 +1,3 @@
1
- alpha-kit: shipped check absent from the README roster: check-alpha-two
1
+ alpha-kit: shipped check absent from the README roster: check-alpha-two
2
+ delta-kit: shipped check absent from the README roster: check-delta-one
3
+ delta-kit: roster names no shipped check: check-delta-ghost
@@ -2,4 +2,4 @@
2
2
  # Fixture config: make the sandbox kits the kit roots, so gate_kit_roots
3
3
  # resolves to this case dir (auto-sourced by lib/gate.sh at cwd) rather than
4
4
  # the real repo. See gate-sdk/SPEC.md §Layout and configuration.
5
- GATE_SDK_KIT_DIRS="alpha-kit gamma-kit"
5
+ GATE_SDK_KIT_DIRS="alpha-kit gamma-kit delta-kit"
@@ -2,5 +2,7 @@
2
2
  # names the synthetic kits via GATE_SDK_KIT_DIRS; their relative roots resolve
3
3
  # against the positional root. beta-kit ships no checks/ — the
4
4
  # skipped-and-counted path. alpha-kit's roster carries annotation clauses and
5
- # indentation the grammar must ignore.
5
+ # indentation the grammar must ignore. delta-kit ships only a .gate descriptor
6
+ # and epsilon-kit ships one of each spelling — the union of the two globs,
7
+ # which an all-.sh corpus leaves unexercised.
6
8
  .
@@ -0,0 +1,13 @@
1
+ # delta-kit (fixture)
2
+
3
+ A synthetic kit whose only shipped gate declares as a `.gate` descriptor — the
4
+ ported spelling, which no `*.sh`-only fixture exercises. `check-readme-roster`
5
+ must ACCEPT: the roster names the descriptor's basename.
6
+
7
+ 1. Register the gates — add to your `gates.list`:
8
+
9
+ <!-- gate-roster:begin -->
10
+ ```
11
+ check-delta-one # declared as a descriptor, not a script
12
+ ```
13
+ <!-- gate-roster:end -->
@@ -0,0 +1,2 @@
1
+ # graph: couples=delta-kit/README.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-readme-roster — fixture descriptor; only the basename is read
@@ -0,0 +1,14 @@
1
+ # epsilon-kit (fixture)
2
+
3
+ A synthetic kit shipping **both** declaration spellings under one `checks/` —
4
+ the mid-port state, which proves the union of the two globs rather than either
5
+ alone. `check-readme-roster` must ACCEPT: the roster names one of each.
6
+
7
+ 1. Register the gates — add to your `gates.list`:
8
+
9
+ <!-- gate-roster:begin -->
10
+ ```
11
+ check-eps-one # a shell declaration
12
+ check-eps-two # a descriptor beside it
13
+ ```
14
+ <!-- gate-roster:end -->
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+ # Fixture gate body — never executed; only the basename is read.
3
+ exit 0
@@ -0,0 +1,2 @@
1
+ # graph: couples=epsilon-kit/README.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-readme-roster — fixture descriptor; only the basename is read
@@ -2,4 +2,4 @@
2
2
  # Fixture config: make the sandbox kits the kit roots, so gate_kit_roots
3
3
  # resolves to this case dir (auto-sourced by lib/gate.sh at cwd) rather than
4
4
  # the real repo. See gate-sdk/SPEC.md §Layout and configuration.
5
- GATE_SDK_KIT_DIRS="alpha-kit beta-kit"
5
+ GATE_SDK_KIT_DIRS="alpha-kit beta-kit delta-kit epsilon-kit"
@@ -1,44 +1,49 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of check-reads-couples' .gate arm — the consumption path and the two
3
- # refusals that survive it. The one good/bad pair cannot hold this arm: the pair models
4
- # exit 0 and exit 1 against a shell source, while this arm needs a binary to answer
5
- # `--reads` and its refusals are exit 2 by the fail-closed contract. With no .gate member
6
- # registered anywhere in the tree the arm has no live instance, so without this file it
7
- # would be an untested branch rather than the counted zero the clean line reports.
2
+ # spec: gate-sdk/SPEC.md §check-reads-couples — the `.gate` arm, which the one good/bad pair
3
+ # cannot hold: the pair models exit 0 and exit 1 against a shell source, while this arm reads a
4
+ # registry member's declared roots and its refusals are exit 2 by the fail-closed contract. A
5
+ # live member exercises the covered path in the battery, but nothing there reaches the '?' skip,
6
+ # the filter being applied rather than ignored, or either refusal.
7
+ #
8
+ # The cases below name **real registry members** and let the substrate answer for them. Before
9
+ # §The sixth budget batch they drove a stub binary answering `--reads`, because the reader was a
10
+ # shell script asking a separate process; the compiled reader answers from its own registry, so a
11
+ # stub would be testing a provider the gate no longer has. Two consequences are recorded rather
12
+ # than dropped silently: the absent-binary refusal is gone because the binary is running by
13
+ # construction, and the non-zero-`--reads` refusal is now a descriptor whose name the registry
14
+ # does not carry — the same condition reached the way the compiled form can reach it.
8
15
  #
9
16
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
10
17
  set -uo pipefail
11
18
  source "$(dirname "${BASH_SOURCE[0]}")/../lib/test-hermetic.sh"
12
19
 
13
- ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
14
- GATE="$ROOT/gate-sdk/checks/check-reads-couples.sh"
15
- REAL_BIN="$ROOT/native/target/release/checkwright-gates"
16
-
20
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
17
21
  fails=0
18
22
  cases=0
19
23
  tmp="$(mktemp -d)"
20
24
  trap 'rm -rf "$tmp"' EXIT
21
25
 
22
- MANIFEST='# graph: couples=corpus/*.md dir=one valve=none tier=precommit'
26
+ MANIFEST_NARROW='# graph: couples=corpus/*.md dir=one valve=none tier=precommit'
27
+ MANIFEST_WIDE='# graph: couples=corpus/*.md,corpus/sub/*.md dir=one valve=none tier=precommit'
23
28
 
24
- # Writes a stub binary that answers `--reads` with the given lines and refuses anything
25
- # else — the shape the real binary has for a subcommand it carries.
26
- make_stub() {
27
- local path="$1" r; shift
28
- {
29
- echo '#!/usr/bin/env bash'
30
- echo '[[ "${1:-}" == --reads ]] || exit 2'
31
- for r in "$@"; do printf "echo '%s'\n" "$r"; done
32
- echo 'exit 0'
33
- } > "$path"
34
- chmod +x "$path"
29
+ # A case dir holding one descriptor named for a real member, plus a tracked corpus whose
30
+ # shape distinguishes a filter that is applied from one that is ignored: `other.txt` sits at
31
+ # the uncovered depth and is excluded by every filter the named member declares.
32
+ make_case() { # $1=label $2=descriptor-basename $3=manifest
33
+ local dir="$tmp/$1"
34
+ mkdir -p "$dir/corpus/sub"
35
+ printf '%s\n' "$3" > "$dir/$2"
36
+ : > "$dir/corpus/SPEC.md"
37
+ : > "$dir/corpus/SPEC-amend.md"
38
+ : > "$dir/corpus/sub/SPEC.md"
39
+ : > "$dir/corpus/sub/other.txt"
40
+ ( cd "$dir" && git init -q . && git add -A ) >/dev/null 2>&1
35
41
  }
36
42
 
37
- # $1=label $2=want-rc $3=want-substring $4=binary-path (case dir prepared by the caller)
38
- run_case() {
39
- local label="$1" want="$2" substr="$3" bin="$4" out rc
43
+ run_case() { # $1=label $2=descriptor-basename $3=want-rc $4=want-substring
44
+ local label="$1" desc="$2" want="$3" substr="$4" out rc
40
45
  cases=$((cases + 1))
41
- out="$( cd "$tmp/$label" && GATE_SDK_NATIVE_BIN="$bin" "$GATE" sandbox.gate 2>&1 )"; rc=$?
46
+ out="$( cd "$tmp/$label" && gate_run check-reads-couples "$DIR/checks" "$desc" 2>&1 )"; rc=$?
42
47
  if [[ "$rc" -ne "$want" ]]; then
43
48
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
44
49
  fi
@@ -47,93 +52,86 @@ run_case() {
47
52
  fi
48
53
  }
49
54
 
50
- # Builds a case dir holding a descriptor, a tracked corpus, and a stub reporting $3...
51
- make_case() {
52
- local label="$1" descriptor="$2"; shift 2
53
- local dir="$tmp/$label"
54
- mkdir -p "$dir/corpus/sub"
55
- printf '%s\n' "$descriptor" > "$dir/sandbox.gate"
56
- : > "$dir/corpus/top.md"
57
- : > "$dir/corpus/sub/deep.md"
58
- make_stub "$dir/stub-bin" "$@"
59
- ( cd "$dir" && git init -q . && git add -A ) >/dev/null 2>&1
60
- }
55
+ # A — the declared roots' tracked reads are covered. The named member declares its scan root
56
+ # twice under two filter knobs, so a couple naming both levels covers both walks.
57
+ make_case covered check-stage-entry.gate "$MANIFEST_WIDE"
58
+ run_case covered check-stage-entry.gate 0 '2 resolvable walk(s) covered'
61
59
 
62
- # A — the reported root's tracked reads are covered. A couple naming both levels covers a
63
- # recursive walk; this is the clean consumption path the refusal used to make unreachable.
64
- make_case covered \
65
- '# graph: couples=corpus/*.md,corpus/sub/*.md dir=one valve=none tier=precommit' corpus
66
- run_case covered 0 '1 resolvable walk(s) covered' "$tmp/covered/stub-bin"
60
+ # B — the same roots, a couple that stops one level short. Globs never cross '/', so the
61
+ # deeper tracked file is uncovered and the finding must name it.
62
+ make_case uncovered check-stage-entry.gate "$MANIFEST_NARROW"
63
+ run_case uncovered check-stage-entry.gate 1 "corpus/sub/SPEC.md"
67
64
 
68
- # B — the same reported root, a couple that stops one level short. Globs never cross '/',
69
- # so the deeper tracked file is uncovered and the finding must name it.
70
- make_case uncovered "$MANIFEST" corpus
71
- run_case uncovered 1 "corpus/sub/deep.md" "$tmp/uncovered/stub-bin"
65
+ # B2 — the same red, read the other way: `corpus/sub/other.txt` is equally uncovered and is
66
+ # equally deep, so its ABSENCE from the finding is what proves the filter is applied rather
67
+ # than ignored. A filter dropped on the floor would flag it too.
68
+ cases=$((cases + 1))
69
+ out="$( cd "$tmp/uncovered" && gate_run check-reads-couples "$DIR/checks" check-stage-entry.gate 2>&1 )"
70
+ if grep -qF -- 'corpus/sub/other.txt' <<<"$out"; then
71
+ echo " FAIL [filter-applied]: a file no declared filter selects was still demanded: $out"
72
+ fails=$((fails + 1))
73
+ fi
72
74
 
73
- # C — a root the gate cannot bound statically. It is counted, never assumed empty: the
74
- # clean line reports it in the same skip counter the shell arm's unresolvable roots use.
75
- make_case unbounded "$MANIFEST" '?'
76
- run_case unbounded 0 '1 undecidable walk(s) skipped-and-counted' "$tmp/unbounded/stub-bin"
75
+ # C — a root the member cannot bound statically. It is counted, never assumed empty: the clean
76
+ # line reports it in the same skip counter the shell arm's unresolvable roots use.
77
+ make_case unbounded check-action-pinning.gate "$MANIFEST_NARROW"
78
+ run_case unbounded check-action-pinning.gate 0 '1 undecidable walk(s) skipped-and-counted'
77
79
 
78
80
  # D — a descriptor claiming the removed opt-out. There is deliberately no descriptor-level
79
81
  # exemption, so the uncovered read is still a finding: the line buys nothing.
80
- make_case claimed_exemption \
81
- "$MANIFEST
82
- # reads-couples-exempt: the walks are covered elsewhere" corpus
83
- run_case claimed_exemption 1 "corpus/sub/deep.md" "$tmp/claimed_exemption/stub-bin"
82
+ make_case claimed_exemption check-stage-entry.gate \
83
+ "$MANIFEST_NARROW
84
+ # reads-couples-exempt: the walks are covered elsewhere"
85
+ run_case claimed_exemption check-stage-entry.gate 1 "corpus/sub/SPEC.md"
84
86
 
85
- # E — surviving refusal one: a .gate member registered with no binary to ask. Exit 2, the
86
- # same fail-closed shape check-gate-substrate-parity assertion B uses for this condition.
87
- make_case no_binary "$MANIFEST" corpus
88
- run_case no_binary 2 'absent' "$tmp/no_binary/nonexistent-bin"
87
+ # E — surviving refusal one: a descriptor whose name the registry does not carry. The read set
88
+ # is unavailable, and "unavailable" must never read as "reads nothing".
89
+ make_case unknown_member sandbox.gate "$MANIFEST_NARROW"
90
+ run_case unknown_member sandbox.gate 2 'no registered subcommand answers'
89
91
 
90
- # F — surviving refusal two: the binary is there but cannot answer for this member. A
91
- # non-zero --reads must never read as "reads nothing".
92
- make_case reads_fails "$MANIFEST" corpus
93
- { echo '#!/usr/bin/env bash'; echo 'echo "no such gate subcommand" >&2'; echo 'exit 3'; } \
94
- > "$tmp/reads_fails/broken-bin"
95
- chmod +x "$tmp/reads_fails/broken-bin"
96
- run_case reads_fails 2 'exited 3' "$tmp/reads_fails/broken-bin"
92
+ # F — surviving refusal two, and it is fail-closed by the same contract: a declared filter knob
93
+ # the config bridge did not carry is exit 2, never an empty filter silently widening the demand
94
+ # back to the whole root. Driven by invoking the arm with that one knob withheld.
95
+ cases=$((cases + 1))
96
+ BIN="${GATE_SDK_NATIVE_BIN:-}"
97
+ if [[ -x "$BIN" ]]; then
98
+ env_args=()
99
+ while IFS= read -r kv; do
100
+ [[ -n "$kv" ]] || continue
101
+ [[ "$kv" == GATE_SDK_KNOB_LIFECYCLE_KIT_ROSTER_BASENAME=* ]] && continue
102
+ env_args+=("$kv")
103
+ done < <( cd "$tmp/uncovered" && source "$DIR/lib/gate.sh" && gate_knob_env check-reads-couples )
104
+ out="$( cd "$tmp/uncovered" && env "${env_args[@]}" "$BIN" check-reads-couples check-stage-entry.gate 2>&1 )"
105
+ rc=$?
106
+ if [[ "$rc" -ne 2 ]]; then
107
+ echo " FAIL [filter-unresolvable]: want exit 2, got $rc -- $out"; fails=$((fails + 1))
108
+ elif ! grep -qF -- 'LIFECYCLE_KIT_ROSTER_BASENAME' <<<"$out"; then
109
+ echo " FAIL [filter-unresolvable]: the refusal does not name the knob: $out"
110
+ fails=$((fails + 1))
111
+ fi
112
+ else
113
+ echo " FAIL [filter-unresolvable]: no binary to withhold a knob from"; fails=$((fails + 1))
114
+ fi
97
115
 
98
- # G — the shell arm is unaffected: a .sh source with a covered walk still analyzes, so a
116
+ # G — the shell arm is unaffected: a `.sh` source with a covered walk still analyzes, so a
99
117
  # refusal above cannot be passing for a parse failure.
100
118
  mkdir -p "$tmp/shell/corpus"
101
119
  : > "$tmp/shell/corpus/a.md"
102
120
  printf '%s\n' \
103
- "$MANIFEST" \
121
+ "$MANIFEST_NARROW" \
104
122
  'gate_find "corpus" -name '"'"'*.md'"'"' -type f' > "$tmp/shell/sandbox-gate.sh"
105
123
  ( cd "$tmp/shell" && git init -q . && git add -A ) >/dev/null 2>&1
106
124
  cases=$((cases + 1))
107
- out="$( cd "$tmp/shell" && "$GATE" sandbox-gate.sh 2>&1 )"; rc=$?
125
+ out="$( cd "$tmp/shell" && gate_run check-reads-couples "$DIR/checks" sandbox-gate.sh 2>&1 )"; rc=$?
108
126
  if [[ "$rc" -ne 0 ]]; then
109
127
  echo " FAIL [shell-arm]: want exit 0, got $rc -- $out"; fails=$((fails + 1))
110
128
  elif ! grep -qF -- 'READS-COUPLES: clean' <<<"$out"; then
111
129
  echo " FAIL [shell-arm]: exit 0 but not clean: $out"; fails=$((fails + 1))
112
130
  fi
113
131
 
114
- # H — the same consumption path against the *real* binary rather than a stub, so the
115
- # reported grammar is the one the substrate actually emits. Skipped-and-named when the
116
- # binary is absent: this file is hermetic and never builds, and a consumer tree has no
117
- # crate to build from.
118
- real_status="skipped (binary not built)"
119
- if [[ -x "$REAL_BIN" ]]; then
120
- mkdir -p "$tmp/real"
121
- printf '%s\n' "$MANIFEST" > "$tmp/real/check-action-pinning.gate"
122
- cases=$((cases + 1))
123
- out="$( cd "$tmp/real" && GATE_SDK_NATIVE_BIN="$REAL_BIN" \
124
- "$GATE" check-action-pinning.gate 2>&1 )"; rc=$?
125
- real_status="run"
126
- if [[ "$rc" -ne 0 ]]; then
127
- echo " FAIL [real-binary]: want exit 0, got $rc -- $out"; fails=$((fails + 1))
128
- elif ! grep -qF -- '1 undecidable walk(s) skipped-and-counted' <<<"$out"; then
129
- echo " FAIL [real-binary]: exit 0 but the reported '?' was not counted: $out"
130
- fails=$((fails + 1))
131
- fi
132
- fi
133
-
134
132
  if [[ "$fails" -gt 0 ]]; then
135
133
  echo "check-reads-couples.test.sh: $fails case(s) failed"
136
134
  exit 1
137
135
  fi
138
- echo "check-reads-couples.test.sh: clean ($cases cases; real-binary case $real_status)"
136
+ echo "check-reads-couples.test.sh: clean ($cases cases over real registry members)"
139
137
  exit 0
@@ -7,8 +7,12 @@ VERDICT_BIN="${DELEGATION_KIT_VERDICT_BIN:-delegation-kit/bin/usage-verdict.sh}"
7
7
  [[ -f "$GUARD_KIT_LIB" ]] || exit 0
8
8
  source "$GUARD_KIT_LIB"
9
9
 
10
+ # copy-divergence: this consumer tees the verdict through guard_trace, which the template does not declare
11
+ # copy-divergence: and reads GUARD_KIT_TRACE_FILE to say where — the pair of markers is what assertion C's valve wants
12
+ GUARD_KIT_TRACE_FILE="${GUARD_KIT_TRACE_FILE:-/dev/null}"
10
13
  verdict="$("$VERDICT_BIN")"
11
14
  rc=$?
15
+ guard_trace "$verdict" >>"$GUARD_KIT_TRACE_FILE"
12
16
  case "$rc" in
13
17
  1) guard_block "$verdict" ;;
14
18
  *) guard_advise "budget verdict (agent-budget-guard): $verdict" ;;
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env bash
2
+ # spec: gate-sdk/SPEC.md §check-template-copy-parity — the root-default derivation, which the
3
+ # good/bad pair structurally cannot reach: every committed case passes an explicit root, so the
4
+ # `git rev-parse --show-toplevel` branch and its refusal are exercised by nothing. This drives
5
+ # both: a sandbox git repo entered with no argument, and the same tree with git unable to answer.
6
+ #
7
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
8
+ set -uo pipefail
9
+ source "$(dirname "${BASH_SOURCE[0]}")/../lib/test-hermetic.sh"
10
+
11
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
12
+ sb="$(mktemp -d)"
13
+ trap 'rm -rf "$sb"' EXIT
14
+ fails=0
15
+
16
+ mkdir -p "$sb/repo/widget-kit/templates" "$sb/repo/scripts" "$sb/norepo/scripts"
17
+ cat > "$sb/repo/widget-kit/templates/thing.sh" <<'EOF'
18
+ # spec: widget-kit/SPEC.md §thing — the template
19
+ helper_one() { :; }
20
+ : "${WIDGET_KIT_A:-1}"
21
+ EOF
22
+ cat > "$sb/repo/scripts/thing.sh" <<'EOF'
23
+ # spec: widget-kit/SPEC.md §thing — the vendored copy, glossed differently on purpose
24
+ helper_one() { :; }
25
+ : "${WIDGET_KIT_A:-1}"
26
+ EOF
27
+ git -C "$sb/repo" init -q
28
+ git -C "$sb/repo" config user.email t@example.invalid
29
+ git -C "$sb/repo" config user.name t
30
+
31
+ # --- the default root: entered from a SUBDIRECTORY, so a cwd-relative default would find
32
+ # --- no pair at all and pass vacuously where the toplevel derivation finds one.
33
+ out="$( cd "$sb/repo/scripts" && gate_run check-template-copy-parity "$DIR/checks" 2>&1 )"; rc=$?
34
+ if [[ "$rc" -ne 0 ]]; then
35
+ echo " FAIL [toplevel-default]: want exit 0, got $rc -- $out"; fails=$((fails + 1))
36
+ elif ! grep -qF '1 template<->copy pair(s)' <<<"$out"; then
37
+ echo " FAIL [toplevel-default-reached]: the derivation resolved a root carrying no pair, so"
38
+ echo " a clean verdict here would be vacuous: $out"
39
+ fails=$((fails + 1))
40
+ fi
41
+
42
+ # --- git cannot answer: the refusal, which is the other half of the same branch.
43
+ out="$( cd "$sb/norepo" && gate_env GIT_CEILING_DIRECTORIES="$sb" \
44
+ && gate_run check-template-copy-parity "$DIR/checks" 2>&1 )"; rc=$?
45
+ if [[ "$rc" -ne 2 ]]; then
46
+ echo " FAIL [no-repo-refuses]: want exit 2, got $rc -- $out"; fails=$((fails + 1))
47
+ elif ! grep -qF 'not a git repository and no root given' <<<"$out"; then
48
+ echo " FAIL [no-repo-message]: the refusal does not name its cause: $out"; fails=$((fails + 1))
49
+ fi
50
+
51
+ if [[ "$fails" -gt 0 ]]; then
52
+ echo "check-template-copy-parity.test.sh: $fails case(s) failed"
53
+ exit 1
54
+ fi
55
+ echo "check-template-copy-parity.test.sh: clean (git-toplevel root default reached from a subdirectory + the no-repository refusal)"
56
+ exit 0
@@ -1 +1,6 @@
1
1
  match a banned pattern
2
+ tree/leak.txt:1:Install notes: clone into /home/bob/projects and run the setup script.
3
+ tree/multi.txt:1:two leaks on one line: /home/alice/one and /home/bob/two
4
+ tree/multi.txt:3:one leak on its own line: /home/carol/three
5
+ tree/multi.txt:4:one leak on its own line: /home/carol/three
6
+ tree/second-leak.txt:2:a single line: the promo URL claude.com/claude-code is banned here too.
@@ -0,0 +1,4 @@
1
+ two leaks on one line: /home/alice/one and /home/bob/two
2
+ a clean line between them
3
+ one leak on its own line: /home/carol/three
4
+ one leak on its own line: /home/carol/three
@@ -0,0 +1,2 @@
1
+ A second leaking file, so the red output is a multi-file record set rather than
2
+ a single line: the promo URL claude.com/claude-code is banned here too.
@@ -1 +1 @@
1
- TREE-TERMS: clean
1
+ TREE-TERMS: clean (2 tracked file(s) scanned under tree; none match the 4 banned pattern(s))
@@ -1,3 +1,6 @@
1
1
  # banned-pattern fixture (grep -E, one per line; '#' + blank ignored)
2
2
  /(home|Users)/[A-Za-z0-9._-]+
3
3
  claude\.com/claude-code
4
+
5
+ claude\.ai/
6
+ ^[A-Za-z][A-Za-z-]*: .*[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
@@ -0,0 +1,4 @@
1
+ Near misses for the anchored trailer shape, which is the one an ERE port can
2
+ silently get wrong by dropping the leading anchor:
3
+ Session-Id: 3f2504e0-4f89-41d3-9a0c-0305e82c3301
4
+ a-bare-uuid 3f2504e0-4f89-41d3-9a0c-0305e82c3301 with no trailer key
@@ -0,0 +1,2 @@
1
+ # A pattern list contains, by construction, what it bans: /home/bob/projects.
2
+ # Its basename is self-exempt, so the gate never reads it as content.
@@ -0,0 +1,3 @@
1
+ # The self-exemption is a prefix glob, not an exact-name match: this basename
2
+ # begins msg-patterns and is exempt too, though it is nobody's exact name.
3
+ # It carries /home/bob/projects for the same constructional reason.
@@ -0,0 +1,3 @@
1
+ A file under a pruned directory. It carries /home/bob/projects, a shape the
2
+ pattern set bans, and the gate must still report clean: the prune is a path
3
+ filter, so a leak here is out of the scanned corpus rather than tolerated in it.