checkwright 0.37.0 → 0.39.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 (213) hide show
  1. package/package.json +2 -2
  2. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  3. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  4. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  5. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  6. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  7. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  8. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  9. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  10. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  11. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  12. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  13. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  16. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  18. package/payload/canon-kit/gate-tests/check-amendment-queue.test.sh +8 -3
  19. package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +3 -3
  20. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +9 -4
  21. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +3 -3
  22. package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +1 -1
  23. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +2 -2
  24. package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +4 -0
  25. package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +1 -1
  26. package/payload/canon-kit/gate-tests/check-todo-task-liveness.test.sh +42 -0
  27. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +7 -7
  28. package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +7 -6
  29. package/payload/delegation-kit/README.md +5 -2
  30. package/payload/delegation-kit/checks/check-brief-authority.gate +4 -0
  31. package/payload/delegation-kit/gate-tests/check-brief-authority/bad/args +1 -0
  32. package/payload/delegation-kit/gate-tests/check-brief-authority/bad/expect.txt +3 -0
  33. package/payload/delegation-kit/gate-tests/check-brief-authority/bad/grant.md +4 -0
  34. package/payload/delegation-kit/gate-tests/check-brief-authority/bad/rules.list +5 -0
  35. package/payload/delegation-kit/gate-tests/check-brief-authority/bad/scripts/delegation-config.knobs +2 -0
  36. package/payload/delegation-kit/gate-tests/check-brief-authority/bad/unquoted.md +2 -0
  37. package/payload/delegation-kit/gate-tests/check-brief-authority/good/args +1 -0
  38. package/payload/delegation-kit/gate-tests/check-brief-authority/good/brief.md +5 -0
  39. package/payload/delegation-kit/gate-tests/check-brief-authority/good/expect.txt +1 -0
  40. package/payload/delegation-kit/gate-tests/check-brief-authority/good/rules.list +5 -0
  41. package/payload/delegation-kit/gate-tests/check-brief-authority/good/scripts/delegation-config.knobs +2 -0
  42. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +90 -6
  43. package/payload/delegation-kit/templates/agent-execution.md +1 -1
  44. package/payload/delegation-kit/templates/brief-rules.list +20 -0
  45. package/payload/delegation-kit/templates/delegation-config.knobs +3 -0
  46. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -2
  47. package/payload/drift-kit/README.md +1 -1
  48. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +2 -2
  49. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +5 -5
  50. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +7 -7
  51. package/payload/evidence-kit/gate-tests/statement-store.test.sh +5 -5
  52. package/payload/evidence-kit/gate-tests/verify-gate-run-strict.test.sh +5 -4
  53. package/payload/gate-sdk/README.md +7 -0
  54. package/payload/gate-sdk/bin/build-native.sh +5 -4
  55. package/payload/gate-sdk/bin/run-gates.ps1 +8 -7
  56. package/payload/gate-sdk/bin/run-gates.sh +10 -8
  57. package/payload/gate-sdk/checks/check-binary-strings.gate +4 -0
  58. package/payload/gate-sdk/checks/check-exec-write.gate +4 -0
  59. package/payload/gate-sdk/checks/check-migration-guard.gate +4 -0
  60. package/payload/gate-sdk/checks/check-path-names.gate +4 -0
  61. package/payload/gate-sdk/checks/check-pipefail-readers.gate +4 -0
  62. package/payload/gate-sdk/checks/check-script-preflight.gate +4 -0
  63. package/payload/gate-sdk/checks/check-site-count.gate +4 -0
  64. package/payload/gate-sdk/checks/check-tree-terms.gate +1 -1
  65. package/payload/gate-sdk/gate-tests/binary-only-recipe.test.sh +2 -2
  66. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +11 -11
  67. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/expect.txt +4 -0
  68. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/app.elf +0 -0
  69. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/notes.bin +0 -0
  70. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/scripts/gate-sdk-config.knobs +3 -0
  71. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/shapes.list +2 -0
  72. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/terms.list +2 -0
  73. package/payload/gate-sdk/gate-tests/check-binary-strings/good/expect.txt +1 -0
  74. package/payload/gate-sdk/gate-tests/check-binary-strings/good/out/app.elf +0 -0
  75. package/payload/gate-sdk/gate-tests/check-binary-strings/good/scripts/gate-sdk-config.knobs +3 -0
  76. package/payload/gate-sdk/gate-tests/check-binary-strings/good/shapes.list +2 -0
  77. package/payload/gate-sdk/gate-tests/check-binary-strings/good/terms.list +4 -0
  78. package/payload/gate-sdk/gate-tests/check-binary-strings.test.sh +74 -0
  79. package/payload/gate-sdk/gate-tests/check-exec-write/bad/expect.txt +13 -0
  80. package/payload/gate-sdk/gate-tests/check-exec-write/bad/scripts/gate-sdk-config.knobs +2 -0
  81. package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/caller.rs +5 -0
  82. package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/helper.rs +5 -0
  83. package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/sites.rs +19 -0
  84. package/payload/gate-sdk/gate-tests/check-exec-write/good/expect.txt +1 -0
  85. package/payload/gate-sdk/gate-tests/check-exec-write/good/scripts/gate-sdk-config.knobs +2 -0
  86. package/payload/gate-sdk/gate-tests/check-exec-write/good/src/helper.rs +5 -0
  87. package/payload/gate-sdk/gate-tests/check-exec-write/good/src/main.rs +15 -0
  88. package/payload/gate-sdk/gate-tests/check-exec-write.test.sh +69 -0
  89. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/args +1 -1
  90. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/expect.txt +1 -1
  91. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/hooks/agent-budget-guard.md +20 -0
  92. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/hooks/agent-dispatch-guard.md +14 -0
  93. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/hooks/escalation-guard.md +7 -0
  94. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/hooks/wakeup-guard.md +9 -0
  95. package/payload/gate-sdk/gate-tests/check-identity.test.sh +2 -2
  96. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/args +2 -0
  97. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0001_init.sql +1 -0
  98. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0002_orders.sql +1 -0
  99. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0003_audit.sql +1 -0
  100. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/destructive.list +4 -0
  101. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/expect.txt +7 -0
  102. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0001_init.sql +1 -0
  103. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0002_late.sql +1 -0
  104. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0003_audit_log.sql +1 -0
  105. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0004_prune.sql +3 -0
  106. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/scripts/gate-sdk-config.knobs +2 -0
  107. package/payload/gate-sdk/gate-tests/check-migration-guard/good/args +2 -0
  108. package/payload/gate-sdk/gate-tests/check-migration-guard/good/base/0001_init.sql +1 -0
  109. package/payload/gate-sdk/gate-tests/check-migration-guard/good/base/0002_legacy.sql +1 -0
  110. package/payload/gate-sdk/gate-tests/check-migration-guard/good/destructive.list +4 -0
  111. package/payload/gate-sdk/gate-tests/check-migration-guard/good/expect.txt +1 -0
  112. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0001_init.sql +1 -0
  113. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0002_legacy.sql +1 -0
  114. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0003_retire_legacy.sql +6 -0
  115. package/payload/gate-sdk/gate-tests/check-migration-guard/good/scripts/gate-sdk-config.knobs +2 -0
  116. package/payload/gate-sdk/gate-tests/check-migration-guard.test.sh +136 -0
  117. package/payload/gate-sdk/gate-tests/check-path-names/bad/expect.txt +6 -0
  118. package/payload/gate-sdk/gate-tests/check-path-names/bad/scripts/gate-sdk-config.knobs +1 -0
  119. package/payload/gate-sdk/gate-tests/check-path-names/bad/terms.list +3 -0
  120. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/ZePhYr.md +1 -0
  121. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo/a.txt +1 -0
  122. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo/zephyr.txt +1 -0
  123. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo-cli.sh +1 -0
  124. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo.rs +1 -0
  125. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo_x.txt +1 -0
  126. package/payload/gate-sdk/gate-tests/check-path-names/good/expect.txt +1 -0
  127. package/payload/gate-sdk/gate-tests/check-path-names/good/scripts/gate-sdk-config.knobs +1 -0
  128. package/payload/gate-sdk/gate-tests/check-path-names/good/terms.list +1 -0
  129. package/payload/gate-sdk/gate-tests/check-path-names/good/tree/foobar.rs +1 -0
  130. package/payload/gate-sdk/gate-tests/check-path-names/good/tree/food/a.txt +1 -0
  131. package/payload/gate-sdk/gate-tests/check-path-names/good/tree/xfoo.txt +1 -0
  132. package/payload/gate-sdk/gate-tests/check-path-names.test.sh +66 -0
  133. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/baseline.tsv +4 -0
  134. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/expect.txt +17 -0
  135. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/scripts/gate-sdk-config.knobs +2 -0
  136. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/over.sh +5 -0
  137. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/readers.sh +16 -0
  138. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/shared-lib.sh +3 -0
  139. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/stale.sh +4 -0
  140. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/baseline.tsv +2 -0
  141. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/expect.txt +1 -0
  142. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/scripts/gate-sdk-config.knobs +2 -0
  143. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/clean.sh +17 -0
  144. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/lib/baselined-lib.sh +4 -0
  145. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/no-pipefail.sh +4 -0
  146. package/payload/gate-sdk/gate-tests/check-pipefail-readers.test.sh +114 -0
  147. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +1 -1
  148. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/expect.txt +10 -0
  149. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/rules.list +23 -0
  150. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/scripts/gate-sdk-config.knobs +2 -0
  151. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/tree/submit-job.sh +13 -0
  152. package/payload/gate-sdk/gate-tests/check-script-preflight/good/expect.txt +1 -0
  153. package/payload/gate-sdk/gate-tests/check-script-preflight/good/rules.list +23 -0
  154. package/payload/gate-sdk/gate-tests/check-script-preflight/good/scripts/gate-sdk-config.knobs +2 -0
  155. package/payload/gate-sdk/gate-tests/check-script-preflight/good/tree/submit-job.sh +17 -0
  156. package/payload/gate-sdk/gate-tests/check-script-preflight.test.sh +110 -0
  157. package/payload/gate-sdk/gate-tests/check-site-count/bad/expect.txt +4 -0
  158. package/payload/gate-sdk/gate-tests/check-site-count/bad/rules.list +5 -0
  159. package/payload/gate-sdk/gate-tests/check-site-count/bad/scripts/gate-sdk-config.knobs +1 -0
  160. package/payload/gate-sdk/gate-tests/check-site-count/bad/sites.tsv +3 -0
  161. package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/new.txt +1 -0
  162. package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/over.txt +3 -0
  163. package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/under.txt +1 -0
  164. package/payload/gate-sdk/gate-tests/check-site-count/good/expect.txt +1 -0
  165. package/payload/gate-sdk/gate-tests/check-site-count/good/rules.list +5 -0
  166. package/payload/gate-sdk/gate-tests/check-site-count/good/scripts/gate-sdk-config.knobs +1 -0
  167. package/payload/gate-sdk/gate-tests/check-site-count/good/sites.tsv +2 -0
  168. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/blob.bin +0 -0
  169. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/pinned.txt +2 -0
  170. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/plain.txt +1 -0
  171. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/tests/helper.txt +2 -0
  172. package/payload/gate-sdk/gate-tests/check-site-count.test.sh +90 -0
  173. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +11 -8
  174. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -1
  175. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/scripts/gate-sdk-config.knobs +1 -0
  176. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/terms.list +4 -0
  177. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/terms.txt +2 -0
  178. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  179. package/payload/gate-sdk/gate-tests/check-tree-terms/good/scripts/gate-sdk-config.knobs +1 -0
  180. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/rosters/terms.list +2 -0
  181. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/words.txt +1 -0
  182. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +36 -16
  183. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +5 -6
  184. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +8 -8
  185. package/payload/gate-sdk/gate-tests/native-git-hooks.test.sh +7 -7
  186. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +4 -4
  187. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +3 -3
  188. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +6 -6
  189. package/payload/gate-sdk/gate-tests/run-json.test.sh +52 -0
  190. package/payload/gate-sdk/gate-tests/verdict-store.test.sh +99 -0
  191. package/payload/gate-sdk/lib/gate.sh +12 -9
  192. package/payload/gate-sdk/lib/test-hermetic.sh +2 -2
  193. package/payload/gate-sdk/templates/check-skeleton.sh +2 -1
  194. package/payload/gate-sdk/templates/migration-destructive.list +10 -0
  195. package/payload/gate-sdk/templates/script-rules.list +39 -0
  196. package/payload/gate-sdk/templates/strings-shapes.list +15 -0
  197. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +5 -5
  198. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +2 -2
  199. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +1 -1
  200. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +1 -1
  201. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +3 -3
  202. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  203. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -2
  204. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +18 -2
  205. package/payload/lifecycle-kit/gate-tests/peer-channel.test.sh +35 -6
  206. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +4 -4
  207. package/payload/lifecycle-kit/templates/consult.md +1 -1
  208. package/payload/lifecycle-kit/templates/stages/scope.md +1 -1
  209. package/payload/queue-kit/README.md +1 -1
  210. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +2 -2
  211. package/payload/queue-kit/gate-tests/check-task-conservation.test.sh +4 -4
  212. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +4 -4
  213. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +9 -9
@@ -14,6 +14,9 @@
14
14
  # DELEGATION_KIT_FOREIGN_TIER_MODEL[] = <harness>/<class>=<model>,<effort>
15
15
  # DELEGATION_KIT_FOREIGN_HARNESS[] = <adapter>=<harness>
16
16
 
17
+ # spec: delegation-kit/SPEC.md §The foreign-vendor run — the word `@SANDBOX@` becomes for an adapter under a policy (the mode word where a run names none); the kit ships none (each names a vendor's option), so set them beside the adapters; default empty
18
+ # DELEGATION_KIT_FOREIGN_SANDBOX[] = <adapter>/<policy>=<word>
19
+
17
20
  # spec: delegation-kit/SPEC.md §The foreign-vendor run — one `<adapter>=<word>` element per argv word, in order; the kit ships no adapter (each names a vendor's program), so set one in the gitignored `.local` overlay; default empty
18
21
  # DELEGATION_KIT_FOREIGN_ADAPTERS[] = <adapter>=<program>
19
22
  # DELEGATION_KIT_FOREIGN_ADAPTERS[] = <adapter>=@PROMPT_FILE@
@@ -139,7 +139,7 @@ Rules live in [DOCTRINE.md](DOCTRINE.md) — re-vendor to upgrade.
139
139
 
140
140
  - **Content-tiering / SSOT** — one tier per surface.
141
141
  EOF
142
- check_case "methodology-section-missing-failclosed" "$m" 2 "Methodology-maintenance rules"
142
+ check_case "methodology-section-missing-failclosed" "$m" 3 "Methodology-maintenance rules"
143
143
 
144
144
  # A reusable full-digest agent file: all three methodology rules present, so a
145
145
  # craft-side finding fires alone.
@@ -212,7 +212,7 @@ cat >"$c/DOCTRINE.md" <<'EOF'
212
212
  3. **De-literalization.** Prose cites names; code owns values.
213
213
  *Digest:* prose cites names.
214
214
  EOF
215
- check_case "craft-section-missing-failclosed" "$c" 2 "Engineering-craft rules"
215
+ check_case "craft-section-missing-failclosed" "$c" 3 "Engineering-craft rules"
216
216
 
217
217
  # --- meth-untrailered: a methodology rule with no *Digest:* trailer (assertion E) ---
218
218
  # The defect this assertion exists for: the rule reaches the doctrine, the digest
@@ -68,7 +68,7 @@ The `trajectory` emit arm is the published-evidence extractor ([drift-kit/SPEC.m
68
68
 
69
69
  `--emit file-install` and `--emit install-evidence` are the two halves of the install-observation channel ([drift-kit/SPEC.md §The install-observation record](https://checkwright.dev/drift-kit/SPEC#the-install-observation-record) and [§The install-evidence projection](https://checkwright.dev/drift-kit/SPEC#the-install-evidence-projection)): the first appends one dated line per install, per held proof on that install, per red a non-author hit, and per retention check-in to a private, gitignored record under your metric dir (`--author` files an install you or someone acting for you ran into a separate record the projection never reads, so author evidence never reaches a published figure); the second emits an aggregate-only markdown table set over it — every figure with its denominator, no row keyed to a single install, and `<id>`, `<profile>` and `<floor>` never published. The field set is fixed before the first observation on purpose: a red nobody wrote down was never observed, so the evidence cannot be collected retrospectively. Closed-set fields are enforced at capture, so the arm's refusals are the whole observation protocol.
70
70
 
71
- A KPI plugin is `kpi-<name>.sh`, or `kpi-<name>.ps1` started by the PowerShell host `GATE_SDK_POWERSHELL` names, resolved through `kpis.list` against your KPI dirs, then each vendored kit's `kpis/`, then the binary's built-in members — three tiers, consumer-first. Add your own by dropping a plugin in your gates dir and naming it in the registry; on native Windows, write it in PowerShell. Shadow a bundled one with a same-named file. A `.sh` plugin is executed directly, and either kind reads the exported `DRIFT_KIT_*` environment, both unchanged by the bundled set moving in-crate. The bundled set ([drift-kit/SPEC.md §Bundled KPIs](https://checkwright.dev/drift-kit/SPEC#bundled-kpis)) carries, as lead KPIs, `kpi-task-split`, `kpi-queue-net-delta`, `kpi-gate-backlog`, `kpi-amendment-age`, `kpi-deferred-age`, `kpi-deprecated-surface`, `kpi-prompt-friction`, `kpi-always-loaded`, `kpi-settings-local`, `kpi-gate-runtime`, `kpi-overhead`, `kpi-price-table-age` and `kpi-stage-economics-lag`; and as lag KPIs, `kpi-knowledge-friction` (fed by the loop below) and `kpi-incident-recurrence` (fed by the queue's `[recurrence:]` tags).
71
+ A KPI plugin is `kpi-<name>.sh`, or `kpi-<name>.ps1` started by the PowerShell host `GATE_SDK_POWERSHELL` names, resolved through `kpis.list` against your KPI dirs, then each vendored kit's `kpis/`, then the binary's built-in members — three tiers, consumer-first. Add your own by dropping a plugin in your gates dir and naming it in the registry; on native Windows, write it in PowerShell. A series an outside tool keeps joins as data instead: a `kpi-<name>.series` file in a KPI dir, named in the registry, its grammar in [drift-kit/SPEC.md §The external series form](https://checkwright.dev/drift-kit/SPEC#the-external-series-form). Shadow a bundled one with a same-named file. A `.sh` plugin is executed directly, and either kind reads the exported `DRIFT_KIT_*` environment, both unchanged by the bundled set moving in-crate. The bundled set ([drift-kit/SPEC.md §Bundled KPIs](https://checkwright.dev/drift-kit/SPEC#bundled-kpis)) carries, as lead KPIs, `kpi-task-split`, `kpi-queue-net-delta`, `kpi-gate-backlog`, `kpi-amendment-age`, `kpi-deferred-age`, `kpi-deprecated-surface`, `kpi-prompt-friction`, `kpi-always-loaded`, `kpi-settings-local`, `kpi-gate-runtime`, `kpi-overhead`, `kpi-price-table-age` and `kpi-stage-economics-lag`; and as lag KPIs, `kpi-knowledge-friction` (fed by the loop below) and `kpi-incident-recurrence` (fed by the queue's `[recurrence:]` tags).
72
72
 
73
73
  ## Test
74
74
 
@@ -40,9 +40,9 @@ BLOCK='<!-- battery-roster:begin -->\nbash bin/run-alpha.sh\n<!-- battery-roster
40
40
  case_run "no-doc" "$CFG1" SKIP 2 "runner doc not found"
41
41
 
42
42
  # B — the doc exists but carries no marker block: a consumer keeping no register
43
- # opts out by not registering the gate, so an unmarked doc is exit 2 and
43
+ # opts out by not registering the gate, so an unmarked doc is exit 3 and
44
44
  # never a vacuous pass over a doc the gate cannot locate the register in.
45
- case_run "no-markers" "$CFG1" 'nothing to see\n' 2 "marker block"
45
+ case_run "no-markers" "$CFG1" 'nothing to see\n' 3 "marker block"
46
46
 
47
47
  # C — an empty suite roster leaves nothing to hold the doc against.
48
48
  case_run "empty-suites" 'EVIDENCE_KIT_SUITES =\n' "$BLOCK" 2 "EVIDENCE_KIT_SUITES is empty"
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: evidence-kit/SPEC.md §bin/run-validate.sh — the pre-hook runs once per suite, before it, with the suite as operand, and a failing hook aborts at exit 2 with no evidence appended.
2
+ # spec: evidence-kit/SPEC.md §bin/run-validate.sh — the pre-hook runs once per suite, before it, with the suite as operand, and a failing hook aborts at exit 3 with no evidence appended.
3
3
  #
4
4
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
5
5
  set -uo pipefail
@@ -45,11 +45,11 @@ if ! grep -q '^hook-test alpha .* verdict=clean ' "$tmp/a/.workflow/validate-evi
45
45
  echo " FAIL: a suite ran before its hook, or no evidence was folded: $(cat "$tmp/a/.workflow/validate-evidence.txt")"; fails=$((fails + 1))
46
46
  fi
47
47
 
48
- # B — a failing hook aborts at the guards' code before its suite runs, and no line reaches the manifest.
48
+ # B — a failing hook aborts at the tool-error code before its suite runs, and no line reaches the manifest.
49
49
  mk_tree "$tmp/b" "false"
50
50
  out="$(_rv "$tmp/b")"; rc=$?
51
- if [[ "$rc" -ne 2 ]] || [[ "$out" != *"pre-hook failed for suite 'alpha'"* ]]; then
52
- echo " FAIL: a failing hook must refuse at exit 2 naming its suite (rc=$rc): $out"; fails=$((fails + 1))
51
+ if [[ "$rc" -ne 3 ]] || [[ "$out" != *"pre-hook failed for suite 'alpha'"* ]]; then
52
+ echo " FAIL: a failing hook must abort at exit 3 naming its suite (rc=$rc): $out"; fails=$((fails + 1))
53
53
  fi
54
54
  if [[ -e "$tmp/b/.tmp/suite.log" ]]; then
55
55
  echo " FAIL: a suite ran after its hook failed"; fails=$((fails + 1))
@@ -78,5 +78,5 @@ if [[ "$fails" -gt 0 ]]; then
78
78
  echo "pre-hook.test: $fails assertion(s) failed"
79
79
  exit 1
80
80
  fi
81
- echo "pre-hook.test: ok (per-suite hook in roster order with its operand ahead of the suite, failing hook exit 2 with no suite run and no evidence, a HEAD-moving hook under a Statement exit 2 with nothing written)"
81
+ echo "pre-hook.test: ok (per-suite hook in roster order with its operand ahead of the suite, failing hook exit 3 with no suite run and no evidence, a HEAD-moving hook under a Statement exit 2 with nothing written)"
82
82
  exit 0
@@ -54,12 +54,12 @@ if [[ "$rc" -ne 1 ]] || [[ "$out" != *"still running (pid $live)"* ]]; then
54
54
  echo " FAIL: the reader did not red on a live PID the test owns (rc=$rc): $out"; fails=$((fails + 1))
55
55
  fi
56
56
 
57
- # B — a lock that does not parse is exit 2, never a free reading. The claim
57
+ # B — a lock that does not parse is exit 3, never a free reading. The claim
58
58
  # publishes the record whole, so an unparseable lock is corruption.
59
59
  printf 'garbage\n' >"$tmp/b.lock"
60
60
  out="$(gate_run check-producer-liveness "$CHECKS" "$tmp/b.lock" 2>&1)"; rc=$?
61
- if [[ "$rc" -ne 2 ]]; then
62
- echo " FAIL: an unparseable lock must be exit 2, got rc=$rc: $out"; fails=$((fails + 1))
61
+ if [[ "$rc" -ne 3 ]]; then
62
+ echo " FAIL: an unparseable lock must be exit 3, got rc=$rc: $out"; fails=$((fails + 1))
63
63
  fi
64
64
 
65
65
  # B2 — set mode's four verdicts. The gate's fixture pair holds exactly one good
@@ -86,12 +86,12 @@ if [[ "$rc" -ne 1 ]] || [[ "$out" != *"run key 'owned-set-run' is still running
86
86
  echo " FAIL: one live record among dead ones must red and name it (rc=$rc): $out"; fails=$((fails + 1))
87
87
  fi
88
88
 
89
- # The aggregation rule: exit 2 wins over red, so a corrupt record is never
89
+ # The aggregation rule: exit 3 wins over red, so a corrupt record is never
90
90
  # averaged away by the clean ones beside it — nor by the live one still red here.
91
91
  printf 'garbage\n' >"$set_dir/broken.run"
92
92
  out="$(gate_run check-producer-liveness "$CHECKS" "$set_dir" 2>&1)"; rc=$?
93
- if [[ "$rc" -ne 2 ]] || [[ "$out" != *"broken.run carries no readable"* ]]; then
94
- echo " FAIL: an unparseable record must win over red with exit 2 (rc=$rc): $out"; fails=$((fails + 1))
93
+ if [[ "$rc" -ne 3 ]] || [[ "$out" != *"broken.run carries no readable"* ]]; then
94
+ echo " FAIL: an unparseable record must win over red with exit 3 (rc=$rc): $out"; fails=$((fails + 1))
95
95
  fi
96
96
 
97
97
  # A non-'.run' file in the same directory is not a record and is not read: the
@@ -159,5 +159,5 @@ if [[ "$fails" -gt 0 ]]; then
159
159
  echo "producer-lock.test: $fails assertion(s) failed"
160
160
  exit 1
161
161
  fi
162
- echo "producer-lock.test: ok (live-PID red, unparseable lock exit 2, set mode's four verdicts and its suffix bound, writer refusal on a live lock, bounded reclaim of a dead one, conditional release)"
162
+ echo "producer-lock.test: ok (live-PID red, unparseable lock exit 3, set mode's four verdicts and its suffix bound, writer refusal on a live lock, bounded reclaim of a dead one, conditional release)"
163
163
  exit 0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: evidence-kit/SPEC.md §bin/run-validate.sh — the git-notes pair: a run stores its Statement as a note on the subject with no file configured, the read knob verifies it with no operand, the store leaves the worktree untouched, a second run's note replaces the first, and a failing store exits 2 naming the published manifest.
2
+ # spec: evidence-kit/SPEC.md §bin/run-validate.sh — the git-notes pair: a run stores its Statement as a note on the subject with no file configured, the read knob verifies it with no operand, the store leaves the worktree untouched, a second run's note replaces the first, and a failing store exits 3 naming the published manifest.
3
3
  #
4
4
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
5
5
  set -uo pipefail
@@ -51,14 +51,14 @@ notes="$(git -C "$t" notes --ref=gate-run list | wc -l | tr -d ' ')"
51
51
  commits="$(git -C "$t" rev-list --count refs/notes/gate-run)"
52
52
  [[ "$notes" == 1 && "$commits" == 2 ]] || fail "a second run must replace the first note (notes=$notes, notes commits=$commits)"
53
53
 
54
- # D — a failing store: exit 2, naming the manifest as published.
54
+ # D — a failing store: exit 3, naming the manifest as published.
55
55
  out="$(_fe broken.knobs --run-validate)"; rc=$?
56
- [[ "$rc" -eq 2 && "$out" == *"EVIDENCE_KIT_STATEMENT_WRITE_CMD exited"*"the manifest"*"published, the store is not"* ]] \
57
- || fail "a failing store must exit 2 naming the published manifest (rc=$rc): $out"
56
+ [[ "$rc" -eq 3 && "$out" == *"EVIDENCE_KIT_STATEMENT_WRITE_CMD exited"*"the manifest"*"published, the store is not"* ]] \
57
+ || fail "a failing store must exit 3 naming the published manifest (rc=$rc): $out"
58
58
 
59
59
  if [[ "$fails" -gt 0 ]]; then
60
60
  echo "statement-store.test: $fails assertion(s) failed"
61
61
  exit 1
62
62
  fi
63
- echo "statement-store.test: ok (the run stores a note on its subject with no file written and the worktree untouched but for the fold, the verify arm reads it clean with no operand, a second run replaces the note, a failing store exits 2 naming the published manifest)"
63
+ echo "statement-store.test: ok (the run stores a note on its subject with no file written and the worktree untouched but for the fold, the verify arm reads it clean with no operand, a second run replaces the note, a failing store exits 3 naming the published manifest)"
64
64
  exit 0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: evidence-kit/SPEC.md §verify-gate-run — each EVIDENCE_KIT_VERIFY_REQUIRE word reds its own case and holds on a run of HEAD with every suite clean; EVIDENCE_KIT_TREE_UNTRACKED=count reads an untracked path as modified unless it is ignored or the run's own write, a link judged where it sits; --json prints the result as one document on exit 0 and 1 and none on a refusal, and the import arm refuses the option.
2
+ # spec: evidence-kit/SPEC.md §verify-gate-run — each EVIDENCE_KIT_VERIFY_REQUIRE word reds its own case and holds on a run of HEAD with every suite clean; EVIDENCE_KIT_TREE_UNTRACKED=count reads an untracked path as modified unless it is ignored or the run's own write, a link judged where it sits; --json prints the result as one document on exit 0 and 1 and the error document on exit 2 or 3, and the import arm refuses the option.
3
3
  #
4
4
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
5
5
  set -uo pipefail
@@ -44,7 +44,7 @@ out="$(_fe "$tmp/a" --verify-gate-run "$tmp/a-statement.json")"; rc=$?
44
44
  [[ "$rc" -eq 0 ]] || fail "the empty default must not red a Statement behind HEAD (rc=$rc): $out"
45
45
 
46
46
  # A' — --json: the document's top-level verdict and ahead on a clean and on a contradicted Statement,
47
- # no document on a refusal, and the import arm keeps refusing the option.
47
+ # the error document on an unreadable Statement, and the import arm keeps refusing the option.
48
48
  out="$(_fe "$tmp/a" --verify-gate-run --json "$tmp/a-statement.json")"; rc=$?
49
49
  [[ "$rc" -eq 0 && "$out" == '{"ahead":1,'* && "$out" == *'],"verdict":"clean"}' ]] \
50
50
  || fail "--json must print a clean document at ahead 1 (rc=$rc): $out"
@@ -52,7 +52,8 @@ out="$(EVIDENCE_KIT_VERIFY_REQUIRE="head" _fe "$tmp/a" --verify-gate-run "$tmp/a
52
52
  [[ "$rc" -eq 1 && "$out" == '{"ahead":1,'* && "$out" == *'],"verdict":"contradiction"}' ]] \
53
53
  || fail "--json must print a contradiction document, the option after the operand (rc=$rc): $out"
54
54
  out="$( cd "$tmp/a" && EVIDENCE_KIT_KNOB_FILE=scripts/evidence-config.knobs bash "$FE" --verify-gate-run --json "$tmp/absent.json" 2>/dev/null )"; rc=$?
55
- [[ "$rc" -eq 2 && -z "$out" ]] || fail "--json must print no document on a refusal (rc=$rc): $out"
55
+ [[ "$rc" -eq 3 && "$out" == '{"contract":"1.1.0","error":"input"}' ]] \
56
+ || fail "--json must print the error document on an unreadable Statement at exit 3 (rc=$rc): $out"
56
57
  out="$(EVIDENCE_KIT_IMPORTED_RUNS=accept _fe "$tmp/a" --import-gate-run --json "$tmp/a-statement.json")"; rc=$?
57
58
  [[ "$rc" -eq 2 && "$out" == *"at most one operand (got: --json "* ]] || fail "--import-gate-run must keep refusing --json (rc=$rc): $out"
58
59
 
@@ -117,5 +118,5 @@ if [[ "$fails" -gt 0 ]]; then
117
118
  echo "verify-gate-run-strict.test: $fails assertion(s) failed"
118
119
  exit 1
119
120
  fi
120
- echo "verify-gate-run-strict.test: ok (head clean at the subject and red one commit later, verdict clean on a passing suite and red on a failing one, count clean with only ignored and run-written untracked files and modified with another or with a link into the tmp dir, unknown words refused at exit 2, --json a document on exit 0 and 1 and none on a refusal)"
121
+ echo "verify-gate-run-strict.test: ok (head clean at the subject and red one commit later, verdict clean on a passing suite and red on a failing one, count clean with only ignored and run-written untracked files and modified with another or with a link into the tmp dir, unknown words refused at exit 2, --json a document on exit 0 and 1 and the error document on an unreadable Statement)"
121
122
  exit 0
@@ -99,6 +99,13 @@ check-action-job-ref
99
99
  check-commit-msg
100
100
  check-commit-subject
101
101
  check-tree-terms
102
+ check-path-names
103
+ check-binary-strings
104
+ check-pipefail-readers
105
+ check-script-preflight
106
+ check-site-count
107
+ check-migration-guard
108
+ check-exec-write
102
109
  check-portability-floor
103
110
  check-projection-roster
104
111
  check-template-copy-parity
@@ -30,13 +30,13 @@ source "$SDK/lib/gate.sh"
30
30
  # script's own location: a caller running from a scratch tree sets cwd and gets that tree's crate.
31
31
  CRATE="$(gate_native_crate)"
32
32
 
33
- # spec: gate-sdk/SPEC.md §Fail-closed contract — an absent toolchain is exit 2 naming the floor,
33
+ # spec: gate-sdk/SPEC.md §Fail-closed contract — an absent toolchain is exit 3 naming the floor,
34
34
  # never a bare command-not-found from the shell
35
35
  command -v cargo >/dev/null 2>&1 || {
36
36
  echo "build-native: cargo is not on PATH, so the gate binary cannot be built." >&2
37
37
  echo " help: cargo is the contributor-side toolchain floor for this tree" >&2
38
38
  echo " (context-kit/SPEC.md §bin/env-probe). Install a Rust toolchain, then re-run." >&2
39
- exit 2
39
+ exit 3
40
40
  }
41
41
 
42
42
  # spec: gate-sdk/SPEC.md §build-native — the message names the consumer case, so a vendored copy
@@ -81,7 +81,7 @@ BN_ART="${BN_ART%.exe}$(gate_exe_suffix "$BN_TARGET")"
81
81
  echo " help: the artifact path is derived from the crate dir, any --target, and the executable" >&2
82
82
  echo " suffix that target implies; if this build emits somewhere else, or under a suffix" >&2
83
83
  echo " gate_exe_suffix does not derive, that derivation is what needs fixing." >&2
84
- exit 2
84
+ exit 3
85
85
  }
86
86
 
87
87
  # spec: gate-sdk/SPEC.md §build-native — the banned set is the consumer's own resolved pattern
@@ -90,9 +90,10 @@ BN_ART="${BN_ART%.exe}$(gate_exe_suffix "$BN_TARGET")"
90
90
  # spec: gate-sdk/SPEC.md §Fail-closed contract — the resolver's status is read from the command
91
91
  # substitution and not from `mapfile`, whose own status says nothing about the producer's
92
92
  BN_PATLIST="$(gate_msg_pattern_files)" || {
93
+ _bn_rc=$?
93
94
  echo "build-native: the banned-pattern set could not be resolved, so the artifact cannot be" >&2
94
95
  echo " verified — treating the build as failed (not clean)." >&2
95
- exit 2
96
+ exit "$_bn_rc"
96
97
  }
97
98
  BN_PATFILES=()
98
99
  while IFS= read -r _bn_f; do [[ -n "$_bn_f" ]] && BN_PATFILES+=("$_bn_f"); done <<<"$BN_PATLIST"
@@ -143,18 +143,19 @@ function Get-SkippedMark {
143
143
  # spec: gate-sdk/SPEC.md §run-gates — the stub's fail-open set on its one declaration line, held to the crate by check-front-end-fail-open and read off the leading token before the lookup and the grammar below
144
144
  $argv = @($args)
145
145
  $lead = if ($argv.Count -gt 0) { [string] $argv[0] } else { '' }
146
- $unavailable = 2
146
+ $refused = 2
147
+ $unavailable = 3
147
148
  $FailOpenArms = @('--hook', '--statusline')
148
- if ($FailOpenArms -ccontains $lead) { $unavailable = 0 }
149
+ if ($FailOpenArms -ccontains $lead) { $refused = 0; $unavailable = 0 }
149
150
 
150
151
  # spec: gate-sdk/SPEC.md §The harness-integration arm — a tree whose repository git refuses or skips runs no binary, so a fail-open arm declines there as on an absent binary
151
152
  function Exit-Refused {
152
- param([string] $Line)
153
+ param([string] $Line, [int] $Status)
153
154
  Write-StubError $Line
154
155
  if ($lead -ceq '--hook') {
155
156
  Write-StubLine -Text '{"systemMessage":"run-gates: git refuses or skips the repository this session stands in, so every hook guard in this tree is off and each guarded call is allowed. git status prints its reason, or git --git-dir=<that .git> status for a skipped one"}'
156
157
  }
157
- exit $unavailable
158
+ exit $Status
158
159
  }
159
160
 
160
161
  # spec: gate-sdk/SPEC.md §run-gates — the one lookup, split as the crate splits it (§The crate's crosser); the mark test runs before the directory changes
@@ -168,14 +169,14 @@ if ($answer) {
168
169
  $top = if ($at -ge 0) { $text.Substring(0, $at) } else { $text }
169
170
  $prefix = if ($at -ge 0) { $text.Substring($at + 1).TrimEnd("`n") } else { '' }
170
171
  if ($top -and (Get-SkippedMark -Top $top -Prefix $prefix)) {
171
- Exit-Refused 'run-gates: git skipped the repository a .git entry marks between here and the toplevel it answered, and answered the enclosing one; git --git-dir=<that .git> status prints its reason'
172
+ Exit-Refused 'run-gates: git skipped the repository a .git entry marks between here and the toplevel it answered, and answered the enclosing one; git --git-dir=<that .git> status prints its reason' -Status $unavailable
172
173
  }
173
174
  }
174
175
  if (-not $top -or -not (Test-Path -LiteralPath $top -PathType Container)) {
175
176
  if (Test-RepositoryMark) {
176
- Exit-Refused 'run-gates: git refuses the repository marked here (GIT_DIR, or a .git entry here or above); git status prints its reason'
177
+ Exit-Refused 'run-gates: git refuses the repository marked here (GIT_DIR, or a .git entry here or above); git status prints its reason' -Status $unavailable
177
178
  }
178
- Exit-Refused 'run-gates: not inside a git repository'
179
+ Exit-Refused 'run-gates: not inside a git repository' -Status $refused
179
180
  }
180
181
  Set-Location -LiteralPath $top
181
182
  $here = (Get-Location).ProviderPath
@@ -32,22 +32,24 @@ _run_gates_marked() {
32
32
  done
33
33
  }
34
34
 
35
- # spec: gate-sdk/SPEC.md §run-gates — the one piece of per-arm knowledge the stub keeps, the fail-open set on one declaration line check-front-end-fail-open holds to the crate's FAIL_OPEN_ARMS: the unavailable status is read on precisely the paths where no binary runs, so it cannot be asked of the binary that would report it
36
- ARM_UNAVAILABLE_STATUS=2
35
+ # spec: gate-sdk/SPEC.md §run-gates — the one piece of per-arm knowledge the stub keeps, the fail-open set on one declaration line check-front-end-fail-open holds to the crate's FAIL_OPEN_ARMS: the refused and unavailable statuses are read on precisely the paths where no binary runs, so they cannot be asked of the binary that would report them
36
+ ARM_REFUSED_STATUS=2
37
+ ARM_UNAVAILABLE_STATUS=3
37
38
  FAIL_OPEN_ARMS='--hook --statusline'
38
39
  for arm in $FAIL_OPEN_ARMS; do
39
40
  if [[ "${1-}" == "$arm" ]]; then
41
+ ARM_REFUSED_STATUS=0
40
42
  ARM_UNAVAILABLE_STATUS=0
41
43
  fi
42
44
  done
43
45
 
44
46
  # spec: gate-sdk/SPEC.md §The harness-integration arm — a tree whose repository git refuses or skips runs no binary, so a fail-open arm declines there as on an absent binary
45
- _run_gates_refuse() { # <line> <leading arm>
47
+ _run_gates_refuse() { # <line> <leading arm> <status>
46
48
  echo "$1" >&2
47
49
  if [[ "$2" == --hook ]]; then
48
50
  printf '%s\n' '{"systemMessage":"run-gates: git refuses or skips the repository this session stands in, so every hook guard in this tree is off and each guarded call is allowed. git status prints its reason, or git --git-dir=<that .git> status for a skipped one"}'
49
51
  fi
50
- exit "$ARM_UNAVAILABLE_STATUS"
52
+ exit "$3"
51
53
  }
52
54
 
53
55
  # spec: gate-sdk/SPEC.md §run-gates — the refusal is the stub's own line alone. The one lookup splits as the crate splits it (§The crate's crosser), and a failed one hands `cd` a path that is never a directory rather than an empty one: bash before 5.3 takes `cd ""` as a silent success
@@ -57,16 +59,16 @@ if answer="$(git rev-parse --show-toplevel --show-prefix 2>/dev/null)" && [[ -n
57
59
  prefix=''
58
60
  [[ "$answer" == *$'\n'* ]] && prefix="${answer#*$'\n'}"
59
61
  if gate_skipped_mark "$top" "$prefix" >/dev/null; then
60
- _run_gates_refuse "run-gates: git skipped the repository a .git entry marks between here and the toplevel it answered, and answered the enclosing one; git --git-dir=<that .git> status prints its reason" "${1-}"
62
+ _run_gates_refuse "run-gates: git skipped the repository a .git entry marks between here and the toplevel it answered, and answered the enclosing one; git --git-dir=<that .git> status prints its reason" "${1-}" "$ARM_UNAVAILABLE_STATUS"
61
63
  fi
62
64
  else
63
65
  top=/dev/null
64
66
  fi
65
67
  cd "$top" 2>/dev/null || {
66
68
  if _run_gates_marked; then
67
- _run_gates_refuse "run-gates: git refuses the repository marked here (GIT_DIR, or a .git entry here or above); git status prints its reason" "${1-}"
69
+ _run_gates_refuse "run-gates: git refuses the repository marked here (GIT_DIR, or a .git entry here or above); git status prints its reason" "${1-}" "$ARM_UNAVAILABLE_STATUS"
68
70
  fi
69
- _run_gates_refuse "run-gates: not inside a git repository" "${1-}"
71
+ _run_gates_refuse "run-gates: not inside a git repository" "${1-}" "$ARM_REFUSED_STATUS"
70
72
  }
71
73
 
72
74
  # spec: gate-sdk/SPEC.md §Layout and configuration — the gate-sdk root locator, exported from this front-end's own location so every arm reaches the exact root
@@ -76,7 +78,7 @@ else
76
78
  export GATE_SDK_ROOT="$SDK"
77
79
  fi
78
80
 
79
- # spec: gate-sdk/SPEC.md §run-gates — the binary located and exec'd with the environment this process already carries. $ARM_UNAVAILABLE_STATUS is the status a *dispatch* failure exits — 2 for every arm whose verdict a battery or a session reads, 0 for a harness-integration arm gating a user action, which §The non-gate arm rules must decline rather than wedge the session
81
+ # spec: gate-sdk/SPEC.md §run-gates — the binary located and exec'd with the environment this process already carries. $ARM_UNAVAILABLE_STATUS is the status a *dispatch* failure exits — 3, a tool error, for every arm whose verdict a battery or a session reads, 0 for a harness-integration arm gating a user action, which §The non-gate arm rules must decline rather than wedge the session
80
82
  exec_arm() {
81
83
  local bin why=''
82
84
  if [[ "$ARM_UNAVAILABLE_STATUS" -eq 0 ]]; then
@@ -0,0 +1,4 @@
1
+ # graph: couples=knob:GATE_SDK_GATES_DIR/strings-shapes.list dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: GATE_SDK_STRINGS_FILES
4
+ # spec: gate-sdk/SPEC.md §check-binary-strings — no named build output carries a deny term or a configured leak shape in a string it would ship (the record names an offset, a rule id and the entry's position, never the string)
@@ -0,0 +1,4 @@
1
+ # graph: couples=*.rs dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: GATE_SDK_EXEC_WRITE_PATHS
4
+ # spec: gate-sdk/SPEC.md §check-exec-write — no Rust file but a declared helper writes a file with an execute bit (the record names the call or the mode constant, never the argument)
@@ -0,0 +1,4 @@
1
+ # graph: couples=*,knob:GATE_SDK_MIGRATION_DESTRUCTIVE dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: GATE_SDK_MIGRATION_DIR
4
+ # spec: gate-sdk/SPEC.md §check-migration-guard — a branch only appends migrations, in order, and none it adds is destructive unless declared (the record names the migration file and, for a destructive statement, its first line and the matching ERE)
@@ -0,0 +1,4 @@
1
+ # graph: couples=* dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: content GATE_SDK_DENY_TERMS
4
+ # spec: gate-sdk/SPEC.md §check-path-names — no tracked path has a component carrying a deny term as its stem (the record names the shortest hitting prefix and a rule id, never the term)
@@ -0,0 +1,4 @@
1
+ # graph: couples=*.sh,knob:GATE_SDK_PIPEFAIL_BASELINE dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: GATE_SDK_PIPEFAIL_PATHS
4
+ # spec: gate-sdk/SPEC.md §check-pipefail-readers — no early-exit reader is fed under pipefail in the configured shell tree beyond its baselined count (the record names the reader, and [auto-fix] where --emit pipefail-fix rewrites it)
@@ -0,0 +1,4 @@
1
+ # graph: couples=*,knob:GATE_SDK_SCRIPT_RULES dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: GATE_SDK_SCRIPT_FILES
4
+ # spec: gate-sdk/SPEC.md §check-script-preflight — no configured shell script breaks a rule in the consumer's rules file (the record names the rule id and the kind's subject, never a value from the script)
@@ -0,0 +1,4 @@
1
+ # graph: couples=*,knob:GATE_SDK_SITE_RULES dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: content GATE_SDK_SITE_RULES
4
+ # spec: gate-sdk/SPEC.md §check-site-count — every tracked file's count of a configured site equals the count a person reviewed (the record names the path, the rule id and both counts, never a site)
@@ -1,4 +1,4 @@
1
1
  # graph: couples=knob:GATE_SDK_GATES_DIR/msg-patterns.list dir=one valve=none tier=precommit trigger=*
2
2
  # install: on-surface
3
- # armed-by: content GATE_SDK_MSG_PATTERN_FILES GATE_SDK_MSG_PATTERN_FILES_LOCAL
3
+ # armed-by: content GATE_SDK_MSG_PATTERN_FILES GATE_SDK_MSG_PATTERN_FILES_LOCAL GATE_SDK_DENY_TERMS
4
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)
@@ -113,10 +113,10 @@ assert_clean "run, scoped member"
113
113
  printf 'check-spec-dod-singleton\ncheck-spec-fence-balance\n' > "$gates/gates.list"
114
114
  rm -f "$gates/owned-action-pinning.sh" "$gates/check-action-pinning.gate"
115
115
 
116
- # the descriptor is the registry's: a list naming compiled-in gates with no descriptor beside it resolves nothing
116
+ # the descriptor is the registry's: a list naming compiled-in gates with no descriptor beside it resolves nothing, an error verdict
117
117
  rm -f "$gates"/*.gate
118
118
  out="$(cd "$repo" && container GATE_SDK_TMP_DIR="$scratch/run" "$BIN" --run --gates-dir "$gates" 2>&1)"; rc=$?
119
- assert_rc "run, no descriptor" "$rc" 1 "$out"
119
+ assert_rc "run, no descriptor" "$rc" 3 "$out"
120
120
  grep -qF '(unresolved)' <<<"$out" || { echo "FAIL [run, no descriptor]: no member reported unresolved"; printf '%s\n' "$out"; fails=$((fails + 1)); }
121
121
  assert_clean "run, no descriptor"
122
122
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  # Behavioral test of check-action-run-shell — the fidelity limit's refused class,
3
3
  # which the one good/bad pair cannot hold: the pair models exit 0 and exit 1, and
4
- # every refusal here is exit 2 by the fail-closed contract.
4
+ # every refusal here is exit 3 by the fail-closed contract, a construct the extractor cannot read.
5
5
  # Each case asserts the exit status AND the construct named in the message, so the
6
6
  # boundary is proved by the oracle rather than described in prose.
7
7
  #
@@ -38,19 +38,19 @@ check_case() {
38
38
  # conformance requirement inside the gate's own subject.
39
39
  check_case folded ' - run: >
40
40
  echo folded
41
- across lines' 2 "a folded block scalar (run: >)"
41
+ across lines' 3 "a folded block scalar (run: >)"
42
42
 
43
43
  check_case folded_chomped ' - run: >-
44
44
  echo folded
45
- across lines' 2 "a folded block scalar (run: >-)"
45
+ across lines' 3 "a folded block scalar (run: >-)"
46
46
 
47
47
  # B — an explicit block-scalar indentation indicator can contradict the indent the
48
48
  # extractor derives from the first body line.
49
49
  check_case indicator ' - run: |2
50
- echo indicated' 2 "an explicit block-scalar indentation indicator (run: |2)"
50
+ echo indicated' 3 "an explicit block-scalar indentation indicator (run: |2)"
51
51
 
52
52
  # C — a YAML alias as the run: value. No anchor resolution is attempted.
53
- check_case alias ' - run: *setup' 2 "a YAML alias as the run: value (run: *setup)"
53
+ check_case alias ' - run: *setup' 3 "a YAML alias as the run: value (run: *setup)"
54
54
 
55
55
  # C2 — the anchor half of the same rule. This fell through every refusal arm and
56
56
  # landed on the plain-scalar counter, so an anchored body was reported skipped and
@@ -58,11 +58,11 @@ check_case alias ' - run: *setup' 2 "a YAML alias as the run: value (run: *
58
58
  # shell. The body below is ShellCheck-dirty, so a regression here reads as clean.
59
59
  check_case anchor ' - run: &setup |
60
60
  echo "$undefined_var"
61
- unused=1' 2 "a YAML anchor on the run: value (run: &setup |)"
61
+ unused=1' 3 "a YAML anchor on the run: value (run: &setup |)"
62
62
 
63
63
  # C3 — an anchor on a plain scalar refuses too: the anchor is what we cannot
64
64
  # resolve, independent of the scalar style it decorates.
65
- check_case anchor_plain ' - run: &setup echo hi' 2 "a YAML anchor on the run: value (run: &setup echo hi)"
65
+ check_case anchor_plain ' - run: &setup echo hi' 3 "a YAML anchor on the run: value (run: &setup echo hi)"
66
66
 
67
67
  # C4 — a quoted value merely beginning with & is an ordinary string, not an anchor.
68
68
  check_case anchor_quoted ' - run: "echo && echo"' 0 "0 run: block(s) linted"
@@ -71,7 +71,7 @@ check_case anchor_quoted ' - run: "echo && echo"' 0 "0 run: block(s) linted
71
71
  # the fragment, so the line is refused rather than linted wrong.
72
72
  check_case unbalanced ' - run: |
73
73
  echo "${{ github.ref_name"
74
- echo tail' 2 "an unbalanced GitHub expression"
74
+ echo tail' 3 "an unbalanced GitHub expression"
75
75
 
76
76
  # E — the chomping indicators are ordinary spellings, handled rather than refused.
77
77
  # An author reaches for |- by habit, so silently skipping these would be the worst
@@ -115,7 +115,7 @@ jobs:
115
115
  runs-on: ubuntu-latest
116
116
  steps:
117
117
  - run: |
118
- echo body' 2 "$defaults_refusal"
118
+ echo body' 3 "$defaults_refusal"
119
119
 
120
120
  wf_case defaults_job 'name: job-level defaults
121
121
 
@@ -127,7 +127,7 @@ jobs:
127
127
  shell: pwsh
128
128
  steps:
129
129
  - run: |
130
- echo body' 2 "$defaults_refusal"
130
+ echo body' 3 "$defaults_refusal"
131
131
 
132
132
  # E3 — the refusal is the `run:` key, not the `defaults:` key. A defaults block
133
133
  # setting anything else changes no step's dialect, so it is extracted normally —
@@ -192,5 +192,5 @@ if [[ "$fails" -gt 0 ]]; then
192
192
  echo "check-action-run-shell.test: $fails assertion(s) failed"
193
193
  exit 1
194
194
  fi
195
- echo "check-action-run-shell.test: ok (folded scalars, an explicit indentation indicator, a YAML alias, a YAML anchor on either scalar style, an unbalanced GitHub expression and a defaults: subtree carrying run: at either level each refuse at exit 2 naming the construct; |- and |+ extract normally; a quoted value merely starting with & is not an anchor; a defaults: block with no run: key extracts normally; an absent shell: key under a Windows or an unreadable runs-on is a finding at exit 1 and naming the key clears it; a refusable construct outside the Actions-shape subject is skipped and counted rather than refused)"
195
+ echo "check-action-run-shell.test: ok (folded scalars, an explicit indentation indicator, a YAML alias, a YAML anchor on either scalar style, an unbalanced GitHub expression and a defaults: subtree carrying run: at either level each refuse at exit 3 naming the construct; |- and |+ extract normally; a quoted value merely starting with & is not an anchor; a defaults: block with no run: key extracts normally; an absent shell: key under a Windows or an unreadable runs-on is a finding at exit 1 and naming the key clears it; a refusable construct outside the Actions-shape subject is skipped and counted rather than refused)"
196
196
  exit 0
@@ -0,0 +1,4 @@
1
+ carry a deny term or a leak shape
2
+ out/app.elf@83: [HOME-PATH] shape 1
3
+ out/app.elf@115: [CODENAME] term 1
4
+ out/notes.bin@11: [CODENAME] term 1
@@ -0,0 +1,3 @@
1
+ GATE_SDK_STRINGS_FILES = out/app.elf out/notes.bin
2
+ GATE_SDK_STRINGS_SHAPES = shapes.list
3
+ GATE_SDK_DENY_TERMS = terms.list
@@ -0,0 +1,2 @@
1
+ # rule: HOME-PATH
2
+ /(home|root|Users)/
@@ -0,0 +1,2 @@
1
+ # rule: CODENAME
2
+ zephyr
@@ -0,0 +1 @@
1
+ BINARY-STRINGS: clean (1 build output(s) scanned; none carry the 2 deny term(s) or 1 shape(s))
@@ -0,0 +1,3 @@
1
+ GATE_SDK_STRINGS_FILES = out/app.elf
2
+ GATE_SDK_STRINGS_SHAPES = shapes.list
3
+ GATE_SDK_DENY_TERMS = terms.list
@@ -0,0 +1,2 @@
1
+ # rule: HOME-PATH
2
+ /(home|root|Users)/
@@ -0,0 +1,4 @@
1
+ # rule: CODENAME
2
+ zephyr
3
+ # A three-byte term: its only occurrence is a run too short to be a string.
4
+ qux