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
@@ -0,0 +1,3 @@
1
+ # graph: couples=kit:smoke/install.sh,kit:smoke/violation.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: gate-sdk/SPEC.md §check-smoke-entry-guard — every mutating smoke script (install.sh, violation.sh) carries the ${SMOKE_KIT_ROOT:?} entry-point guard so a bare run refuses instead of mutating the caller's tree
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=*/templates/*.sh,scripts/*.sh dir=bi valve=none tier=precommit
3
+ # install: on-surface
3
4
  # spec: gate-sdk/SPEC.md §check-template-copy-parity — a kit template and its vendored consumer copy agree on their declared contract surface, with copy-side additions declared
4
5
  #
5
6
  # usage: check-template-copy-parity.sh [root]
@@ -0,0 +1,3 @@
1
+ # graph: couples=kit:templates/*.list,kit:*/*.sh dir=bi valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: gate-sdk/SPEC.md §check-template-registry-parity — a kit's shipped `.list` registry template names exactly the artifacts of its sibling directory, both directions
@@ -0,0 +1,3 @@
1
+ # graph: couples=kit:gate-tests/*.test.sh,kit:smoke/install.sh,kit:smoke/violation.sh dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: gate-sdk/SPEC.md §check-test-hermetic — two assertions (A) every bespoke gate-tests/*.test.sh sources lib/test-hermetic.sh or carries a `# hermetic-exempt:` marker; (B) a credential-managing smoke script pins every own-kit bin call ("$SMOKE_KIT_ROOT/bin/*") to a *_CRED_FILE path so it cannot resolve the ambient ~/.claude credential
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=scripts/msg-patterns.list dir=one valve=none tier=precommit trigger=*
3
+ # install: zero-config
3
4
  # spec: gate-sdk/SPEC.md §check-tree-terms — no tracked file matches the banned-pattern set (the tracked-files half of the leak guard; the pattern files and their templates are self-exempt)
4
5
  #
5
6
  # usage: check-tree-terms.sh [scan-root] [pattern-file...]
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=.workflow/*,.gitignore dir=one valve=none tier=precommit
3
+ # install: on-surface
3
4
  # spec: gate-sdk/SPEC.md §The workflow directory — every workflow-dir member is tracked or ignored, and every tracked member opens with a '# contract: ' header carrying a ruled payload
4
5
  #
5
6
  # usage: check-workflow-tiering.sh [scan-root] (default '.')
@@ -14,7 +15,7 @@ ROOT="${1:-.}"
14
15
  git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1 || {
15
16
  echo "check-workflow-tiering: $ROOT is not a git repository — the tracked/ignored partition is unreadable" >&2; exit 2; }
16
17
 
17
- WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
18
+ WF="$GATE_SDK_WORKFLOW_DIR"
18
19
  [[ -d "$ROOT/$WF" ]] || {
19
20
  echo "check-workflow-tiering: workflow directory not found: $ROOT/$WF" >&2; exit 2; }
20
21
 
@@ -53,6 +53,21 @@ check_case indicator ' - run: |2
53
53
  # C — a YAML alias as the run: value. No anchor resolution is attempted.
54
54
  check_case alias ' - run: *setup' 2 "a YAML alias as the run: value (run: *setup)"
55
55
 
56
+ # C2 — the anchor half of the same rule. This fell through every refusal arm and
57
+ # landed on the plain-scalar counter, so an anchored body was reported skipped and
58
+ # never linted: a silent fail-open in the gate whose whole job is linting this
59
+ # shell. The body below is ShellCheck-dirty, so a regression here reads as clean.
60
+ check_case anchor ' - run: &setup |
61
+ echo "$undefined_var"
62
+ unused=1' 2 "a YAML anchor on the run: value (run: &setup |)"
63
+
64
+ # C3 — an anchor on a plain scalar refuses too: the anchor is what we cannot
65
+ # resolve, independent of the scalar style it decorates.
66
+ check_case anchor_plain ' - run: &setup echo hi' 2 "a YAML anchor on the run: value (run: &setup echo hi)"
67
+
68
+ # C4 — a quoted value merely beginning with & is an ordinary string, not an anchor.
69
+ check_case anchor_quoted ' - run: "echo && echo"' 0 "0 run: block(s) linted"
70
+
56
71
  # D — an unbalanced GitHub expression on a body line: substituting it would mangle
57
72
  # the fragment, so the line is refused rather than linted wrong.
58
73
  check_case unbalanced ' - run: |
@@ -84,5 +99,5 @@ if [[ "$fails" -gt 0 ]]; then
84
99
  echo "check-action-run-shell.test: $fails assertion(s) failed"
85
100
  exit 1
86
101
  fi
87
- echo "check-action-run-shell.test: ok (folded scalars, an explicit indentation indicator, a YAML alias and an unbalanced GitHub expression each refuse at exit 2 naming the construct; |- and |+ extract normally; a refusable construct outside the Actions-shape subject is skipped and counted rather than refused)"
102
+ echo "check-action-run-shell.test: ok (folded scalars, an explicit indentation indicator, a YAML alias, a YAML anchor on either scalar style and an unbalanced GitHub expression each refuse at exit 2 naming the construct; |- and |+ extract normally; a quoted value merely starting with & is not an anchor; a refusable construct outside the Actions-shape subject is skipped and counted rather than refused)"
88
103
  exit 0
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env bash
2
+ # spec: gate-sdk/SPEC.md §check-core-files — a kit: manifest line derives one path per kit root, so a root missing that path reds without any manifest edit; a kit: token carrying a wildcard is refused fail-closed because this reader requires each expanded path to exist, which is a different invariant from the glob match a couples= field performs. This lives in the bespoke unit lane rather than the good/+bad/ pair because the fixture runner reads exit 2 as a harness error and runs each case with the fixture dir as cwd, so neither the refusal nor the expansion is expressible there.
3
+ set -uo pipefail
4
+ source "$(dirname "${BASH_SOURCE[0]}")/../lib/test-hermetic.sh"
5
+
6
+ ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
7
+ GATE="$ROOT/gate-sdk/checks/check-core-files.sh"
8
+ [[ -x "$GATE" ]] || { echo "check-core-files.test: gate not found: $GATE"; exit 2; }
9
+
10
+ sb="$(mktemp -d)"
11
+ trap 'rm -rf "$sb"' EXIT
12
+
13
+ git -C "$sb" init -q
14
+ git -C "$sb" config user.email t@example.invalid
15
+ git -C "$sb" config user.name t
16
+ mkdir -p "$sb/alpha-kit" "$sb/beta-kit"
17
+ printf 'a\n' > "$sb/alpha-kit/SPEC.md"
18
+ printf 'b\n' > "$sb/beta-kit/SPEC.md"
19
+ printf 'r\n' > "$sb/plain.txt"
20
+ git -C "$sb" add -A
21
+ git -C "$sb" commit -qm seed
22
+
23
+ fails=0
24
+ run() { ( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit" bash "$GATE" "$1" 2>&1 ); }
25
+
26
+ # A kit: line expands to one path per root; every expansion exists, so the gate is clean
27
+ # and its count proves the derivation ran (2 derived + 1 hand line).
28
+ printf 'kit:SPEC.md\nplain.txt\n' > "$sb/good.list"
29
+ out="$(run good.list)"; rc=$?
30
+ [[ "$rc" -eq 0 ]] || { echo "FAIL [expand-clean]: expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
31
+ grep -qF '3 manifest path(s)' <<<"$out" || { echo "FAIL [expand-count]: expected 3 expanded paths: $out"; fails=$((fails + 1)); }
32
+
33
+ # A new root with no SPEC.md reds without any manifest edit — the property Delta 2 exists for.
34
+ mkdir -p "$sb/gamma-kit"
35
+ printf 'g\n' > "$sb/gamma-kit/other.md"
36
+ git -C "$sb" add -A
37
+ git -C "$sb" commit -qm gamma
38
+ out="$( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit gamma-kit" bash "$GATE" good.list 2>&1 )"; rc=$?
39
+ [[ "$rc" -eq 1 ]] || { echo "FAIL [new-root-reds]: expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
40
+ grep -qF 'missing: gamma-kit/SPEC.md' <<<"$out" || { echo "FAIL [new-root-names]: $out"; fails=$((fails + 1)); }
41
+
42
+ # An untracked expansion reds on the tracked half of the invariant, not just existence.
43
+ printf 'u\n' > "$sb/gamma-kit/SPEC.md"
44
+ out="$( cd "$sb" && GATE_SDK_KIT_DIRS="alpha-kit beta-kit gamma-kit" bash "$GATE" good.list 2>&1 )"; rc=$?
45
+ [[ "$rc" -eq 1 ]] || { echo "FAIL [untracked-reds]: expected exit 1, got $rc: $out"; fails=$((fails + 1)); }
46
+ grep -qF 'untracked: gamma-kit/SPEC.md' <<<"$out" || { echo "FAIL [untracked-names]: $out"; fails=$((fails + 1)); }
47
+
48
+ # A wildcard is refused fail-closed: this reader cannot express "some file matches".
49
+ for tok in 'kit:checks/*.sh' 'kit:SPEC?.md' 'kit:[ab].md'; do
50
+ printf '%s\n' "$tok" > "$sb/wild.list"
51
+ out="$(run wild.list)"; rc=$?
52
+ [[ "$rc" -eq 2 ]] || { echo "FAIL [wildcard-refused $tok]: expected exit 2, got $rc: $out"; fails=$((fails + 1)); }
53
+ grep -qF 'carries a wildcard' <<<"$out" || { echo "FAIL [wildcard-message $tok]: $out"; fails=$((fails + 1)); }
54
+ done
55
+
56
+ # Backward compatibility: a manifest with no kit: line behaves exactly as before.
57
+ printf 'plain.txt\n' > "$sb/plainonly.list"
58
+ out="$(run plainonly.list)"; rc=$?
59
+ [[ "$rc" -eq 0 ]] || { echo "FAIL [no-token-unchanged]: expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
60
+ grep -qF '1 manifest path(s)' <<<"$out" || { echo "FAIL [no-token-count]: $out"; fails=$((fails + 1)); }
61
+
62
+ [[ "$fails" -eq 0 ]] || { echo "check-core-files.test: $fails assertion(s) failed"; exit 1; }
63
+ echo "check-core-files.test: clean (kit: expands per root and reds on a root missing the path or leaving it untracked; a wildcard token is refused fail-closed; a token-free manifest is unchanged)"
64
+ exit 0
@@ -0,0 +1,7 @@
1
+ [package]
2
+ name = "crate-arms-bad"
3
+ version = "0.0.0"
4
+ edition = "2021"
5
+ publish = false
6
+
7
+ [dependencies]
@@ -0,0 +1,12 @@
1
+ pub fn doubled(n: i32) -> i32 {
2
+ let unread = n;
3
+ n * 2
4
+ }
5
+
6
+ #[cfg(test)]
7
+ mod tests {
8
+ #[test]
9
+ fn doubling_is_doubling() {
10
+ assert_eq!(super::doubled(21), 43);
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ check-crate-arms: cargo clippy failed
2
+ unused variable: `unread`
3
+ check-crate-arms: cargo test failed
4
+ doubling_is_doubling
5
+ help: fix the finding above
@@ -0,0 +1,2 @@
1
+ GATE_SDK_NATIVE_CRATE="crate"
2
+ GATE_SDK_CARGO_TARGET_DIR="${TMPDIR:-/tmp}/checkwright-crate-arms-bad"
@@ -0,0 +1,7 @@
1
+ [package]
2
+ name = "crate-arms-good"
3
+ version = "0.0.0"
4
+ edition = "2021"
5
+ publish = false
6
+
7
+ [dependencies]
@@ -0,0 +1,11 @@
1
+ pub fn doubled(n: i32) -> i32 {
2
+ n * 2
3
+ }
4
+
5
+ #[cfg(test)]
6
+ mod tests {
7
+ #[test]
8
+ fn doubling_is_doubling() {
9
+ assert_eq!(super::doubled(21), 42);
10
+ }
11
+ }
@@ -0,0 +1,2 @@
1
+ CRATE-ARMS: clean
2
+ cargo clippy --all-targets at -D warnings and cargo test
@@ -0,0 +1,2 @@
1
+ GATE_SDK_NATIVE_CRATE="crate"
2
+ GATE_SDK_CARGO_TARGET_DIR="${TMPDIR:-/tmp}/checkwright-crate-arms-good"
@@ -1 +1 @@
1
- GATE-ASSERTIONS: clean (2 enumerated contract(s) coupled)
1
+ GATE-ASSERTIONS: clean (2 of 2 enumerated contract(s) coupled)
@@ -0,0 +1,2 @@
1
+ scripts
2
+ stamp.txt
@@ -0,0 +1,5 @@
1
+ the gate binary was not built from the source now in the tree
2
+ reports source stamp 7b30e5148d6ca2f09e1b84ff2d5c7a6033819e4c
3
+ stamp.txt hashes to 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
4
+ 2 descriptor(s) dispatch to that binary: check-ported check-vendored
5
+ help: rebuild it
@@ -0,0 +1,2 @@
1
+ # graph: couples=docs/*.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor in a kit resolve dir, so the red is reported against the whole dispatching set rather than one dir's
@@ -0,0 +1,2 @@
1
+ # graph: couples=docs/*.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor
@@ -0,0 +1,2 @@
1
+ GATE_SDK_KIT_DIRS="kitroot"
2
+ GATE_SDK_NATIVE_BIN="./stub-bin"
@@ -0,0 +1,4 @@
1
+ # Hermetic fixture registry — both descriptors are registered members, so both
2
+ # dispatch and the stale binary is the violation this case asserts.
3
+ check-ported
4
+ check-vendored
@@ -0,0 +1 @@
1
+ 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # A binary built from a source state this fixture tree no longer carries: its baked
3
+ # stamp is not stamp.txt's. The near-miss this case must not collapse into is the
4
+ # zero-descriptor tree, which exits 0 — so a red here can only be the stamp mismatch.
5
+ [[ "${1:-}" == --source-stamp ]] && { echo 7b30e5148d6ca2f09e1b84ff2d5c7a6033819e4c; exit 0; }
6
+ exit 2
@@ -0,0 +1,2 @@
1
+ scripts
2
+ stamp.txt
@@ -0,0 +1,5 @@
1
+ GATE-BINARY-FRESH: clean
2
+ 2 .gate descriptor(s)
3
+ 2 dispatched to by a live member of scripts/gates.list
4
+ built from the source now in stamp.txt
5
+ stamp 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
@@ -0,0 +1,2 @@
1
+ # graph: couples=docs/*.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor in a kit resolve dir, so the derivation is proved over the dir union rather than the gates dir alone
@@ -0,0 +1,2 @@
1
+ # graph: couples=docs/*.md dir=one valve=none tier=precommit
2
+ # spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor
@@ -0,0 +1,2 @@
1
+ GATE_SDK_KIT_DIRS="kitroot"
2
+ GATE_SDK_NATIVE_BIN="./stub-bin"
@@ -0,0 +1,4 @@
1
+ # Hermetic fixture registry — both descriptors are registered members, so both
2
+ # dispatch and the binary is load-bearing.
3
+ check-ported
4
+ check-vendored
@@ -0,0 +1 @@
1
+ 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # A binary built from the source the fixture tree carries: its baked stamp is the
3
+ # one stamp.txt reports, so the gate must reach the comparison and find them equal.
4
+ [[ "${1:-}" == --source-stamp ]] && { echo 4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812; exit 0; }
5
+ exit 2
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of checks/check-gate-binary-fresh.sh over the configurations the
3
+ # good/+bad/ pair cannot hold: the pair is one invocation each and both are
4
+ # "descriptors present, binary readable". These are the load-bearing predicate's
5
+ # own boundary — a descriptor on disk is a declaration, a registered member
6
+ # resolving to one is a dispatch — plus the two no-dispatch configurations this
7
+ # repo's battery and the consumer smoke used to be the only oracles for.
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)" # gate-sdk/
14
+ GATE="$DIR/checks/check-gate-binary-fresh.sh"
15
+ SANDBOX="$(mktemp -d)"
16
+ trap 'rm -rf "$SANDBOX"' EXIT
17
+
18
+ fails=0
19
+ STAMP=4f1c2a90bb7e5d3168ac04e2f5b7391dd0c6a812
20
+
21
+ # One sandbox shape, re-pointed per case: a gates dir, a kit resolve dir, a stub
22
+ # binary whose baked stamp matches stamp.txt, and a registry the case rewrites.
23
+ mkdir -p "$SANDBOX/scripts" "$SANDBOX/kitroot/checks"
24
+ printf '%s\n' "$STAMP" > "$SANDBOX/stamp.txt"
25
+ cat > "$SANDBOX/stub-bin" <<EOF
26
+ #!/usr/bin/env bash
27
+ [[ "\${1:-}" == --source-stamp ]] && { echo $STAMP; exit 0; }
28
+ exit 2
29
+ EOF
30
+ chmod +x "$SANDBOX/stub-bin"
31
+ DESC='# graph: couples=docs/*.md dir=one valve=none tier=precommit
32
+ # spec: gate-sdk/SPEC.md §check-gate-binary-fresh — fixture descriptor'
33
+
34
+ run() { # run <bin> ; registry + descriptors are already in place
35
+ ( cd "$SANDBOX" && env GATE_SDK_KIT_DIRS=kitroot GATE_SDK_NATIVE_BIN="$1" \
36
+ GATE_SDK_NATIVE_CRATE=crate "$GATE" scripts stamp.txt 2>&1 )
37
+ }
38
+
39
+ expect() { # expect <label> <want-rc> <substring> <got-rc> <output>
40
+ if [[ "$4" -ne "$2" ]]; then
41
+ echo " FAIL [$1]: want exit $2, got $4 -- $5"; fails=$((fails + 1))
42
+ elif ! grep -qF -- "$3" <<<"$5"; then
43
+ echo " FAIL [$1]: exit $2 but output lacks '$3': $5"; fails=$((fails + 1))
44
+ fi
45
+ }
46
+
47
+ # --- zero descriptors: clean, and the report says zero of each ---
48
+ printf 'check-shell\n' > "$SANDBOX/scripts/gates.list"
49
+ printf '#!/usr/bin/env bash\n' > "$SANDBOX/scripts/check-shell.sh"
50
+ out="$(run ./stub-bin)"; rc=$?
51
+ expect zero-descriptors 0 '0 .gate descriptor(s)' "$rc" "$out"
52
+ expect zero-descriptors-dispatch 0 '0 dispatched to by a live member' "$rc" "$out"
53
+
54
+ # --- descriptors present, none dispatching: clean, and the two counts differ ---
55
+ # The configuration every vendored tree is in after the first cohort lands: the
56
+ # descriptors ship with the kit root, no consumer registry names them, and no
57
+ # binary exists. Reading a descriptor's presence as a dispatch reds all of them.
58
+ printf '%s\n' "$DESC" > "$SANDBOX/scripts/check-ported.gate"
59
+ printf '%s\n' "$DESC" > "$SANDBOX/kitroot/checks/check-vendored.gate"
60
+ out="$(run ./nonexistent-bin)"; rc=$?
61
+ expect present-none-dispatching 0 '2 .gate descriptor(s)' "$rc" "$out"
62
+ expect present-none-dispatching-count 0 '0 dispatched to by a live member' "$rc" "$out"
63
+
64
+ # --- the near miss: a registered member resolves to a descriptor, no binary ---
65
+ # Exit 2, never 0: this is the state the corrected predicate must still fail
66
+ # closed on, and the one way a too-loose predicate passes its own good/ case.
67
+ printf 'check-shell\ncheck-ported\n' > "$SANDBOX/scripts/gates.list"
68
+ out="$(run ./nonexistent-bin)"; rc=$?
69
+ expect registered-no-binary 2 'registered member(s) dispatch to it' "$rc" "$out"
70
+
71
+ # --- absent registry: cannot verify, so exit 2 rather than a clean report ---
72
+ rm -f "$SANDBOX/scripts/gates.list"
73
+ out="$(run ./stub-bin)"; rc=$?
74
+ expect absent-registry 2 'no gate registry at' "$rc" "$out"
75
+
76
+ if [[ "$fails" -gt 0 ]]; then
77
+ echo "check-gate-binary-fresh.test.sh: $fails case(s) failed"
78
+ exit 1
79
+ fi
80
+ echo "check-gate-binary-fresh.test.sh: clean (load-bearing predicate: zero descriptors, descriptors with none dispatching, a registered dispatch with no binary, and an absent registry — 6 assertions over 4 cases)"
81
+ exit 0
@@ -2,7 +2,9 @@
2
2
 
3
3
  ## New Features
4
4
 
5
- - **some-other-task** — live, but nothing points at it.
5
+ - **some-other-task** — live, but nothing points at it. Its body bolds
6
+ **emphasis** the way real entry prose does, and a token scan reads that
7
+ emphasis as a live slug.
6
8
 
7
9
  ## Done
8
10
 
@@ -1 +1,3 @@
1
- does not resolve to a live task
1
+ # until: retired-task does not resolve to a live task
2
+ exemption element carries neither # until: <slug> nor # permanent: <reason>
3
+ # until: emphasis does not resolve to a live task
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env bash
2
2
  # Fixture gate (scanned as text, never executed): one exemption's `# until:`
3
- # resolves only to Done, and another carries no disposition — must be REJECTED.
3
+ # resolves only to Done, one carries no disposition, and one points at a bold
4
+ # token in body prose that was never a task — all three must be REJECTED.
4
5
  set -uo pipefail
5
6
 
6
7
  # exception-list: surfaces excused from the sample scan
7
8
  EXEMPT=(
8
9
  "surface-a" # until: retired-task
9
10
  "surface-b"
11
+ "surface-c" # until: emphasis
10
12
  )
11
13
  echo "SAMPLE: clean (${#EXEMPT[@]} exemptions)"
@@ -1 +1,2 @@
1
1
  GATE-EXEMPTION-TASKS: clean
2
+ 1 live task slug(s)
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # no-fixture: fixture descriptor (scanned as text): a .gate-dispatched no-fixture member whose implementation module emits neither contract line
3
+ # spec: gate-sdk/SPEC.md §check-gate-output — the corpus follows the rule to the implementation module
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ # no-fixture: a fixture-less member, so the static source-grep is its only output-contract oracle
2
3
  # Fixture gate (scanned as text): passes silently with no machine-keyable success
3
4
  # line — a reader cannot tell "passed" from "did nothing".
4
5
  exit 0
@@ -1 +1,4 @@
1
1
  no machine-keyable success line
2
+ check-sample (no '<NAME>: clean
3
+ check-native-sample (no '<NAME>: clean
4
+ check-native-sample (no 'help:' remedy line
@@ -1,2 +1,3 @@
1
1
  # Fixture registry: names one member that passes silently — must be REJECTED.
2
2
  check-sample
3
+ check-native-sample
@@ -0,0 +1,4 @@
1
+ [package]
2
+ name = "checkwright-gates"
3
+ version = "0.0.0"
4
+ edition = "2021"
@@ -0,0 +1,7 @@
1
+ // Fixture module (scanned as text, never compiled): passes silently with no
2
+ // machine-keyable success line and no help: remedy. The descriptor beside it carries
3
+ // the '# no-fixture:' opt-out, so a reader that stopped at the descriptor — or kept the
4
+ // shell emitter alternation, which matches nothing here — would report clean.
5
+ pub fn run() -> i32 {
6
+ 0
7
+ }
@@ -0,0 +1,3 @@
1
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
2
+ # no-fixture: fixture descriptor (scanned as text): a .gate-dispatched no-fixture member, whose output contract lives in its implementation module rather than in this file
3
+ # spec: gate-sdk/SPEC.md §check-gate-output — the corpus follows the rule to the implementation module
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ # no-fixture: a fixture-less member, so the static source-grep is its only output-contract oracle
2
3
  # Fixture gate (scanned as text): emits a conforming machine-keyable success line
3
4
  # and a help: remedy on its failure path.
4
5
  if false; then
@@ -1 +1,2 @@
1
1
  GATE-OUTPUT: clean
2
+ 2 source-grepped as no-fixture members
@@ -1,3 +1,4 @@
1
1
  # Fixture registry (scanned as text, never executed): names one member that
2
2
  # DOES carry a '<NAME>: clean' success line — check-gate-output must ACCEPT.
3
3
  check-sample
4
+ check-native-sample
@@ -0,0 +1,4 @@
1
+ [package]
2
+ name = "checkwright-gates"
3
+ version = "0.0.0"
4
+ edition = "2021"
@@ -0,0 +1,11 @@
1
+ // Fixture module (scanned as text, never compiled): the implementation half of a
2
+ // .gate-dispatched no-fixture member, emitting a conforming machine-keyable success
3
+ // line and a help: remedy in the Rust idiom — check-gate-output must ACCEPT.
4
+ pub fn run() -> i32 {
5
+ if false {
6
+ println!(" help: nothing to fix in the fixture");
7
+ return 1;
8
+ }
9
+ println!("NATIVE-SAMPLE: clean (nothing to check in the fixture)");
10
+ 0
11
+ }
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env bash
2
+ # Direct unit test of check-gate-output's out-of-reach branch — the one verdict its
3
+ # fixture pair cannot hold. Both cases of that pair ship a crate dir (they must: the
4
+ # pair's whole job is proving the module-grep arm accepts and rejects), so neither can
5
+ # also stand up the tree where the crate is absent. That tree is not hypothetical: it
6
+ # is every consumer, because native/ is not a kit root and the payload vendors kit
7
+ # roots only, so a vendored .gate member's implementation module is never delivered.
8
+ # It also holds the two trees that decide what "the crate is absent" means: one carrying
9
+ # the binary at its default path under the crate directory (out of reach), and one
10
+ # carrying a manifest but no gates module at all (red).
11
+ #
12
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
13
+ set -uo pipefail
14
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
15
+
16
+ SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
17
+ GATE="$SDK/checks/check-gate-output.sh"
18
+
19
+ fails=0
20
+ TMP="$(mktemp -d)"
21
+ trap 'rm -rf "$TMP"' EXIT
22
+
23
+ # A consumer-shaped tree: the descriptor vendors, the crate does not exist.
24
+ mkdir -p "$TMP/consumer"
25
+ printf 'check-vendored-sample\n' > "$TMP/consumer/gates.list"
26
+ cat > "$TMP/consumer/check-vendored-sample.gate" <<'EOF'
27
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
28
+ # no-fixture: a .gate-dispatched no-fixture member whose implementation module this tree does not carry
29
+ # spec: gate-sdk/SPEC.md §check-gate-output — the out-of-reach branch
30
+ EOF
31
+
32
+ out="$(cd "$TMP/consumer" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
33
+ if [[ "$rc" -ne 0 ]]; then
34
+ echo " FAIL: a member whose crate is absent reddened (exit $rc) — every consumer's battery"
35
+ printf ' %s\n' "$out"
36
+ fails=$((fails + 1))
37
+ fi
38
+ if ! grep -q 'declared out of reach' <<<"$out"; then
39
+ echo " FAIL: the omission was not declared in the success line — a silently shrinking count"
40
+ printf ' %s\n' "$out"
41
+ fails=$((fails + 1))
42
+ fi
43
+ if ! grep -q 'check-vendored-sample' <<<"$out"; then
44
+ echo " FAIL: the out-of-reach member was not named, so the declaration says nothing"
45
+ printf ' %s\n' "$out"
46
+ fails=$((fails + 1))
47
+ fi
48
+ if ! grep -q '0 source-grepped as no-fixture members' <<<"$out"; then
49
+ echo " FAIL: an out-of-reach member was still counted as source-grepped"
50
+ printf ' %s\n' "$out"
51
+ fails=$((fails + 1))
52
+ fi
53
+
54
+ # spec: gate-sdk/SPEC.md §check-gate-output — the regression case for "why the manifest
55
+ # and not the directory": a consumer that holds only the gate binary still has a native/
56
+ # directory, because GATE_SDK_NATIVE_BIN defaults inside the crate path. Under a
57
+ # directory-presence probe this tree reddened and no consumer could clear it.
58
+ cp -R "$TMP/consumer" "$TMP/binonly"
59
+ mkdir -p "$TMP/binonly/native/target/release"
60
+ : > "$TMP/binonly/native/target/release/checkwright-gates"
61
+ out="$(cd "$TMP/binonly" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
62
+ if [[ "$rc" -ne 0 ]]; then
63
+ echo " FAIL: a tree holding only the binary reddened (exit $rc) — the crate path is where"
64
+ echo " the artifact lands, so directory presence is not crate presence"
65
+ printf ' %s\n' "$out"
66
+ fails=$((fails + 1))
67
+ fi
68
+ if ! grep -q 'declared out of reach' <<<"$out"; then
69
+ echo " FAIL: the binary-only tree was not declared out of reach"
70
+ printf ' %s\n' "$out"
71
+ fails=$((fails + 1))
72
+ fi
73
+
74
+ # The same tree WITH a crate present and the module missing is the half-landed port,
75
+ # and it must red — this is what keeps the branch above from being an escape hatch.
76
+ cp -R "$TMP/consumer" "$TMP/upstream"
77
+ mkdir -p "$TMP/upstream/native/src/gates"
78
+ printf '[package]\nname = "checkwright-gates"\n' > "$TMP/upstream/native/Cargo.toml"
79
+ out="$(cd "$TMP/upstream" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
80
+ if [[ "$rc" -ne 1 ]]; then
81
+ echo " FAIL: a crate present with no module for a dispatching member did not red (exit $rc)"
82
+ printf ' %s\n' "$out"
83
+ fails=$((fails + 1))
84
+ fi
85
+ if ! grep -q 'no module at native/src/gates/vendored_sample.rs' <<<"$out"; then
86
+ echo " FAIL: the red did not name the module path the name convention derives"
87
+ printf ' %s\n' "$out"
88
+ fails=$((fails + 1))
89
+ fi
90
+
91
+ # spec: gate-sdk/SPEC.md §check-gate-output — "why not the gates module directory either":
92
+ # a crate whose gates module is gone entirely must stay red rather than going quietly out
93
+ # of reach. This is the case a src/gates/ probe would have converted into a false green,
94
+ # so it is asserted rather than left to the SPEC's argument.
95
+ cp -R "$TMP/consumer" "$TMP/gutted"
96
+ mkdir -p "$TMP/gutted/native"
97
+ printf '[package]\nname = "checkwright-gates"\n' > "$TMP/gutted/native/Cargo.toml"
98
+ out="$(cd "$TMP/gutted" && GATE_SDK_KIT_DIRS="$SDK" bash "$GATE" . 2>&1)"; rc=$?
99
+ if [[ "$rc" -ne 1 ]]; then
100
+ echo " FAIL: a crate whose gates module is absent did not red (exit $rc) — crate presence"
101
+ echo " must not be inferred from the module set it happens to carry"
102
+ printf ' %s\n' "$out"
103
+ fails=$((fails + 1))
104
+ fi
105
+
106
+ if [[ "$fails" -gt 0 ]]; then
107
+ echo "check-gate-output.test: $fails assertion(s) failed"
108
+ exit 1
109
+ fi
110
+ echo "check-gate-output.test: ok (out-of-reach declared, binary-only out of reach, missing-module red, gutted-crate red)"
111
+ exit 0
@@ -0,0 +1,2 @@
1
+ scripts
2
+ conservation.md
@@ -0,0 +1,7 @@
1
+ ## Meta-gate conservation for the binary substrate
2
+
3
+ | Meta-gate | Disposition |
4
+ |---|---|
5
+ | `check-unrelated` | Retained. |
6
+
7
+ ## Next section