checkwright 0.21.0 → 0.23.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 (489) hide show
  1. package/README.md +1013 -50
  2. package/lib/common/digest.sh +18 -0
  3. package/lib/common/lock.sh +40 -0
  4. package/lib/common/profile.sh +33 -0
  5. package/lib/common/recipe.sh +56 -43
  6. package/lib/diff.sh +64 -0
  7. package/lib/doctor.sh +81 -7
  8. package/lib/init.sh +167 -52
  9. package/lib/uninstall.sh +212 -0
  10. package/lib/update.sh +34 -0
  11. package/package.json +2 -2
  12. package/payload/artifact/targets.list +30 -0
  13. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  15. package/payload/canon-kit/README.md +2 -0
  16. package/payload/canon-kit/SPEC.md +666 -59
  17. package/payload/canon-kit/checks/check-amendment-queue.sh +1 -0
  18. package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
  19. package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
  20. package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
  21. package/payload/canon-kit/checks/check-docs-link-convention.sh +12 -4
  22. package/payload/canon-kit/checks/check-install-claim.gate +3 -0
  23. package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
  24. package/payload/canon-kit/checks/check-knob-default-coupling.sh +1 -0
  25. package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
  26. package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
  27. package/payload/canon-kit/checks/check-md-refs.gate +3 -0
  28. package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
  29. package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
  30. package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
  31. package/payload/canon-kit/checks/check-prose-tells.sh +1 -0
  32. package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
  33. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
  34. package/payload/canon-kit/checks/check-spec-embedded-source.sh +1 -0
  35. package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
  36. package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
  37. package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
  38. package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
  39. package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +4 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  45. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  49. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  50. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  51. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +29 -5
  52. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  53. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  62. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  63. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  64. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  65. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
  66. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  67. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
  68. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
  69. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
  70. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  71. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  72. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +32 -8
  73. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  74. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  75. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  76. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  77. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  78. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  79. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  80. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  81. package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
  82. package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
  83. package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
  84. package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
  85. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
  86. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
  87. package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
  88. package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
  89. package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
  90. package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
  91. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
  92. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
  93. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +27 -4
  94. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  95. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  96. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  97. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  98. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
  99. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  100. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
  101. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  102. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  103. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  104. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  105. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  106. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
  107. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  108. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  109. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  110. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  111. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  112. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  113. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  114. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  115. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  116. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  117. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  118. package/payload/canon-kit/lib/spec.sh +109 -70
  119. package/payload/canon-kit/smoke/install.sh +21 -1
  120. package/payload/canon-kit/templates/SPEC-amendment.md +9 -2
  121. package/payload/context-kit/README.md +4 -1
  122. package/payload/context-kit/SPEC.md +166 -9
  123. package/payload/context-kit/bin/env-probe.sh +19 -6
  124. package/payload/context-kit/checks/check-brevity.sh +1 -0
  125. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
  126. package/payload/context-kit/checks/check-memory-off.sh +1 -0
  127. package/payload/context-kit/checks/check-settings-paths.sh +94 -0
  128. package/payload/context-kit/checks/check-settings-pins.sh +1 -0
  129. package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
  130. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  131. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  132. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  133. package/payload/context-kit/gate-tests/check-settings-paths/good/args +1 -0
  134. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  135. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  136. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  137. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  138. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  139. package/payload/context-kit/lib/toolfloor.sh +15 -4
  140. package/payload/context-kit/smoke/agents-md.sh +12 -1
  141. package/payload/context-kit/smoke/install.sh +4 -1
  142. package/payload/delegation-kit/README.md +3 -3
  143. package/payload/delegation-kit/SPEC.md +499 -26
  144. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
  145. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
  146. package/payload/delegation-kit/checks/check-gate-tamper.sh +2 -1
  147. package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
  148. package/payload/delegation-kit/lib/delegation.sh +1 -0
  149. package/payload/delegation-kit/smoke/install.sh +2 -1
  150. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
  151. package/payload/delegation-kit/templates/agent-execution.md +127 -12
  152. package/payload/delegation-kit/templates/delegation-config.sh +4 -0
  153. package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
  154. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  155. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
  156. package/payload/doctrine-kit/DOCTRINE.md +112 -11
  157. package/payload/doctrine-kit/README.md +12 -3
  158. package/payload/doctrine-kit/SPEC.md +163 -11
  159. package/payload/doctrine-kit/bin/install-doctrine.sh +167 -17
  160. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
  161. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  162. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  163. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +82 -2
  164. package/payload/doctrine-kit/smoke/install.sh +167 -1
  165. package/payload/drift-kit/README.md +3 -2
  166. package/payload/drift-kit/SPEC.md +264 -22
  167. package/payload/drift-kit/bin/kfric.sh +21 -2
  168. package/payload/drift-kit/bin/stage-economics.sh +157 -3
  169. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
  170. package/payload/drift-kit/smoke/install.sh +183 -1
  171. package/payload/drift-kit/templates/economics.md +9 -0
  172. package/payload/drift-kit/templates/kpis.list +6 -1
  173. package/payload/evidence-kit/README.md +20 -6
  174. package/payload/evidence-kit/SPEC.md +355 -17
  175. package/payload/evidence-kit/bin/run-validate.sh +51 -9
  176. package/payload/evidence-kit/checks/check-battery-roster.sh +87 -0
  177. package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
  178. package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
  179. package/payload/evidence-kit/checks/check-producer-liveness.sh +35 -0
  180. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
  181. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  182. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
  183. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
  184. package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
  185. package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
  186. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
  187. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
  188. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
  189. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
  190. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
  191. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
  192. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
  193. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
  194. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
  195. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
  196. package/payload/evidence-kit/lib/evidence.sh +18 -0
  197. package/payload/evidence-kit/smoke/install.sh +17 -3
  198. package/payload/gate-sdk/README.md +17 -1
  199. package/payload/gate-sdk/SPEC.md +4427 -92
  200. package/payload/gate-sdk/bin/build-native.sh +38 -0
  201. package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
  202. package/payload/gate-sdk/bin/gen-pre-commit.sh +32 -2
  203. package/payload/gate-sdk/bin/port-blockers.sh +445 -0
  204. package/payload/gate-sdk/bin/run-consumer-smoke.sh +129 -2
  205. package/payload/gate-sdk/bin/run-gate-tests.sh +61 -9
  206. package/payload/gate-sdk/bin/run-gates.sh +37 -2
  207. package/payload/gate-sdk/bin/upgrade-smoke.sh +55 -7
  208. package/payload/gate-sdk/checks/check-action-gh-repo.gate +3 -0
  209. package/payload/gate-sdk/checks/check-action-pinning.gate +3 -0
  210. package/payload/gate-sdk/checks/check-action-run-shell.sh +4 -1
  211. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  212. package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
  213. package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
  214. package/payload/gate-sdk/checks/check-core-files.sh +28 -4
  215. package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
  216. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
  217. package/payload/gate-sdk/checks/check-exec-bit.sh +21 -1
  218. package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
  219. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +107 -0
  220. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +7 -7
  221. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
  222. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
  223. package/payload/gate-sdk/checks/check-gate-output.sh +41 -3
  224. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +333 -0
  225. package/payload/gate-sdk/checks/check-graph.sh +5 -5
  226. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
  227. package/payload/gate-sdk/checks/check-identity.sh +1 -0
  228. package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
  229. package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
  230. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  231. package/payload/gate-sdk/checks/check-readme-roster.sh +6 -0
  232. package/payload/gate-sdk/checks/check-reads-couples.sh +71 -21
  233. package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
  234. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  235. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  236. package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -0
  237. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  238. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  239. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  240. package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
  241. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
  242. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
  243. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  244. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  245. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  246. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  247. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  248. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  249. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  250. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  251. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  252. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
  253. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
  254. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
  255. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
  256. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
  257. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
  258. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
  259. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
  260. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
  261. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
  262. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
  263. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
  264. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
  265. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
  266. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
  267. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
  268. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
  269. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
  270. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
  271. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
  272. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  273. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  274. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
  275. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  276. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  277. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  278. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  279. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  280. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
  281. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  282. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  283. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  284. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  285. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +111 -0
  286. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
  287. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
  288. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
  289. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
  290. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
  291. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
  292. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
  293. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
  294. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
  295. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
  296. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
  297. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
  298. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
  299. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
  300. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
  301. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
  302. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
  303. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
  304. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
  305. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
  306. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
  307. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
  308. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
  309. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  310. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
  311. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
  312. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +184 -0
  313. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  314. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  315. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  316. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  317. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  318. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  319. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  320. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  321. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  322. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  323. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  324. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  325. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  326. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  327. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  328. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  329. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  330. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
  331. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
  332. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
  333. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
  334. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
  335. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
  336. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
  337. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
  338. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
  339. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
  340. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
  341. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
  342. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
  343. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
  344. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
  345. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  346. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
  347. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +151 -1
  348. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  349. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
  350. package/payload/gate-sdk/lib/consumer-smoke.sh +41 -4
  351. package/payload/gate-sdk/lib/gate.sh +208 -9
  352. package/payload/gate-sdk/lib/inject.sh +46 -1
  353. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  354. package/payload/gate-sdk/smoke/install.sh +61 -1
  355. package/payload/guard-kit/README.md +18 -14
  356. package/payload/guard-kit/SPEC.md +366 -72
  357. package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
  358. package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
  359. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
  360. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  361. package/payload/guard-kit/guard-tests/cases.tsv +49 -7
  362. package/payload/guard-kit/lib/guard.sh +277 -54
  363. package/payload/guard-kit/templates/close-triage.md +38 -10
  364. package/payload/guard-kit/templates/guard-config.sh +3 -0
  365. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  366. package/payload/lifecycle-kit/README.md +12 -1
  367. package/payload/lifecycle-kit/SPEC.md +991 -41
  368. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  369. package/payload/lifecycle-kit/bin/enter-stage.sh +139 -13
  370. package/payload/lifecycle-kit/bin/file-gap.sh +60 -2
  371. package/payload/lifecycle-kit/bin/file-survey.sh +69 -0
  372. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -0
  373. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  374. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  375. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  376. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  377. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  378. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  379. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  380. package/payload/lifecycle-kit/checks/check-stage-entry.sh +1 -0
  381. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  382. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  383. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  384. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -2
  385. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  386. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  387. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  388. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  389. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  390. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  391. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  392. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  393. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
  394. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
  395. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +3 -3
  396. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  397. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  398. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  399. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  400. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  401. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  402. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  403. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  404. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +2 -3
  405. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
  406. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
  407. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  408. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
  409. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
  410. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
  411. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
  412. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +83 -0
  413. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +122 -0
  414. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  415. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
  416. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  417. package/payload/lifecycle-kit/lib/stages.sh +12 -2
  418. package/payload/lifecycle-kit/smoke/install.sh +83 -4
  419. package/payload/lifecycle-kit/templates/consult.md +73 -0
  420. package/payload/lifecycle-kit/templates/lead.md +139 -7
  421. package/payload/lifecycle-kit/templates/stages/align.md +12 -0
  422. package/payload/lifecycle-kit/templates/stages/build.md +8 -0
  423. package/payload/lifecycle-kit/templates/stages/close.md +45 -5
  424. package/payload/lifecycle-kit/templates/stages/scope.md +42 -3
  425. package/payload/lifecycle-kit/templates/stages/spec.md +13 -1
  426. package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
  427. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  428. package/payload/queue-kit/README.md +6 -1
  429. package/payload/queue-kit/SPEC.md +350 -6
  430. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  431. package/payload/queue-kit/bin/queue-edges.sh +78 -0
  432. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  433. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  434. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +1 -0
  435. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  436. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  437. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  438. package/payload/queue-kit/checks/check-roadmap-fresh.sh +1 -0
  439. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  440. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  441. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  442. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
  443. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  444. package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
  445. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  446. package/payload/queue-kit/lib/queue.sh +4 -19
  447. package/payload/queue-kit/smoke/install.sh +4 -1
  448. package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
  449. package/payload/site-kit/SPEC.md +64 -27
  450. package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
  451. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  452. package/payload/site-kit/smoke/install.sh +9 -1
  453. package/profiles.list +36 -8
  454. package/payload/canon-kit/checks/check-comment-tier.sh +0 -211
  455. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  456. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  457. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  458. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  459. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  460. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  461. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  462. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  463. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  464. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  465. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  466. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -180
  467. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  468. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  469. package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
  470. package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
  471. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  472. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  473. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  474. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  475. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  476. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  477. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  478. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  479. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  480. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  481. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  482. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -104
  483. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  484. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  485. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  486. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  487. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  488. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  489. package/payload/queue-kit/checks/check-task-names.sh +0 -128
@@ -54,7 +54,7 @@ cleanup() {
54
54
  }
55
55
  trap cleanup EXIT
56
56
 
57
- csmoke_vendor_and_install "${roots[@]}" || exit 2
57
+ csmoke_vendor_and_install "$(dirname "$SDK")" "${roots[@]}" || exit 2
58
58
  installed="$CSMOKE_INSTALLED"
59
59
 
60
60
  run_battery() { ( cd "$SCRATCH" && bash gate-sdk/bin/run-gates.sh ) 2>&1; }
@@ -70,6 +70,133 @@ fi
70
70
  # spec: gate-sdk/SPEC.md §Consumer smoke — hard reset (not checkout) so a violation that staged its shape is unstaged too
71
71
  restore() { ( cd "$SCRATCH" && git reset -q --hard && git clean -qfd ); }
72
72
 
73
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting: one pass over the union of the vendored kits' checks/ against the scratch registry, between the green-battery assertion and the violation phase
74
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting: thecorroborating probe's tree: the invoking repo that ships the kits, where a kit's own surfaces exist
75
+ HOST_TREE="${SDK%/*}"
76
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the scratch consumer is zero-config, so its registry sits at gate-sdk's default gates dir, where that kit's own smoke/install.sh writes it
77
+ scratch_list="$SCRATCH/scripts/gates.list"
78
+ [[ -f "$scratch_list" ]] || {
79
+ echo "run-consumer-smoke: no gate registry at $scratch_list after install" >&2
80
+ exit 2
81
+ }
82
+
83
+ declare -A acct_registered=() acct_kit=() acct_root=()
84
+ declare -A acct_reason=() acct_declkit=() acct_selfset=()
85
+
86
+ while IFS= read -r g; do
87
+ [[ -n "$g" ]] && acct_registered["$g"]=1
88
+ done < <(gates_list_members "$scratch_list")
89
+
90
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting reads *declaration paths*, both spellings: a gate whose implementation ported to a compiled subcommand still ships, still earns or forfeits a scratch-battery slot, and must not leave this pass's universe by changing substrate
91
+ shopt -s nullglob
92
+ for r in "${roots[@]}"; do
93
+ kit="$(basename "$r")"
94
+ acct_root["$kit"]="$r"
95
+ for f in "$SCRATCH/$kit"/checks/check-*.sh "$SCRATCH/$kit"/checks/check-*.gate; do
96
+ g="$(basename "$f")"; g="${g%.*}"
97
+ acct_kit["$g"]="$kit"
98
+ done
99
+ done
100
+ shopt -u nullglob
101
+
102
+ for r in "${roots[@]}"; do
103
+ kit="$(basename "$r")"
104
+ while IFS= read -r line; do
105
+ line="${line#*smoke-unregistered:}"
106
+ read -r dg reason <<<"$line"
107
+ reason="${reason#—}"; reason="${reason#--}"; reason="${reason#-}"; reason="${reason# }"
108
+ if [[ -z "$dg" || -z "$reason" ]]; then
109
+ echo "CONSUMER-SMOKE: FAIL — $kit/smoke/install.sh has a '# smoke-unregistered:' line missing its gate name or its reason"
110
+ echo " help: the shape is '# smoke-unregistered: <gate-name> — <reason>'; both fields are read (gate-sdk/SPEC.md §Consumer smoke)."
111
+ exit 1
112
+ fi
113
+ acct_reason["$dg"]="$reason"
114
+ acct_declkit["$dg"]="$kit"
115
+ done < <(grep -E '^[[:space:]]*#[[:space:]]*smoke-unregistered:' "$SCRATCH/$kit/smoke/install.sh" || true)
116
+ done
117
+
118
+ mapfile -t acct_unreg < <(
119
+ for g in "${!acct_kit[@]}"; do
120
+ [[ -n "${acct_registered[$g]:-}" ]] || printf '%s\n' "$g"
121
+ done | sort
122
+ )
123
+
124
+ acct_self=0
125
+ acct_hand=0
126
+ acct_bad=()
127
+ acct_stale=()
128
+ acct_contra=()
129
+
130
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting probes through gate_command's substrate-blind dispatch, so a ported gate is probed as the gate it is rather than skipped for want of a .sh; an unresolvable dispatch is the exit-2 the contract already means by "could not run"
131
+ acct_probe() { # acct_probe <tree> <checks-dir> <gate>
132
+ local argv=()
133
+ mapfile -t argv < <( cd "$1" && gate_command "$3" "$2" 2>/dev/null )
134
+ [[ ${#argv[@]} -gt 0 ]] || return 2
135
+ ( cd "$1" && "${argv[@]}" ) >/dev/null 2>&1
136
+ }
137
+
138
+ acct_start_ns=$(date +%s%N)
139
+ for g in "${acct_unreg[@]}"; do
140
+ [[ -n "$g" ]] || continue
141
+ kit="${acct_kit[$g]}"
142
+ acct_probe "$SCRATCH" "$SCRATCH/$kit/checks" "$g"
143
+ rc_s=$?
144
+ rc_h=""
145
+ if [[ "$rc_s" -eq 2 ]]; then
146
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting: exit 2 is usage/environment failure generally, so the permanent exemption is granted only when the same gate does NOT exit 2 where its surface exists
147
+ acct_probe "$HOST_TREE" "${acct_root[$kit]}/checks" "$g"
148
+ rc_h=$?
149
+ if [[ "$rc_h" -ne 2 ]]; then
150
+ # spec: gate-sdk/SPEC.md §Consumer smoke — a declaration the probe contradicts is reported rather than silently exempted: the gate declares it reads a surface a fresh install writes and the probe derived that the surface is absent, so one of the two is wrong and the arm exists so a wrong declaration is not as invisible as a missing one
151
+ if [[ "$(awk 'sub(/^# install:[[:space:]]+/, "") { print $1; exit }' \
152
+ "$SCRATCH/$kit/checks/$g".{sh,gate} 2>/dev/null | head -n1)" == zero-config ]]; then
153
+ acct_contra+=("$kit ships $g declaring zero-config, yet the probe finds its surface absent in the scratch consumer")
154
+ fi
155
+ acct_selfset["$g"]=1
156
+ acct_self=$((acct_self + 1))
157
+ continue
158
+ fi
159
+ fi
160
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting: a declaration is honoured only from the kit that ships the gate, so a foreign-kit line leaves the omission unaccounted as well as stale
161
+ if [[ -n "${acct_reason[$g]:-}" && "${acct_declkit[$g]}" == "$kit" ]]; then
162
+ acct_hand=$((acct_hand + 1))
163
+ continue
164
+ fi
165
+ acct_bad+=("$kit ships $g — scratch exit $rc_s${rc_h:+, invoking-repo exit $rc_h}")
166
+ done
167
+ acct_ms=$(( ($(date +%s%N) - acct_start_ns) / 1000000 ))
168
+
169
+ if [[ ${#acct_reason[@]} -gt 0 ]]; then
170
+ for g in "${!acct_reason[@]}"; do
171
+ dk="${acct_declkit[$g]}"
172
+ if [[ -n "${acct_registered[$g]:-}" ]]; then
173
+ acct_stale+=("$dk declares $g unregistered, but it is registered")
174
+ elif [[ "${acct_kit[$g]:-}" != "$dk" ]]; then
175
+ acct_stale+=("$dk declares $g, which that kit does not ship")
176
+ elif [[ -n "${acct_selfset[$g]:-}" ]]; then
177
+ acct_stale+=("$dk declares $g, which the probe already exempts — probe first, reasons second")
178
+ fi
179
+ done
180
+ fi
181
+
182
+ # spec: gate-sdk/SPEC.md §Consumer smoke — a probe may leave scratch artifacts; the violation phase starts from the committed baseline
183
+ restore
184
+
185
+ # spec: gate-sdk/SPEC.md §Consumer smoke — the registration accounting: the measured cost is reported on every run, red or green, and never cached across runs
186
+ echo "CONSUMER-SMOKE: accounting — ${#acct_unreg[@]} unregistered gate(s) probed in ${acct_ms}ms ($acct_self self-declared, $acct_hand hand-declared, ${#acct_bad[@]} unaccounted)"
187
+ for l in "${acct_contra[@]:-}"; do [[ -n "$l" ]] && echo " contradicted declaration: $l"; done
188
+
189
+ if [[ ${#acct_bad[@]} -gt 0 || ${#acct_stale[@]} -gt 0 ]]; then
190
+ echo "CONSUMER-SMOKE: FAIL — the registration accounting is not satisfied"
191
+ for l in "${acct_bad[@]:-}"; do [[ -n "$l" ]] && echo " unaccounted: $l"; done
192
+ for l in "${acct_stale[@]:-}"; do [[ -n "$l" ]] && echo " stale declaration: $l"; done
193
+ echo ""
194
+ echo " help: register the gate in that kit's smoke/install.sh, or declare the omission"
195
+ echo " beside its registration block with '# smoke-unregistered: <gate-name> — <reason>'"
196
+ echo " (gate-sdk/SPEC.md §Consumer smoke)."
197
+ exit 1
198
+ fi
199
+
73
200
  fired=0
74
201
  for r in "${roots[@]}"; do
75
202
  kit="$(basename "$r")"
@@ -108,5 +235,5 @@ if [[ "$rc" -ne 0 ]] || ! grep -qE 'All [0-9]+ gates passed' <<<"$out"; then
108
235
  exit 1
109
236
  fi
110
237
 
111
- echo "CONSUMER-SMOKE: clean ($installed kits installed, $fired violations fired)"
238
+ echo "CONSUMER-SMOKE: clean ($installed kits installed, $fired violations fired, ${#acct_registered[@]} gates registered, $acct_self self-declared, $acct_hand hand-declared)"
112
239
  exit 0
@@ -19,23 +19,52 @@ for d in "${GATE_DIRS[@]}"; do
19
19
  done
20
20
  GATE_DIRS=("${resolved[@]+"${resolved[@]}"}")
21
21
 
22
+ # spec: gate-sdk/SPEC.md §run-gate-tests — the binary is absolutized here, at the invoker's
23
+ # root, because gate_command runs in the case dir below and the knob's default is
24
+ # deliberately repo-relative; the gate dirs above are absolutized for the same reason.
25
+ _rgt_bin="$(gate_native_bin)"
26
+ if [[ "$_rgt_bin" != /* && -e "$_rgt_bin" ]]; then
27
+ GATE_SDK_NATIVE_BIN="$(cd "$(dirname "$_rgt_bin")" && pwd)/$(basename "$_rgt_bin")"
28
+ export GATE_SDK_NATIVE_BIN
29
+ fi
30
+ unset _rgt_bin
31
+
22
32
  [[ -d "$TESTS_DIR" ]] || { echo "run-gate-tests: no fixture tree at $TESTS_DIR" >&2; exit 2; }
23
33
 
24
34
  pairs=0
25
35
  logic_fail=0
26
36
  harness_fail=0
27
37
 
38
+ # spec: gate-sdk/SPEC.md §run-gate-tests — the case runs whatever the member dispatches to: gate_command yields the shell script's one-element argv or the binary's two-element `<binary> <name>`, so the fixture pair is the parity oracle across both substrates rather than a shell-only one. argv[0] is absolutized here because the case runs after a `cd` into its own dir and the binary knob's default is deliberately a repo-relative path (§lib/gate.sh).
28
39
  run_case() {
29
40
  local gate="$1" casedir="$2" want="$3" expect="$4"
30
- local gate_path
31
- if ! gate_path="$(gate_resolve "$gate" "${GATE_DIRS[@]+"${GATE_DIRS[@]}"}")"; then
32
- echo " HARNESS: $gate.sh resolves in none of: ${GATE_DIRS[*]}"
41
+ local -a argv=()
42
+ # spec: gate-sdk/SPEC.md §run-gate-tests — resolved from inside the case dir, so a bridged
43
+ # member's knob values come off the case's own cwd-relative config exactly as a shell
44
+ # member's do
45
+ if ! mapfile -t argv < <(cd "$casedir" && gate_command "$gate" "${GATE_DIRS[@]+"${GATE_DIRS[@]}"}"); then
46
+ echo " HARNESS: $gate resolves in none of: ${GATE_DIRS[*]}"
33
47
  return 2
34
48
  fi
35
- if [[ ! -x "$gate_path" ]]; then
36
- echo " HARNESS: $gate_path is not executable"
49
+ if [[ ${#argv[@]} -eq 0 ]]; then
50
+ echo " HARNESS: $gate resolves in none of: ${GATE_DIRS[*]}"
51
+ return 2
52
+ fi
53
+ # spec: gate-sdk/SPEC.md §run-gate-tests — a bridged argv leads with `env` and its
54
+ # NAME=VALUE elements, so the dispatch executable is the first element that is neither,
55
+ # and it is that element the executability check and the absolutization take
56
+ local x=0
57
+ if [[ "${argv[0]}" == env ]]; then
58
+ x=1
59
+ while [[ "$x" -lt "${#argv[@]}" && "${argv[$x]}" == [A-Za-z_]*=* ]]; do x=$((x + 1)); done
60
+ fi
61
+ if [[ "$x" -ge "${#argv[@]}" || ! -x "${argv[$x]}" ]]; then
62
+ echo " HARNESS: ${argv[$x]:-<no dispatch executable in argv>} is not executable"
37
63
  return 2
38
64
  fi
65
+ if [[ "${argv[$x]}" != /* ]]; then
66
+ argv[$x]="$(cd "$(dirname "${argv[$x]}")" && pwd)/$(basename "${argv[$x]}")"
67
+ fi
39
68
 
40
69
  local -a args=()
41
70
  if [[ -f "$casedir/args" ]]; then
@@ -44,7 +73,7 @@ run_case() {
44
73
  fi
45
74
 
46
75
  local out rc
47
- out="$( cd "$casedir" && "$gate_path" "${args[@]+"${args[@]}"}" 2>&1 )"
76
+ out="$( cd "$casedir" && "${argv[@]}" "${args[@]+"${args[@]}"}" 2>&1 )"
48
77
  rc=$?
49
78
 
50
79
  if [[ "$rc" -eq 2 ]]; then
@@ -57,12 +86,35 @@ run_case() {
57
86
  printf ' %s\n' "$out"
58
87
  return 1
59
88
  fi
60
- if [[ -n "$expect" ]] && ! grep -qF -- "$expect" <<<"$out"; then
61
- echo " FAIL: $gate $(basename "$casedir") exit $rc OK but output lacks expected substring:"
62
- echo " want: $expect"
89
+ # Every non-blank expect line is its own assertion: grep -F would read a
90
+ # multi-line pattern as alternatives and pass on any one of them.
91
+ local -a missing=()
92
+ local want_line
93
+ while IFS= read -r want_line; do
94
+ [[ -z "${want_line//[[:space:]]/}" ]] && continue
95
+ grep -qF -- "$want_line" <<<"$out" || missing+=("$want_line")
96
+ done <<<"$expect"
97
+ if [[ "${#missing[@]}" -gt 0 ]]; then
98
+ echo " FAIL: $gate $(basename "$casedir") exit $rc OK but output lacks expected line(s):"
99
+ printf ' missing: %s\n' "${missing[@]}"
63
100
  printf ' %s\n' "$out"
64
101
  return 1
65
102
  fi
103
+
104
+ # spec: gate-sdk/SPEC.md §Output contract — asserted at runtime, both cases
105
+ if [[ "$want" -eq 0 ]]; then
106
+ if ! grep -qE '^[A-Z][A-Z0-9-]*: clean \(.*\)$' <<<"$out"; then
107
+ echo " FAIL: $gate $(basename "$casedir") exited 0 but emitted no '<NAME>: clean (…)' line"
108
+ printf ' %s\n' "$out"
109
+ return 1
110
+ fi
111
+ else
112
+ if ! grep -qE '(^|[[:space:]])help:' <<<"$out"; then
113
+ echo " FAIL: $gate $(basename "$casedir") reported a violation with no 'help:' remedy line"
114
+ printf ' %s\n' "$out"
115
+ return 1
116
+ fi
117
+ fi
66
118
  return 0
67
119
  }
68
120
 
@@ -105,6 +105,9 @@ fi
105
105
  failed=()
106
106
  TIMINGS="${GATE_SDK_TMP_DIR:-.tmp}/gate-timings.txt"
107
107
  mkdir -p "$(dirname "$TIMINGS")" && : > "$TIMINGS"
108
+ # spec: gate-sdk/SPEC.md §run-gates — where gate_command's stderr is held apart from
109
+ # the argv its stdout carries; rewritten per member, read only on a dispatch error
110
+ DISPATCH_ERR="${GATE_SDK_TMP_DIR:-.tmp}/gate-dispatch-stderr.txt"
108
111
  total_ms=0
109
112
  VERBOSE="${GATE_SDK_VERBOSE:-}"
110
113
  for i in "${!RUN_MEMBERS[@]}"; do
@@ -115,12 +118,26 @@ for i in "${!RUN_MEMBERS[@]}"; do
115
118
  fi
116
119
  start_ns=$(date +%s%N)
117
120
  out=""; ok=1
118
- if gate_path="$(gate_resolve "$c" "${RESOLVE_DIRS[@]}")"; then
119
- if out="$("$gate_path" "${args[@]}" 2>&1)"; then
121
+ # spec: gate-sdk/SPEC.md §lib/gate.sh — execute the invocation argv, keeping
122
+ # gate_command's exit 2 (dispatch harness error) distinct from its exit 1
123
+ # (nothing declares this member)
124
+ # spec: gate-sdk/SPEC.md §run-gates — the two streams are captured apart, never
125
+ # merged: argv is stdout alone, so a diagnostic any successful call writes to
126
+ # stderr cannot become argv[0] and be exec'd
127
+ argv_out="$(gate_command "$c" "${RESOLVE_DIRS[@]}" 2>"$DISPATCH_ERR")"; cstatus=$?
128
+ argv=()
129
+ [[ -n "$argv_out" && "$cstatus" -eq 0 ]] && mapfile -t argv <<<"$argv_out"
130
+ if [[ "$cstatus" -eq 0 && ${#argv[@]} -gt 0 ]]; then
131
+ if out="$("${argv[@]}" "${args[@]}" 2>&1)"; then
120
132
  tail=" PASS: $c"
121
133
  else
122
134
  rc=$?; ok=0; tail=" FAIL: $c (exit $rc)"; failed+=("$c")
123
135
  fi
136
+ elif [[ "$cstatus" -eq 2 ]]; then
137
+ ok=0
138
+ out="$(<"$DISPATCH_ERR")"
139
+ tail=" FAIL: $c (dispatch harness error, exit 2)"
140
+ failed+=("$c")
124
141
  else
125
142
  ok=0
126
143
  out="$c listed in $LIST but resolves in none of: ${RESOLVE_DIRS[*]}"
@@ -139,6 +156,24 @@ done
139
156
  printf 'TOTAL %d\n' "$total_ms" >> "$TIMINGS"
140
157
 
141
158
  printf '\n===== gates summary =====\n'
159
+ # spec: gate-sdk/SPEC.md §run-gates — a declared omission is what keeps `All N gates passed.` honest as the roster-collapse tripwire: an omitted member shrinks N legitimately, so it is reported on its own line beside the summary. Separate is load-bearing rather than tidy — the consumer smokes match the green phrase against this output, so the line must not carry it
160
+ report_omissions() {
161
+ local reason count
162
+ while read -r count reason; do
163
+ [[ -n "$reason" ]] || continue
164
+ case "$reason" in
165
+ substrate-unavailable)
166
+ printf '%d gate(s) omitted (%s): no prebuilt gate binary is published for this platform.\n' \
167
+ "$count" "$reason" ;;
168
+ digest-unverifiable)
169
+ printf '%d gate(s) omitted (%s): install sha256sum or shasum, then re-run checkwright init.\n' \
170
+ "$count" "$reason" ;;
171
+ *)
172
+ printf '%d gate(s) omitted (%s).\n' "$count" "$reason" ;;
173
+ esac
174
+ done < <(awk '$1 == "#" && $2 == "omitted:" { print $4 }' "$LIST" | sort | uniq -c)
175
+ }
176
+ report_omissions
142
177
  if [[ ${#failed[@]} -eq 0 ]]; then
143
178
  printf 'All %d gates passed.\n' "${#RUN_MEMBERS[@]}"
144
179
  exit 0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: gate-sdk/SPEC.md §upgrade-smoke — the two-phase upgrade proof on the consumer-smoke mechanics; the 'upgrade' validate suite each validate stage re-runs, and (TO=HEAD, the default) the standing pre-release assertion that the working tree upgrades cleanly from the last tag. Harness-less: bare bash + git, never the network.
2
+ # spec: gate-sdk/SPEC.md §upgrade-smoke — the two-phase upgrade proof on the consumer-smoke mechanics; the 'upgrade' validate suite each validate stage re-runs, and (TO=HEAD, the default) the standing pre-release assertion that the working tree upgrades cleanly from the last tag. Each phase runs its own ref's gate binary, built from a detached worktree at that ref. Harness-less: bare bash + git + cargo, never the network.
3
3
  set -uo pipefail
4
4
 
5
5
  SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -32,7 +32,15 @@ BASE="$(cd "$BASE" && pwd)"
32
32
  export TMPDIR="$BASE" # csmoke_vendor_and_install mktemps the consumer under TMPDIR — pin it to the knob
33
33
  WORK="$(mktemp -d "$BASE/upgrade-smoke.XXXXXX")" || exit 2
34
34
  SCRATCH="" # csmoke_vendor_and_install sets this to the consumer dir
35
- cleanup() { rm -rf "$WORK" "$SCRATCH"; }
35
+ # spec: gate-sdk/SPEC.md §upgrade-smoke — a per-ref worktree outlives the run if the trap does not take it, and the repo's worktree-prune mechanism should not have to collect after a validate suite
36
+ WORKTREES=()
37
+ cleanup() {
38
+ local w
39
+ for w in "${WORKTREES[@]+"${WORKTREES[@]}"}"; do
40
+ git -C "$REPO" worktree remove --force "$w" >/dev/null 2>&1
41
+ done
42
+ rm -rf "$WORK" "$SCRATCH"
43
+ }
36
44
  trap cleanup EXIT
37
45
 
38
46
  FROM_TREE="$WORK/from"; TO_TREE="$WORK/to"
@@ -58,8 +66,41 @@ mapfile -t toroots < <(kit_dirs_in "$TO_TREE")
58
66
  [[ ${#fromroots[@]} -gt 0 ]] || { echo "upgrade-smoke: no vendorable kits at FROM ($FROM)" >&2; exit 2; }
59
67
  [[ ${#toroots[@]} -gt 0 ]] || { echo "upgrade-smoke: no vendorable kits at TO ($TO)" >&2; exit 2; }
60
68
 
61
- # spec: gate-sdk/SPEC.md §upgrade-smoke — step 1: vendor + install + baseline at FROM via the shared scratch-consumer builder, then run the battery (a red FROM baseline is a broken tag: exit 2, not an upgrade finding)
62
- csmoke_vendor_and_install "${fromroots[@]}" \
69
+ # spec: gate-sdk/SPEC.md §upgrade-smoke — a ref's binary is built from a detached worktree at that ref, never from the archive tree its kits come from: native/build.rs stamps its source with `git ls-files` and panics outside a checkout, so an archive build dies in the build script and reads as a broken tag. The build lands in the worktree's own native/target/, which is already under the scratch base — so the host's build output is untouched and gate_native_bin's relative path still resolves against the checkout this names
70
+ REF_TREE=""
71
+ ref_binary_tree() { # $1 = ref, $2 = phase label -> sets REF_TREE to a checkout whose native/ is built
72
+ local ref="$1" label="$2" wt out
73
+ REF_TREE=""
74
+ command -v cargo >/dev/null 2>&1 || {
75
+ echo "upgrade-smoke: FAIL(env) — the $label ref ($ref) dispatches gate(s) to the binary and cargo is not on PATH; this suite builds one binary per ref" >&2
76
+ return 2
77
+ }
78
+ wt="$WORK/checkout-$label"
79
+ git -C "$REPO" worktree add --detach -q "$wt" "$ref" >/dev/null 2>&1 || {
80
+ echo "upgrade-smoke: FAIL(env) — could not add a detached worktree at the $label ref ($ref)" >&2
81
+ return 2
82
+ }
83
+ WORKTREES+=("$wt")
84
+ # spec: gate-sdk/SPEC.md §upgrade-smoke — a ref dispatching to a binary it carries no crate for is a tag fact, and the one thing this must not do is fall back to the host's binary, which is the present behavior wearing a fallback's clothes
85
+ [[ -d "$wt/native" ]] || {
86
+ echo "upgrade-smoke: FAIL(env) — the $label ref ($ref) dispatches gate(s) to the binary and carries no crate to build one from; a broken tag, not an upgrade finding" >&2
87
+ return 2
88
+ }
89
+ out="$( cd "$wt/native" && cargo build --release 2>&1 )" || {
90
+ echo "upgrade-smoke: FAIL(env) — the $label ref ($ref) will not build its gate binary under this toolchain; an environment or tag fact, never an upgrade finding" >&2
91
+ printf '%s\n' "$out" >&2
92
+ return 2
93
+ }
94
+ REF_TREE="$wt"
95
+ }
96
+
97
+ # spec: gate-sdk/SPEC.md §upgrade-smoke — step 1: vendor + install + baseline at FROM via the shared scratch-consumer builder, paired with FROM's own binary so phase 1's claim is about FROM alone, then run the battery (a red FROM baseline is a broken tag: exit 2, not an upgrade finding)
98
+ FROM_BIN=""
99
+ if [[ "$(csmoke_gate_descriptors "${fromroots[@]}")" -gt 0 ]]; then
100
+ ref_binary_tree "$FROM" from || exit 2
101
+ FROM_BIN="$REF_TREE"
102
+ fi
103
+ csmoke_vendor_and_install "$FROM_BIN" "${fromroots[@]}" \
63
104
  || { echo "upgrade-smoke: vendoring the FROM baseline ($FROM) failed — a broken tag, not an upgrade finding" >&2; exit 2; }
64
105
  CONS="$SCRATCH"
65
106
 
@@ -81,9 +122,16 @@ for r in "${toroots[@]}"; do
81
122
  done
82
123
  for r in "${fromroots[@]}"; do kitname_seen["$(basename "$r")"]=1; done
83
124
 
125
+ # spec: gate-sdk/SPEC.md §upgrade-smoke — the binary is re-placed in the same motion that swaps the kit directories, because that swap is the upgrade transition: phase B's claim — TO's shell against TO's binary — then holds by construction rather than by the host tree happening to be TO
126
+ if [[ "$(csmoke_gate_descriptors "${toroots[@]}")" -gt 0 ]]; then
127
+ ref_binary_tree "$TO" to || exit 2
128
+ csmoke_place_binary "$REF_TREE" "${toroots[@]}" \
129
+ || { echo "upgrade-smoke: FAIL(env) — could not place TO ($TO)'s gate binary in the scratch consumer" >&2; exit 2; }
130
+ fi
131
+
84
132
  ( cd "$CONS" && bash gate-sdk/bin/gen-pre-commit.sh --write >/dev/null ) \
85
133
  || { echo "upgrade-smoke: phase A gen-pre-commit failed at TO ($TO)" >&2; exit 2; }
86
- ( cd "$CONS" && bash gate-sdk/checks/check-graph.sh --emit > .workflow/CHECK-GRAPH.html ) \
134
+ ( cd "$CONS" && bash gate-sdk/checks/check-graph.sh --emit > scripts/CHECK-GRAPH.html ) \
87
135
  || { echo "upgrade-smoke: phase A check-graph --emit failed at TO ($TO)" >&2; exit 2; }
88
136
  if [[ -f "$CONS/doctrine-kit/bin/install-doctrine.sh" ]]; then
89
137
  ( cd "$CONS" && bash doctrine-kit/bin/install-doctrine.sh >/dev/null ) \
@@ -96,7 +144,7 @@ stray=()
96
144
  while IFS= read -r p; do
97
145
  [[ -n "$p" ]] || continue
98
146
  case "$p" in
99
- scripts/git-hooks/pre-commit|.workflow/CHECK-GRAPH.html|CLAUDE.md) continue ;;
147
+ scripts/git-hooks/pre-commit|scripts/CHECK-GRAPH.html|CLAUDE.md) continue ;;
100
148
  esac
101
149
  top="${p%%/*}"
102
150
  [[ -n "${kitname_seen[$top]:-}" ]] || stray+=("$p")
@@ -132,7 +180,7 @@ fi
132
180
 
133
181
  if [[ "$decl_st" -eq 2 ]]; then
134
182
  echo "upgrade-smoke: FAIL — TO ($ver) resolves note $decl_src, which carries no 'Tightened gates' section:" >&2
135
- echo " every release note carries all three fixed sections (docs/install.md §The upgrade contract)." >&2
183
+ echo " every release note carries the fixed sections its note grammar rosters (docs/install.md §The upgrade contract)." >&2
136
184
  exit 1
137
185
  fi
138
186
  if [[ "$decl_st" -ne 0 ]]; then
@@ -0,0 +1,3 @@
1
+ # graph: couples=.github/workflows/*.yml,.github/workflows/*.yaml,.github/ISSUE_TEMPLATE/*.yml,docs/_config.yml,kit:templates/*.yml,kit:templates/*.yaml dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: gate-sdk/SPEC.md §check-action-gh-repo — a job whose run: bodies invoke gh establishes a repository context: a checkout before the first call, GH_REPO in scope, or --repo on every call
@@ -0,0 +1,3 @@
1
+ # graph: couples=.github/workflows/*.yml,.github/workflows/*.yaml,.github/ISSUE_TEMPLATE/*.yml,docs/_config.yml,kit:templates/*.yml,kit:templates/*.yaml dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: gate-sdk/SPEC.md §check-action-pinning — every `uses:` ref in a scanned YAML file is immutable: a full 40-hex commit SHA, or a repo-local ./ path git pins at checkout
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=.github/workflows/*.yml,.github/workflows/*.yaml,.github/ISSUE_TEMPLATE/*.yml,docs/_config.yml,kit:templates/*.yml,kit:templates/*.yaml dir=one valve=none tier=precommit
3
+ # install: on-surface
3
4
  # spec: gate-sdk/SPEC.md §check-action-run-shell — every GitHub Actions `run:` literal block scalar in an Actions-shaped YAML file is ShellCheck-clean at -S warning under the dialect the step actually runs
4
5
  #
5
6
  # usage: check-action-run-shell.sh [scan-root]
@@ -93,6 +94,7 @@ function processkey(rest, col, v) {
93
94
  if (v ~ /^>/) refuse(FNR, "a folded block scalar (run: " v ")")
94
95
  if (v ~ /^\|[0-9]/) refuse(FNR, "an explicit block-scalar indentation indicator (run: " v ")")
95
96
  if (v ~ /^\*/) refuse(FNR, "a YAML alias as the run: value (run: " v ")")
97
+ if (v ~ /^&/) refuse(FNR, "a YAML anchor on the run: value (run: " v ")")
96
98
  if (v ~ /^\|[-+]?$/) { startblock(col, FNR); return }
97
99
  if (v == "") return
98
100
  printf "P\t%d\n", FNR
@@ -175,7 +177,8 @@ for f in "${files[@]}"; do
175
177
  echo " $f:$a: $b" >&2
176
178
  echo " help: a multi-line run: body in an Actions-shaped file must be a literal block" >&2
177
179
  echo " scalar written 'run: |' (or '|-' / '|+'), with no explicit indentation" >&2
178
- echo " indicator and no YAML alias, and every \${{ }} on a body line balanced." >&2
180
+ echo " indicator and no YAML anchor or alias, and every \${{ }} on a body line" >&2
181
+ echo " balanced." >&2
179
182
  exit 2
180
183
  ;;
181
184
  P) plain=$((plain + 1)) ;;
@@ -0,0 +1,3 @@
1
+ # graph: couples=kit:smoke/*.sh,kit:gate-tests/*.test.sh,kit:bin/*.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: gate-sdk/SPEC.md §check-assertion-strength — a guard over a call to a script whose declared `# exit:` header binds a verdict token to one non-zero code must not name that token in its failure message while comparing no status to that token's code
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=scripts/msg-patterns.list dir=one valve=none tier=commit-msg
3
+ # install: zero-config
3
4
  # spec: gate-sdk/SPEC.md §check-commit-msg — the commit message matches no banned pattern (the leak guard for the message surface the pre-commit hook never sees)
4
5
  #
5
6
  # usage: check-commit-msg.sh <message-file> [pattern-file...]
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=gate-sdk/lib/gate.sh dir=one valve=none tier=commit-msg
3
+ # install: on-surface
3
4
  # spec: gate-sdk/SPEC.md §check-commit-subject — the subject line parses as <type>(<scope>)?!?: <summary> with <type> in the shared roster, or matches a git-generated carve-out (the parse guarantee under trajectory.sh's feat/debt column)
4
5
  #
5
6
  # usage: check-commit-subject.sh <message-file>
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # graph: couples=scripts/core-files.list dir=one valve=none tier=precommit
2
+ # graph: couples=scripts/core-files.list,kit:SPEC.md,kit:README.md dir=one valve=none tier=precommit
3
+ # install: on-surface
3
4
  # spec: gate-sdk/SPEC.md §check-core-files — every path in the core-files manifest exists in the worktree and is tracked
4
5
  #
5
6
  # usage: check-core-files.sh [manifest]
@@ -18,12 +19,35 @@ if [[ ! -e "$MANIFEST" ]]; then
18
19
  fi
19
20
  [[ -r "$MANIFEST" ]] || { echo "check-core-files: manifest not readable: $MANIFEST" >&2; exit 2; }
20
21
 
21
- mapfile -t paths < <(gates_list_members "$MANIFEST")
22
- if [[ ${#paths[@]} -eq 0 ]]; then
22
+ mapfile -t lines < <(gates_list_members "$MANIFEST")
23
+ if [[ ${#lines[@]} -eq 0 ]]; then
23
24
  echo "CORE-FILES: clean (manifest $MANIFEST lists no paths)"
24
25
  exit 0
25
26
  fi
26
27
 
28
+ # spec: gate-sdk/SPEC.md §check-core-files — a kit: line derives one path per kit root; the
29
+ # wildcard refusal is fail-closed because this reader requires each expanded path to exist,
30
+ # which is a different invariant from the glob match a couples= field performs
31
+ paths=(); _cf_expanded=""
32
+ for line in "${lines[@]}"; do
33
+ if [[ "$line" == kit:* ]]; then
34
+ case "${line#kit:}" in
35
+ *'*'* | *'?'* | *'['*)
36
+ echo "check-core-files: kit: token carries a wildcard in $MANIFEST: $line" >&2
37
+ echo " help: this manifest requires every expanded path to exist and be tracked," >&2
38
+ echo " which a wildcard cannot express — name an exact per-kit basename" >&2
39
+ echo " (e.g. kit:SPEC.md), or hand-list the paths." >&2
40
+ exit 2
41
+ ;;
42
+ esac
43
+ gate_expand_couples_var _cf_expanded "$line"
44
+ IFS=',' read -ra _cf_parts <<<"$_cf_expanded"
45
+ paths+=("${_cf_parts[@]}")
46
+ else
47
+ paths+=("$line")
48
+ fi
49
+ done
50
+
27
51
  git rev-parse --git-dir >/dev/null 2>&1 || {
28
52
  echo "check-core-files: not a git repository — cannot verify tracked status" >&2; exit 2; }
29
53
 
@@ -48,5 +72,5 @@ if [[ ${#missing[@]} -gt 0 || ${#untracked[@]} -gt 0 ]]; then
48
72
  exit 1
49
73
  fi
50
74
 
51
- echo "CORE-FILES: clean ($present listed path(s) present and tracked in $MANIFEST)"
75
+ echo "CORE-FILES: clean ($present manifest path(s) present and tracked in $MANIFEST)"
52
76
  exit 0
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env bash
2
+ # graph: couples=native/Cargo.toml,native/build.rs,native/src/*.rs,native/src/gates/*.rs dir=one valve=none tier=precommit
3
+ # install: never
4
+ # spec: gate-sdk/SPEC.md §check-crate-arms — the crate's lint and test arms run at commit time, so a battery that passes cannot coexist with a CI that fails on them
5
+ #
6
+ # usage: check-crate-arms.sh
7
+ # The crate comes from GATE_SDK_NATIVE_CRATE and the build scratch from
8
+ # GATE_SDK_CARGO_TARGET_DIR; there are no positional arguments.
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
+ CRATE="$(gate_native_crate)"
16
+ TARGET_DIR="${GATE_SDK_CARGO_TARGET_DIR:-$CRATE/target}"
17
+
18
+ # spec: gate-sdk/SPEC.md §check-crate-arms — the predicate is the crate's presence, never
19
+ # cargo's: a consumer tree is missing the corpus, not the toolchain, and a gate with no
20
+ # corpus reports clean rather than declaring a skip
21
+ [[ -f "$CRATE/Cargo.toml" ]] || {
22
+ echo "CRATE-ARMS: clean (no crate at $CRATE — $CRATE/Cargo.toml is absent, so there is no corpus to lint or test)"
23
+ exit 0
24
+ }
25
+
26
+ # spec: gate-sdk/SPEC.md §Fail-closed contract — a crate with no toolchain to check it is
27
+ # "cannot verify", which must not share an exit code with "verified clean"
28
+ command -v cargo >/dev/null 2>&1 || {
29
+ echo "check-crate-arms: cargo is not on PATH but a crate is present at $CRATE — the check could not run; treating as failure (not clean)" >&2
30
+ echo " help: cargo is the contributor-side toolchain floor for a tree carrying the crate" >&2
31
+ echo " (context-kit/SPEC.md §bin/env-probe). Install a Rust toolchain, then re-run." >&2
32
+ exit 2
33
+ }
34
+
35
+ fail=0
36
+
37
+ # spec: gate-sdk/SPEC.md §check-crate-arms — both arms run even when the first fails, so one
38
+ # commit-time report carries what CI would have said in two
39
+ lint="$(cargo clippy --release --manifest-path "$CRATE/Cargo.toml" --target-dir "$TARGET_DIR" --all-targets -- -D warnings 2>&1)"; st=$?
40
+ if [[ "$st" -ne 0 ]]; then
41
+ echo "check-crate-arms: cargo clippy failed (exit $st) on $CRATE:"
42
+ echo "$lint"
43
+ fail=1
44
+ fi
45
+
46
+ unit="$(cargo test --release --manifest-path "$CRATE/Cargo.toml" --target-dir "$TARGET_DIR" 2>&1)"; st=$?
47
+ if [[ "$st" -ne 0 ]]; then
48
+ echo "check-crate-arms: cargo test failed (exit $st) on $CRATE:"
49
+ echo "$unit"
50
+ fail=1
51
+ fi
52
+
53
+ if [[ "$fail" -ne 0 ]]; then
54
+ echo " help: fix the finding above. These are the arms CI runs, and this gate is now their"
55
+ echo " only spelling — the battery plus bash gate-sdk/bin/build-native.sh is the whole"
56
+ echo " commit-time obligation, and neither discharges the other."
57
+ exit 1
58
+ fi
59
+
60
+ echo "CRATE-ARMS: clean (cargo clippy --all-targets at -D warnings and cargo test, both --release over $CRATE, build scratch $TARGET_DIR)"
61
+ exit 0
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=docs/enforcement.md,scripts/gates.list,scripts/*.sh,kit:*.sh,scripts/kpis.list,.claude/settings.json,.github/workflows/*.yml dir=one valve=none tier=precommit
3
+ # install: on-surface
3
4
  # spec: gate-sdk/SPEC.md §check-enforcement-fresh — docs/enforcement.md is the byte-fresh projection of enforcement-map.sh --emit
4
5
  #
5
6
  # usage: check-enforcement-fresh.sh [projection-file] [emit-file]