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
@@ -1,242 +0,0 @@
1
- #!/usr/bin/env bash
2
- # spec: drift-kit/SPEC.md §The published-evidence extractor — governed-trajectory table, pure function of committed history
3
- # usage: trajectory.sh [--emit] (bare: human header + table; --emit: table only, for the committed projection)
4
- # advisory by construction: exit is always 0, never joins gates.list; the
5
- # consumer freshness gate (check-trajectory-fresh) is what blocks a stale emission.
6
- set -uo pipefail
7
-
8
- REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
9
- cd "$REPO_ROOT" 2>/dev/null || exit 0
10
-
11
- _ds_cfg="${DRIFT_KIT_CONFIG_FILE:-}"
12
- if [[ -n "$_ds_cfg" ]]; then
13
- [[ -f "$_ds_cfg" ]] || {
14
- echo "drift-kit: DRIFT_KIT_CONFIG_FILE not found: $_ds_cfg" >&2
15
- exit 2
16
- }
17
- # shellcheck source=/dev/null # consumer config path is resolved at runtime
18
- source "$_ds_cfg"
19
- else
20
- _ds_cfg="${GATE_SDK_GATES_DIR:-scripts}/drift-config.sh"
21
- if [[ -f "$_ds_cfg" ]]; then
22
- # shellcheck source=/dev/null # consumer config path is resolved at runtime
23
- source "$_ds_cfg"
24
- fi
25
- fi
26
- unset _ds_cfg
27
-
28
- # spec: drift-kit/SPEC.md §Layout and configuration — DRIFT_KIT_TRAJECTORY_SURFACES is "<state-file> <evidence-file>"
29
- _wf="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
30
- : "${DRIFT_KIT_TRAJECTORY_SURFACES:=$_wf/WORKFLOW-STATE.txt $_wf/validate-evidence.txt}"
31
- : "${DRIFT_KIT_GATES_FILE:=${GATE_SDK_GATES_DIR:-scripts}/gates.list}"
32
- unset _wf
33
- read -r STATE_FILE EVIDENCE_FILE _ <<<"$DRIFT_KIT_TRAJECTORY_SURFACES"
34
-
35
- # spec: drift-kit/SPEC.md §Layout and configuration — DRIFT_KIT_STAGES is the ordered stage roster the trajectory table renders; unset falls open to the historical five so standalone/un-upgraded emission stays byte-identical (drift re-derives with its own knob, never sourcing lifecycle — the DRIFT_KIT_STATE_FILE precedent)
36
- declare -p DRIFT_KIT_STAGES &>/dev/null || DRIFT_KIT_STAGES=(scope align build validate close)
37
-
38
- # spec: drift-kit/SPEC.md §The published-evidence extractor — each stage's slot label is its shortest prefix unique among the roster; header legend and cells read this one map so they cannot drift, and a non-colliding roster reduces every label to its single letter (five-stage default byte-identical)
39
- declare -A STAGE_ABBR
40
- for _s in "${DRIFT_KIT_STAGES[@]}"; do
41
- _len=1
42
- while (( _len < ${#_s} )); do
43
- _pfx="${_s:0:_len}"
44
- _collide=0
45
- for _o in "${DRIFT_KIT_STAGES[@]}"; do
46
- [[ "$_o" == "$_s" ]] && continue
47
- [[ "${_o:0:_len}" == "$_pfx" ]] && { _collide=1; break; }
48
- done
49
- (( _collide )) || break
50
- _len=$(( _len + 1 ))
51
- done
52
- STAGE_ABBR[$_s]="${_s:0:_len}"
53
- done
54
- _stage_legend=""
55
- for _s in "${DRIFT_KIT_STAGES[@]}"; do
56
- _stage_legend="$_stage_legend${_stage_legend:+ }${STAGE_ABBR[$_s]}"
57
- done
58
- unset _s _o _len _pfx _collide
59
-
60
- # spec: drift-kit/SPEC.md §The published-evidence extractor — the case-arm membership test and the git-log grep pre-filter build one alternation from the roster, so the two roster reads cannot diverge
61
- _stage_alt="$(IFS='|'; printf '%s' "${DRIFT_KIT_STAGES[*]}")"
62
-
63
- emit=0
64
- [[ "${1:-}" == "--emit" ]] && emit=1
65
-
66
- # spec: drift-kit/SPEC.md §The published-evidence extractor — iteration+stages harvest; state file truncates at scope, history keeps every stamp
67
- ITERS=() # iteration names, chronological (all, in-flight included — for range boundaries)
68
- declare -A START_COMMIT # iter -> first commit that added any of its stamps
69
- declare -A CLOSE_COMMIT # iter -> commit that added its 'close' stamp (unset if never closed)
70
- declare -A STAGES # iter -> space-joined stage names seen, in first-seen order
71
-
72
- if git cat-file -e "HEAD:$STATE_FILE" 2>/dev/null; then
73
- while IFS= read -r line; do
74
- case "$line" in
75
- COMMIT\ *) cur_commit="${line#COMMIT }" ;;
76
- +*)
77
- stamp="${line#+}"
78
- read -r it st _ <<<"$stamp"
79
- case " ${DRIFT_KIT_STAGES[*]} " in
80
- *" $st "*) ;;
81
- *) continue ;;
82
- esac
83
- if [[ -z "${START_COMMIT[$it]:-}" ]]; then
84
- START_COMMIT[$it]="$cur_commit"
85
- ITERS+=("$it")
86
- STAGES[$it]=""
87
- fi
88
- case " ${STAGES[$it]} " in
89
- *" $st "*) ;;
90
- *) STAGES[$it]="${STAGES[$it]:+${STAGES[$it]} }$st" ;;
91
- esac
92
- [[ "$st" == close ]] && CLOSE_COMMIT[$it]="$cur_commit"
93
- ;;
94
- esac
95
- done < <(git log --reverse --format='COMMIT %H' -p -U0 -- "$STATE_FILE" 2>/dev/null \
96
- | grep -E "^COMMIT |^\+[a-z0-9-]+ ($_stage_alt) ")
97
- fi
98
-
99
- # spec: drift-kit/SPEC.md §The published-evidence extractor — every range-scoped column freezes at (close(N-1), close(N)]; no column reads HEAD, so the emission is a pure function of closed history
100
- declare -A COMMIT_ITER FEAT DEBT # commit -> owning closed iteration (range-attributed); per-iteration feat/debt subject split
101
- CLOSED_ITERS=()
102
- for it in "${ITERS[@]}"; do
103
- [[ -n "${CLOSE_COMMIT[$it]:-}" ]] && CLOSED_ITERS+=("$it")
104
- done
105
- prev_close=""
106
- for it in "${CLOSED_ITERS[@]}"; do
107
- close_c="${CLOSE_COMMIT[$it]}"
108
- if [[ -n "$prev_close" ]]; then
109
- range="$prev_close..$close_c" # (close(N-1), close(N)]
110
- else
111
- range="$close_c" # first row: close(0) is the empty boundary — every ancestor up to close(1)
112
- fi
113
- f=0; d=0
114
- while IFS=' ' read -r h subj; do
115
- COMMIT_ITER["$h"]="$it"
116
- case "$subj" in
117
- feat*) f=$((f + 1)) ;;
118
- fix* | refactor*) d=$((d + 1)) ;;
119
- esac
120
- done < <(git log --format='%H %s' "$range" 2>/dev/null)
121
- FEAT[$it]="$f"; DEBT[$it]="$d"
122
- prev_close="$close_c"
123
- done
124
-
125
- # spec: drift-kit/SPEC.md §The published-evidence extractor — amendment-latency harvest, fixture/template paths excluded
126
- declare -A ADD_DATE AMEND_COUNT AMEND_MAXLAG
127
- while IFS= read -r line; do
128
- case "$line" in
129
- COMMIT\ *)
130
- rest="${line#COMMIT }"
131
- read -r cur_commit cur_date <<<"$rest"
132
- ;;
133
- A$'\t'*)
134
- path="${line#A$'\t'}"
135
- case "$path" in */gate-tests/*|*/templates/*) continue ;; esac
136
- ADD_DATE["$path"]="$cur_date"
137
- ;;
138
- D$'\t'*)
139
- path="${line#D$'\t'}"
140
- case "$path" in */gate-tests/*|*/templates/*) continue ;; esac
141
- add_date="${ADD_DATE[$path]:-}"
142
- [[ -n "$add_date" ]] || continue
143
- owner="${COMMIT_ITER[$cur_commit]:-}"
144
- [[ -n "$owner" ]] || continue
145
- a_epoch="$(date -d "$add_date" +%s 2>/dev/null)" || continue
146
- d_epoch="$(date -d "$cur_date" +%s 2>/dev/null)" || continue
147
- lag=$(((d_epoch - a_epoch) / 86400))
148
- AMEND_COUNT[$owner]=$(( ${AMEND_COUNT[$owner]:-0} + 1 ))
149
- [[ "$lag" -gt "${AMEND_MAXLAG[$owner]:-0}" ]] && AMEND_MAXLAG[$owner]="$lag"
150
- ;;
151
- esac
152
- done < <(git log --reverse --format='COMMIT %H %ad' --date=short --diff-filter=AD \
153
- --name-status -- '*/SPEC-*.md' 'SPEC-*.md' 2>/dev/null)
154
-
155
- # spec: drift-kit/SPEC.md §The published-evidence extractor — validate-attestation harvest (evidence manifest also truncates at scope)
156
- declare -A VAL_SUITES VAL_FAIL VAL_PRESENT
157
- if [[ -n "$EVIDENCE_FILE" ]] && git cat-file -e "HEAD:$EVIDENCE_FILE" 2>/dev/null; then
158
- while IFS= read -r stamp; do
159
- read -r it _suite rest <<<"$stamp"
160
- [[ -n "$it" ]] || continue
161
- VAL_PRESENT[$it]=1
162
- VAL_SUITES[$it]=$(( ${VAL_SUITES[$it]:-0} + 1 ))
163
- case "$rest" in
164
- *"fail=0 "*) ;;
165
- *"fail="*)
166
- fv="${rest##*fail=}"; fv="${fv%% *}"
167
- [[ "$fv" =~ ^[0-9]+$ ]] && VAL_FAIL[$it]=$(( ${VAL_FAIL[$it]:-0} + fv ))
168
- ;;
169
- esac
170
- done < <(
171
- for c in $(git log --format='%H' -- "$EVIDENCE_FILE" 2>/dev/null); do
172
- git show "$c:$EVIDENCE_FILE" 2>/dev/null
173
- done | grep -E '^[a-z0-9-]+ [a-z_]+ sha256=' | sort -u
174
- )
175
- else
176
- EVIDENCE_FILE="${EVIDENCE_FILE:-(unset)}"
177
- fi
178
-
179
- # spec: drift-kit/SPEC.md §The published-evidence extractor — gate-roster growth (gates.list count at close commit)
180
- declare -A GATE_COUNT
181
- for it in "${!CLOSE_COMMIT[@]}"; do
182
- roster="$(git show "${CLOSE_COMMIT[$it]}:$DRIFT_KIT_GATES_FILE" 2>/dev/null)" \
183
- && GATE_COUNT[$it]="$(printf '%s\n' "$roster" | grep -Evc '^[[:space:]]*(#|$)')" \
184
- || GATE_COUNT[$it]="n/a"
185
- done
186
-
187
- # spec: drift-kit/SPEC.md §The published-evidence extractor — one slot per configured stage in roster order, present as its roster-unique abbreviation or absent as '·'
188
- render_stages() {
189
- local seen=" $1 " out="" s
190
- for s in "${DRIFT_KIT_STAGES[@]}"; do
191
- case "$seen" in
192
- *" $s "*) out="$out${out:+ }${STAGE_ABBR[$s]}" ;;
193
- *) out="$out${out:+ }·" ;;
194
- esac
195
- done
196
- printf '%s' "$out"
197
- }
198
-
199
- state_missing=0
200
- git cat-file -e "HEAD:$STATE_FILE" 2>/dev/null || state_missing=1
201
-
202
- if [[ "$emit" -eq 0 ]]; then
203
- echo "=== Governed trajectory (advisory — this repo's own committed history) ==="
204
- echo "One row per closed iteration; pure function of committed history (drift-kit/SPEC.md)."
205
- echo
206
- fi
207
-
208
- echo "| iteration | stages ($_stage_legend) | commits (feat/debt) | amendments (merged · max lag) | validate (suites) | gates.list |"
209
- echo "| --- | --- | --- | --- | --- | --- |"
210
-
211
- if [[ "$state_missing" -eq 1 ]]; then
212
- echo "| n/a (no $STATE_FILE) | · | · | · | · | · |"
213
- exit 0
214
- fi
215
-
216
- for it in "${ITERS[@]}"; do
217
- [[ -n "${CLOSE_COMMIT[$it]:-}" ]] || continue # closed iterations only
218
-
219
- stages_cell="$(render_stages "${STAGES[$it]}")"
220
- commits_cell="${FEAT[$it]:-0}f/${DEBT[$it]:-0}d"
221
-
222
- ac="${AMEND_COUNT[$it]:-0}"
223
- if [[ "$ac" -eq 0 ]]; then
224
- amend_cell="0"
225
- else
226
- amend_cell="$ac · ≤${AMEND_MAXLAG[$it]:-0}d"
227
- fi
228
-
229
- if [[ -n "${VAL_PRESENT[$it]:-}" ]]; then
230
- vf="${VAL_FAIL[$it]:-0}"
231
- if [[ "$vf" -eq 0 ]]; then
232
- val_cell="${VAL_SUITES[$it]}s clean"
233
- else
234
- val_cell="${VAL_SUITES[$it]}s ${vf}✗"
235
- fi
236
- else
237
- val_cell="n/a (pre-evidence-kit)"
238
- fi
239
-
240
- echo "| $it | $stages_cell | $commits_cell | $amend_cell | $val_cell | ${GATE_COUNT[$it]:-n/a} |"
241
- done
242
- exit 0
@@ -1,87 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=README.md,scripts/evidence-config.sh,gate-sdk/lib/gate.sh dir=bi valve=none tier=precommit
3
- # install: on-surface
4
- # spec: evidence-kit/SPEC.md §check-battery-roster — the runner doc's battery-roster block holds name-set parity with EVIDENCE_KIT_SUITES, both directions
5
- #
6
- # usage: check-battery-roster.sh [runner-doc]
7
- # bare: EVIDENCE_KIT_RUNNER_DOC (default README.md) against the git toplevel;
8
- # positional: taken as given, so a fixture tree can be pointed at.
9
- set -uo pipefail
10
-
11
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/evidence.sh
13
- source "$KIT/lib/evidence.sh"
14
-
15
- BEGIN="<!-- battery-roster:begin -->"
16
- END="<!-- battery-roster:end -->"
17
-
18
- DOC="${1:-}"
19
- if [[ -z "$DOC" ]]; then
20
- top="$(git rev-parse --show-toplevel)" \
21
- || { echo "check-battery-roster: not a git repository and no runner-doc argument" >&2; exit 2; }
22
- DOC="$top/${EVIDENCE_KIT_RUNNER_DOC:-README.md}"
23
- fi
24
- [[ -f "$DOC" ]] || { echo "check-battery-roster: runner doc not found: $DOC" >&2; exit 2; }
25
- [[ ${#EVIDENCE_KIT_SUITES[@]} -gt 0 ]] \
26
- || { echo "check-battery-roster: EVIDENCE_KIT_SUITES is empty — no suite roster to hold $DOC against" >&2; exit 2; }
27
- grep -qF -- "$BEGIN" "$DOC" \
28
- || { echo "check-battery-roster: no '$BEGIN' marker block in $DOC" >&2; exit 2; }
29
-
30
- # spec: evidence-kit/SPEC.md §check-battery-roster — a suite's documented invocation is EVIDENCE_KIT_RUN_<suite> minus a leading 'env' and its VAR=value assignments, the validate harness's environment being no part of what a contributor types
31
- normalize_invocation() {
32
- local -a t=()
33
- read -r -a t <<<"${1-}"
34
- local out="" tok head=1
35
- for tok in ${t[@]+"${t[@]}"}; do
36
- if [[ "$head" -eq 1 ]]; then
37
- [[ "$tok" == "env" || "$tok" =~ ^[A-Za-z_][A-Za-z0-9_]*= ]] && continue
38
- head=0
39
- fi
40
- out+="${out:+ }$tok"
41
- done
42
- printf '%s\n' "$out"
43
- }
44
-
45
- roster="$(awk -v b="$BEGIN" -v e="$END" '
46
- { line = $0; sub(/#.*$/, "", line); gsub(/^[ \t]+|[ \t\r]+$/, "", line); gsub(/[ \t]+/, " ", line) }
47
- line == b { inb = 1; next }
48
- line == e { inb = 0; next }
49
- inb && line ~ /^[a-z][a-z0-9_-]* / { print FNR ":" line }
50
- ' "$DOC")"; st=$?
51
- fail_closed "$st" check-battery-roster awk
52
-
53
- declare -A roster_line=()
54
- while IFS= read -r r; do
55
- [[ -n "$r" ]] || continue
56
- roster_line["${r#*:}"]="${r%%:*}"
57
- done <<<"$roster"
58
-
59
- declare -A suite_of=()
60
- for s in "${EVIDENCE_KIT_SUITES[@]}"; do
61
- c="$(normalize_invocation "$(ek_suite_cmd "$s")")"
62
- [[ -n "$c" ]] && suite_of["$c"]="$s"
63
- done
64
-
65
- findings=()
66
- # assertion A: every configured suite's documented invocation is a roster line
67
- for c in "${!suite_of[@]}"; do
68
- [[ -n "${roster_line[$c]:-}" ]] \
69
- || findings+=("$DOC: suite '${suite_of[$c]}' is absent from the battery-roster block — no line reads '$c'")
70
- done
71
- # assertion B: every roster line resolves to a configured suite
72
- for c in "${!roster_line[@]}"; do
73
- [[ -n "${suite_of[$c]:-}" ]] \
74
- || findings+=("$DOC:${roster_line[$c]}: roster line runs no configured suite: '$c'")
75
- done
76
-
77
- if [[ ${#findings[@]} -gt 0 ]]; then
78
- printf '%s\n' "check-battery-roster: the battery-roster block is out of parity with EVIDENCE_KIT_SUITES:"
79
- printf ' %s\n' "${findings[@]}" | sort
80
- echo " help: keep the block in name-set parity with the configured suites — add the"
81
- echo " missing suite's documented invocation, or drop the line whose command"
82
- echo " runs no configured suite (evidence-kit/SPEC.md §check-battery-roster)."
83
- exit 1
84
- fi
85
-
86
- echo "BATTERY-ROSTER: clean (${#EVIDENCE_KIT_SUITES[@]} configured suite(s) in name-set parity with the battery-roster block in $DOC)"
87
- exit 0
@@ -1,104 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=.workflow/validate-baseline.txt,TASK-QUEUE.md dir=one valve=none tier=precommit
3
- # install: zero-config
4
- # spec: evidence-kit/SPEC.md §check-evidence-baseline — held-constant baseline grammar, blocking-slug liveness, and (when scenario globs are configured) manifest↔disk set equality
5
- set -uo pipefail
6
-
7
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
- # shellcheck source=../lib/evidence.sh
9
- source "$KIT/lib/evidence.sh"
10
-
11
- BASELINE="${1:-$EVIDENCE_KIT_BASELINE_FILE}"
12
- QUEUE="${2:-$EVIDENCE_KIT_QUEUE_FILE}"
13
-
14
- [[ -f "$BASELINE" ]] || {
15
- echo "EVIDENCE-BASELINE: baseline not found: $BASELINE"
16
- echo " help: create $BASELINE with a comment header and one '<suite> <scenario> <status> [<slug>]' line per known scenario"
17
- exit 1
18
- }
19
-
20
- errors=()
21
-
22
- declare -A slug_of=()
23
- while IFS= read -r line; do
24
- read -r suite scenario status slug rest <<<"$line"
25
- if [[ -z "$suite" || -z "$scenario" || -z "$status" ]]; then
26
- errors+=("malformed line (want '<suite> <scenario> <status> [<slug>]'): $line"); continue
27
- fi
28
- if [[ -n "$rest" ]]; then
29
- errors+=("too many fields (a slug is a single token): $line"); continue
30
- fi
31
- case "$status" in
32
- pass)
33
- [[ -z "$slug" ]] || errors+=("a 'pass' scenario takes no blocking slug: $line")
34
- ;;
35
- fail|ignore)
36
- if [[ -z "$slug" ]]; then
37
- errors+=("a '$status' scenario requires a blocking slug (a live task or permanent marker): $line")
38
- else
39
- slug_of["$slug"]=1
40
- fi
41
- ;;
42
- *)
43
- errors+=("bad status '$status' (want pass|fail|ignore): $line")
44
- ;;
45
- esac
46
- done < <(ek_data_lines "$BASELINE")
47
-
48
- if [[ ${#slug_of[@]} -gt 0 ]]; then
49
- declare -A permanent=()
50
- for p in ${EVIDENCE_KIT_PERMANENT_SLUGS[@]+"${EVIDENCE_KIT_PERMANENT_SLUGS[@]}"}; do permanent["$p"]=1; done
51
- declare -A live=() done_only=()
52
- if [[ -f "$QUEUE" ]]; then
53
- while read -r qslug qsec; do
54
- if [[ "$qsec" == "Done" ]]; then
55
- [[ -n "${live[$qslug]:-}" ]] || done_only["$qslug"]=1
56
- else
57
- live["$qslug"]=1
58
- unset 'done_only[$qslug]'
59
- fi
60
- done < <(awk '
61
- /^##[[:space:]]/ { sec = $0; sub(/^##[[:space:]]*/, "", sec); next }
62
- /^-[[:space:]]+\*\*[^*]+\*\*/ {
63
- s = $0; sub(/^-[[:space:]]+\*\*/, "", s); sub(/\*\*.*$/, "", s)
64
- print s, sec
65
- }
66
- ' "$QUEUE")
67
- fi
68
- for slug in "${!slug_of[@]}"; do
69
- [[ -n "${permanent[$slug]:-}" ]] && continue
70
- [[ -n "${live[$slug]:-}" ]] && continue
71
- if [[ -n "${done_only[$slug]:-}" ]]; then
72
- errors+=("blocking slug '$slug' is a Done task — stale; promote the scenario or repoint the slug")
73
- else
74
- errors+=("blocking slug '$slug' resolves to no live task in $QUEUE and no permanent marker")
75
- fi
76
- done
77
- fi
78
-
79
- for suite in "${!EVIDENCE_KIT_SCENARIO_GLOBS[@]}"; do
80
- glob="${EVIDENCE_KIT_SCENARIO_GLOBS[$suite]}"
81
- declare -A on_disk=() in_base=()
82
- shopt -s nullglob
83
- for f in $glob; do on_disk["$(basename "$f")"]=1; done
84
- shopt -u nullglob
85
- while read -r bsuite bscen _; do
86
- [[ "$bsuite" == "$suite" ]] && in_base["$bscen"]=1
87
- done < <(ek_data_lines "$BASELINE")
88
- for s in "${!in_base[@]}"; do
89
- [[ -n "${on_disk[$s]:-}" ]] || errors+=("suite '$suite': baseline scenario '$s' matches no file under glob '$glob'")
90
- done
91
- for s in "${!on_disk[@]}"; do
92
- [[ -n "${in_base[$s]:-}" ]] || errors+=("suite '$suite': on-disk scenario '$s' (glob '$glob') has no baseline line")
93
- done
94
- unset on_disk in_base
95
- done
96
-
97
- if [[ ${#errors[@]} -gt 0 ]]; then
98
- echo "EVIDENCE-BASELINE: ${#errors[@]} issue(s) in $BASELINE:"
99
- printf ' %s\n' "${errors[@]}"
100
- echo " help: each line is '<suite> <scenario> <status> [<slug>]'; a fail/ignore carries a live blocking slug; the baseline is edited by human commit only"
101
- exit 1
102
- fi
103
- echo "EVIDENCE-BASELINE: clean ($(ek_data_lines "$BASELINE" | grep -c . || true) scenario(s); grammar, slug liveness, and coverage hold in $BASELINE)"
104
- exit 0
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=.workflow/validate-evidence.txt,TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
3
- # install: zero-config
4
- # spec: evidence-kit/SPEC.md §check-evidence-manifest — (B) manifest grammar + current-iteration scoping; with lifecycle configured also (A) close-entry green block and (C) validate-stamp↔evidence coupling
5
- set -uo pipefail
6
-
7
- KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
- # shellcheck source=../lib/evidence.sh
9
- source "$KIT/lib/evidence.sh"
10
-
11
- MANIFEST="${1:-$EVIDENCE_KIT_MANIFEST_FILE}"
12
- QUEUE="${2:-$EVIDENCE_KIT_QUEUE_FILE}"
13
- STATE="${3:-$EVIDENCE_KIT_STATE_FILE}"
14
-
15
- [[ -f "$MANIFEST" ]] || {
16
- echo "EVIDENCE-MANIFEST: manifest not found: $MANIFEST"
17
- echo " help: seed it with a '# contract: $EVIDENCE_MANIFEST_CONTRACT' header; run-validate appends one line per suite"
18
- exit 1
19
- }
20
-
21
- want_header="# contract: $EVIDENCE_MANIFEST_CONTRACT"
22
- if [[ "$(head -n1 "$MANIFEST")" != "$want_header" ]]; then
23
- echo "EVIDENCE-MANIFEST: first line is not the versioned wire-format header '$want_header' in $MANIFEST"
24
- echo " help: the manifest's first line declares the wire contract the attestation payload is versioned by; run-validate never rewrites it, and the iteration-boundary truncation preserves it"
25
- exit 1
26
- fi
27
-
28
- iter=""; stage=""
29
- iter="$(ek_queue_iteration "$QUEUE" 2>/dev/null || true)"
30
- stage="$(ek_state_stage "$STATE" 2>/dev/null || true)"
31
-
32
- # assertion B: every manifest line carries the version header, the eight-field shape, and the current iteration
33
- grammar_errs=()
34
- declare -A clean_suite_date=()
35
- have_line_for_iter=0
36
- while IFS= read -r line; do
37
- read -r f1 f2 f3 f4 f5 f6 f7 f8 rest <<<"$line"
38
- if [[ -z "$f8" || -n "$rest" ]]; then
39
- grammar_errs+=("malformed line (want '<iteration> <suite> sha256=… pass=… fail=… ignore=… verdict=… <date>'): $line"); continue
40
- fi
41
- ok=1
42
- [[ "$f3" =~ ^sha256=[0-9a-f]{64}$ ]] || { grammar_errs+=("bad sha256 field '$f3': $line"); ok=0; }
43
- [[ "$f4" =~ ^pass=[0-9]+$ ]] || { grammar_errs+=("bad pass field '$f4': $line"); ok=0; }
44
- [[ "$f5" =~ ^fail=[0-9]+$ ]] || { grammar_errs+=("bad fail field '$f5': $line"); ok=0; }
45
- [[ "$f6" =~ ^ignore=[0-9]+$ ]] || { grammar_errs+=("bad ignore field '$f6': $line"); ok=0; }
46
- [[ "$f7" =~ ^verdict=(clean|new-failures)$ ]] || { grammar_errs+=("bad verdict field '$f7' (want verdict=clean|new-failures): $line"); ok=0; }
47
- [[ "$f8" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] || { grammar_errs+=("bad date '$f8': $line"); ok=0; }
48
- [[ "$ok" -eq 1 ]] || continue
49
- if [[ -n "$iter" && "$f1" != "$iter" ]]; then
50
- grammar_errs+=("foreign iteration '$f1' (current is '$iter') — the iteration-boundary truncation was skipped: $line"); continue
51
- fi
52
- have_line_for_iter=1
53
- if [[ "$f7" == "verdict=clean" ]]; then
54
- clean_suite_date["$f2"]="$f8"
55
- fi
56
- done < <(ek_data_lines "$MANIFEST")
57
-
58
- if [[ ${#grammar_errs[@]} -gt 0 ]]; then
59
- echo "EVIDENCE-MANIFEST: ${#grammar_errs[@]} grammar issue(s) in $MANIFEST:"
60
- printf ' %s\n' "${grammar_errs[@]}"
61
- echo " help: every line is the eight-field '$EVIDENCE_MANIFEST_CONTRACT' shape and carries the current iteration; a foreign line means the iteration-boundary truncation (LIFECYCLE_KIT_BOUNDARY_TRUNCATE) did not clear the manifest"
62
- exit 1
63
- fi
64
-
65
- # spec: evidence-kit/SPEC.md §check-evidence-manifest — an empty cursor disarms A and C here, at the declared early-out, rather than letting an empty stage slip past two live assertions; the no-cursor window (state file truncated to its preamble at the iteration boundary) is reachable in normal operation
66
- if [[ -z "$iter" || ! -f "$STATE" || -z "$stage" ]]; then
67
- echo "EVIDENCE-MANIFEST: clean (grammar holds in $MANIFEST; no lifecycle state — close-entry/stamp-coupling disarmed)"
68
- exit 0
69
- fi
70
-
71
- earliest_validate=""
72
- have_validate=0
73
- while read -r s1 s2 _ s4 _; do
74
- [[ "$s1" == "$iter" && "$s2" == "validate" ]] || continue
75
- have_validate=1
76
- if [[ -z "$earliest_validate" || "$s4" < "$earliest_validate" ]]; then earliest_validate="$s4"; fi
77
- done < <(awk '/^---[[:space:]]*$/{f=1; next} f && NF {print}' "$STATE")
78
-
79
- errors=()
80
-
81
- # assertion C: a validate stamp demands ≥1 evidence line, re-armed only once the cursor has advanced past validate (the entry stamp precedes the suites)
82
- if [[ "$have_validate" -eq 1 && "$stage" != "validate" && "$have_line_for_iter" -eq 0 ]]; then
83
- errors+=("iteration '$iter' has a validate stamp but no evidence line — validate ran and recorded nothing (run evidence-kit/bin/run-validate.sh)")
84
- fi
85
-
86
- # assertion A: a close-entry cursor requires the full green block — every configured suite a clean line dated on/after the earliest validate stamp
87
- if [[ "$stage" == "close" ]]; then
88
- for suite in ${EVIDENCE_KIT_SUITES[@]+"${EVIDENCE_KIT_SUITES[@]}"}; do
89
- d="${clean_suite_date[$suite]:-}"
90
- if [[ -z "$d" ]]; then
91
- errors+=("close entry: suite '$suite' has no clean evidence line for '$iter'")
92
- elif [[ -n "$earliest_validate" && "$d" < "$earliest_validate" ]]; then
93
- errors+=("close entry: suite '$suite' clean line is dated $d, before the earliest validate stamp $earliest_validate — stale evidence")
94
- fi
95
- done
96
- fi
97
-
98
- if [[ ${#errors[@]} -gt 0 ]]; then
99
- echo "EVIDENCE-MANIFEST: ${#errors[@]} issue(s) coupling $MANIFEST to $STATE:"
100
- printf ' %s\n' "${errors[@]}"
101
- echo " help: record a run-validate evidence line per suite before the close entry is stamped; the entry stamp proves invocation, the evidence line proves the green result"
102
- exit 1
103
- fi
104
- echo "EVIDENCE-MANIFEST: clean (grammar + close-entry/stamp-coupling hold for '$iter' at stage '$stage' in $MANIFEST)"
105
- exit 0
@@ -1,3 +0,0 @@
1
- validate-evidence.txt
2
- TASK-QUEUE.md
3
- WORKFLOW-STATE.txt
@@ -1,3 +0,0 @@
1
- validate-evidence.txt
2
- TASK-QUEUE.md
3
- WORKFLOW-STATE.txt