checkwright 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +385 -19
  2. package/lib/common/digest.sh +18 -0
  3. package/lib/common/lock.sh +11 -0
  4. package/lib/common/recipe.sh +8 -11
  5. package/lib/doctor.sh +49 -0
  6. package/lib/init.sh +152 -29
  7. package/package.json +2 -2
  8. package/payload/artifact/targets.list +30 -0
  9. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/canon-kit/README.md +1 -0
  12. package/payload/canon-kit/SPEC.md +281 -26
  13. package/payload/canon-kit/checks/check-comment-tier.sh +7 -2
  14. package/payload/canon-kit/checks/check-docs-link-convention.sh +11 -4
  15. package/payload/canon-kit/checks/check-md-refs.sh +22 -9
  16. package/payload/canon-kit/checks/check-payload-claim.sh +133 -0
  17. package/payload/canon-kit/checks/check-prose-enum.sh +1 -1
  18. package/payload/canon-kit/checks/check-spec-pointer.sh +15 -4
  19. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  20. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +26 -3
  21. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
  22. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  23. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
  24. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
  25. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
  26. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +5 -3
  27. package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
  28. package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
  29. package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
  30. package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
  31. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
  32. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
  33. package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
  34. package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
  35. package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
  36. package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
  37. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
  38. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
  39. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +24 -1
  40. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
  41. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
  42. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
  43. package/payload/canon-kit/lib/spec.sh +22 -12
  44. package/payload/canon-kit/smoke/install.sh +20 -1
  45. package/payload/canon-kit/templates/SPEC-amendment.md +5 -1
  46. package/payload/context-kit/SPEC.md +38 -7
  47. package/payload/context-kit/lib/toolfloor.sh +1 -1
  48. package/payload/context-kit/smoke/install.sh +3 -1
  49. package/payload/delegation-kit/README.md +2 -1
  50. package/payload/delegation-kit/SPEC.md +590 -48
  51. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
  52. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +61 -0
  53. package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -1
  54. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/silent.md +7 -0
  55. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/args +1 -0
  56. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/expect.txt +1 -0
  57. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-cheap.md +7 -0
  58. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-inherit.md +8 -0
  59. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/args +1 -0
  60. package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/expect.txt +1 -0
  61. package/payload/delegation-kit/lib/delegation.sh +3 -0
  62. package/payload/delegation-kit/smoke/install.sh +3 -1
  63. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
  64. package/payload/delegation-kit/templates/agent-execution.md +171 -15
  65. package/payload/delegation-kit/templates/delegation-config.sh +4 -0
  66. package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
  67. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
  68. package/payload/doctrine-kit/DOCTRINE.md +27 -0
  69. package/payload/doctrine-kit/README.md +5 -0
  70. package/payload/doctrine-kit/SPEC.md +62 -3
  71. package/payload/doctrine-kit/bin/install-doctrine.sh +84 -4
  72. package/payload/doctrine-kit/smoke/install.sh +77 -1
  73. package/payload/drift-kit/README.md +3 -2
  74. package/payload/drift-kit/SPEC.md +253 -20
  75. package/payload/drift-kit/bin/stage-economics.sh +157 -3
  76. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
  77. package/payload/drift-kit/smoke/install.sh +155 -1
  78. package/payload/drift-kit/templates/economics.md +9 -0
  79. package/payload/drift-kit/templates/kpis.list +6 -1
  80. package/payload/evidence-kit/README.md +20 -6
  81. package/payload/evidence-kit/SPEC.md +355 -17
  82. package/payload/evidence-kit/bin/run-validate.sh +51 -9
  83. package/payload/evidence-kit/checks/check-battery-roster.sh +86 -0
  84. package/payload/evidence-kit/checks/check-producer-liveness.sh +34 -0
  85. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
  86. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  87. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
  88. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
  89. package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
  90. package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
  91. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
  92. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
  93. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
  94. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
  95. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
  96. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
  97. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
  98. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
  99. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
  100. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
  101. package/payload/evidence-kit/lib/evidence.sh +18 -0
  102. package/payload/evidence-kit/smoke/install.sh +17 -3
  103. package/payload/gate-sdk/README.md +4 -1
  104. package/payload/gate-sdk/SPEC.md +1955 -79
  105. package/payload/gate-sdk/bin/gen-pre-commit.sh +13 -3
  106. package/payload/gate-sdk/bin/run-consumer-smoke.sh +121 -1
  107. package/payload/gate-sdk/bin/run-gate-tests.sh +40 -9
  108. package/payload/gate-sdk/bin/run-gates.sh +32 -3
  109. package/payload/gate-sdk/bin/upgrade-smoke.sh +3 -3
  110. package/payload/gate-sdk/checks/check-action-gh-repo.gate +2 -0
  111. package/payload/gate-sdk/checks/check-action-pinning.gate +2 -0
  112. package/payload/gate-sdk/checks/check-action-run-shell.sh +3 -1
  113. package/payload/gate-sdk/checks/check-core-files.sh +27 -4
  114. package/payload/gate-sdk/checks/check-exec-bit.sh +20 -1
  115. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +106 -0
  116. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +6 -7
  117. package/payload/gate-sdk/checks/check-gate-output.sh +9 -1
  118. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +302 -0
  119. package/payload/gate-sdk/checks/check-graph.sh +7 -8
  120. package/payload/gate-sdk/checks/check-readme-roster.sh +5 -0
  121. package/payload/gate-sdk/checks/check-reads-couples.sh +73 -22
  122. package/payload/gate-sdk/checks/check-template-registry-parity.sh +81 -0
  123. package/payload/gate-sdk/checks/check-tree-terms.sh +11 -7
  124. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
  125. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
  126. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
  127. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
  128. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
  129. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
  130. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
  131. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
  132. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
  133. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
  134. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
  135. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
  136. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
  137. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
  138. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
  139. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
  140. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
  141. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
  142. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
  143. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
  144. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
  145. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
  146. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  147. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
  148. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
  149. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  150. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
  154. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
  155. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
  156. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
  157. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
  158. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
  159. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
  160. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
  161. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
  162. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
  163. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
  164. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
  165. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
  166. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
  167. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
  168. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
  169. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
  170. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
  171. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
  172. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
  173. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  174. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
  175. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
  176. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +123 -0
  177. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
  178. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
  179. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
  180. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
  181. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
  182. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
  183. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
  184. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
  185. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
  186. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
  187. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
  188. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
  189. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
  190. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
  191. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
  192. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
  193. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +41 -1
  194. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
  195. package/payload/gate-sdk/lib/consumer-smoke.sh +26 -1
  196. package/payload/gate-sdk/lib/gate.sh +104 -13
  197. package/payload/gate-sdk/lib/inject.sh +21 -1
  198. package/payload/gate-sdk/smoke/install.sh +19 -1
  199. package/payload/guard-kit/README.md +4 -3
  200. package/payload/guard-kit/SPEC.md +88 -10
  201. package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
  202. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
  203. package/payload/guard-kit/lib/guard.sh +1 -0
  204. package/payload/guard-kit/templates/close-triage.md +35 -7
  205. package/payload/guard-kit/templates/guard-config.sh +3 -0
  206. package/payload/lifecycle-kit/README.md +1 -0
  207. package/payload/lifecycle-kit/SPEC.md +589 -33
  208. package/payload/lifecycle-kit/bin/enter-stage.sh +13 -3
  209. package/payload/lifecycle-kit/bin/file-gap.sh +42 -1
  210. package/payload/lifecycle-kit/bin/file-survey.sh +50 -0
  211. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +1 -1
  212. package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
  213. package/payload/lifecycle-kit/checks/check-survey-record.sh +102 -0
  214. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
  215. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
  216. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +1 -0
  217. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
  218. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  219. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
  220. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
  221. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
  222. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
  223. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +84 -0
  224. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +94 -0
  225. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
  226. package/payload/lifecycle-kit/lib/stages.sh +8 -2
  227. package/payload/lifecycle-kit/smoke/install.sh +17 -1
  228. package/payload/lifecycle-kit/templates/consult.md +73 -0
  229. package/payload/lifecycle-kit/templates/lead.md +141 -10
  230. package/payload/lifecycle-kit/templates/stages/align.md +12 -0
  231. package/payload/lifecycle-kit/templates/stages/build.md +8 -0
  232. package/payload/lifecycle-kit/templates/stages/close.md +25 -4
  233. package/payload/lifecycle-kit/templates/stages/scope.md +34 -0
  234. package/payload/lifecycle-kit/templates/stages/spec.md +8 -0
  235. package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
  236. package/payload/queue-kit/README.md +4 -1
  237. package/payload/queue-kit/SPEC.md +230 -6
  238. package/payload/queue-kit/bin/queue-edges.sh +78 -0
  239. package/payload/queue-kit/checks/check-queue-entry-budget.sh +5 -3
  240. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
  241. package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
  242. package/payload/queue-kit/smoke/install.sh +4 -1
  243. package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
  244. package/payload/site-kit/SPEC.md +135 -29
  245. package/payload/site-kit/checks/check-docs-render-fidelity.sh +100 -27
  246. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +158 -0
  247. package/payload/site-kit/lib/site.sh +16 -2
  248. package/payload/site-kit/smoke/install.sh +9 -1
  249. package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
  250. package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
@@ -0,0 +1,14 @@
1
+ # fixture runner doc
2
+
3
+ 1. Run the verification suites:
4
+
5
+ <!-- battery-roster:begin -->
6
+ ```bash
7
+ bash bin/run-alpha.sh # alpha
8
+ bash bin/run-delta.sh # a suite validate no longer runs
9
+ ```
10
+ <!-- battery-roster:end -->
11
+
12
+ `bash bin/run-beta.sh` appears here, outside the markers, for a different
13
+ rhetorical job — so beta is undocumented and gamma is missing outright, while
14
+ the delta line resolves to no configured suite.
@@ -0,0 +1,7 @@
1
+ # shellcheck shell=bash
2
+ # spec: evidence-kit/SPEC.md §check-battery-roster — fixture consumer config: the same three suites as good/, so the pair differs only in the runner doc
3
+ # shellcheck disable=SC2034 # consumed by evidence-kit/lib/evidence.sh after sourcing
4
+ EVIDENCE_KIT_SUITES=(alpha beta gamma)
5
+ EVIDENCE_KIT_RUN_alpha='bash bin/run-alpha.sh'
6
+ EVIDENCE_KIT_RUN_beta='env FIXTURE_VERBOSE=1 bash bin/run-beta.sh'
7
+ EVIDENCE_KIT_RUN_gamma='bash bin/run-gamma.sh --deep'
@@ -0,0 +1,14 @@
1
+ # fixture runner doc
2
+
3
+ 1. Run the verification suites:
4
+
5
+ <!-- battery-roster:begin -->
6
+ ```bash
7
+ bash bin/run-alpha.sh # alpha
8
+ bash bin/run-beta.sh # beta — the env prefix is normalized away
9
+ bash bin/run-gamma.sh --deep # gamma — arguments are part of the command
10
+ ```
11
+ <!-- battery-roster:end -->
12
+
13
+ The indented markers, the fence lines, and the annotation clauses are all
14
+ outside what the parity compare reads.
@@ -0,0 +1,7 @@
1
+ # shellcheck shell=bash
2
+ # spec: evidence-kit/SPEC.md §check-battery-roster — fixture consumer config: three suites, one env-prefixed, so the pair exercises the invocation normalization the parity compare runs on
3
+ # shellcheck disable=SC2034 # consumed by evidence-kit/lib/evidence.sh after sourcing
4
+ EVIDENCE_KIT_SUITES=(alpha beta gamma)
5
+ EVIDENCE_KIT_RUN_alpha='bash bin/run-alpha.sh'
6
+ EVIDENCE_KIT_RUN_beta='env FIXTURE_VERBOSE=1 bash bin/run-beta.sh'
7
+ EVIDENCE_KIT_RUN_gamma='bash bin/run-gamma.sh --deep'
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of checks/check-battery-roster.sh — the branches the one
3
+ # good/bad pair cannot hold: the three fail-closed misconfigurations (absent
4
+ # doc, doc with no marker block, empty suite roster), the normalization arm the
5
+ # pair does not reach (leading VAR=value assignments with no `env` token), and
6
+ # the suite whose EVIDENCE_KIT_RUN_<suite> is unset, which run-validate rejects
7
+ # and this gate therefore leaves alone rather than reporting as undocumented.
8
+ #
9
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
10
+ set -uo pipefail
11
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
12
+
13
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # evidence-kit/
14
+ GATE="$DIR/checks/check-battery-roster.sh"
15
+
16
+ fails=0
17
+ tmp="$(mktemp -d)"
18
+ trap 'rm -rf "$tmp"' EXIT
19
+
20
+ # case_run <name> <config-body> <doc-body|SKIP> <want> <expect>
21
+ case_run() {
22
+ local name="$1" cfg="$2" doc="$3" want="$4" expect="$5"
23
+ local d="$tmp/$name" out rc; mkdir -p "$d/scripts"
24
+ printf '%b' "$cfg" >"$d/scripts/evidence-config.sh"
25
+ [[ "$doc" == "SKIP" ]] || printf '%b' "$doc" >"$d/runner.md"
26
+ out="$( cd "$d" && env -u EVIDENCE_KIT_CONFIG_FILE GATE_SDK_GATES_DIR=scripts "$GATE" runner.md 2>&1 )"; rc=$?
27
+ if [[ "$rc" -ne "$want" ]]; then
28
+ echo " FAIL: $name expected exit $want, got $rc: $out"; fails=$((fails + 1)); return
29
+ fi
30
+ if ! grep -qF -- "$expect" <<<"$out"; then
31
+ echo " FAIL: $name exit OK but output lacks '$expect': $out"; fails=$((fails + 1))
32
+ fi
33
+ }
34
+
35
+ CFG1='EVIDENCE_KIT_SUITES=(alpha)\nEVIDENCE_KIT_RUN_alpha="bash bin/run-alpha.sh"\n'
36
+ BLOCK='<!-- battery-roster:begin -->\nbash bin/run-alpha.sh\n<!-- battery-roster:end -->\n'
37
+
38
+ # A — the configured runner doc does not exist: misconfiguration, not a clean.
39
+ case_run "no-doc" "$CFG1" SKIP 2 "runner doc not found"
40
+
41
+ # B — the doc exists but carries no marker block: a consumer keeping no register
42
+ # opts out by not registering the gate, so an unmarked doc is exit 2 and
43
+ # never a vacuous pass over a doc the gate cannot locate the register in.
44
+ case_run "no-markers" "$CFG1" 'nothing to see\n' 2 "marker block"
45
+
46
+ # C — an empty suite roster leaves nothing to hold the doc against.
47
+ case_run "empty-suites" 'EVIDENCE_KIT_SUITES=()\n' "$BLOCK" 2 "EVIDENCE_KIT_SUITES is empty"
48
+
49
+ # D — leading VAR=value assignments with no `env` token normalize away too: the
50
+ # harness's environment is not what a contributor types, whichever spelling
51
+ # the config uses.
52
+ case_run "bare-assignment-prefix" \
53
+ 'EVIDENCE_KIT_SUITES=(alpha)\nEVIDENCE_KIT_RUN_alpha="VERBOSE=1 bash bin/run-alpha.sh"\n' \
54
+ "$BLOCK" 0 "BATTERY-ROSTER: clean"
55
+
56
+ # E — a suite with no EVIDENCE_KIT_RUN_<suite> has no documented invocation to
57
+ # compare, and run-validate already exits 2 on it; reporting it here as an
58
+ # undocumented suite would send the reader to the doc to fix a config bug.
59
+ case_run "suite-without-command" \
60
+ 'EVIDENCE_KIT_SUITES=(alpha orphan)\nEVIDENCE_KIT_RUN_alpha="bash bin/run-alpha.sh"\n' \
61
+ "$BLOCK" 0 "BATTERY-ROSTER: clean"
62
+
63
+ if [[ "$fails" -gt 0 ]]; then
64
+ echo "check-battery-roster.test: $fails assertion(s) failed"
65
+ exit 1
66
+ fi
67
+ echo "check-battery-roster.test: ok (absent doc + unmarked doc + empty suite roster fail closed; bare assignment prefix normalized, command-less suite left alone)"
68
+ exit 0
@@ -0,0 +1 @@
1
+ the evidence producer for run key 'demo-iter' is still running (pid 1)
@@ -0,0 +1,2 @@
1
+ PRODUCER-LIVENESS: clean
2
+ dead pid 2147483646
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of the producer-liveness lock — the halves no gate fixture
3
+ # pair can hold. The pair covers the reader's two static verdicts; everything
4
+ # below needs a process the test itself owns (a live PID) or a run of the
5
+ # writer (refusal, bounded reclaim, conditional release).
6
+ #
7
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
8
+ set -uo pipefail
9
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
10
+
11
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # evidence-kit/
12
+ GATE="$DIR/checks/check-producer-liveness.sh"
13
+ RV="$DIR/bin/run-validate.sh"
14
+
15
+ fails=0
16
+ tmp="$(mktemp -d)"
17
+ live=""
18
+ cleanup() { [[ -n "$live" ]] && kill "$live" 2>/dev/null; rm -rf "$tmp"; }
19
+ trap cleanup EXIT
20
+
21
+ sleep 60 &
22
+ live=$!
23
+
24
+ mk_tree() {
25
+ rm -rf "$1"; mkdir -p "$1/.workflow" "$1/scripts" "$1/.tmp"
26
+ printf '# baseline\ngreen green pass\n' >"$1/.workflow/validate-baseline.txt"
27
+ printf '# contract: evidence-manifest v1\n' >"$1/.workflow/validate-evidence.txt"
28
+ printf "EVIDENCE_KIT_SUITES=(green)\nEVIDENCE_KIT_PARSER=exit-code\nEVIDENCE_KIT_RUN_ID=lock-test\nEVIDENCE_KIT_RUN_green='%s'\n" \
29
+ "${2:-true}" >"$1/scripts/evidence-config.sh"
30
+ }
31
+ # test-hermetic pins EVIDENCE_KIT_CONFIG_FILE to a shared empty file, so each
32
+ # scratch tree names its own config rather than relying on the cwd lookup.
33
+ _rv() { ( cd "$1" && EVIDENCE_KIT_CONFIG_FILE=scripts/evidence-config.sh bash "$RV" 2>&1 ); }
34
+
35
+ # A — the reader reds on a PID the test owns. The fixture pair's bad case can
36
+ # only reach for PID 1, so the live-PID verdict is pinned here against a
37
+ # process whose liveness this test controls end to end.
38
+ printf 'pid=%s run=owned-run\n' "$live" >"$tmp/a.lock"
39
+ out="$(bash "$GATE" "$tmp/a.lock" 2>&1)"; rc=$?
40
+ if [[ "$rc" -ne 1 ]] || [[ "$out" != *"still running (pid $live)"* ]]; then
41
+ echo " FAIL: the reader did not red on a live PID the test owns (rc=$rc): $out"; fails=$((fails + 1))
42
+ fi
43
+
44
+ # B — a lock that does not parse is exit 2, never a free reading. The claim
45
+ # publishes the record whole, so an unparseable lock is corruption.
46
+ printf 'garbage\n' >"$tmp/b.lock"
47
+ out="$(bash "$GATE" "$tmp/b.lock" 2>&1)"; rc=$?
48
+ if [[ "$rc" -ne 2 ]]; then
49
+ echo " FAIL: an unparseable lock must be exit 2, got rc=$rc: $out"; fails=$((fails + 1))
50
+ fi
51
+
52
+ # C — delta 6's headline: the writer refuses to start against a *live* PID,
53
+ # names the blocking run key, and attempts no reclaim — the lock it found
54
+ # is still there, untouched, when it exits.
55
+ mk_tree "$tmp/c"
56
+ printf 'pid=%s run=blocking-run\n' "$live" >"$tmp/c/.tmp/run-validate.lock"
57
+ out="$(_rv "$tmp/c")"; rc=$?
58
+ if [[ "$rc" -eq 0 ]] || [[ "$out" != *"blocking-run"* ]]; then
59
+ echo " FAIL: the writer did not refuse a live lock naming its run key (rc=$rc): $out"; fails=$((fails + 1))
60
+ fi
61
+ if [[ "$(cat "$tmp/c/.tmp/run-validate.lock" 2>/dev/null)" != "pid=$live run=blocking-run" ]]; then
62
+ echo " FAIL: the refusal disturbed the live holder's lock"; fails=$((fails + 1))
63
+ fi
64
+ if grep -q '^lock-test ' "$tmp/c/.workflow/validate-evidence.txt"; then
65
+ echo " FAIL: a refused run still recorded evidence"; fails=$((fails + 1))
66
+ fi
67
+
68
+ # D — a dead-PID lock is reclaimed, the run proceeds, and the trap releases the
69
+ # lock it then owned.
70
+ mk_tree "$tmp/d"
71
+ printf 'pid=2147483646 run=stale-run\n' >"$tmp/d/.tmp/run-validate.lock"
72
+ out="$(_rv "$tmp/d")"; rc=$?
73
+ if [[ "$rc" -ne 0 ]] || ! grep -q '^lock-test green ' "$tmp/d/.workflow/validate-evidence.txt"; then
74
+ echo " FAIL: a dead-PID lock was not reclaimed (rc=$rc): $out"; fails=$((fails + 1))
75
+ fi
76
+ if [[ -e "$tmp/d/.tmp/run-validate.lock" ]]; then
77
+ echo " FAIL: the EXIT trap did not release the run's own lock"; fails=$((fails + 1))
78
+ fi
79
+
80
+ # E — the reclaim is bounded. A claim that keeps failing with no live holder
81
+ # must refuse on the second attempt rather than loop. An unclaimable lock
82
+ # path is the deterministic stand-in: losing the reclaim race to another
83
+ # producer reaches the same branch but cannot be scheduled reliably, and its
84
+ # more common outcome is the live-holder refusal arm C already pins.
85
+ mk_tree "$tmp/e"
86
+ printf "EVIDENCE_KIT_LOCK_FILE='no-such-dir/run-validate.lock'\n" >>"$tmp/e/scripts/evidence-config.sh"
87
+ out="$(timeout 30 bash -c "cd '$tmp/e' && EVIDENCE_KIT_CONFIG_FILE=scripts/evidence-config.sh bash '$RV' 2>&1")"; rc=$?
88
+ if [[ "$rc" -eq 124 ]] || [[ "$out" != *"refusing to start rather than retrying"* ]]; then
89
+ echo " FAIL: the reclaim is not bounded to one retry (rc=$rc): $out"; fails=$((fails + 1))
90
+ fi
91
+
92
+ # F — the release is conditional. The suite command removes this run's lock out
93
+ # of band and a second producer claims the freed slot; the exiting run must
94
+ # leave that live record alone. An unconditional rm -f deletes it, which is
95
+ # this unit's own defect reproduced inside its own mechanism.
96
+ mk_tree "$tmp/f" "bash scripts/steal-lock.sh"
97
+ printf '#!/usr/bin/env bash\nrm -f .tmp/run-validate.lock\nprintf "pid=%%s run=second-producer\\n" "%s" > .tmp/run-validate.lock\nexit 0\n' \
98
+ "$live" >"$tmp/f/scripts/steal-lock.sh"
99
+ out="$(_rv "$tmp/f")"; rc=$?
100
+ if [[ "$(cat "$tmp/f/.tmp/run-validate.lock" 2>/dev/null)" != "pid=$live run=second-producer" ]]; then
101
+ echo " FAIL: the EXIT trap removed a lock that was no longer ours (rc=$rc): $out"; fails=$((fails + 1))
102
+ fi
103
+
104
+ if [[ "$fails" -gt 0 ]]; then
105
+ echo "producer-lock.test: $fails assertion(s) failed"
106
+ exit 1
107
+ fi
108
+ echo "producer-lock.test: ok (live-PID red, unparseable lock exit 2, writer refusal on a live lock, bounded reclaim of a dead one, conditional release)"
109
+ exit 0
@@ -38,6 +38,7 @@ declare -p EVIDENCE_KIT_SUITES &>/dev/null || EVIDENCE_KIT_SUITES=()
38
38
  [[ -v EVIDENCE_KIT_QUEUE_FILE ]] || EVIDENCE_KIT_QUEUE_FILE="${GATE_SDK_QUEUE_FILE:-TASK-QUEUE.md}"
39
39
  [[ -v EVIDENCE_KIT_STATE_FILE ]] || EVIDENCE_KIT_STATE_FILE="${GATE_SDK_WORKFLOW_DIR:-.workflow}/WORKFLOW-STATE.txt"
40
40
  [[ -v EVIDENCE_KIT_TMP_DIR ]] || EVIDENCE_KIT_TMP_DIR="${GATE_SDK_TMP_DIR:-.tmp}"
41
+ [[ -v EVIDENCE_KIT_LOCK_FILE ]] || EVIDENCE_KIT_LOCK_FILE="$EVIDENCE_KIT_TMP_DIR/run-validate.lock"
41
42
  [[ -v EVIDENCE_KIT_RUN_ID ]] || EVIDENCE_KIT_RUN_ID=""
42
43
  [[ -v EVIDENCE_KIT_PRE_HOOK ]] || EVIDENCE_KIT_PRE_HOOK=""
43
44
  declare -p EVIDENCE_KIT_SCENARIO_GLOBS &>/dev/null || declare -A EVIDENCE_KIT_SCENARIO_GLOBS=()
@@ -110,6 +111,23 @@ ek_parse() {
110
111
  esac
111
112
  }
112
113
 
114
+ # spec: evidence-kit/SPEC.md §The producer-liveness lock — the one liveness predicate all three readers share; `kill -0` is the cheap same-uid answer and `ps -p` the portable fallback, so a live process this uid may not signal reads held rather than free
115
+ ek_pid_alive() {
116
+ local pid="${1:-}"
117
+ [[ "$pid" =~ ^[1-9][0-9]*$ ]] || return 1
118
+ kill -0 "$pid" 2>/dev/null && return 0
119
+ ps -p "$pid" >/dev/null 2>&1
120
+ }
121
+
122
+ # spec: evidence-kit/SPEC.md §The producer-liveness lock — prints the lock record's '<pid> <run key>'; 1 = no lock (the free reading), 2 = a lock that does not parse, which no reader may treat as free
123
+ ek_lock_read() {
124
+ local lock="${1:-$EVIDENCE_KIT_LOCK_FILE}" line
125
+ [[ -f "$lock" ]] || return 1
126
+ IFS= read -r line <"$lock" || return 2
127
+ [[ "$line" =~ ^pid=([1-9][0-9]*)[[:space:]]run=([^[:space:]]+)$ ]] || return 2
128
+ printf '%s %s\n' "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}"
129
+ }
130
+
113
131
  ek_data_lines() {
114
132
  grep -Ev '^[[:space:]]*(#|$)' "$1" 2>/dev/null || true
115
133
  }
@@ -11,6 +11,8 @@ check-evidence-baseline
11
11
  check-evidence-manifest
12
12
  EOF
13
13
 
14
+ # smoke-unregistered: check-producer-liveness — entry-preflight only, never gates.list-registered: its subject is a producer-in-flight transition, not tree state, and a consumer battery that includes itself (this repo's does) would red every run against the lock run-validate just claimed (evidence-kit/SPEC.md §check-producer-liveness)
15
+
14
16
  mkdir -p .workflow
15
17
  [[ -f .workflow/validate-baseline.txt ]] \
16
18
  || printf '# contract: evidence-kit/SPEC.md §Baseline manifest — held-constant validate baseline: <suite> <scenario> <status> [<slug>]\n' > .workflow/validate-baseline.txt
@@ -18,19 +20,23 @@ mkdir -p .workflow
18
20
  || printf '# contract: evidence-manifest v1\n' > .workflow/validate-evidence.txt
19
21
 
20
22
  bash "$SDK/bin/gen-pre-commit.sh" --write >/dev/null
21
- bash "$SDK/checks/check-graph.sh" --emit > .workflow/CHECK-GRAPH.html
23
+ bash "$SDK/checks/check-graph.sh" --emit > scripts/CHECK-GRAPH.html
22
24
 
23
25
  # spec: evidence-kit/SPEC.md §bin/run-validate.sh — exercise run-validate end-to-end (advisory tool, no fixture pair): a one-suite exit-code run appends a clean evidence line.
24
26
  es="$PWD/.tmp/run-validate-smoke"
25
27
  rm -rf "$es"; mkdir -p "$es/.workflow" "$es/scripts" "$es/.tmp"
26
- printf '# baseline\ngreen green pass\nmulti a pass\nmulti b pass\n' > "$es/.workflow/validate-baseline.txt"
28
+ printf '# baseline\ngreen green pass\nuntouched_tree untouched_tree pass\nmulti a pass\nmulti b pass\n' > "$es/.workflow/validate-baseline.txt"
27
29
  printf '# contract: evidence-manifest v1\n' > "$es/.workflow/validate-evidence.txt"
28
30
  printf '#!/usr/bin/env bash\nprintf "a pass\\nb pass\\n"\n' > "$es/scripts/multi-parser.sh"
31
+ # spec: evidence-kit/SPEC.md §Evidence manifest — a suite standing in for one whose precondition is a clean worktree: it reds if the manifest already carries a data line at its turn, which is what an earlier suite's row means. Second in the roster on purpose — first, it would pass under either writer
32
+ printf '#!/usr/bin/env bash\ngrep -qEv "^[[:space:]]*(#|$)" .workflow/validate-evidence.txt \\\n && { echo "the spine wrote the tracked manifest before this suite ran" >&2; exit 1; }\nexit 0\n' \
33
+ > "$es/scripts/untouched-tree.sh"
29
34
  cat > "$es/scripts/evidence-config.sh" <<'EOF'
30
- EVIDENCE_KIT_SUITES=(green multi)
35
+ EVIDENCE_KIT_SUITES=(green untouched_tree multi)
31
36
  EVIDENCE_KIT_PARSER=exit-code
32
37
  EVIDENCE_KIT_RUN_ID=smoke
33
38
  EVIDENCE_KIT_RUN_green='true'
39
+ EVIDENCE_KIT_RUN_untouched_tree='bash scripts/untouched-tree.sh'
34
40
  EVIDENCE_KIT_RUN_multi='true'
35
41
  EVIDENCE_KIT_PARSER_multi='bash scripts/multi-parser.sh'
36
42
  EOF
@@ -42,4 +48,12 @@ grep -qE '^smoke green sha256=[0-9a-f]{64} pass=1 fail=0 ignore=0 verdict=clean
42
48
  grep -qE '^smoke multi sha256=[0-9a-f]{64} pass=2 fail=0 ignore=0 verdict=clean ' \
43
49
  "$es/.workflow/validate-evidence.txt" \
44
50
  || { echo "smoke(run-validate): per-suite parser override did not reach the spine" >&2; exit 1; }
51
+ # spec: evidence-kit/SPEC.md §Evidence manifest — the single fold, asserted from the suite's own vantage rather than from the finished file: a spine writing per suite reddens this one, so its clean row is the property
52
+ grep -qE '^smoke untouched_tree sha256=[0-9a-f]{64} pass=1 fail=0 ignore=0 verdict=clean ' \
53
+ "$es/.workflow/validate-evidence.txt" \
54
+ || { echo "smoke(run-validate): the spine wrote the manifest before the roster finished" >&2; exit 1; }
55
+ # spec: evidence-kit/SPEC.md §Evidence manifest — the rows land in configured-suite order, so a repeat run relocates nothing
56
+ diff <(grep -v '^#' "$es/.workflow/validate-evidence.txt" | awk '{print $2}') \
57
+ <(printf 'green\nuntouched_tree\nmulti\n') >/dev/null \
58
+ || { echo "smoke(run-validate): the folded rows are not in configured-suite order" >&2; exit 1; }
45
59
  rm -rf "$es"
@@ -62,7 +62,7 @@ EOF
62
62
 
63
63
  mkdir -p .workflow docs
64
64
  bash gate-sdk/bin/gen-pre-commit.sh --write # generate the hook
65
- bash gate-sdk/checks/check-graph.sh --emit > .workflow/CHECK-GRAPH.html
65
+ bash gate-sdk/checks/check-graph.sh --emit > scripts/CHECK-GRAPH.html
66
66
  bash gate-sdk/bin/enforcement-map.sh --emit > docs/enforcement.md # the enforcement map (regenerate on any class-registry change)
67
67
  bash gate-sdk/bin/install-hooks.sh # opt in this clone
68
68
 
@@ -87,6 +87,8 @@ check-gate-output
87
87
  check-gate-fail-closed
88
88
  check-gate-fixture-coverage
89
89
  check-gate-assertions
90
+ check-gate-substrate-parity
91
+ check-gate-binary-fresh
90
92
  check-test-hermetic
91
93
  check-assertion-strength
92
94
  check-gate-exemption-tasks
@@ -110,6 +112,7 @@ check-commit-msg
110
112
  check-commit-subject
111
113
  check-tree-terms
112
114
  check-template-copy-parity
115
+ check-template-registry-parity
113
116
  ```
114
117
  <!-- gate-roster:end -->
115
118