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
@@ -1,127 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=*/templates/*.sh,scripts/*.sh dir=bi valve=none tier=precommit
3
- # install: on-surface
4
- # spec: gate-sdk/SPEC.md §check-template-copy-parity — a kit template and its vendored consumer copy agree on their declared contract surface, with copy-side additions declared
5
- #
6
- # usage: check-template-copy-parity.sh [root]
7
- # root defaults to the git toplevel; the pairing is <root>/*/templates/<n>.sh
8
- # <-> <root>/<gates-dir>/<n>.sh, minus the *-config.sh suffix exclusion.
9
- set -uo pipefail
10
-
11
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
-
15
- ROOT="${1:-}"
16
- if [[ -z "$ROOT" ]]; then
17
- ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" \
18
- || { echo "check-template-copy-parity: not a git repository and no root given" >&2; exit 2; }
19
- fi
20
- [[ -d "$ROOT" ]] || { echo "check-template-copy-parity: root not a directory: $ROOT" >&2; exit 2; }
21
-
22
- GATES_DIR="$(gate_sdk_gates_dir)"
23
-
24
- # spec: gate-sdk/SPEC.md §check-template-copy-parity — assertion A reads the resolved `<file> §<section>` target, never the trailing prose: a pair may gloss one target two ways deliberately
25
- spec_target() {
26
- sed -n 's/^# spec:[[:space:]]*//p' "$1" 2>/dev/null | head -1 \
27
- | sed 's/[[:space:]]*—.*$//; s/[[:space:]]*$//'
28
- }
29
-
30
- # spec: gate-sdk/SPEC.md §check-template-copy-parity — the declared surface: four classes of *declaration*, never content. `case` arms contribute the arm's exit token (its first command word), never the arm's pattern — a consumer's rule patterns are its own vocabulary and the gate must not read them.
31
- declared_surface() {
32
- local f="$1"
33
- {
34
- sed -n -E 's/^[[:space:]]*(function[[:space:]]+)?([A-Za-z_][A-Za-z0-9_]*)[[:space:]]*\(\)[[:space:]]*\{?.*$/func:\2/p' "$f"
35
- # comment-tier-exempt: local parser fact, below SPEC altitude — an arm opens only where a `;;` (or the `in`) last closed one, so a `)` inside an arm body's prose is not read as a new arm
36
- awk '
37
- /(^|[[:space:];])case[[:space:]].*[[:space:]]in[[:space:]]*$/ { in_case=1; expect=1; next }
38
- /^[[:space:]]*esac([[:space:]]|$)/ { in_case=0; expect=0; want=0; next }
39
- in_case {
40
- line=$0
41
- if (expect && index(line, ")")) {
42
- line=substr(line, index(line, ")")+1) # first ")" closes the pattern
43
- expect=0; want=1
44
- }
45
- if (want && match(line, /[A-Za-z_][A-Za-z0-9_]*/)) {
46
- print "case:" substr(line, RSTART, RLENGTH)
47
- want=0
48
- }
49
- if (index($0, ";;")) { expect=1; want=0 }
50
- }
51
- ' "$f"
52
- grep -oE '(^|[;&|)]|\$\(|&&|\|\|)[[:space:]]*[a-z_][a-z0-9]*_[a-z0-9_]+([[:space:]]|\))' "$f" \
53
- | grep -oE '[a-z_][a-z0-9]*_[a-z0-9_]+' | sed 's/^/lib:/'
54
- grep -oE '\$\{[A-Z][A-Z0-9]*_[A-Z0-9_]+:[-=]' "$f" \
55
- | sed -E 's/^\$\{//; s/:[-=]$//; s/^/knob:/'
56
- } 2>/dev/null | sort -u
57
- }
58
-
59
- # spec: gate-sdk/SPEC.md §check-template-copy-parity — the `# copy-divergence:` marker grammar assertion C reads
60
- divergence_reasons() {
61
- sed -n 's/^[[:space:]]*#[[:space:]]*copy-divergence:[[:space:]]*//p' "$1" 2>/dev/null
62
- }
63
-
64
- pairs=0
65
- findings=()
66
-
67
- shopt -s nullglob
68
- templates=("$ROOT"/*/templates/*.sh)
69
- shopt -u nullglob
70
-
71
- for tpl in "${templates[@]}"; do
72
- name="${tpl##*/}"
73
- [[ "$name" == *-config.sh ]] && continue # a config template is a starting point; divergence is its contract
74
- copy="$ROOT/$GATES_DIR/$name"
75
- [[ -f "$copy" ]] || continue # unpaired: not vendored here, nothing to be in parity with
76
- pairs=$((pairs + 1))
77
- rel_copy="${copy#"$ROOT"/}"
78
-
79
- # assertion A — same resolved spec: target
80
- t_target="$(spec_target "$tpl")"
81
- c_target="$(spec_target "$copy")"
82
- if [[ "$t_target" != "$c_target" ]]; then
83
- findings+=("$rel_copy: spec: target differs from its template")
84
- findings+=(" template: ${t_target:-<none>}")
85
- findings+=(" copy: ${c_target:-<none>}")
86
- fi
87
-
88
- t_surface="$(declared_surface "$tpl")"; st=$?
89
- fail_closed "$st" check-template-copy-parity "declared_surface"
90
- c_surface="$(declared_surface "$copy")"; st=$?
91
- fail_closed "$st" check-template-copy-parity "declared_surface"
92
-
93
- # assertion B — the template's declared surface is present in the copy
94
- missing="$(comm -23 <(printf '%s\n' "$t_surface") <(printf '%s\n' "$c_surface") | grep -v '^$' || true)"
95
- if [[ -n "$missing" ]]; then
96
- findings+=("$rel_copy: drops surface the template declares (a template-side change never propagated, or a copy-side removal):")
97
- while IFS= read -r tok; do findings+=(" $tok"); done <<<"$missing"
98
- fi
99
-
100
- # assertion C — copy-side additions are declared by a marker naming them
101
- extra="$(comm -13 <(printf '%s\n' "$t_surface") <(printf '%s\n' "$c_surface") | grep -v '^$' || true)"
102
- if [[ -n "$extra" ]]; then
103
- reasons="$(divergence_reasons "$copy")"
104
- undeclared=()
105
- while IFS= read -r tok; do
106
- bare="${tok#*:}"
107
- grep -qF -- "$bare" <<<"$reasons" || undeclared+=("$tok")
108
- done <<<"$extra"
109
- if [[ ${#undeclared[@]} -gt 0 ]]; then
110
- findings+=("$rel_copy: adds surface no '# copy-divergence:' marker names:")
111
- for tok in "${undeclared[@]}"; do findings+=(" $tok"); done
112
- fi
113
- fi
114
- done
115
-
116
- if [[ ${#findings[@]} -gt 0 ]]; then
117
- echo "check-template-copy-parity: template <-> consumer-copy contract surface diverged:"
118
- printf '%s\n' "${findings[@]}"
119
- echo " help: assertion A — point both copies' 'spec:' line at the same '<file> §<section>'"
120
- echo " (trailing prose may differ). Assertion B — propagate the template's"
121
- echo " declaration to the copy, or retire it from the template. Assertion C —"
122
- echo " add a '# copy-divergence: <reason>' line to the copy whose reason names"
123
- echo " the added token and says why the copy needs it."
124
- exit 1
125
- fi
126
- echo "TEMPLATE-COPY-PARITY: clean ($pairs template<->copy pair(s) agree on spec: target, template-declared surface present, copy additions declared)"
127
- exit 0
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=scripts/msg-patterns.list dir=one valve=none tier=precommit trigger=*
3
- # install: zero-config
4
- # spec: gate-sdk/SPEC.md §check-tree-terms — no tracked file matches the banned-pattern set (the tracked-files half of the leak guard; the pattern files and their templates are self-exempt)
5
- #
6
- # usage: check-tree-terms.sh [scan-root] [pattern-file...]
7
- # scan-root enumerated via git ls-files (default '.'); pattern-file args
8
- # override GATE_SDK_MSG_PATTERN_FILES (+ _LOCAL). Skips per spec: above.
9
- set -uo pipefail
10
-
11
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
-
15
- SCANROOT="${1:-.}"
16
- shift || true
17
-
18
- git rev-parse --git-dir >/dev/null 2>&1 || {
19
- echo "check-tree-terms: not a git repository — cannot enumerate tracked files" >&2; exit 2; }
20
-
21
- pat_list="$(gate_msg_pattern_files "$@")"; st=$?
22
- fail_closed "$st" TREE-TERMS pattern-files
23
- mapfile -t PATS < <(printf '%s' "$pat_list")
24
-
25
- patterns="$(grep -hEv '^[[:space:]]*(#|$)' "${PATS[@]+"${PATS[@]}"}")"; gst=$?
26
- [[ "$gst" -le 1 ]] || fail_closed "$gst" TREE-TERMS grep-patterns
27
-
28
- npat=0
29
- [[ -n "$patterns" ]] && npat="$(grep -c '' <<<"$patterns")"
30
- if [[ "$npat" -eq 0 ]]; then
31
- echo "TREE-TERMS: clean (0 banned pattern(s) configured; tree unchecked)"
32
- exit 0
33
- fi
34
-
35
- listing="$(git ls-files -- "$SCANROOT")"; st=$?
36
- fail_closed "$st" TREE-TERMS git-ls-files
37
-
38
- # spec: gate-sdk/SPEC.md §check-tree-terms — the filter pass (pruned dirs, the pattern-file's own basename, non-regular files) stays a per-path loop with no fork in it; the grep itself batches every surviving path into one process instead of re-materialising the pattern file and re-execing grep per file
39
- paths=()
40
- while IFS= read -r path; do
41
- [[ -n "$path" ]] || continue
42
- gate_path_pruned "$path" && continue
43
- base="${path##*/}"
44
- [[ "$base" == msg-patterns* ]] && continue
45
- [[ -f "$path" ]] || continue
46
- paths+=("$path")
47
- done <<< "$listing"
48
- scanned="${#paths[@]}"
49
-
50
- hits=""
51
- if [[ "$scanned" -gt 0 ]]; then
52
- m="$(grep -EnHf <(printf '%s\n' "$patterns") "${paths[@]}")"; mst=$?
53
- [[ "$mst" -le 1 ]] || fail_closed "$mst" TREE-TERMS grep
54
- [[ -n "$m" ]] && hits="$m"$'\n'
55
- fi
56
-
57
- if [[ -n "$hits" ]]; then
58
- echo "check-tree-terms: tracked file(s) match a banned pattern (leaked local/private term):"
59
- printf '%s' "$hits"
60
- echo " help: remove the leaked term from the tracked file; private term lists"
61
- echo " belong in the gitignored local pattern file, never in a tracked one."
62
- exit 1
63
- fi
64
-
65
- echo "TREE-TERMS: clean ($scanned tracked file(s) scanned under $SCANROOT; none match the $npat banned pattern(s))"
66
- exit 0
@@ -1,85 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=.workflow/*,.gitignore dir=one valve=none tier=precommit
3
- # install: on-surface
4
- # spec: gate-sdk/SPEC.md §The workflow directory — every workflow-dir member is tracked or ignored, and every tracked member opens with a '# contract: ' header carrying a ruled payload
5
- #
6
- # usage: check-workflow-tiering.sh [scan-root] (default '.')
7
- set -uo pipefail
8
-
9
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
- # shellcheck source=../lib/gate.sh
11
- source "$SDK/lib/gate.sh"
12
-
13
- ROOT="${1:-.}"
14
- [[ -d "$ROOT" ]] || { echo "check-workflow-tiering: not a directory: $ROOT" >&2; exit 2; }
15
- git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1 || {
16
- echo "check-workflow-tiering: $ROOT is not a git repository — the tracked/ignored partition is unreadable" >&2; exit 2; }
17
-
18
- WF="$GATE_SDK_WORKFLOW_DIR"
19
- [[ -d "$ROOT/$WF" ]] || {
20
- echo "check-workflow-tiering: workflow directory not found: $ROOT/$WF" >&2; exit 2; }
21
-
22
- # spec: gate-sdk/SPEC.md §The workflow directory — the two ruled payload forms
23
- POINTER_RE='^[A-Za-z0-9._/-]+\.md[[:space:]]+§[^[:space:]]'
24
- VERSION_RE='^[a-z0-9-]+ v[0-9]+$'
25
-
26
- errors=()
27
- tracked=0
28
- ignored=0
29
-
30
- shopt -s nullglob dotglob
31
- members=("$ROOT/$WF"/*)
32
- shopt -u nullglob dotglob
33
-
34
- for m in "${members[@]}"; do
35
- rel="${m#"$ROOT"/}"
36
- is_tracked=0
37
- if [[ -d "$m" ]]; then
38
- listing="$(git -C "$ROOT" ls-files -- "$rel")"; st=$?
39
- fail_closed "$st" WORKFLOW-TIERING "git ls-files ($rel)"
40
- [[ -n "$listing" ]] && is_tracked=1
41
- else
42
- git -C "$ROOT" ls-files --error-unmatch -- "$rel" >/dev/null 2>&1 && is_tracked=1
43
- fi
44
-
45
- is_ignored=0
46
- git -C "$ROOT" check-ignore -q -- "$rel"; st=$?
47
- case "$st" in
48
- 0) is_ignored=1 ;;
49
- 1) ;;
50
- *) echo "check-workflow-tiering: git check-ignore exited $st on $rel" >&2; exit 2 ;;
51
- esac
52
-
53
- # assertion A: partition totality
54
- if [[ "$is_tracked" == 0 && "$is_ignored" == 0 ]]; then
55
- errors+=("$rel: neither tracked nor ignored — no tier holds it")
56
- continue
57
- fi
58
- if [[ "$is_tracked" == 0 ]]; then ignored=$((ignored + 1)); continue; fi
59
- tracked=$((tracked + 1))
60
- [[ -d "$m" ]] && continue
61
-
62
- # assertion B: header presence and ruled payload form
63
- [[ -r "$m" ]] || { echo "check-workflow-tiering: member not readable: $rel" >&2; exit 2; }
64
- first=""
65
- IFS= read -r first < "$m" || true
66
- if [[ "$first" != "# contract: "* ]]; then
67
- errors+=("$rel: tracked member's first line is not a '# contract: ' header: ${first:0:60}")
68
- continue
69
- fi
70
- payload="${first#"# contract: "}"
71
- sig="${payload%% — *}"; sig="${sig%% -- *}"
72
- sig="${sig%"${sig##*[![:space:]]}"}"
73
- if [[ ! "$sig" =~ $POINTER_RE ]] && [[ ! "$sig" =~ $VERSION_RE ]]; then
74
- errors+=("$rel: '# contract: ' payload is neither '<owner-path>.md §<section>' nor '<format-name> v<N>': $sig")
75
- fi
76
- done
77
-
78
- if [[ ${#errors[@]} -gt 0 ]]; then
79
- echo "check-workflow-tiering: ${#errors[@]} workflow-surface violation(s):"
80
- printf ' %s\n' "${errors[@]}"
81
- echo " help: every workflow-dir member belongs to one of two tiers — a tracked checked projection or a gitignored local capture; add the member to .gitignore or commit it. A tracked member's first line is '# contract: <owner-path>.md §<section>' (optionally ' — <grammar or gloss>'), or '# contract: <format-name> v<N>' where a gate parses the header as a wire-format version and its owning SPEC says so."
82
- exit 1
83
- fi
84
- echo "WORKFLOW-TIERING: clean ($tracked tracked projection(s) with a ruled '# contract: ' header, $ignored capture member(s); every member holds a tier)"
85
- exit 0
@@ -1 +0,0 @@
1
- --fixture .
@@ -1 +0,0 @@
1
- --fixture .
@@ -1,94 +0,0 @@
1
- #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §The close-surface roster — the derivation: every close-surface: declaration, unioned with the workflow directory's capture tier so an undeclared capture surface is reported rather than missing
3
- # usage: close-surfaces.sh [scan-root] (default: the repo toplevel)
4
- # prints one tab-separated '<path> <mode> <reclaim> <owner>' row per surface,
5
- # sorted by path; exit 2 on an unreadable configuration or declaration surface
6
- set -uo pipefail
7
-
8
- ROOT="${1:-}"
9
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
- SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
11
- [[ -n "$ROOT" ]] && { cd "$ROOT" || exit 2; }
12
- # shellcheck source=../../gate-sdk/lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
- # shellcheck source=../lib/stages.sh
15
- source "$KIT/lib/stages.sh"
16
-
17
- if [[ -z "$ROOT" ]]; then
18
- REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || {
19
- echo "close-surfaces: not a git repository — the capture tier is underivable" >&2; exit 2; }
20
- cd "$REPO_ROOT" || exit 2
21
- fi
22
- git rev-parse --git-dir >/dev/null 2>&1 || {
23
- echo "close-surfaces: not a git repository — the capture tier is underivable" >&2; exit 2; }
24
-
25
- declare -a SURFACES=()
26
- _add_surface() {
27
- local f s
28
- f="${1#./}"
29
- for s in ${SURFACES[@]+"${SURFACES[@]}"}; do [[ "$s" == "$f" ]] && return 0; done
30
- SURFACES+=("$f")
31
- }
32
-
33
- while IFS= read -r r; do
34
- [[ -n "$r" ]] || continue
35
- [[ -f "${r%/}/$LIFECYCLE_KIT_ROSTER_BASENAME" ]] && _add_surface "${r%/}/$LIFECYCLE_KIT_ROSTER_BASENAME"
36
- done < <(gate_kit_roots_rel)
37
-
38
- shopt -s nullglob globstar
39
- for g in ${LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS[@]+"${LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS[@]}"}; do
40
- for f in $g; do [[ -f "$f" ]] && _add_surface "$f"; done
41
- done
42
- shopt -u nullglob globstar
43
-
44
- # spec: lifecycle-kit/SPEC.md §The close-surface roster — fenced blocks are skipped, so the directive's own grammar is quotable where it is specified (check-spec-pointer's carve-out, same reason)
45
- read -r -d '' EXTRACT <<'AWK' || true
46
- /^[[:space:]]*```/ { fence = !fence; next }
47
- fence { next }
48
- /^[[:space:]]*close-surface:[[:space:]]/ { print }
49
- AWK
50
-
51
- declare -a ROWS=()
52
- declare -a DECLARED=()
53
- for s in ${SURFACES[@]+"${SURFACES[@]}"}; do
54
- [[ -r "$s" ]] || { echo "close-surfaces: declaration surface not readable: $s" >&2; exit 2; }
55
- while IFS= read -r line; do
56
- [[ -n "$line" ]] || continue
57
- body="${line#"${line%%close-surface:*}"}"
58
- body="${body#close-surface:}"
59
- body="${body#"${body%%[![:space:]]*}"}"
60
- body="${body%"${body##*[![:space:]]}"}"
61
- reclaim="-"
62
- if [[ "$body" == *" reclaim="* ]]; then
63
- reclaim="${body#* reclaim=}"
64
- body="${body%% reclaim=*}"
65
- fi
66
- path="${body%%[[:space:]]*}"
67
- mode="${body#"$path"}"
68
- mode="${mode#"${mode%%[![:space:]]*}"}"
69
- mode="${mode%"${mode##*[![:space:]]}"}"
70
- ROWS+=("$path $mode $reclaim $s")
71
- DECLARED+=("$path")
72
- done < <(awk "$EXTRACT" "$s")
73
- done
74
-
75
- WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
76
- if [[ -d "$WF" ]]; then
77
- shopt -s nullglob dotglob
78
- for m in "$WF"/*; do
79
- [[ -f "$m" ]] || continue
80
- git check-ignore -q -- "$m"; st=$?
81
- case "$st" in
82
- 0) ;;
83
- 1) continue ;;
84
- *) echo "close-surfaces: git check-ignore exited $st on $m" >&2; exit 2 ;;
85
- esac
86
- seen=0
87
- for d in ${DECLARED[@]+"${DECLARED[@]}"}; do [[ "$d" == "$m" ]] && { seen=1; break; }; done
88
- [[ "$seen" == 1 ]] || ROWS+=("$m (undeclared) - -")
89
- done
90
- shopt -u nullglob dotglob
91
- fi
92
-
93
- [[ ${#ROWS[@]} -eq 0 ]] && exit 0
94
- printf '%s\n' "${ROWS[@]}" | LC_ALL=C sort -t' ' -k1,1
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=.workflow/*,kit:SPEC.md,.claude/commands/*.md,.gitignore dir=one valve=none tier=precommit
3
- # install: on-surface
4
- # 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
5
- #
6
- # usage: check-close-surfaces.sh [scan-root] (derives through bin/close-surfaces.sh)
7
- set -uo pipefail
8
-
9
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
- SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
11
- # shellcheck source=../../gate-sdk/lib/gate.sh
12
- source "$SDK/lib/gate.sh"
13
-
14
- declare -a ROOTARG=()
15
- if [[ -n "${1:-}" ]]; then
16
- cd "$1" || { echo "check-close-surfaces: not a directory: $1" >&2; exit 2; }
17
- ROOTARG=(.)
18
- fi
19
-
20
- roster="$(bash "$KIT/bin/close-surfaces.sh" ${ROOTARG[@]+"${ROOTARG[@]}"})"; st=$?
21
- fail_closed "$st" CLOSE-SURFACES "bin/close-surfaces.sh"
22
-
23
- WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
24
- FORCED_RE='^forced=[A-Za-z0-9._/-]+\.md[[:space:]]+§[^[:space:]]'
25
-
26
- errors=()
27
- declarations=0
28
- captures=0
29
- while IFS=$'\t' read -r path mode reclaim owner; do
30
- [[ -n "$path" ]] || continue
31
-
32
- # assertion A: no undeclared capture surface
33
- if [[ "$mode" == "(undeclared)" ]]; then
34
- captures=$((captures + 1))
35
- errors+=("$path: capture-tier workflow member with no 'close-surface:' declaration — close would read it only by luck")
36
- continue
37
- fi
38
- declarations=$((declarations + 1))
39
-
40
- # assertion B: every declaration carries a mode; a forced= citation is well-formed
41
- if [[ -z "$mode" ]]; then
42
- errors+=("$owner: 'close-surface: $path' carries no mode — say 'advisory' or 'forced=<owner-path>.md §<section>'")
43
- elif [[ "$mode" != "advisory" ]]; then
44
- if [[ ! "$mode" =~ $FORCED_RE ]]; then
45
- errors+=("$owner: 'close-surface: $path' mode is neither 'advisory' nor a well-formed 'forced=<owner-path>.md §<section>': $mode")
46
- fi
47
- fi
48
-
49
- # assertion C: a capture-tier declaration names its reclaim command
50
- if [[ "$path" == "$WF"/* ]] && git check-ignore -q -- "$path" 2>/dev/null; then
51
- captures=$((captures + 1))
52
- [[ "$reclaim" == "-" || -z "$reclaim" ]] \
53
- && errors+=("$owner: 'close-surface: $path' is capture-tier (gitignored) and names no reclaim= command")
54
- fi
55
- done <<<"$roster"
56
-
57
- if [[ ${#errors[@]} -gt 0 ]]; then
58
- echo "check-close-surfaces: ${#errors[@]} close-surface roster violation(s):"
59
- printf ' %s\n' "${errors[@]}"
60
- echo " help: declare the surface with a full-line 'close-surface: <path> <mode> [reclaim=<command>]' directive in the SPEC section that already owns it — never a central list. <mode> is 'advisory' (no forcing function; a skip is a visible judgment) or 'forced=<owner-path>.md §<section>' naming the structural forcing function. A gitignored capture surface names the drain that empties it as the trailing reclaim=<command>."
61
- exit 1
62
- fi
63
- echo "CLOSE-SURFACES: clean ($declarations declared surface(s), $captures capture-tier; every capture member declared, every declaration moded, every capture-tier declaration reclaimed)"
64
- exit 0
@@ -1,198 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
3
- # install: on-surface
4
- # spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal
5
- set -uo pipefail
6
-
7
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
- SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
9
- # shellcheck source=../../gate-sdk/lib/gate.sh
10
- source "$SDK/lib/gate.sh"
11
- # shellcheck source=../lib/stages.sh
12
- source "$KIT/lib/stages.sh"
13
-
14
- QUEUE="${1:-$LIFECYCLE_KIT_QUEUE_FILE}"
15
- STATE="${2:-$LIFECYCLE_KIT_STATE_FILE}"
16
-
17
- [[ -f "$QUEUE" ]] || { echo "check-stage-entry: file not found: $QUEUE" >&2; exit 2; }
18
- [[ -f "$STATE" ]] || { echo "check-stage-entry: file not found: $STATE" >&2; exit 2; }
19
-
20
- hdr="$(lifecycle_header "$QUEUE")"
21
- if [[ -z "$hdr" ]]; then
22
- echo "STAGE-ENTRY: no '## Iteration:' header in $QUEUE"
23
- echo " help: add '## Iteration: <name>' to $QUEUE"
24
- exit 1
25
- fi
26
-
27
- # spec: lifecycle-kit/SPEC.md §check-stage-entry — the two axes, two surfaces: the header names the iteration, the state file's last stamp is the entered stage. An empty cursor is unreachable by construction here — enter-stage hands this gate a temp state file that always carries the candidate stamp, and at pre-commit the entry commit stages that same stamp — so it stays a hard parse error rather than a disarm.
28
- iter="$(lifecycle_header_iter "$hdr")"
29
- stage="$(lifecycle_current_stage "$STATE")"
30
- if [[ -z "$iter" ]]; then
31
- echo "STAGE-ENTRY: could not parse the iteration from: $hdr"
32
- echo " help: header must read '## Iteration: <name>'"
33
- exit 1
34
- fi
35
- if [[ -z "$stage" ]]; then
36
- echo "STAGE-ENTRY: could not parse the entered stage — no stamp line in $STATE"
37
- echo " help: the entered stage is the last '<iter> <stage> <session-id> <YYYY-MM-DD>' stamp; run the stage skill (it stamps as its first step)"
38
- exit 1
39
- fi
40
-
41
- if ! lifecycle_stage_known "$stage"; then
42
- echo "STAGE-ENTRY: cursor stage '$stage' is not a lifecycle stage (${LIFECYCLE_KIT_STAGES[*]})"
43
- echo " help: the last stamp in $STATE must name one of the configured lifecycle stages"
44
- exit 1
45
- fi
46
- pred="${LIFECYCLE_KIT_PREDECESSOR[$stage]:-}"
47
-
48
- errors=()
49
- c_fired=0
50
-
51
- # assertion A: the entered stage's mandatory-predecessor stamp exists for this iteration
52
- if [[ -n "$pred" ]]; then
53
- found="$(awk -v it="$iter" -v pr="$pred" '
54
- /^---[[:space:]]*$/ { f = 1; next }
55
- f && NF { if ($1 == it && $2 == pr) { print "1"; exit } }
56
- ' "$STATE")"; st=$?
57
- fail_closed "$st" STAGE-ENTRY "awk predecessor-stamp scan"
58
- [[ "$found" == "1" ]] || errors+=("entering '$stage' but no '$iter $pred' stamp in $STATE — the mandatory predecessor stage was never invoked (run /$pred, or correct the entry stamp)")
59
- fi
60
-
61
- # assertion B: drain-entry queue-empty — [drain-exempt:] exempts at drain entry only; the drain successor's entry backstops with no exemption
62
- b_mode=""
63
- if [[ -n "$LIFECYCLE_KIT_DRAIN_STAGE" ]]; then
64
- if [[ "$stage" == "$LIFECYCLE_KIT_DRAIN_STAGE" ]]; then
65
- b_mode=drain
66
- else
67
- for s in "${!LIFECYCLE_KIT_PREDECESSOR[@]}"; do
68
- [[ "$s" == "$stage" && "${LIFECYCLE_KIT_PREDECESSOR[$s]}" == "$LIFECYCLE_KIT_DRAIN_STAGE" ]] && b_mode=successor
69
- done
70
- fi
71
- fi
72
- exempt_detail=""
73
- if [[ -n "$b_mode" ]]; then
74
- secs=""
75
- for s in "${LIFECYCLE_KIT_ACTIVE_SECTIONS[@]}"; do secs+="${secs:+|}$s"; done
76
- scan="$(awk -v secre="^## ($secs)[[:space:]]*$" -v exempt="$([[ "$b_mode" == drain ]] && echo 1 || echo 0)" '
77
- $0 ~ secre { inq = 1; next }
78
- /^## / { inq = 0 }
79
- !inq || $0 !~ /^- / { next }
80
- {
81
- if (match($0, /\[drain-exempt:[[:space:]]*[^]]*\]/)) {
82
- r = substr($0, RSTART, RLENGTH)
83
- sub(/^\[drain-exempt:[[:space:]]*/, "", r); sub(/\]$/, "", r)
84
- gsub(/[[:space:]]+$/, "", r)
85
- if (r == "") printf "M\t%d\t%s\n", FNR, $0
86
- else if (exempt) printf "E\t%d\t%s\n", FNR, r
87
- else printf "L\t%d\t%s\n", FNR, $0
88
- } else printf "L\t%d\t%s\n", FNR, $0
89
- }
90
- ' "$QUEUE")"; st=$?
91
- fail_closed "$st" STAGE-ENTRY "awk active-queue scan"
92
- leftover=""; malformed=""; n_exempt=0
93
- while IFS=$'\t' read -r kind ln text; do
94
- [[ -n "$kind" ]] || continue
95
- case "$kind" in
96
- L) leftover+=$'\n'" $ln: $text" ;;
97
- M) malformed+=$'\n'" $ln: $text" ;;
98
- E) n_exempt=$((n_exempt + 1)); exempt_detail+="${exempt_detail:+; }$ln: $text" ;;
99
- esac
100
- done <<< "$scan"
101
- if [[ -n "$leftover" ]]; then
102
- if [[ "$b_mode" == drain ]]; then
103
- errors+=("entering '$stage' but the active queue is non-empty (the prior stage is not drained):$leftover")
104
- else
105
- errors+=("entering '$stage' (the drain successor) but the active queue is non-empty — nothing may remain active past '$LIFECYCLE_KIT_DRAIN_STAGE', [drain-exempt:] included:$leftover")
106
- fi
107
- fi
108
- [[ -z "$malformed" ]] || errors+=("[drain-exempt:] with an empty reason is malformed (the reason is the audit trail):$malformed")
109
- fi
110
-
111
- # assertion C: audit-entry with a cross-component amendment signal and no audit stamp demands that stamp or a recorded waiver (lifecycle-kit/SPEC.md §check-stage-entry)
112
- if [[ -n "$LIFECYCLE_KIT_AUDIT_STAGE" && "$stage" == "$LIFECYCLE_KIT_AUDIT_ENTRY_STAGE" ]]; then
113
- audit_stamp="$(awk -v it="$iter" -v au="$LIFECYCLE_KIT_AUDIT_STAGE" '
114
- /^---[[:space:]]*$/ { f = 1; next }
115
- f && NF { if ($1 == it && $2 == au) { print "1"; exit } }
116
- ' "$STATE")"; st=$?
117
- fail_closed "$st" STAGE-ENTRY "awk audit-stamp scan"
118
-
119
- if [[ "$audit_stamp" != "1" ]]; then
120
- # spec: lifecycle-kit/SPEC.md §check-stage-entry — templates/ paths excluded (a shipped stub is not a live amendment)
121
- declare -A roster=()
122
- while IFS= read -r sf; do
123
- [[ -n "$sf" ]] || continue
124
- sf="${sf#./}"; roster["${sf%/*}"]=1
125
- done < <(gate_find "." -name "$LIFECYCLE_KIT_ROSTER_BASENAME" -type f | grep -v '/templates/' || true) # reads-couples-exempt: whole-tree audit-signal scan; re-fire is owned by the state-file couple every stage entry stamps
126
-
127
- declare -A amend_dirs=()
128
- amend_files=()
129
- while IFS= read -r af; do
130
- [[ -n "$af" ]] || continue
131
- af="${af#./}"; amend_dirs["${af%/*}"]=1; amend_files+=("$af")
132
- done < <(gate_find "." -name "$LIFECYCLE_KIT_AMENDMENT_GLOB" -type f | grep -v '/templates/' || true) # reads-couples-exempt: whole-tree audit-signal scan; re-fire is owned by the state-file couple every stage entry stamps
133
-
134
- contract_alt=""
135
- for ct in "${LIFECYCLE_KIT_CONTRACT_TOKENS[@]}"; do
136
- contract_alt+="${contract_alt:+|}${ct//./\\.}"
137
- done
138
-
139
- signal_detail=""
140
- if [[ ${#amend_dirs[@]} -ge 2 ]]; then
141
- signal_detail="amendments span ${#amend_dirs[@]} component dirs: ${!amend_dirs[*]}"
142
- else
143
- for af in ${amend_files[@]+"${amend_files[@]}"}; do
144
- declare -A comps=(["${af%/*}"]=1)
145
- while IFS= read -r tok; do
146
- [[ -n "$tok" ]] || continue
147
- d="$tok"
148
- for ct in "${LIFECYCLE_KIT_CONTRACT_TOKENS[@]}"; do
149
- d="${d%/$ct}"; d="${d%/${ct%/}}"
150
- done
151
- [[ -n "${roster[$d]:-}" ]] && comps["$d"]=1
152
- done < <(grep -oE '[a-z0-9][a-z0-9/_-]*/('"$contract_alt"')' "$af" 2>/dev/null || true)
153
- if [[ ${#comps[@]} -ge 2 ]]; then
154
- signal_detail="amendment $af references ${#comps[@]} components: ${!comps[*]}"
155
- unset comps
156
- break
157
- fi
158
- unset comps
159
- done
160
- fi
161
-
162
- if [[ -n "$signal_detail" ]]; then
163
- waiver="$(awk -v it="$iter" -v wv="$LIFECYCLE_KIT_WAIVER_TOKEN" '
164
- /^---[[:space:]]*$/ { f = 1; next }
165
- f && NF { if ($1 == it && $2 == wv) { print "1"; exit } }
166
- ' "$STATE")"; st=$?
167
- fail_closed "$st" STAGE-ENTRY "awk waiver scan"
168
- if [[ "$waiver" != "1" ]]; then
169
- c_fired=1
170
- errors+=("entering '$stage' with a cross-component amendment signal and no '$iter $LIFECYCLE_KIT_AUDIT_STAGE' stamp ($signal_detail) — the audit trigger (≥2 components' contracts) was not verified for this iteration")
171
- fi
172
- fi
173
- fi
174
- fi
175
-
176
- if [[ ${#errors[@]} -gt 0 ]]; then
177
- echo "STAGE-ENTRY: ${#errors[@]} prior-stage readiness issue(s) entering '$stage' of '$iter':"
178
- printf ' %s\n' "${errors[@]}"
179
- if [[ "$c_fired" == "1" ]]; then
180
- echo " help: a cross-component $LIFECYCLE_KIT_AUDIT_ENTRY_STAGE entry must run /$LIFECYCLE_KIT_AUDIT_STAGE (stamps '$iter $LIFECYCLE_KIT_AUDIT_STAGE <session> <date>'), or — on an explicit user ruling, never self-issued by the entering session — record a deliberate waiver line '$iter $LIFECYCLE_KIT_WAIVER_TOKEN <session> <date>' in $STATE"
181
- else
182
- echo " help: a stage entry re-verifies the prior stage's static exit — invoke the predecessor skill (it stamps $STATE) and drain the active queue before entering $LIFECYCLE_KIT_DRAIN_STAGE"
183
- fi
184
- exit 1
185
- fi
186
-
187
- if [[ -z "$pred" ]]; then
188
- detail="'$stage' has no mandatory predecessor"
189
- elif [[ "$b_mode" == drain ]]; then
190
- detail="predecessor '$pred' stamped; active queue drained"
191
- [[ -z "$exempt_detail" ]] || detail+=" (drain-exempt residue — $exempt_detail)"
192
- elif [[ "$b_mode" == successor ]]; then
193
- detail="predecessor '$pred' stamped; active queue empty (drain-successor backstop, no exemption)"
194
- else
195
- detail="predecessor '$pred' stamped"
196
- fi
197
- echo "STAGE-ENTRY: clean ('$iter' / '$stage' — $detail)"
198
- exit 0