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
@@ -1,5 +1,6 @@
1
1
  # lifecycle-kit:merge:begin
2
2
  .workflow/WORKFLOW-STATE.txt merge=iteration-scoped
3
3
  .workflow/lesson-evidence.txt merge=iteration-scoped
4
+ .workflow/survey-record.md merge=iteration-scoped
4
5
  .workflow/gap-inbox.md merge=union
5
6
  # lifecycle-kit:merge:end
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of checks/check-merge-attrs.sh — the scenarios the one-pair
2
+ # Behavioral test of check-merge-attrs — the scenarios the one-pair
3
3
  # good/bad harness cannot hold. The good/bad fixture pair (run-gate-tests.sh)
4
4
  # covers the reverse-direction safety edge (a merge=iteration-scoped attribute
5
5
  # on a path outside the derived set); this file covers the forward direction (a
@@ -14,7 +14,6 @@ set -uo pipefail
14
14
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
15
15
 
16
16
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
17
- GATE="$DIR/checks/check-merge-attrs.sh"
18
17
  SANDBOX="$(mktemp -d)"
19
18
  trap 'rm -rf "$SANDBOX"' EXIT
20
19
 
@@ -22,7 +21,7 @@ fails=0
22
21
 
23
22
  check_case() { # $1=label $2=dir $3=want-rc $4=want-substring
24
23
  local out rc
25
- out="$(cd "$2" && "$GATE" 2>&1)"; rc=$?
24
+ out="$(cd "$2" && gate_run check-merge-attrs "$DIR/checks" 2>&1)"; rc=$?
26
25
  if [[ "$rc" -ne "$3" ]]; then
27
26
  echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
28
27
  fi
@@ -63,6 +62,7 @@ mkdir -p "$uok"
63
62
  cat >"$uok/.gitattributes" <<'EOF'
64
63
  .workflow/WORKFLOW-STATE.txt merge=iteration-scoped
65
64
  .workflow/lesson-evidence.txt merge=iteration-scoped
65
+ .workflow/survey-record.md merge=iteration-scoped
66
66
  .workflow/gap-inbox.md merge=union
67
67
  CHANGELOG.md merge=union
68
68
  EOF
@@ -0,0 +1 @@
1
+ point a reader into per-iteration scratch
@@ -0,0 +1,4 @@
1
+ # shellcheck shell=bash
2
+ # comment-tier-exempt: fixture config — the permanent surfaces this case dir carries
3
+ # shellcheck disable=SC2034 # consumed by lifecycle-kit/lib/stages.sh after sourcing
4
+ LIFECYCLE_KIT_PERMANENT_SURFACE_GLOBS=("surfaces/*.md")
@@ -0,0 +1,13 @@
1
+ # Queue — the three retrieval-pointer forms, none of them tagged
2
+
3
+ - **single-line-colon** — the attested `prose-profile` form, colon and path on one physical line.
4
+ Full finding and its two-command witness: `.workflow/survey-record.md`
5
+
6
+ - **markdown-link** — the pointer as a link target rather than a trailing token.
7
+ The rest of the census lives in [the survey record](.workflow/survey-record.md) and is not
8
+ repeated here.
9
+
10
+ - **wrapped-colon** — the live shape: the colon ends one physical line and the path opens the next,
11
+ so a scanner reading physical lines in isolation clears it with no tag needed.
12
+ The census and its two-command witness:
13
+ `.workflow/survey-record.md`. Everything else in this entry is prose.
@@ -0,0 +1,4 @@
1
+ # shellcheck shell=bash
2
+ # comment-tier-exempt: fixture config — the permanent surfaces this case dir carries
3
+ # shellcheck disable=SC2034 # consumed by lifecycle-kit/lib/stages.sh after sourcing
4
+ LIFECYCLE_KIT_PERMANENT_SURFACE_GLOBS=("surfaces/*.md")
@@ -0,0 +1,31 @@
1
+ # Queue — the clean forms, copied from live entries that name the record as a subject
2
+
3
+ - **naming-as-subject-one** — the record is the sentence's subject, not a promise of retrievable content.
4
+ A superseded block sits beside its superseder with no visible difference.
5
+ `.workflow/survey-record.md`'s stage-entry read trigger advertises every block for a
6
+ reader who cannot tell which one is live.
7
+
8
+ - **naming-as-subject-two** — same shape, path opening a wrapped continuation line after a full stop.
9
+ The selector answered the wrong term, so the ruling failed on both terms.
10
+ `.workflow/survey-record.md` was wrong twice in one iteration, and both firings were found late.
11
+
12
+ - **naming-as-subject-three** — mid-sentence mention after a full stop on one physical line.
13
+ A liveness scan reads the surface only for emptiness or a bullet count. `.workflow/survey-record.md`
14
+ does both, which is why the count alone proves nothing.
15
+
16
+ - **naming-as-subject-four** — the record's purpose stated, still no retrieval promise.
17
+ The mechanism claimed more than it held and was wrong three times in one iteration.
18
+ `.workflow/survey-record.md` exists so a later stage need not re-derive a survey,
19
+ which is a reason to keep it rather than a place to send a reader.
20
+
21
+ - **prepositional-mention** — a path introduced by a preposition, never by a colon.
22
+ The stage cursor has exactly one source, the last stamp in
23
+ `.workflow/WORKFLOW-STATE.txt`, and stage motion never writes the queue.
24
+
25
+ - **non-member-after-colon** — a colon-introduced pointer at a surface outside the truncated set stays clean.
26
+ The pattern is already shipped:
27
+ `.workflow/audit-roster.txt` is a tracked roster with its own liveness rules.
28
+
29
+ - **exempt-dead-citation** — the escape hatch: a surface quoting a dead citation verbatim in order to
30
+ describe it. scratch-citation-exempt: this entry documents the defect and must quote it
31
+ `prose-profile` ended "Full finding and its two-command witness: `.workflow/survey-record.md`".
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of checks/check-shim-restatement.sh — the scenarios the one
2
+ # Behavioral test of check-shim-restatement — the scenarios the one
3
3
  # good/bad pair cannot hold. The pair covers the plain restatement/clean split;
4
4
  # this drives: a shim with no binding directive is skipped (not a shim), a
5
5
  # resolved corpus that yields no n-grams is fail-closed (never a false clean —
@@ -11,7 +11,6 @@ set -uo pipefail
11
11
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
12
12
 
13
13
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
14
- GATE="$DIR/checks/check-shim-restatement.sh"
15
14
  SANDBOX="$(mktemp -d)"
16
15
  trap 'rm -rf "$SANDBOX"' EXIT
17
16
 
@@ -20,7 +19,7 @@ fails=0
20
19
  check_case() { # $1=label $2=sandbox-dir $3=want-rc $4=want-substring $5..=gate args
21
20
  local label="$1" dir="$2" want="$3" sub="$4"; shift 4
22
21
  local out rc
23
- out="$(cd "$dir" && "$GATE" "$@" 2>&1)"; rc=$?
22
+ out="$(cd "$dir" && gate_run check-shim-restatement "$DIR/checks" "$@" 2>&1)"; rc=$?
24
23
  if [[ "$rc" -ne "$want" ]]; then
25
24
  echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
26
25
  fi
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of checks/check-skill-binding.sh — the scenarios the one-pair
2
+ # Behavioral test of check-skill-binding — the scenarios the one-pair
3
3
  # good/bad harness cannot hold. The good/bad fixture pair covers the unbound-slot
4
4
  # case; the harness admits one bad/ dir, so this drives the orphan-binding case,
5
5
  # the missing-template case, and the two skip cases (a skill with no binding
@@ -10,7 +10,6 @@ set -uo pipefail
10
10
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
11
11
 
12
12
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
13
- GATE="$DIR/checks/check-skill-binding.sh"
14
13
  SANDBOX="$(mktemp -d)"
15
14
  trap 'rm -rf "$SANDBOX"' EXIT
16
15
 
@@ -18,7 +17,7 @@ fails=0
18
17
 
19
18
  check_case() { # $1=label $2=sandbox-dir $3=want-rc $4=want-substring
20
19
  local out rc
21
- out="$(cd "$2" && "$GATE" commands 2>&1)"; rc=$?
20
+ out="$(cd "$2" && gate_run check-skill-binding "$DIR/checks" commands 2>&1)"; rc=$?
22
21
  if [[ "$rc" -ne "$3" ]]; then
23
22
  echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
24
23
  fi
@@ -15,7 +15,6 @@ set -uo pipefail
15
15
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
16
16
 
17
17
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
18
- GATE="$DIR/checks/check-stage-entry.sh"
19
18
  SANDBOX="$(mktemp -d)"
20
19
  mkdir -p "$SANDBOX/.workflow"
21
20
  trap 'rm -rf "$SANDBOX"' EXIT
@@ -46,7 +45,7 @@ demo-iteration build bbbbbbbb 2026-06-02
46
45
  demo-iteration validate cccccccc 2026-06-03
47
46
  EOF
48
47
 
49
- out="$(cd "$SANDBOX" && "$GATE" 2>&1)"; rc=$?
48
+ out="$(cd "$SANDBOX" && gate_run check-stage-entry "$DIR/checks" 2>&1)"; rc=$?
50
49
  if [[ "$rc" -ne 1 ]]; then
51
50
  echo " FAIL [validate-non-empty-queue]: want exit 1, got $rc -- $out"
52
51
  fails=$((fails + 1))
@@ -71,7 +70,7 @@ EOF
71
70
 
72
71
  check_case() { # $1=label $2=sandbox-dir $3=want-rc $4=want-substring
73
72
  local out rc
74
- out="$(cd "$2" && "$GATE" 2>&1)"; rc=$?
73
+ out="$(cd "$2" && gate_run check-stage-entry "$DIR/checks" 2>&1)"; rc=$?
75
74
  if [[ "$rc" -ne "$3" ]]; then
76
75
  echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
77
76
  fi
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of checks/check-stage-evidence.sh — the sentinel-scoping
2
+ # Behavioral test of check-stage-evidence — the sentinel-scoping
3
3
  # guards the one-pair good/bad harness cannot hold ('—' legal only at the
4
4
  # first stage; a '—' stamp legal only while the header is also unnamed), plus
5
5
  # the waiver-token grammar allowance. The regression lives in the interplay of
@@ -11,7 +11,6 @@ set -uo pipefail
11
11
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
12
12
 
13
13
  DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
14
- GATE="$DIR/checks/check-stage-evidence.sh"
15
14
 
16
15
  fails=0
17
16
  tmp="$(mktemp -d)"
@@ -22,7 +21,8 @@ case_run() {
22
21
  local name="$1" hdr="$2" stamp="$3" want="$4" expect="$5" out rc
23
22
  printf '%s\n' "$hdr" >"$tmp/TASK-QUEUE.md"
24
23
  printf 'header prose\n---\n%b' "$stamp" >"$tmp/WORKFLOW-STATE.txt"
25
- out="$("$GATE" "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
24
+ out="$(gate_run check-stage-evidence "$DIR/checks" \
25
+ "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
26
26
  if [[ "$rc" -ne "$want" ]]; then
27
27
  echo " FAIL: $name expected exit $want, got $rc: $out"; fails=$((fails + 1)); return
28
28
  fi
@@ -94,7 +94,9 @@ case_run "no-cursor-unstamped-state" \
94
94
  # skips only the cross-stage distinctness map (attribution still stamps).
95
95
  printf '%s\n' '## Iteration: demo-iteration' >"$tmp/TASK-QUEUE.md"
96
96
  printf 'header prose\n---\ndemo-iteration scope s1 2026-06-12\ndemo-iteration build s1 2026-06-13\n' >"$tmp/WORKFLOW-STATE.txt"
97
- out="$(LIFECYCLE_KIT_SESSION_BOUNDARY=iteration "$GATE" "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
97
+ out="$(gate_env LIFECYCLE_KIT_SESSION_BOUNDARY=iteration
98
+ gate_run check-stage-evidence "$DIR/checks" \
99
+ "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
98
100
  if [[ "$rc" -ne 0 ]] || ! grep -qF "clean" <<<"$out"; then
99
101
  echo " FAIL: shared-session-iteration-posture expected clean exit 0, got $rc: $out"; fails=$((fails + 1))
100
102
  fi
@@ -102,7 +104,9 @@ fi
102
104
  # I — a bad posture value must exit 2 (the loader's fail-closed machine check).
103
105
  printf '%s\n' '## Iteration: demo-iteration' >"$tmp/TASK-QUEUE.md"
104
106
  printf 'header prose\n---\ndemo-iteration build s1 2026-06-13\n' >"$tmp/WORKFLOW-STATE.txt"
105
- out="$(LIFECYCLE_KIT_SESSION_BOUNDARY=bogus "$GATE" "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
107
+ out="$(gate_env LIFECYCLE_KIT_SESSION_BOUNDARY=bogus
108
+ gate_run check-stage-evidence "$DIR/checks" \
109
+ "$tmp/TASK-QUEUE.md" "$tmp/WORKFLOW-STATE.txt" 2>&1)"; rc=$?
106
110
  if [[ "$rc" -ne 2 ]] || ! grep -qF "neither 'stage' nor 'iteration'" <<<"$out"; then
107
111
  echo " FAIL: bogus-posture expected exit 2 with the loader finding, got $rc: $out"; fails=$((fails + 1))
108
112
  fi
@@ -0,0 +1,2 @@
1
+ # hermetic override arg: the record file (grammar-only, no rev-existence probe)
2
+ record.md
@@ -0,0 +1,4 @@
1
+ rev is not a full 40-hex sha: '0123456'
2
+ empty oracle
3
+ expected the '- oracle:' line here, found '- rev:'
4
+ help:
@@ -0,0 +1,18 @@
1
+ # contract: lifecycle-kit/SPEC.md §The survey record — carried surveys, one block per survey; boundary-truncated, cited only behind a passing witness.
2
+
3
+ ## 2026-01-02 scope — which registered gates meet every port criterion?
4
+ - corpus: scripts/gates.list */checks/
5
+ - oracle: bash gate-sdk/bin/run-gates.sh check-gate-substrate-parity
6
+ - rev: 0123456
7
+ - finding: four gates meet all six criteria; the remaining eleven fail the pure-function criterion.
8
+
9
+ ## 2026-01-03 align — which specs still cite the retired section?
10
+ - corpus: */SPEC.md
11
+ - oracle:
12
+ - rev: 89abcdef0123456789abcdef0123456789abcdef
13
+ - finding: two specs still cite it.
14
+
15
+ ## 2026-01-04 build — which fixtures cover the new grammar?
16
+ - corpus: lifecycle-kit/gate-tests/
17
+ - rev: 3333333333333333333333333333333333333333
18
+ - finding: one pair covers it.
@@ -0,0 +1,2 @@
1
+ # hermetic override arg: the record file (grammar-only, no rev-existence probe)
2
+ record.md
@@ -0,0 +1 @@
1
+ SURVEY-RECORD: clean (2 block(s)
@@ -0,0 +1,13 @@
1
+ # contract: lifecycle-kit/SPEC.md §The survey record — carried surveys, one block per survey; boundary-truncated, cited only behind a passing witness.
2
+
3
+ ## 2026-01-02 scope — which registered gates meet every port criterion?
4
+ - corpus: scripts/gates.list */checks/
5
+ - oracle: bash gate-sdk/bin/run-gates.sh check-gate-substrate-parity
6
+ - rev: 0123456789abcdef0123456789abcdef01234567
7
+ - finding: four gates meet all six criteria; the remaining eleven fail the pure-function criterion.
8
+
9
+ ## 2026-01-03 spec — does any kit README still name the retired knob?
10
+ - corpus: */README.md
11
+ - oracle: none
12
+ - rev: 89abcdef0123456789abcdef0123456789abcdef
13
+ - finding: a reading of prose, so this block is a note — re-derive before relying on it.
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of check-survey-record — the scenarios the one-pair
3
+ # good/bad harness cannot hold. The fixture pair drives the gate through its
4
+ # hermetic file argument, which asserts grammar only, because a fixture's rev
5
+ # names no commit in the tree the fixture was copied into. This file covers the
6
+ # other half: the bare (configured-record) mode in a real sandbox repo, where the
7
+ # rev-existence probe runs — a rev naming a real commit passes, a well-formed
8
+ # 40-hex rev naming nothing is the wrong-rev finding the shape check cannot make
9
+ # — plus the two inert shapes (no record at all, a header-only record).
10
+ #
11
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
12
+ set -uo pipefail
13
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
14
+
15
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
16
+ SANDBOX="$(mktemp -d)"
17
+ trap 'rm -rf "$SANDBOX"' EXIT
18
+
19
+ fails=0
20
+
21
+ check_case() { # $1=label $2=dir $3=want-rc $4=want-substring
22
+ local out rc
23
+ out="$(cd "$2" && gate_run check-survey-record "$DIR/checks" 2>&1)"; rc=$?
24
+ if [[ "$rc" -ne "$3" ]]; then
25
+ echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
26
+ fi
27
+ if [[ -n "$4" ]] && ! grep -qF -- "$4" <<<"$out"; then
28
+ echo " FAIL [$1]: exit $rc OK but output lacks '$4':"; printf ' %s\n' "$out"
29
+ fails=$((fails + 1))
30
+ fi
31
+ }
32
+
33
+ seed_repo() { # $1=dir -> a one-commit git repo, printing its HEAD sha
34
+ git -C "$1" init -q
35
+ printf 'seed\n' >"$1/seed.txt"
36
+ git -C "$1" add -A
37
+ git -C "$1" -c user.email=t@t.invalid -c user.name=t commit -q -m base
38
+ git -C "$1" rev-parse HEAD
39
+ }
40
+
41
+ write_record() { # $1=dir $2=rev
42
+ mkdir -p "$1/.workflow"
43
+ cat >"$1/.workflow/survey-record.md" <<EOF
44
+ # contract: lifecycle-kit/SPEC.md §The survey record — carried surveys.
45
+
46
+ ## 2026-01-02 scope — which gates meet every port criterion?
47
+ - corpus: checks/
48
+ - oracle: bash run-gates.sh
49
+ - rev: $2
50
+ - finding: four of them.
51
+ EOF
52
+ }
53
+
54
+ # --- bare mode, rev naming a real commit: the probe runs and passes ---
55
+ live="$SANDBOX/live"; mkdir -p "$live"
56
+ head_sha="$(seed_repo "$live")"
57
+ write_record "$live" "$head_sha"
58
+ check_case "rev-exists" "$live" 0 "1 rev(s) name a real commit"
59
+
60
+ # --- bare mode, well-formed 40-hex rev naming nothing: the wrong-rev finding ---
61
+ ghost="$SANDBOX/ghost"; mkdir -p "$ghost"
62
+ seed_repo "$ghost" >/dev/null
63
+ write_record "$ghost" "0123456789abcdef0123456789abcdef01234567"
64
+ check_case "rev-unknown" "$ghost" 1 "rev names no commit in this repository"
65
+
66
+ # --- an absent record is clean and counted inert: the surface is optional ---
67
+ empty="$SANDBOX/empty"; mkdir -p "$empty"
68
+ seed_repo "$empty" >/dev/null
69
+ check_case "no-record" "$empty" 0 "no survey filed this iteration"
70
+
71
+ # --- a header-only record (the shape the iteration boundary leaves behind) ---
72
+ hdr="$SANDBOX/header-only"; mkdir -p "$hdr/.workflow"
73
+ seed_repo "$hdr" >/dev/null
74
+ printf '# contract: lifecycle-kit/SPEC.md §The survey record — carried surveys.\n' \
75
+ >"$hdr/.workflow/survey-record.md"
76
+ check_case "header-only" "$hdr" 0 "clean (0 block(s)"
77
+
78
+ if [[ "$fails" -gt 0 ]]; then
79
+ echo "check-survey-record.test.sh: $fails case(s) failed"
80
+ exit 1
81
+ fi
82
+ echo "check-survey-record.test.sh: clean (rev-exists + rev-unknown probe arms, absent-record and header-only inert shapes, 4 cases)"
83
+ exit 0
@@ -0,0 +1,122 @@
1
+ #!/usr/bin/env bash
2
+ # spec: lifecycle-kit/SPEC.md §The committed gap inbox — file-gap.sh's capture-time slug resolution raises an advisory and never a verdict: every filing writes the one plain '- <date> — <prose>' bullet, a live entry's slug in the prose asks the filer on stderr, a done slug and a Lessons-only slug and a sub-task and a hyphen-embedded near-miss ask nothing, the longest live slug is the one the advisory names, prose that denies the recurrence in words is left exactly as written, and no run touches the queue file
3
+ set -uo pipefail
4
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
+
6
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
7
+ TOOL="$DIR/bin/file-gap.sh"
8
+ SANDBOX="$(mktemp -d)"
9
+ trap 'rm -rf "$SANDBOX"' EXIT
10
+
11
+ fails=0
12
+ note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
13
+
14
+ cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
15
+ # TASK-QUEUE.md
16
+
17
+ ## Iteration: demo-iteration
18
+
19
+ ---
20
+
21
+ ## New Features
22
+
23
+ - **fork-dispatch** — an active entry whose slug is a hyphen-prefix of a deferred one.
24
+
25
+ ## Technical Debt
26
+
27
+ ## Deferred
28
+
29
+ - **fork-dispatch-prohibition** [design-pending] — the deferred entry.
30
+ Cost while deferred: recovery is re-paid each time.
31
+ - **nested-subtask** — a sub-task, indented, deliberately out of the entry scan.
32
+
33
+ ## Icebox
34
+
35
+ - **iced-entry** — one line, still live work.
36
+
37
+ ## Done
38
+
39
+ - landed-and-fixed
40
+
41
+ ## Lessons Learned
42
+
43
+ - **lesson-shaped-slug** [attend] — a lesson written in the entry shape.
44
+ EOF
45
+
46
+ DATE="$(date +%F)"
47
+ OUT=""; ERR=""
48
+
49
+ filed() { # $1=prose -> sets OUT (stdout) and ERR (stderr) of one filing into a fresh inbox
50
+ local prose="$1" inbox="$SANDBOX/inbox-$RANDOM.md"
51
+ OUT="$(cd "$SANDBOX" && env LIFECYCLE_KIT_GAP_INBOX_FILE="$inbox" \
52
+ LIFECYCLE_KIT_QUEUE_FILE="$SANDBOX/TASK-QUEUE.md" \
53
+ bash "$TOOL" "$prose" 2>"$SANDBOX/err.txt")"
54
+ ERR="$(cat "$SANDBOX/err.txt")"
55
+ }
56
+
57
+ # the advisory's distinguishing phrase — every filing's stderr also carries the
58
+ # unconditional drain-window warning, so silence is asserted against this alone
59
+ ASKS='names live entry'
60
+
61
+ plain() { # $1=arm, $2=the prose the bullet must carry verbatim after the date
62
+ grep -qxF -- "file-gap: - $DATE — $2" <<<"$OUT" \
63
+ || note "$1-plain" "the bullet is not the plain '- <date> — <prose>' shape: $OUT"
64
+ grep -q -- '^file-gap: - [0-9-]* — recurrence of' <<<"$OUT" \
65
+ && note "$1-verdict" "the tool interposed a recurrence verdict into the bullet: $OUT"
66
+ }
67
+
68
+ qbefore="$(cat "$SANDBOX/TASK-QUEUE.md")"
69
+
70
+ # --- a live deferred slug asks, the bullet stays plain, and the longest match wins ---
71
+ p='the fork-dispatch-prohibition failure mode fired again inside scope'
72
+ filed "$p"
73
+ plain live-match "$p"
74
+ grep -qF "$ASKS \`fork-dispatch-prohibition\`" <<<"$ERR" \
75
+ || note live-ask "no point-of-capture advisory naming the longest live slug: $ERR"
76
+ grep -qF 'RE-FILES' <<<"$ERR" \
77
+ || note live-question "the advisory does not ask the filer to state the claim: $ERR"
78
+
79
+ # --- an icebox entry is live too ---
80
+ p='iced-entry regressed'
81
+ filed "$p"
82
+ plain icebox "$p"
83
+ grep -qF "$ASKS \`iced-entry\`" <<<"$ERR" || note icebox-ask "an icebox entry did not resolve as live: $ERR"
84
+
85
+ # --- a done slug is a new defect, not a recurrence: no advisory at all ---
86
+ p='landed-and-fixed broke again after its fix landed'
87
+ filed "$p"
88
+ plain done-slug "$p"
89
+ grep -qF "$ASKS" <<<"$ERR" && note done-ask "a done-section slug raised the recurrence advisory: $ERR"
90
+
91
+ # --- a Lessons entry written in the entry shape is not a queue entry ---
92
+ p='lesson-shaped-slug came up once more'
93
+ filed "$p"
94
+ plain lesson "$p"
95
+ grep -qF "$ASKS" <<<"$ERR" && note lesson-ask "a Lessons lead line resolved as a live queue entry: $ERR"
96
+
97
+ # --- a sub-task is out of scope: the rule and its threshold are entry-scoped ---
98
+ p='nested-subtask surfaced again'
99
+ filed "$p"
100
+ plain subtask "$p"
101
+ grep -qF "$ASKS" <<<"$ERR" && note subtask-ask "an indented sub-task resolved as an entry: $ERR"
102
+
103
+ # --- a hyphen-embedded near-miss is not a match ---
104
+ p='the fork-dispatching helper is slow'
105
+ filed "$p"
106
+ plain boundary "$p"
107
+ grep -qF "$ASKS" <<<"$ERR" && note boundary-ask "a slug embedded in a longer hyphenated token matched: $ERR"
108
+
109
+ # --- the live instance, frozen: prose that denies the recurrence in words is left as written ---
110
+ p='the harness grows unbounded and nothing prunes it. NOT a recurrence of `fork-dispatch-prohibition` — the filer ruled this must be a separate cross-referencing entry.'
111
+ filed "$p"
112
+ plain denial "$p"
113
+ grep -qF "$ASKS \`fork-dispatch-prohibition\`" <<<"$ERR" \
114
+ || note denial-ask "the advisory should still ask on a denying bullet — asking is not asserting: $ERR"
115
+
116
+ # --- no filing ever writes the queue ---
117
+ [[ "$qbefore" == "$(cat "$SANDBOX/TASK-QUEUE.md")" ]] \
118
+ || note no-queue-write "file-gap.sh modified the queue file — the constraint the gap inbox exists to hold"
119
+
120
+ [[ "$fails" -eq 0 ]] || { echo "file-gap-recurrence.test: $fails assertion(s) failed"; exit 1; }
121
+ echo "file-gap-recurrence.test: clean (every filing writes the plain bullet and no verdict, a live slug asks the filer while done/Lessons/sub-task/near-miss slugs stay silent, the longest live slug is the one named, a denying prose survives verbatim and is still asked about, and no filing writes the queue)"
122
+ exit 0
@@ -0,0 +1,142 @@
1
+ #!/usr/bin/env bash
2
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — --rename end-to-end through a sandboxed enter-stage: both surfaces rewritten in one motion, the columns-2-4 witness proved rather than assumed, the half-landed hand-rename healed, every refusal writing nothing, the idempotent no-op, and --simulate --rename writing nothing while prefixing every line
3
+ set -uo pipefail
4
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
+
6
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
7
+ ENTER="$DIR/bin/enter-stage.sh"
8
+ SANDBOX="$(mktemp -d)"
9
+ trap 'rm -rf "$SANDBOX"' EXIT
10
+
11
+ fails=0
12
+ note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
13
+
14
+ seed() { # $1=sandbox subdir $2=header name $3=stamp column-1 name
15
+ local sb="$1" hdr="$2" col1="$3"
16
+ mkdir -p "$sb/.workflow"
17
+ cat >"$sb/TASK-QUEUE.md" <<EOF
18
+ # TASK-QUEUE.md
19
+
20
+ ## Iteration: $hdr
21
+
22
+ ## New Features
23
+
24
+ ## Technical Debt
25
+
26
+ ## Done
27
+ EOF
28
+ cat >"$sb/.workflow/WORKFLOW-STATE.txt" <<EOF
29
+ # contract: lifecycle-kit/SPEC.md §check-stage-evidence
30
+
31
+ ---
32
+
33
+ $col1 scope aaaaaaaa 2026-06-01
34
+ $col1 build bbbbbbbb 2026-06-02
35
+ $col1 validate cccccccc 2026-06-03
36
+ EOF
37
+ cp "$sb/TASK-QUEUE.md" "$sb/queue.before"
38
+ cp "$sb/.workflow/WORKFLOW-STATE.txt" "$sb/state.before"
39
+ }
40
+
41
+ run_rename() { # $1=sandbox subdir, rest = argv after the tool name
42
+ local sb="$1"; shift
43
+ ( cd "$sb" && env GATE_SDK_TMP_DIR="$sb/scratch" bash "$ENTER" "$@" 2>&1 )
44
+ }
45
+
46
+ fields234() { awk '/^---[[:space:]]*$/ { f = 1; next } f && NF { print $2, $3, $4 }' "$1"; }
47
+
48
+ unchanged() { # $1=sandbox subdir $2=assertion label
49
+ cmp -s "$1/queue.before" "$1/TASK-QUEUE.md" || note "$2" "the queue was written"
50
+ cmp -s "$1/state.before" "$1/.workflow/WORKFLOW-STATE.txt" || note "$2" "the state file was written"
51
+ }
52
+
53
+ # --- both surfaces rewritten in one motion, columns 2-4 intact ---
54
+ ok="$SANDBOX/ok"
55
+ seed "$ok" old-name old-name
56
+ pre="$(fields234 "$ok/state.before")"
57
+ out="$(run_rename "$ok" --rename new-name)"; rc=$?
58
+ [[ "$rc" -eq 0 ]] || note write "want exit 0, got $rc -- $out"
59
+ grep -q '^## Iteration: new-name$' "$ok/TASK-QUEUE.md" || note write-header "the queue header was not renamed"
60
+ [[ "$(awk '/^---[[:space:]]*$/ { f = 1; next } f && NF && $1 != "new-name" { c++ } END { print c + 0 }' \
61
+ "$ok/.workflow/WORKFLOW-STATE.txt")" == 0 ]] \
62
+ || note write-stamps "a stamp's column 1 was left at the old name"
63
+ [[ "$pre" == "$(fields234 "$ok/.workflow/WORKFLOW-STATE.txt")" ]] \
64
+ || note witness "columns 2-4 (stage, session id, date) moved under the rename"
65
+ [[ "$(wc -l <"$ok/state.before")" == "$(wc -l <"$ok/.workflow/WORKFLOW-STATE.txt")" ]] \
66
+ || note witness-shape "the rename changed the state file's line count"
67
+ grep -qF 'commit' <<<"$out" || note report "the report does not tell the caller to commit both files: $out"
68
+ grep -qF 'TASK-QUEUE.md' <<<"$out" || note report-queue "the report does not name the queue: $out"
69
+ grep -qF 'WORKFLOW-STATE.txt' <<<"$out" || note report-state "the report does not name the state file: $out"
70
+
71
+ # --- the half-landed hand-rename heals from either side ---
72
+ for half in header stamps; do
73
+ hb="$SANDBOX/half-$half"
74
+ if [[ "$half" == header ]]; then seed "$hb" new-name old-name; else seed "$hb" old-name new-name; fi
75
+ out="$(run_rename "$hb" --rename new-name)"; rc=$?
76
+ [[ "$rc" -eq 0 ]] || note "heal-$half" "want exit 0, got $rc -- $out"
77
+ grep -q '^## Iteration: new-name$' "$hb/TASK-QUEUE.md" || note "heal-$half-header" "header not healed"
78
+ [[ "$(awk '/^---[[:space:]]*$/ { f = 1; next } f && NF && $1 != "new-name" { c++ } END { print c + 0 }' \
79
+ "$hb/.workflow/WORKFLOW-STATE.txt")" == 0 ]] || note "heal-$half-stamps" "stamps not healed"
80
+ done
81
+
82
+ # --- the idempotent no-op ---
83
+ idem="$SANDBOX/idempotent"
84
+ seed "$idem" same-name same-name
85
+ out="$(run_rename "$idem" --rename same-name)"; rc=$?
86
+ [[ "$rc" -eq 0 ]] || note idempotent "want exit 0, got $rc -- $out"
87
+ grep -qF 'idempotent no-op' <<<"$out" || note idempotent-report "the no-op was not reported as one: $out"
88
+ unchanged "$idem" idempotent-write
89
+
90
+ # --- every refusal writes nothing ---
91
+ ref="$SANDBOX/refusals"
92
+ for bad in "" "two words" "—" "Upper-Case" "-leading-dash"; do
93
+ rm -rf "$ref"; seed "$ref" old-name old-name
94
+ out="$(run_rename "$ref" --rename "$bad")"; rc=$?
95
+ [[ "$rc" -eq 2 ]] || note "refuse[$bad]" "want exit 2, got $rc -- $out"
96
+ unchanged "$ref" "refuse-write[$bad]"
97
+ done
98
+ rm -rf "$ref"; seed "$ref" old-name old-name
99
+ out="$(run_rename "$ref" --rename a b)"; rc=$?
100
+ [[ "$rc" -eq 2 ]] || note refuse-arity "--rename with two names: want exit 2, got $rc -- $out"
101
+ unchanged "$ref" refuse-arity-write
102
+
103
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the placeholder refusal precedes the slug grammar so its message names the writer that owns the value, not a malformed name
104
+ rm -rf "$ref"; seed "$ref" old-name old-name
105
+ out="$(run_rename "$ref" --rename "—")"
106
+ grep -qF 'boundary reset' <<<"$out" \
107
+ || note refuse-placeholder-message "the placeholder refusal did not name the boundary reset: $out"
108
+
109
+ # --- a pre-flight refusal writes nothing: a stamp naming a stage the machine does not know ---
110
+ pf="$SANDBOX/preflight"
111
+ seed "$pf" old-name old-name
112
+ printf 'old-name notastage eeeeeeee 2026-06-05\n' >>"$pf/.workflow/WORKFLOW-STATE.txt"
113
+ cp "$pf/.workflow/WORKFLOW-STATE.txt" "$pf/state.before"
114
+ out="$(run_rename "$pf" --rename new-name)"; rc=$?
115
+ [[ "$rc" -eq 1 ]] || note preflight "a check-stage-evidence refusal: want exit 1, got $rc -- $out"
116
+ grep -qF 'STAGE-EVIDENCE' <<<"$out" || note preflight-relay "the gate's output was not relayed: $out"
117
+ unchanged "$pf" preflight-write
118
+
119
+ # --- --simulate --rename writes nothing and prefixes every line ---
120
+ sim="$SANDBOX/simulate"
121
+ seed "$sim" old-name old-name
122
+ out="$(run_rename "$sim" --simulate --rename new-name)"; rc=$?
123
+ [[ "$rc" -eq 0 ]] || note simulate "want exit 0, got $rc -- $out"
124
+ unchanged "$sim" simulate-write
125
+ if grep -qv '^enter-stage (simulate): ' <<<"$out"; then
126
+ note simulate-prefix "an unprefixed line escaped --simulate: $out"
127
+ fi
128
+ grep -qF 'new-name' <<<"$out" || note simulate-relay "the simulate report does not name the new name: $out"
129
+
130
+ simn="$SANDBOX/simulate-noop"
131
+ seed "$simn" same-name same-name
132
+ out="$(run_rename "$simn" --simulate --rename same-name)"; rc=$?
133
+ [[ "$rc" -eq 0 ]] || note simulate-noop "want exit 0, got $rc -- $out"
134
+ grep -qF 'idempotent no-op' <<<"$out" || note simulate-noop-report "the would-be no-op was not reported: $out"
135
+ if grep -qv '^enter-stage (simulate): ' <<<"$out"; then
136
+ note simulate-noop-prefix "the would-be no-op line is unprefixed: $out"
137
+ fi
138
+ unchanged "$simn" simulate-noop-write
139
+
140
+ [[ "$fails" -eq 0 ]] || { echo "rename-iteration.test: $fails assertion(s) failed"; exit 1; }
141
+ echo "rename-iteration.test: clean (--rename writes both surfaces with columns 2-4 proved unchanged, heals a half-landed rename from either side, no-ops idempotently, refuses empty/non-slug/placeholder/arity and a red pre-flight with nothing written, and simulates read-only under its prefix)"
142
+ exit 0