checkwright 0.23.0 → 0.24.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 (321) hide show
  1. package/README.md +172 -10
  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/SPEC.md +125 -13
  11. package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
  12. package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
  13. package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
  14. package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
  15. package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
  16. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
  17. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
  18. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
  19. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
  20. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  21. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  22. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
  23. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
  24. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
  25. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
  26. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
  27. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
  28. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
  29. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
  30. package/payload/canon-kit/smoke/install.sh +1 -1
  31. package/payload/context-kit/README.md +6 -4
  32. package/payload/context-kit/SPEC.md +239 -70
  33. package/payload/context-kit/bin/always-loaded.sh +5 -21
  34. package/payload/context-kit/bin/env-probe.sh +2 -17
  35. package/payload/context-kit/checks/check-brevity.gate +3 -0
  36. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
  37. package/payload/context-kit/checks/check-memory-off.gate +3 -0
  38. package/payload/context-kit/checks/check-settings-paths.gate +3 -0
  39. package/payload/context-kit/checks/check-settings-pins.gate +3 -0
  40. package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
  41. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
  42. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
  43. package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
  44. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
  45. package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
  46. package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
  47. package/payload/context-kit/lib/context.sh +56 -0
  48. package/payload/context-kit/lib/toolfloor.sh +1 -1
  49. package/payload/context-kit/smoke/agents-md.sh +16 -4
  50. package/payload/context-kit/smoke/install.sh +3 -2
  51. package/payload/context-kit/templates/session-context.sh +5 -5
  52. package/payload/delegation-kit/SPEC.md +284 -9
  53. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
  54. package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
  55. package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
  56. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
  57. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
  58. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
  59. package/payload/delegation-kit/smoke/install.sh +1 -1
  60. package/payload/delegation-kit/templates/agent-execution.md +71 -4
  61. package/payload/doctrine-kit/SPEC.md +1 -1
  62. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
  63. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
  64. package/payload/doctrine-kit/smoke/install.sh +17 -4
  65. package/payload/drift-kit/README.md +2 -2
  66. package/payload/drift-kit/SPEC.md +71 -7
  67. package/payload/drift-kit/bin/stage-economics.sh +1 -1
  68. package/payload/drift-kit/lib/drift.sh +43 -0
  69. package/payload/drift-kit/smoke/install.sh +21 -14
  70. package/payload/evidence-kit/README.md +3 -1
  71. package/payload/evidence-kit/SPEC.md +160 -19
  72. package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
  73. package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
  74. package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
  75. package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
  76. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
  77. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
  78. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
  79. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
  80. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
  81. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
  82. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
  83. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
  84. package/payload/evidence-kit/lib/evidence.sh +2 -0
  85. package/payload/evidence-kit/smoke/install.sh +1 -1
  86. package/payload/gate-sdk/README.md +10 -7
  87. package/payload/gate-sdk/SPEC.md +3916 -265
  88. package/payload/gate-sdk/bin/install-hooks.sh +14 -2
  89. package/payload/gate-sdk/bin/port-blockers.sh +37 -9
  90. package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
  91. package/payload/gate-sdk/bin/run-gates.sh +22 -0
  92. package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
  93. package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
  94. package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
  95. package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
  96. package/payload/gate-sdk/checks/check-core-files.gate +3 -0
  97. package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
  98. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
  99. package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
  100. package/payload/gate-sdk/checks/check-gate-assertions.sh +1 -0
  101. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
  102. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
  103. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
  104. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
  105. package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
  106. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +78 -14
  107. package/payload/gate-sdk/checks/check-graph.gate +3 -0
  108. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
  109. package/payload/gate-sdk/checks/check-identity.gate +3 -0
  110. package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
  111. package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
  112. package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
  113. package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
  114. package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
  115. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  116. package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
  117. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  118. package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
  119. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
  120. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
  121. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
  122. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
  123. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
  124. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
  125. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
  126. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
  127. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
  128. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
  129. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
  130. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
  131. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
  132. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
  133. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
  134. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
  135. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
  136. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
  137. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
  138. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
  139. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
  140. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
  141. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
  142. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
  143. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
  144. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
  145. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
  146. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
  147. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
  148. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
  149. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  150. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
  154. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
  155. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
  156. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
  157. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
  158. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
  159. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
  160. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
  161. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
  162. package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
  163. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
  164. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
  165. package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
  166. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
  167. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
  168. package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
  169. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
  170. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
  171. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
  172. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  173. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
  174. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
  175. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
  176. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
  177. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
  178. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
  179. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
  180. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
  181. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
  182. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
  183. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
  184. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
  185. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
  186. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
  187. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
  188. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
  189. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
  190. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
  191. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
  192. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
  193. package/payload/gate-sdk/lib/gate.sh +232 -25
  194. package/payload/gate-sdk/smoke/install.sh +5 -1
  195. package/payload/guard-kit/SPEC.md +207 -28
  196. package/payload/guard-kit/bin/run-guard-tests.sh +6 -1
  197. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
  198. package/payload/guard-kit/guard-tests/cases.tsv +37 -9
  199. package/payload/guard-kit/lib/guard.sh +170 -6
  200. package/payload/lifecycle-kit/README.md +3 -2
  201. package/payload/lifecycle-kit/SPEC.md +507 -75
  202. package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
  203. package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
  204. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
  205. package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
  206. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
  207. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
  208. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
  209. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
  210. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
  211. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
  212. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
  213. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
  214. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
  215. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
  216. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
  217. package/payload/lifecycle-kit/lib/stages.sh +5 -0
  218. package/payload/lifecycle-kit/smoke/install.sh +29 -15
  219. package/payload/lifecycle-kit/templates/lead.md +24 -0
  220. package/payload/lifecycle-kit/templates/stages/align.md +20 -2
  221. package/payload/lifecycle-kit/templates/stages/build.md +3 -3
  222. package/payload/lifecycle-kit/templates/stages/close.md +20 -6
  223. package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
  224. package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
  225. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  226. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
  227. package/payload/queue-kit/README.md +10 -10
  228. package/payload/queue-kit/SPEC.md +301 -84
  229. package/payload/queue-kit/bin/queue-counts.sh +1 -1
  230. package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
  231. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
  232. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
  233. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
  234. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
  235. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
  236. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
  237. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
  238. package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
  239. package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
  240. package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
  241. package/payload/queue-kit/lib/queue.sh +0 -49
  242. package/payload/queue-kit/smoke/install.sh +1 -1
  243. package/payload/site-kit/SPEC.md +29 -2
  244. package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
  245. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  246. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
  247. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
  248. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
  249. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
  250. package/payload/site-kit/smoke/install.sh +1 -1
  251. package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
  252. package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
  253. package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
  254. package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
  255. package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
  256. package/payload/context-kit/bin/footprint.sh +0 -144
  257. package/payload/context-kit/checks/check-brevity.sh +0 -124
  258. package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
  259. package/payload/context-kit/checks/check-memory-off.sh +0 -113
  260. package/payload/context-kit/checks/check-settings-paths.sh +0 -94
  261. package/payload/context-kit/checks/check-settings-pins.sh +0 -111
  262. package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
  263. package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
  264. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
  265. package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
  266. package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
  267. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
  268. package/payload/drift-kit/bin/trajectory.sh +0 -242
  269. package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
  270. package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
  271. package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
  272. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
  273. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
  274. package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
  275. package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
  276. package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
  277. package/payload/gate-sdk/checks/check-core-files.sh +0 -76
  278. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
  279. package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
  280. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
  281. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
  282. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
  283. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
  284. package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
  285. package/payload/gate-sdk/checks/check-graph.sh +0 -632
  286. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
  287. package/payload/gate-sdk/checks/check-identity.sh +0 -135
  288. package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
  289. package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
  290. package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
  291. package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
  292. package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
  293. package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
  294. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
  295. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
  296. package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
  297. package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
  298. package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
  299. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
  300. package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
  301. package/payload/queue-kit/bin/queue-index.sh +0 -182
  302. package/payload/queue-kit/bin/roadmap.sh +0 -76
  303. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
  304. package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
  305. package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
  306. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
  307. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
  308. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
  309. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  310. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  311. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
  312. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
  313. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  314. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  315. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
  316. /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
  317. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
  318. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
  319. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
  320. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
  321. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
@@ -30,6 +30,21 @@ sim=0
30
30
  if [[ "${1:-}" == "--simulate" ]]; then sim=1; shift; fi
31
31
  sim_relay() { local l; while IFS= read -r l; do echo "enter-stage (simulate): $l"; done <<<"$1"; }
32
32
 
33
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the recovery relay: a refusal's help line is its actionable half, so it prints under --simulate too. The mode's designed consumer is the lead, which gates an expensive dispatch on it rather than hand-deriving prior-stage completeness; relaying the verdict while withholding the one line that resolves it is what sent a lead to escalate a question this tool already answered.
34
+ relay_help() {
35
+ local l
36
+ for l in "$@"; do
37
+ if [[ "$sim" == 1 ]]; then
38
+ echo "enter-stage (simulate): help: $l" >&2
39
+ else
40
+ echo " help: $l" >&2
41
+ fi
42
+ done
43
+ }
44
+
45
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the two pre-flight arms refuse on the same terms and recover the same way, so the recovery is one string rather than two that must be kept in step
46
+ HELP_PREFLIGHT="resolve the finding above, or (to override deliberately) perform the stamp by hand."
47
+
33
48
  QUEUE="$LIFECYCLE_KIT_QUEUE_FILE"
34
49
  STATE="$LIFECYCLE_KIT_STATE_FILE"
35
50
 
@@ -91,10 +106,10 @@ if [[ "${1:-}" == "--rename" ]]; then
91
106
  { $1 = n; print }
92
107
  ' "$STATE" > "$rn_tmpstate"
93
108
 
94
- # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the columns-2-4 witness: the writer proves it touched only the field it meant to, which is the content predicate a PreToolUse guard would have to reconstruct a pre-edit file to compute
95
- rn_fields() { awk '/^---[[:space:]]*$/ { f = 1; next } f && NF { print $2, $3, $4 }' "$1"; }
109
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the columns-2-to-last witness: the writer proves it touched only the field it meant to, which is the content predicate a PreToolUse guard would have to reconstruct a pre-edit file to compute. It reads to $NF rather than to a pinned column because a field riding outside the witness could be dropped or corrupted with neither this tool nor its test noticing
110
+ rn_fields() { awk '/^---[[:space:]]*$/ { f = 1; next } f && NF { s = ""; for (i = 2; i <= NF; i++) s = s (i > 2 ? " " : "") $i; print s }' "$1"; }
96
111
  if [[ "$(rn_fields "$STATE")" != "$(rn_fields "$rn_tmpstate")" ]]; then
97
- echo "enter-stage: the rename would alter columns 2-4 (stage, session id, date) of $STATE — refusing, nothing written." >&2
112
+ echo "enter-stage: the rename would alter columns 2 through NF (stage, session id, date, head) of $STATE — refusing, nothing written." >&2
98
113
  exit 2
99
114
  fi
100
115
 
@@ -118,7 +133,7 @@ if [[ "${1:-}" == "--rename" ]]; then
118
133
  if [[ "$sim" == 1 ]]; then
119
134
  echo "enter-stage (simulate): --rename '$rn_name' would rewrite both surfaces — no write:"
120
135
  sim_relay "$QUEUE: '## Iteration: $rn_cur' -> '## Iteration: $rn_name'"
121
- sim_relay "$STATE: column 1 of $rn_moves stamp(s) -> '$rn_name'; columns 2-4 proved unchanged"
136
+ sim_relay "$STATE: column 1 of $rn_moves stamp(s) -> '$rn_name'; columns 2 through NF proved unchanged"
122
137
  exit 0
123
138
  fi
124
139
 
@@ -126,7 +141,7 @@ if [[ "${1:-}" == "--rename" ]]; then
126
141
  mv "$rn_tmpqueue" "$QUEUE"
127
142
  mv "$rn_tmpstate" "$STATE"
128
143
  trap - EXIT
129
- echo "enter-stage: renamed the iteration to '$rn_name' — header in $QUEUE, column 1 of $rn_moves stamp(s) in $STATE; columns 2-4 proved unchanged."
144
+ echo "enter-stage: renamed the iteration to '$rn_name' — header in $QUEUE, column 1 of $rn_moves stamp(s) in $STATE; columns 2 through NF proved unchanged."
130
145
  echo " next: commit $QUEUE and $STATE together — the rename writes both, and check-stage-evidence requires them to agree."
131
146
  exit 0
132
147
  fi
@@ -157,11 +172,15 @@ if ! id="$(bash "$KIT/bin/session-id.sh")"; then
157
172
  exit 2
158
173
  fi
159
174
  today="$(date +%F)"
160
- stamp_line="$stamp_iter $stage $id $today"
175
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the sole production writer of <head>, read in the state file's own work tree at the instant of the append; 'none' where there is no work tree or no commit to name is a value, never an omission
176
+ head_at="$(git -C "$(dirname "$STATE")" rev-parse --short HEAD 2>/dev/null)"
177
+ [[ -n "$head_at" ]] || head_at="none"
178
+ stamp_line="$stamp_iter $stage $id $today $head_at"
161
179
 
162
180
  last="$(awk '/^---[[:space:]]*$/ { f = 1; next } f && NF { last = $0 } END { print last }' "$STATE")"
163
- read -r f_iter f_stage f_id _ <<<"$last"
164
- if [[ "$f_iter" == "$stamp_iter" && "$f_stage" == "$stage" && "$f_id" == "$id" ]]; then
181
+ read -r f_iter f_stage f_id _f_date f_head _ <<<"$last"
182
+ # spec: lifecycle-kit/SPEC.md §The state machine — the idempotence guard keys on the head too, so a re-entry after HEAD moved appends rather than reporting a no-op: re-running this tool IS the stated remedy for a stale recorded head, and a guard blind to the head would answer that remedy by writing nothing
183
+ if [[ "$f_iter" == "$stamp_iter" && "$f_stage" == "$stage" && "$f_id" == "$id" && "$f_head" == "$head_at" ]]; then
165
184
  if [[ "$sim" == 1 ]]; then
166
185
  echo "enter-stage (simulate): '$stamp_line' is already the last stamp in $STATE — the real entry would be an idempotent no-op."
167
186
  exit 0
@@ -193,15 +212,21 @@ else
193
212
  pre_queue="$QUEUE"
194
213
  fi
195
214
 
196
- if ! preflight="$(bash "$KIT/checks/check-stage-entry.sh" "$pre_queue" "$tmpstate" 2>&1)"; then
215
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the built-in pre-flight names the gate and never a substrate, the rename pre-flight's own resolution: an argv the bridge refused to build is exit 2, never an entry that proceeds unchecked.
216
+ mapfile -t pre_argv < <(gate_command check-stage-entry "$KIT/checks")
217
+ if [[ ${#pre_argv[@]} -eq 0 ]]; then
218
+ echo "enter-stage: check-stage-entry could not be dispatched (see above) — the entry could not be pre-flighted; nothing written." >&2
219
+ exit 2
220
+ fi
221
+ if ! preflight="$("${pre_argv[@]}" "$pre_queue" "$tmpstate" 2>&1)"; then
197
222
  if [[ "$sim" == 1 ]]; then
198
223
  echo "enter-stage (simulate): check-stage-entry would refuse the entry to '$stage':" >&2
199
224
  sim_relay "$preflight" >&2
200
- exit 1
225
+ else
226
+ echo "enter-stage: check-stage-entry refuses the entry to '$stage' — nothing written:" >&2
227
+ printf '%s\n' "$preflight" >&2
201
228
  fi
202
- echo "enter-stage: check-stage-entry refuses the entry to '$stage' — nothing written:" >&2
203
- printf '%s\n' "$preflight" >&2
204
- echo " help: resolve the finding above, or (to override deliberately) perform the stamp by hand." >&2
229
+ relay_help "$HELP_PREFLIGHT"
205
230
  exit 1
206
231
  fi
207
232
 
@@ -213,11 +238,11 @@ for pf in ${LIFECYCLE_KIT_ENTRY_PREFLIGHT[@]+"${LIFECYCLE_KIT_ENTRY_PREFLIGHT[@]
213
238
  if [[ "$sim" == 1 ]]; then
214
239
  echo "enter-stage (simulate): LIFECYCLE_KIT_ENTRY_PREFLIGHT command for '$stage' would refuse the entry:" >&2
215
240
  sim_relay "$pf_out" >&2
216
- exit 1
241
+ else
242
+ echo "enter-stage: LIFECYCLE_KIT_ENTRY_PREFLIGHT command for '$stage' refuses the entry — nothing written:" >&2
243
+ printf '%s\n' "$pf_out" >&2
217
244
  fi
218
- echo "enter-stage: LIFECYCLE_KIT_ENTRY_PREFLIGHT command for '$stage' refuses the entry — nothing written:" >&2
219
- printf '%s\n' "$pf_out" >&2
220
- echo " help: resolve the finding above, or (to override deliberately) perform the stamp by hand." >&2
245
+ relay_help "$HELP_PREFLIGHT"
221
246
  exit 1
222
247
  fi
223
248
  done
@@ -233,29 +258,43 @@ if [[ "$first" == 1 ]]; then
233
258
  if [[ "$sim" == 1 ]]; then
234
259
  echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — ## Lessons Learned is non-empty:" >&2
235
260
  sim_relay "$lessons" >&2
236
- exit 1
261
+ else
262
+ echo "enter-stage: iteration-boundary entry to '$stage' refused — ## Lessons Learned is non-empty; the close stage must disposition every lesson before the next iteration begins (nothing written):" >&2
263
+ printf '%s\n' "$lessons" >&2
237
264
  fi
238
- echo "enter-stage: iteration-boundary entry to '$stage' refused — ## Lessons Learned is non-empty; the close stage must disposition every lesson before the next iteration begins (nothing written):" >&2
239
- printf '%s\n' "$lessons" >&2
240
- echo " help: run the close ritual's disposition step (rule/task/harvest/discard, stamping $LIFECYCLE_KIT_LESSON_EVIDENCE_FILE), clear the section, then re-run enter-stage $stage." >&2
265
+ relay_help "run the close ritual's disposition step (rule/task/harvest/discard, stamping $LIFECYCLE_KIT_LESSON_EVIDENCE_FILE), clear the section, then re-run enter-stage $stage."
241
266
  exit 1
242
267
  fi
243
268
  fi
244
269
 
245
- # spec: lifecycle-kit/SPEC.md §The committed gap inbox — the iteration-boundary entry refuses while the gap inbox holds bullets: a mid-iteration gap must be dispositioned by close's drain before the next iteration begins (the same refusal contract as the Lessons check), so no gap outlives its iteration untriaged.
270
+ # spec: lifecycle-kit/SPEC.md §The committed gap inbox — the iteration-boundary gap-inbox check: one detector (any bullet), two dispositions. Close-skipped refuses as it always did, because a skipped stage is recoverable by running it; post-close admits, because no stage of the closing iteration is coming back and a refusal there only pushes the queue write outside the state machine, ahead of any stamp.
246
271
  if [[ "$first" == 1 && -f "$LIFECYCLE_KIT_GAP_INBOX_FILE" ]]; then
247
272
  gaps="$(awk '/^-[[:space:]]/ { print }' "$LIFECYCLE_KIT_GAP_INBOX_FILE")"
248
273
  if [[ -n "$gaps" ]]; then
249
- if [[ "$sim" == 1 ]]; then
250
- echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — $LIFECYCLE_KIT_GAP_INBOX_FILE holds untriaged gap bullets:" >&2
251
- sim_relay "$gaps" >&2
274
+ gap_n="$(grep -c '' <<<"$gaps")"
275
+ # spec: lifecycle-kit/SPEC.md §The committed gap inbox — the discriminator, one cursor read shared with bin/file-gap.sh. A never-named closing iteration has no close to have skipped — the guard LIFECYCLE_KIT_BOUNDARY_REQUIRE applies one block down for the same reason — and a boundary with no cursor at all is that case too, which the predicate alone reports as not-reached, so both edges are named here rather than folded into it.
276
+ if [[ "$cur_iter" == "$UNNAMED" ]] || lifecycle_closing_stage_reached "$STATE" \
277
+ || [[ -z "$(lifecycle_current_stage "$STATE")" ]]; then
278
+ if [[ "$sim" == 1 ]]; then
279
+ echo "enter-stage (simulate): iteration-boundary entry to '$stage' would not refuse for the gap inbox — it would carry $gap_n bullet(s) from $LIFECYCLE_KIT_GAP_INBOX_FILE into '$stage''s own intake:" >&2
280
+ sim_relay "$gaps" >&2
281
+ else
282
+ echo "enter-stage: $LIFECYCLE_KIT_GAP_INBOX_FILE holds $gap_n bullet(s) and no stage of the closing iteration is coming back for them — they do not refuse this entry; they are this iteration's '$stage' intake:" >&2
283
+ printf '%s\n' "$gaps" >&2
284
+ fi
285
+ relay_help "disposition each bullet in this session, after the stamp: promote it to a queue entry, fix it inline, or discard it with cause in the commit message — then truncate $LIFECYCLE_KIT_GAP_INBOX_FILE to its header in the same commit. Deleting a bullet without a disposition is not a drain."
286
+ relay_help "a promoted entry's provenance sentence carries the bullet's own date and names the iteration whose close generated it — the finding's disposition lands in this iteration's ledger, and saying so is what keeps that legible."
287
+ else
288
+ if [[ "$sim" == 1 ]]; then
289
+ echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — $LIFECYCLE_KIT_GAP_INBOX_FILE holds $gap_n untriaged gap bullet(s) and the cursor never reached '${LIFECYCLE_KIT_STAGES[-1]}', the closing stage of '$cur_iter':" >&2
290
+ sim_relay "$gaps" >&2
291
+ else
292
+ echo "enter-stage: iteration-boundary entry to '$stage' refused — $LIFECYCLE_KIT_GAP_INBOX_FILE holds $gap_n untriaged gap bullet(s) and the cursor never reached '${LIFECYCLE_KIT_STAGES[-1]}', the closing stage of '$cur_iter' (nothing written):" >&2
293
+ printf '%s\n' "$gaps" >&2
294
+ fi
295
+ relay_help "run the closing stage's gap-drain step — disposition each bullet (promote to a deferred [design-pending] entry, fix inline, or discard with cause in the commit message), truncate the inbox to its header, then re-run enter-stage $stage."
252
296
  exit 1
253
297
  fi
254
- echo "enter-stage: iteration-boundary entry to '$stage' refused — $LIFECYCLE_KIT_GAP_INBOX_FILE holds untriaged gap bullets; every gap is dispositioned before the next iteration begins (nothing written):" >&2
255
- printf '%s\n' "$gaps" >&2
256
- echo " help: if the closing stage has not run yet, run its gap-drain step — disposition each bullet (promote to a deferred [design-pending] entry, fix inline, or discard with cause in the commit message), then truncate the inbox to its header." >&2
257
- echo " help: if it has already run, these bullets were filed after the drain and no stage is coming back for them: disposition them here, in this entering session — promote each directly to the deferred queue (or fix it), truncate the inbox to its header, commit, and re-run enter-stage $stage. Deleting a bullet without a disposition is not a drain." >&2
258
- exit 1
259
298
  fi
260
299
  fi
261
300
 
@@ -275,10 +314,10 @@ if [[ "$first" == 1 && "$cur_iter" != "$UNNAMED" ]]; then
275
314
  [[ -z "$req_msg" ]] && continue
276
315
  if [[ "$sim" == 1 ]]; then
277
316
  echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — $req_msg" >&2
278
- exit 1
317
+ else
318
+ echo "enter-stage: iteration-boundary entry to '$stage' refused — $req_msg (nothing written)." >&2
279
319
  fi
280
- echo "enter-stage: iteration-boundary entry to '$stage' refused — $req_msg (nothing written)." >&2
281
- echo " help: the close stage must disposition the iteration at the release boundary, stamping a '<iteration> release <version|none> — <basis>' line into $br before the next iteration begins." >&2
320
+ relay_help "the close stage must disposition the iteration at the release boundary, stamping a '<iteration> release <version|none> — <basis>' line into $br before the next iteration begins."
282
321
  exit 1
283
322
  done
284
323
  fi
@@ -92,8 +92,8 @@ fi
92
92
  # capture, while the filer can still act: after the iteration's last stage
93
93
  # stamps there is no drainer left in the machine.
94
94
  _fg_stage="$(lifecycle_current_stage)"
95
- if [[ "$_fg_stage" == "${LIFECYCLE_KIT_STAGES[-1]}" ]]; then
96
- printf 'file-gap: WARNING — the cursor is at %s, the last stage of the iteration. Disposition this bullet before the iteration ends: once that stage has finished, none is left to drain it, and the next %s entry refuses until an entering session promotes it directly.\n' \
95
+ if lifecycle_closing_stage_reached; then
96
+ printf 'file-gap: WARNING — the cursor is at %s, the last stage of the iteration. Disposition this bullet before the iteration ends: once that stage has finished, none is left to drain it, and the next %s entry carries it into that session'"'"'s own intake instead.\n' \
97
97
  "$_fg_stage" "$LIFECYCLE_KIT_FIRST_STAGE" >&2
98
98
  else
99
99
  printf 'file-gap: this bullet blocks the next %s entry until close drains it.\n' \
@@ -0,0 +1,3 @@
1
+ # graph: couples=.workflow/*,kit:SPEC.md,.claude/commands/*.md,.gitignore,native/src/gates/close_surfaces.rs,native/src/emit/close_surfaces.rs dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: lifecycle-kit/SPEC.md §check-close-surfaces — the derived close-surface roster is complete and moded: no undeclared capture surface, every declaration carries a mode with a well-formed forced= citation, every capture-tier declaration names a reclaim command
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt,SPEC.md,*/SPEC.md,*/*/SPEC.md,SPEC-*.md,*/SPEC-*.md,*/*/SPEC-*.md dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal
@@ -32,10 +32,10 @@ EOF
32
32
 
33
33
  ---
34
34
 
35
- demo-iteration scope aaaaaaaa 2026-06-01
36
- demo-iteration build bbbbbbbb 2026-06-02
37
- demo-iteration validate cccccccc 2026-06-03
38
- demo-iteration close dddddddd 2026-06-04
35
+ demo-iteration scope aaaaaaaa 2026-06-01 none
36
+ demo-iteration build bbbbbbbb 2026-06-02 none
37
+ demo-iteration validate cccccccc 2026-06-03 none
38
+ demo-iteration close dddddddd 2026-06-04 none
39
39
  EOF
40
40
  cat >"$sb/lifecycle-config.sh" <<'EOF'
41
41
  # shellcheck shell=bash
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of checks/check-close-surfaces.sh over real git repos — the
2
+ # Behavioral test of check-close-surfaces over real git repos — the
3
3
  # two assertions the good/bad pair cannot reach. A fixture case dir cannot ship
4
4
  # a gitignored member: `git check-ignore` never reports a tracked path, and a
5
5
  # fixture file must be tracked to survive a clone. So the capture-tier half —
@@ -2,6 +2,6 @@
2
2
 
3
3
  ---
4
4
 
5
- demo-iteration scope aaaaaaaa 2026-06-01
6
- demo-iteration build bbbbbbbb 2026-06-02
7
- demo-iteration close dddddddd 2026-06-03
5
+ demo-iteration scope aaaaaaaa 2026-06-01 none
6
+ demo-iteration build bbbbbbbb 2026-06-02 none
7
+ demo-iteration close dddddddd 2026-06-03 none
@@ -2,6 +2,6 @@
2
2
 
3
3
  ---
4
4
 
5
- demo-iteration scope aaaaaaaa 2026-06-01
6
- demo-iteration build bbbbbbbb 2026-06-02
7
- demo-iteration validate cccccccc 2026-06-03
5
+ demo-iteration scope aaaaaaaa 2026-06-01 none
6
+ demo-iteration build bbbbbbbb 2026-06-02 none
7
+ demo-iteration validate cccccccc 2026-06-03 none
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of checks/check-stage-entry.sh assertions B and C — the
2
+ # Behavioral test of check-stage-entry assertions B and C — the
3
3
  # scenarios the one-pair good/bad harness cannot hold. The good/bad fixture
4
4
  # pair (run-gate-tests.sh) covers assertion A (prerequisite-stamp ordering: a
5
5
  # close cursor with no validate stamp); the harness admits only one
@@ -40,9 +40,9 @@ EOF
40
40
  cat >"$SANDBOX/.workflow/WORKFLOW-STATE.txt" <<'EOF'
41
41
  ---
42
42
 
43
- demo-iteration scope aaaaaaaa 2026-06-01
44
- demo-iteration build bbbbbbbb 2026-06-02
45
- demo-iteration validate cccccccc 2026-06-03
43
+ demo-iteration scope aaaaaaaa 2026-06-01 none
44
+ demo-iteration build bbbbbbbb 2026-06-02 none
45
+ demo-iteration validate cccccccc 2026-06-03 none
46
46
  EOF
47
47
 
48
48
  out="$(cd "$SANDBOX" && gate_run check-stage-entry "$DIR/checks" 2>&1)"; rc=$?
@@ -62,9 +62,9 @@ state_through_validate() { # stamps scope..validate into $1/.workflow — the l
62
62
  cat >"$1/.workflow/WORKFLOW-STATE.txt" <<'EOF'
63
63
  ---
64
64
 
65
- demo-iteration scope aaaaaaaa 2026-06-01
66
- demo-iteration build bbbbbbbb 2026-06-02
67
- demo-iteration validate cccccccc 2026-06-03
65
+ demo-iteration scope aaaaaaaa 2026-06-01 none
66
+ demo-iteration build bbbbbbbb 2026-06-02 none
67
+ demo-iteration validate cccccccc 2026-06-03 none
68
68
  EOF
69
69
  }
70
70
 
@@ -145,10 +145,10 @@ mkdir -p "$b4/.workflow"
145
145
  cat >"$b4/.workflow/WORKFLOW-STATE.txt" <<'EOF'
146
146
  ---
147
147
 
148
- demo-iteration scope aaaaaaaa 2026-06-01
149
- demo-iteration build bbbbbbbb 2026-06-02
150
- demo-iteration validate dddddddd 2026-06-03
151
- demo-iteration close eeeeeeee 2026-06-04
148
+ demo-iteration scope aaaaaaaa 2026-06-01 none
149
+ demo-iteration build bbbbbbbb 2026-06-02 none
150
+ demo-iteration validate dddddddd 2026-06-03 none
151
+ demo-iteration close eeeeeeee 2026-06-04 none
152
152
  EOF
153
153
  check_case "B4 tagged-residue-successor-entry" "$b4" 1 "[drain-exempt:] included"
154
154
 
@@ -180,8 +180,8 @@ mkdir -p "$c1/.workflow" "$c1/widget-service" "$c1/panel-facade"
180
180
  cat >"$c1/.workflow/WORKFLOW-STATE.txt" <<'EOF'
181
181
  ---
182
182
 
183
- demo-iteration scope aaaaaaaa 2026-06-01
184
- demo-iteration build bbbbbbbb 2026-06-02
183
+ demo-iteration scope aaaaaaaa 2026-06-01 none
184
+ demo-iteration build bbbbbbbb 2026-06-02 none
185
185
  EOF
186
186
  check_case "C1 two-dir-no-align" "$c1" 1 "cross-component amendment signal"
187
187
 
@@ -191,9 +191,9 @@ cp -r "$c1" "$c2"
191
191
  cat >"$c2/.workflow/WORKFLOW-STATE.txt" <<'EOF'
192
192
  ---
193
193
 
194
- demo-iteration scope aaaaaaaa 2026-06-01
195
- demo-iteration align-waived cccccccc 2026-06-03
196
- demo-iteration build bbbbbbbb 2026-06-02
194
+ demo-iteration scope aaaaaaaa 2026-06-01 none
195
+ demo-iteration align-waived cccccccc 2026-06-03 none
196
+ demo-iteration build bbbbbbbb 2026-06-02 none
197
197
  EOF
198
198
  check_case "C2 two-dir-waiver" "$c2" 0 "STAGE-ENTRY: clean"
199
199
 
@@ -206,8 +206,8 @@ printf 'delta folds the wire change into panel-facade/SPEC.md\n' >"$c3/widget-se
206
206
  cat >"$c3/.workflow/WORKFLOW-STATE.txt" <<'EOF'
207
207
  ---
208
208
 
209
- demo-iteration scope aaaaaaaa 2026-06-01
210
- demo-iteration build bbbbbbbb 2026-06-02
209
+ demo-iteration scope aaaaaaaa 2026-06-01 none
210
+ demo-iteration build bbbbbbbb 2026-06-02 none
211
211
  EOF
212
212
  check_case "C3 single-amendment-cross-component" "$c3" 1 "cross-component amendment signal"
213
213
 
@@ -220,8 +220,8 @@ printf 'delta stays within widget-service/SPEC.md\n' >"$c4/widget-service/SPEC-f
220
220
  cat >"$c4/.workflow/WORKFLOW-STATE.txt" <<'EOF'
221
221
  ---
222
222
 
223
- demo-iteration scope aaaaaaaa 2026-06-01
224
- demo-iteration build bbbbbbbb 2026-06-02
223
+ demo-iteration scope aaaaaaaa 2026-06-01 none
224
+ demo-iteration build bbbbbbbb 2026-06-02 none
225
225
  EOF
226
226
  check_case "C4 single-component" "$c4" 0 "STAGE-ENTRY: clean"
227
227
 
@@ -237,8 +237,8 @@ printf 'delta stays within widget-service/SPEC.md\n' >"$c5/widget-service/SPEC-f
237
237
  cat >"$c5/.workflow/WORKFLOW-STATE.txt" <<'EOF'
238
238
  ---
239
239
 
240
- demo-iteration scope aaaaaaaa 2026-06-01
241
- demo-iteration build bbbbbbbb 2026-06-02
240
+ demo-iteration scope aaaaaaaa 2026-06-01 none
241
+ demo-iteration build bbbbbbbb 2026-06-02 none
242
242
  EOF
243
243
  check_case "C5 templates-stub-not-counted" "$c5" 0 "STAGE-ENTRY: clean"
244
244
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  ---
4
4
 
5
- demo-iteration scope aaaaaaaa 2026-06-01
6
- old-iteration build bbbbbbbb 2026-06-02
5
+ demo-iteration scope aaaaaaaa 2026-06-01 none
6
+ old-iteration build bbbbbbbb 2026-06-02 none
@@ -2,5 +2,5 @@
2
2
 
3
3
  ---
4
4
 
5
- demo-iteration scope aaaaaaaa 2026-06-01
6
- demo-iteration build bbbbbbbb 2026-06-02
5
+ demo-iteration scope aaaaaaaa 2026-06-01 none
6
+ demo-iteration build bbbbbbbb 2026-06-02 none
@@ -6,6 +6,11 @@
6
6
  # the header guard and the per-stamp loop allowance, so the cases drive the
7
7
  # whole gate on crafted input via its $1/$2 argument mode.
8
8
  #
9
+ # spec: lifecycle-kit/SPEC.md §check-stage-evidence — the stamp-provenance and
10
+ # stamp-commit-purity assertions live here too, and nowhere else: each reads a real
11
+ # HEAD and a real staged path set, so a static good/bad fixture pair cannot carry
12
+ # one. Part 2 below builds a throwaway git repo per case for exactly that.
13
+ #
9
14
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
10
15
  set -uo pipefail
11
16
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
@@ -35,25 +40,25 @@ case_run() {
35
40
  # guard a '—' header matched a '— validate' stamp and passed clean).
36
41
  case_run "unnamed-past-first-stage" \
37
42
  '## Iteration: —' \
38
- '— validate s1 2026-06-12\n' \
43
+ '— validate s1 2026-06-12 none\n' \
39
44
  1 "still unnamed ('—') at stage 'validate'"
40
45
 
41
46
  # B — a named header with a leftover '—' bootstrap stamp is stale and must FAIL.
42
47
  case_run "stale-bootstrap-under-named" \
43
48
  '## Iteration: demo-iteration' \
44
- '— scope s1 2026-06-12\n' \
49
+ '— scope s1 2026-06-12 none\n' \
45
50
  1 "legal '—' bootstrap"
46
51
 
47
52
  # C — the legitimate pre-naming first-stage bootstrap is CLEAN.
48
53
  case_run "unnamed-first-stage-bootstrap" \
49
54
  '## Iteration: —' \
50
- '— scope s1 2026-06-12\n' \
55
+ '— scope s1 2026-06-12 none\n' \
51
56
  0 "clean"
52
57
 
53
58
  # D — a properly named iteration with a matching stamp at a later stage is CLEAN.
54
59
  case_run "named-at-validate" \
55
60
  '## Iteration: demo-iteration' \
56
- 'demo-iteration scope s1 2026-06-12\ndemo-iteration validate s2 2026-06-12\n' \
61
+ 'demo-iteration scope s1 2026-06-12 none\ndemo-iteration validate s2 2026-06-12 none\n' \
57
62
  0 "clean"
58
63
 
59
64
  # E — a waiver line (check-stage-entry assertion C's recorded waiver) is a
@@ -63,21 +68,21 @@ case_run "named-at-validate" \
63
68
  # stage-distinctness pass, so that reuse does not fire.
64
69
  case_run "waiver-token-accepted" \
65
70
  '## Iteration: demo-iteration' \
66
- 'demo-iteration scope s1 2026-06-12\ndemo-iteration align-waived s3 2026-06-12\ndemo-iteration build s3 2026-06-12\n' \
71
+ 'demo-iteration scope s1 2026-06-12 none\ndemo-iteration align-waived s3 2026-06-12 none\ndemo-iteration build s3 2026-06-12 none\n' \
67
72
  0 "clean"
68
73
 
69
74
  # F — two distinct stages sharing one session id must FAIL: a stage flip is a
70
75
  # context boundary, so scope and build cannot both be session s1.
71
76
  case_run "shared-session-across-stages" \
72
77
  '## Iteration: demo-iteration' \
73
- 'demo-iteration scope s1 2026-06-12\ndemo-iteration build s1 2026-06-13\n' \
78
+ 'demo-iteration scope s1 2026-06-12 none\ndemo-iteration build s1 2026-06-13 none\n' \
74
79
  1 "is shared by stages"
75
80
 
76
81
  # G — a multi-session build (same stage, two different ids) is CLEAN: same-stage
77
82
  # re-entries may rotate the id freely.
78
83
  case_run "same-stage-multi-session" \
79
84
  '## Iteration: demo-iteration' \
80
- 'demo-iteration scope s1 2026-06-12\ndemo-iteration build s2 2026-06-13\ndemo-iteration build s3 2026-06-14\n' \
85
+ 'demo-iteration scope s1 2026-06-12 none\ndemo-iteration build s2 2026-06-13 none\ndemo-iteration build s3 2026-06-14 none\n' \
81
86
  0 "clean"
82
87
 
83
88
  # G2 — a state file present but carrying no stamp (the no-cursor window) must
@@ -93,7 +98,7 @@ case_run "no-cursor-unstamped-state" \
93
98
  # H — case F's shared-id input greens under the 'iteration' posture: the knob
94
99
  # skips only the cross-stage distinctness map (attribution still stamps).
95
100
  printf '%s\n' '## Iteration: demo-iteration' >"$tmp/TASK-QUEUE.md"
96
- printf 'header prose\n---\ndemo-iteration scope s1 2026-06-12\ndemo-iteration build s1 2026-06-13\n' >"$tmp/WORKFLOW-STATE.txt"
101
+ printf 'header prose\n---\ndemo-iteration scope s1 2026-06-12 none\ndemo-iteration build s1 2026-06-13 none\n' >"$tmp/WORKFLOW-STATE.txt"
97
102
  out="$(gate_env LIFECYCLE_KIT_SESSION_BOUNDARY=iteration
98
103
  gate_run check-stage-evidence "$DIR/checks" \
99
104
  "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
@@ -103,7 +108,7 @@ fi
103
108
 
104
109
  # I — a bad posture value must exit 2 (the loader's fail-closed machine check).
105
110
  printf '%s\n' '## Iteration: demo-iteration' >"$tmp/TASK-QUEUE.md"
106
- printf 'header prose\n---\ndemo-iteration build s1 2026-06-13\n' >"$tmp/WORKFLOW-STATE.txt"
111
+ printf 'header prose\n---\ndemo-iteration build s1 2026-06-13 none\n' >"$tmp/WORKFLOW-STATE.txt"
107
112
  out="$(gate_env LIFECYCLE_KIT_SESSION_BOUNDARY=bogus
108
113
  gate_run check-stage-evidence "$DIR/checks" \
109
114
  "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
@@ -111,9 +116,114 @@ if [[ "$rc" -ne 2 ]] || ! grep -qF "neither 'stage' nor 'iteration'" <<<"$out";
111
116
  echo " FAIL: bogus-posture expected exit 2 with the loader finding, got $rc: $out"; fails=$((fails + 1))
112
117
  fi
113
118
 
119
+ # --- Part 2: the provenance + purity assertions, each on a throwaway git repo ---
120
+ # spec: lifecycle-kit/SPEC.md §check-stage-evidence — the assertions read HEAD and the staged
121
+ # path set, so every case owns a repo: a shared one would let an earlier case's commit decide a
122
+ # later case's verdict, which is the coupling these assertions exist to detect.
123
+
124
+ repo_new() { # $1 = case name; echoes the repo path, seeded with a committed 4-field stamp
125
+ local r="$tmp/repo-$1"
126
+ mkdir -p "$r/.workflow"
127
+ git -C "$r" init -q
128
+ git -C "$r" config user.email test@example.invalid
129
+ git -C "$r" config user.name test
130
+ printf '## Iteration: demo-iteration\n' >"$r/TASK-QUEUE.md"
131
+ printf 'header prose\n---\ndemo-iteration scope s1 2026-06-12 none\n' >"$r/.workflow/WORKFLOW-STATE.txt"
132
+ git -C "$r" add -A
133
+ git -C "$r" commit -q -m seed
134
+ printf '%s\n' "$r"
135
+ }
136
+
137
+ repo_head() { git -C "$1" rev-parse --short HEAD; }
138
+
139
+ repo_run() { # $1 = repo; runs the gate from inside it on the configured paths
140
+ ( cd "$1" && gate_run check-stage-evidence "$DIR/checks" \
141
+ TASK-QUEUE.md .workflow/WORKFLOW-STATE.txt 2>&1 )
142
+ }
143
+
144
+ repo_case() { # $1=name $2=repo $3=want-exit $4=expect-substring
145
+ local out rc
146
+ out="$(repo_run "$2")"; rc=$?
147
+ if [[ "$rc" -ne "$3" ]]; then
148
+ echo " FAIL: $1 expected exit $3, got $rc: $out"; fails=$((fails + 1)); return
149
+ fi
150
+ if ! grep -qF -- "$4" <<<"$out"; then
151
+ echo " FAIL: $1 exit OK but output lacks '$4': $out"; fails=$((fails + 1))
152
+ fi
153
+ }
154
+
155
+ # J — a newly introduced stamp naming the current HEAD is CLEAN, and stays clean with the
156
+ # state file staged alone (the stamp commit's own shape).
157
+ r="$(repo_new current)"
158
+ printf 'demo-iteration build s2 2026-06-13 %s\n' "$(repo_head "$r")" >>"$r/.workflow/WORKFLOW-STATE.txt"
159
+ repo_case "provenance-head-is-current" "$r" 0 "clean"
160
+ git -C "$r" add .workflow/WORKFLOW-STATE.txt
161
+ repo_case "purity-state-file-alone" "$r" 0 "clean"
162
+
163
+ # K — the attested defect: the stamp was written, then work commits landed, then the stamp is
164
+ # committed. HEAD moved under it, so the recorded head is stale and the gate must RED.
165
+ r="$(repo_new stale)"
166
+ printf 'demo-iteration build s2 2026-06-13 %s\n' "$(repo_head "$r")" >>"$r/.workflow/WORKFLOW-STATE.txt"
167
+ printf 'work\n' >"$r/work.txt"
168
+ git -C "$r" add work.txt
169
+ git -C "$r" commit -q -m "work that landed under an uncommitted stamp"
170
+ repo_case "provenance-head-went-stale" "$r" 1 "HEAD is now"
171
+
172
+ # L — 'none' is the sentinel for a tree with no commit to name; on the live file inside a work
173
+ # tree it is a RED, which is what stops the inertness conditions from being a disarm.
174
+ r="$(repo_new sentinel)"
175
+ printf 'demo-iteration build s2 2026-06-13 none\n' >>"$r/.workflow/WORKFLOW-STATE.txt"
176
+ repo_case "provenance-none-inside-a-work-tree" "$r" 1 "records head 'none'"
177
+
178
+ # M — the purity assertion: a commit that introduces a stamp and also stages work must RED,
179
+ # which is the one-commit shape provenance alone cannot see (HEAD never moved).
180
+ r="$(repo_new purity)"
181
+ printf 'demo-iteration build s2 2026-06-13 %s\n' "$(repo_head "$r")" >>"$r/.workflow/WORKFLOW-STATE.txt"
182
+ printf 'work\n' >"$r/work.txt"
183
+ git -C "$r" add -A
184
+ repo_case "purity-work-rides-the-stamp-commit" "$r" 1 "also stages 'work.txt'"
185
+
186
+ # N — the first stage's boundary reset legitimately writes the queue and the boundary surfaces
187
+ # in the same motion, so its stamp commit is exempt for exactly those paths.
188
+ r="$(repo_new boundary)"
189
+ printf 'demo-iteration scope s2 2026-06-13 %s\n' "$(repo_head "$r")" >>"$r/.workflow/WORKFLOW-STATE.txt"
190
+ printf '# contract\n' >"$r/.workflow/survey-record.md"
191
+ printf '# contract\n' >"$r/.workflow/gap-inbox.md"
192
+ printf '## Iteration: demo-iteration\n\nnamed\n' >"$r/TASK-QUEUE.md"
193
+ git -C "$r" add -A
194
+ repo_case "purity-boundary-reset-surfaces-exempt" "$r" 0 "clean"
195
+
196
+ # N2 — and the exemption is the FIRST STAGE's alone: the identical staged set under a later
197
+ # stage's stamp reds, which is what makes case N an exemption rather than a blanket pass.
198
+ r="$(repo_new boundary-later-stage)"
199
+ printf 'demo-iteration build s2 2026-06-13 %s\n' "$(repo_head "$r")" >>"$r/.workflow/WORKFLOW-STATE.txt"
200
+ printf '## Iteration: demo-iteration\n\nedited\n' >"$r/TASK-QUEUE.md"
201
+ git -C "$r" add -A
202
+ repo_case "purity-boundary-exemption-is-first-stage-only" "$r" 1 "also stages 'TASK-QUEUE.md'"
203
+
204
+ # O — the migration clause: rewriting the file's existing four-field stamps to five fields is a
205
+ # REWRITE, not an introduction. Without it the one-time migration — and every consumer's own
206
+ # recovery, which the spec names as the mitigation — would red against an assertion no
207
+ # historical stamp can satisfy.
208
+ r="$(repo_new migration)"
209
+ printf 'header prose\n---\ndemo-iteration scope s1 2026-06-12\n' >"$r/.workflow/WORKFLOW-STATE.txt"
210
+ git -C "$r" add -A
211
+ git -C "$r" commit -q -m "a pre-upgrade four-field state file"
212
+ printf 'header prose\n---\ndemo-iteration scope s1 2026-06-12 aaaaaaa\n' >"$r/.workflow/WORKFLOW-STATE.txt"
213
+ git -C "$r" add -A
214
+ repo_case "migration-of-four-field-stamps-is-not-an-introduction" "$r" 0 "clean"
215
+
216
+ # P — --rename rewrites column 1 of every data line, which must not read as re-introducing all
217
+ # of them: identity is the (session-id, head) pair, not the whole line.
218
+ r="$(repo_new rename)"
219
+ sed -i 's/^demo-iteration /renamed-iteration /' "$r/.workflow/WORKFLOW-STATE.txt"
220
+ printf '## Iteration: renamed-iteration\n' >"$r/TASK-QUEUE.md"
221
+ git -C "$r" add -A
222
+ repo_case "rename-of-column-1-is-not-an-introduction" "$r" 0 "clean"
223
+
114
224
  if [[ "$fails" -gt 0 ]]; then
115
225
  echo "check-stage-evidence.test: $fails assertion(s) failed"
116
226
  exit 1
117
227
  fi
118
- echo "check-stage-evidence.test: ok (unnamed past first stage + stale bootstrap + shared-session-across-stages + unstamped no-cursor state + bogus posture rejected; bootstrap + named later stage + waiver token + multi-session build + iteration-posture shared id accepted)"
228
+ echo "check-stage-evidence.test: ok (unnamed past first stage + stale bootstrap + shared-session-across-stages + unstamped no-cursor state + bogus posture rejected; bootstrap + named later stage + waiver token + multi-session build + iteration-posture shared id accepted; a stale head, a 'none' inside a work tree and work riding the stamp commit rejected; a current head, a lone staged state file, the boundary reset's surfaces, the four-field migration and a column-1 rename accepted)"
119
229
  exit 0