checkwright 0.38.0 → 0.40.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 (195) 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 +3 -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 +2 -2
  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 +1 -1
  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 +1 -1
  30. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -2
  31. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +2 -2
  32. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +5 -5
  33. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +7 -7
  34. package/payload/evidence-kit/gate-tests/statement-store.test.sh +5 -5
  35. package/payload/evidence-kit/gate-tests/verify-gate-run-strict.test.sh +5 -4
  36. package/payload/gate-sdk/README.md +7 -0
  37. package/payload/gate-sdk/bin/build-native.sh +5 -4
  38. package/payload/gate-sdk/bin/run-gates.ps1 +8 -7
  39. package/payload/gate-sdk/bin/run-gates.sh +10 -8
  40. package/payload/gate-sdk/checks/check-binary-strings.gate +4 -0
  41. package/payload/gate-sdk/checks/check-exec-write.gate +4 -0
  42. package/payload/gate-sdk/checks/check-migration-guard.gate +4 -0
  43. package/payload/gate-sdk/checks/check-path-names.gate +4 -0
  44. package/payload/gate-sdk/checks/check-pipefail-readers.gate +4 -0
  45. package/payload/gate-sdk/checks/check-script-preflight.gate +4 -0
  46. package/payload/gate-sdk/checks/check-site-count.gate +4 -0
  47. package/payload/gate-sdk/checks/check-tree-terms.gate +1 -1
  48. package/payload/gate-sdk/gate-tests/binary-only-recipe.test.sh +2 -2
  49. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +11 -11
  50. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/expect.txt +5 -0
  51. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/app.elf +0 -0
  52. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/notes.bin +0 -0
  53. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/out/short.bin +0 -0
  54. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/scripts/gate-sdk-config.knobs +3 -0
  55. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/shapes.list +2 -0
  56. package/payload/gate-sdk/gate-tests/check-binary-strings/bad/terms.list +4 -0
  57. package/payload/gate-sdk/gate-tests/check-binary-strings/good/expect.txt +1 -0
  58. package/payload/gate-sdk/gate-tests/check-binary-strings/good/out/app.elf +0 -0
  59. package/payload/gate-sdk/gate-tests/check-binary-strings/good/scripts/gate-sdk-config.knobs +3 -0
  60. package/payload/gate-sdk/gate-tests/check-binary-strings/good/shapes.list +4 -0
  61. package/payload/gate-sdk/gate-tests/check-binary-strings/good/terms.list +4 -0
  62. package/payload/gate-sdk/gate-tests/check-binary-strings.test.sh +74 -0
  63. package/payload/gate-sdk/gate-tests/check-exec-write/bad/expect.txt +14 -0
  64. package/payload/gate-sdk/gate-tests/check-exec-write/bad/scripts/gate-sdk-config.knobs +2 -0
  65. package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/caller.rs +5 -0
  66. package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/helper.rs +5 -0
  67. package/payload/gate-sdk/gate-tests/check-exec-write/bad/src/sites.rs +21 -0
  68. package/payload/gate-sdk/gate-tests/check-exec-write/good/expect.txt +1 -0
  69. package/payload/gate-sdk/gate-tests/check-exec-write/good/scripts/gate-sdk-config.knobs +2 -0
  70. package/payload/gate-sdk/gate-tests/check-exec-write/good/src/helper.rs +5 -0
  71. package/payload/gate-sdk/gate-tests/check-exec-write/good/src/main.rs +15 -0
  72. package/payload/gate-sdk/gate-tests/check-exec-write.test.sh +69 -0
  73. package/payload/gate-sdk/gate-tests/check-identity.test.sh +2 -2
  74. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/args +2 -0
  75. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0001_init.sql +1 -0
  76. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0002_orders.sql +1 -0
  77. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/base/0003_audit.sql +1 -0
  78. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/destructive.list +4 -0
  79. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/expect.txt +8 -0
  80. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0001_init.sql +1 -0
  81. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0002_late.sql +1 -0
  82. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0003_audit_log.sql +1 -0
  83. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0004_prune.sql +3 -0
  84. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0005_accounts.sql +2 -0
  85. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/migrations/0005_users.sql +2 -0
  86. package/payload/gate-sdk/gate-tests/check-migration-guard/bad/scripts/gate-sdk-config.knobs +2 -0
  87. package/payload/gate-sdk/gate-tests/check-migration-guard/good/args +2 -0
  88. package/payload/gate-sdk/gate-tests/check-migration-guard/good/base/0001_init.sql +1 -0
  89. package/payload/gate-sdk/gate-tests/check-migration-guard/good/base/0002_legacy.sql +1 -0
  90. package/payload/gate-sdk/gate-tests/check-migration-guard/good/destructive.list +4 -0
  91. package/payload/gate-sdk/gate-tests/check-migration-guard/good/expect.txt +1 -0
  92. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0001_init.sql +1 -0
  93. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0002_legacy.sql +1 -0
  94. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0003_retire_legacy.sql +6 -0
  95. package/payload/gate-sdk/gate-tests/check-migration-guard/good/migrations/0004_index_accounts.sql +2 -0
  96. package/payload/gate-sdk/gate-tests/check-migration-guard/good/scripts/gate-sdk-config.knobs +2 -0
  97. package/payload/gate-sdk/gate-tests/check-migration-guard.test.sh +277 -0
  98. package/payload/gate-sdk/gate-tests/check-path-names/bad/expect.txt +6 -0
  99. package/payload/gate-sdk/gate-tests/check-path-names/bad/scripts/gate-sdk-config.knobs +1 -0
  100. package/payload/gate-sdk/gate-tests/check-path-names/bad/terms.list +3 -0
  101. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/ZePhYr.md +1 -0
  102. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo/a.txt +1 -0
  103. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo/zephyr.txt +1 -0
  104. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo-cli.sh +1 -0
  105. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo.rs +1 -0
  106. package/payload/gate-sdk/gate-tests/check-path-names/bad/tree/foo_x.txt +1 -0
  107. package/payload/gate-sdk/gate-tests/check-path-names/good/expect.txt +1 -0
  108. package/payload/gate-sdk/gate-tests/check-path-names/good/scripts/gate-sdk-config.knobs +1 -0
  109. package/payload/gate-sdk/gate-tests/check-path-names/good/terms.list +1 -0
  110. package/payload/gate-sdk/gate-tests/check-path-names/good/tree/foobar.rs +1 -0
  111. package/payload/gate-sdk/gate-tests/check-path-names/good/tree/food/a.txt +1 -0
  112. package/payload/gate-sdk/gate-tests/check-path-names/good/tree/xfoo.txt +1 -0
  113. package/payload/gate-sdk/gate-tests/check-path-names.test.sh +66 -0
  114. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/baseline.tsv +4 -0
  115. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/expect.txt +17 -0
  116. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/scripts/gate-sdk-config.knobs +2 -0
  117. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/over.sh +5 -0
  118. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/readers.sh +16 -0
  119. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/shared-lib.sh +3 -0
  120. package/payload/gate-sdk/gate-tests/check-pipefail-readers/bad/tree/stale.sh +4 -0
  121. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/baseline.tsv +2 -0
  122. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/expect.txt +1 -0
  123. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/scripts/gate-sdk-config.knobs +2 -0
  124. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/clean.sh +17 -0
  125. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/lib/baselined-lib.sh +4 -0
  126. package/payload/gate-sdk/gate-tests/check-pipefail-readers/good/tree/no-pipefail.sh +4 -0
  127. package/payload/gate-sdk/gate-tests/check-pipefail-readers.test.sh +127 -0
  128. package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +1 -1
  129. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/expect.txt +10 -0
  130. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/rules.list +23 -0
  131. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/scripts/gate-sdk-config.knobs +2 -0
  132. package/payload/gate-sdk/gate-tests/check-script-preflight/bad/tree/submit-job.sh +13 -0
  133. package/payload/gate-sdk/gate-tests/check-script-preflight/good/expect.txt +1 -0
  134. package/payload/gate-sdk/gate-tests/check-script-preflight/good/rules.list +23 -0
  135. package/payload/gate-sdk/gate-tests/check-script-preflight/good/scripts/gate-sdk-config.knobs +2 -0
  136. package/payload/gate-sdk/gate-tests/check-script-preflight/good/tree/submit-job.sh +17 -0
  137. package/payload/gate-sdk/gate-tests/check-script-preflight.test.sh +110 -0
  138. package/payload/gate-sdk/gate-tests/check-site-count/bad/expect.txt +4 -0
  139. package/payload/gate-sdk/gate-tests/check-site-count/bad/rules.list +5 -0
  140. package/payload/gate-sdk/gate-tests/check-site-count/bad/scripts/gate-sdk-config.knobs +1 -0
  141. package/payload/gate-sdk/gate-tests/check-site-count/bad/sites.tsv +3 -0
  142. package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/new.txt +1 -0
  143. package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/over.txt +3 -0
  144. package/payload/gate-sdk/gate-tests/check-site-count/bad/tree/under.txt +1 -0
  145. package/payload/gate-sdk/gate-tests/check-site-count/good/expect.txt +1 -0
  146. package/payload/gate-sdk/gate-tests/check-site-count/good/rules.list +5 -0
  147. package/payload/gate-sdk/gate-tests/check-site-count/good/scripts/gate-sdk-config.knobs +1 -0
  148. package/payload/gate-sdk/gate-tests/check-site-count/good/sites.tsv +2 -0
  149. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/blob.bin +0 -0
  150. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/pinned.txt +2 -0
  151. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/plain.txt +1 -0
  152. package/payload/gate-sdk/gate-tests/check-site-count/good/tree/tests/helper.txt +2 -0
  153. package/payload/gate-sdk/gate-tests/check-site-count.test.sh +90 -0
  154. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +11 -8
  155. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -1
  156. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/scripts/gate-sdk-config.knobs +1 -0
  157. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/terms.list +4 -0
  158. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/terms.txt +2 -0
  159. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
  160. package/payload/gate-sdk/gate-tests/check-tree-terms/good/scripts/gate-sdk-config.knobs +1 -0
  161. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/rosters/terms.list +2 -0
  162. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/words.txt +1 -0
  163. package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +36 -16
  164. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +5 -6
  165. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +8 -8
  166. package/payload/gate-sdk/gate-tests/lib-test-hermetic.test.sh +35 -1
  167. package/payload/gate-sdk/gate-tests/native-git-hooks.test.sh +7 -7
  168. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +4 -4
  169. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +3 -3
  170. package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +6 -6
  171. package/payload/gate-sdk/gate-tests/run-json.test.sh +52 -0
  172. package/payload/gate-sdk/gate-tests/verdict-store.test.sh +99 -0
  173. package/payload/gate-sdk/lib/gate.sh +12 -9
  174. package/payload/gate-sdk/lib/test-hermetic.sh +25 -8
  175. package/payload/gate-sdk/templates/check-skeleton.sh +2 -1
  176. package/payload/gate-sdk/templates/migration-destructive.list +10 -0
  177. package/payload/gate-sdk/templates/script-rules.list +39 -0
  178. package/payload/gate-sdk/templates/strings-shapes.list +15 -0
  179. package/payload/guard-kit/gate-tests/consumer-rules.test.sh +5 -5
  180. package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +2 -2
  181. package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +1 -1
  182. package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +1 -1
  183. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +3 -3
  184. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
  185. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -2
  186. package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +18 -2
  187. package/payload/lifecycle-kit/gate-tests/peer-channel.test.sh +35 -6
  188. package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +4 -4
  189. package/payload/lifecycle-kit/templates/consult.md +1 -1
  190. package/payload/lifecycle-kit/templates/stages/scope.md +1 -1
  191. package/payload/queue-kit/README.md +1 -1
  192. package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +2 -2
  193. package/payload/queue-kit/gate-tests/check-task-conservation.test.sh +4 -4
  194. package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +4 -4
  195. package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +9 -9
@@ -265,7 +265,7 @@ has "derive-nocases-named" "$tmp/out" "GUARD_KIT_CONSUMER_VARIANT_LIMITS"
265
265
  eq "derive-nofile-status" "$(lane "$(derive_knobs nofile no-such-limits.tsv)")" 2
266
266
  has "derive-nofile-named" "$tmp/out" "GUARD_KIT_CONSUMER_VARIANT_LIMITS"
267
267
  printf 'block\tcd_compound\tsq-lead\n' >"$tmp/cwd/lane-bad-limits.tsv"
268
- eq "derive-unreadable-status" "$(lane "$(derive_knobs unreadable lane-bad-limits.tsv)")" 2
268
+ eq "derive-unreadable-status" "$(lane "$(derive_knobs unreadable lane-bad-limits.tsv)")" 3
269
269
  has "derive-unreadable-named" "$tmp/out" "GUARD_KIT_CONSUMER_VARIANT_LIMITS"
270
270
 
271
271
  # --- the variant lane reads the fifth positional: a limit row nothing needs is a mismatch, and a
@@ -278,14 +278,14 @@ limits() { # $1=name $2..=rows — a limits table of those rows, its path echoe
278
278
  }
279
279
  eq "limits-stale-status" "$(lane "$tmp/lane-off.knobs" "$(limits stale 'fallthrough\tcd_compound\tsq-lead')")" 1
280
280
  has "limits-stale-named" "$tmp/out" "limit row 'cd_compound sq-lead' admits a re-spelling that no longer fails"
281
- eq "limits-floor-status" "$(lane "$tmp/lane-off.knobs" "$(limits floor 'block\tcd_compound\tsq-lead')")" 2
282
- eq "limits-transform-status" "$(lane "$tmp/lane-off.knobs" "$(limits transform 'allow\tcd_compound\tsq')")" 2
283
- eq "limits-twice-status" "$(lane "$tmp/lane-off.knobs" "$(limits twice 'allow\tcd_compound\tsq-lead' 'fallthrough\tcd_compound\tsq-lead')")" 2
281
+ eq "limits-floor-status" "$(lane "$tmp/lane-off.knobs" "$(limits floor 'block\tcd_compound\tsq-lead')")" 3
282
+ eq "limits-transform-status" "$(lane "$tmp/lane-off.knobs" "$(limits transform 'allow\tcd_compound\tsq')")" 3
283
+ eq "limits-twice-status" "$(lane "$tmp/lane-off.knobs" "$(limits twice 'allow\tcd_compound\tsq-lead' 'fallthrough\tcd_compound\tsq-lead')")" 3
284
284
  eq "limits-missing-status" "$(lane "$tmp/lane-off.knobs" "$tmp/no-such-limits.tsv")" 2
285
285
 
286
286
  if [[ "$fails" -gt 0 ]]; then
287
287
  echo "consumer-rules.test: $fails of $checks assertion(s) failed"
288
288
  exit 1
289
289
  fi
290
- echo "consumer-rules.test: ok ($checks assertions; the consumer command reads the payload bytes as received with the working directory and environment inherited, a block and a decision are relayed verbatim ahead of the generic ruleset, an empty result falls through to it, a fault — non-zero-non-2 exit, unparseable or non-object stdout, a command that cannot start — rides the ruleset's own answer and never silences it, an empty knob runs no stage; --guard-json field reads bytes verbatim, view prints the named view through the tool's reader, nothing for a tool no reader serves, and words prints the word read's values a segment a line, nothing where the read answers nothing, and refuses an operand; a raw control byte is blocked by name before any rule; --run-guard-tests' consumer lane drives the consumer's rows against its command from the arm's working directory, reds a mismatch either way, is silent where no table is named, and refuses a table with no command or no file at exit 2, and derives its rows' re-spellings only under a named limits table, held from both sides and refused at exit 2 with no cases table or no readable table; its variant lane counts the four tables' derived rows, reds a limit row nothing needs and refuses a limits table it cannot read at exit 2)"
290
+ echo "consumer-rules.test: ok ($checks assertions; the consumer command reads the payload bytes as received with the working directory and environment inherited, a block and a decision are relayed verbatim ahead of the generic ruleset, an empty result falls through to it, a fault — non-zero-non-2 exit, unparseable or non-object stdout, a command that cannot start — rides the ruleset's own answer and never silences it, an empty knob runs no stage; --guard-json field reads bytes verbatim, view prints the named view through the tool's reader, nothing for a tool no reader serves, and words prints the word read's values a segment a line, nothing where the read answers nothing, and refuses an operand; a raw control byte is blocked by name before any rule; --run-guard-tests' consumer lane drives the consumer's rows against its command from the arm's working directory, reds a mismatch either way, is silent where no table is named, and refuses a table with no command or no file at exit 2, and derives its rows' re-spellings only under a named limits table, held from both sides and refused with no cases table or no table file at exit 2 and with an unparseable table at exit 3; its variant lane counts the four tables' derived rows, reds a limit row nothing needs and refuses a limits table with no file at exit 2 and one it cannot parse at exit 3)"
291
291
  exit 0
@@ -54,7 +54,7 @@ want "absent-entry" "no/such/page.md" 2 "resolves to neither a tracked file nor
54
54
  printf 'untracked\n' >"$tmp/loose.md"
55
55
  want "untracked-entry" "loose.md" 2 "resolves to neither a tracked file nor a directory"
56
56
 
57
- # --- an unreadable configured surface: exit 2 rather than a clean over a corpus
57
+ # --- an unreadable configured surface: exit 3 rather than a clean over a corpus
58
58
  # the gate could not read. Skipped for a caller that reads a mode-000 file anyway.
59
59
  mkdir -p "$tmp/locked"
60
60
  printf 'bash gate-sdk/bin/run-gates.sh --run-demo\n' >"$tmp/locked/page.md"
@@ -64,7 +64,7 @@ chmod 000 "$tmp/locked/page.md"
64
64
  if head -c1 "$tmp/locked/page.md" >/dev/null 2>&1; then
65
65
  echo " note: skipping the unreadable-surface case — this caller reads a mode-000 file"
66
66
  else
67
- want "unreadable-surface" "locked" 2 "unreadable corpus file"
67
+ want "unreadable-surface" "locked" 3 "unreadable corpus file"
68
68
  fi
69
69
  chmod 644 "$tmp/locked/page.md"
70
70
 
@@ -215,7 +215,7 @@ seed "$refused"
215
215
  printf 'gitdir: %s/absent\n' "$refused" >"$refused/.git"
216
216
  before="$(state_of "$refused")"
217
217
  out="$(run_enter "$refused" scope)"; rc=$?
218
- [[ "$rc" -eq 2 && "$out" == *"marks a repository"* ]] || note refused "a refused repository skipped the worktree check (want exit 2 naming the mark): rc=$rc $out"
218
+ [[ "$rc" -eq 3 && "$out" == *"marks a repository"* ]] || note refused "a refused repository skipped the worktree check (want exit 3 naming the mark): rc=$rc $out"
219
219
  [[ "$(state_of "$refused")" == "$before" ]] || note refused-write "the refused entry wrote the state file"
220
220
 
221
221
  [[ "$fails" -eq 0 ]] || { echo "boundary-worktree-refusal.test: $fails assertion(s) failed"; exit 1; }
@@ -56,7 +56,7 @@ expect 2 "$rc" "a missing message file fails closed"
56
56
  (gate_run check-dispatch-entry "$DIR/checks" "$tmp/msg.txt" "$tmp/one.txt" >/dev/null 2>&1); rc=$?
57
57
  expect 2 "$rc" "two arguments is a usage error"
58
58
  (gate_run check-dispatch-entry "$DIR/checks" "$tmp/msg.txt" "$tmp/nope.txt" "$tmp/head.txt" "$tmp/head.txt" "$tmp/work.txt" >/dev/null 2>&1); rc=$?
59
- expect 2 "$rc" "an unreadable marker fails closed"
59
+ expect 3 "$rc" "an unreadable marker fails closed"
60
60
 
61
61
  if [[ "$fails" -gt 0 ]]; then
62
62
  echo "check-dispatch-entry.test: $fails assertion(s) failed"
@@ -3,7 +3,7 @@
3
3
  # good/bad pair cannot hold: (A) a malformed disposition line reds on grammar;
4
4
  # (B) a Lessons entry still present in the worktree is not a removal, so it
5
5
  # needs no stamp; (C) a stored prefix matches a longer lead line (prefix join);
6
- # (D-F) bare mode is clean outside a repository and exit 2 in one git refuses,
6
+ # (D-F) bare mode is clean outside a repository and exit 3 in one git refuses,
7
7
  # a nested one git skips included.
8
8
  #
9
9
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
@@ -64,13 +64,13 @@ bare_case "D no-repository" "$SANDBOX/none" 0 "no git repository"
64
64
  # E: bare mode in a repository git refuses is the crosser's refusal, never that clean answer.
65
65
  mkdir -p "$SANDBOX/refused"
66
66
  printf 'gitdir: %s/absent\n' "$SANDBOX/refused" >"$SANDBOX/refused/.git"
67
- bare_case "E refused-repository" "$SANDBOX/refused" 2 "marks a repository"
67
+ bare_case "E refused-repository" "$SANDBOX/refused" 3 "marks a repository"
68
68
 
69
69
  # F: a nested repository git skips is refused too, though git answers the enclosing one at exit 0.
70
70
  git init -q "$SANDBOX/outer"
71
71
  mkdir -p "$SANDBOX/outer/inner/.git"
72
72
  printf 'garbage\n' >"$SANDBOX/outer/inner/.git/HEAD"
73
- bare_case "F nested-skipped-repository" "$SANDBOX/outer/inner" 2 "marks a repository beneath it"
73
+ bare_case "F nested-skipped-repository" "$SANDBOX/outer/inner" 3 "marks a repository beneath it"
74
74
 
75
75
  if [[ "$fails" -gt 0 ]]; then
76
76
  echo "check-lesson-disposition.test.sh: $fails case(s) failed"
@@ -44,7 +44,7 @@ cat >"$u/AGENT.md" <<'EOF'
44
44
  <!-- lifecycle-kit:begin -->
45
45
  The block opened but the end marker is gone.
46
46
  EOF
47
- check_case "unpaired-marker-failclosed" "$u" 2 "end marker missing"
47
+ check_case "unpaired-marker-failclosed" "$u" 3 "end marker missing"
48
48
 
49
49
  # --- agent-file-missing: the configured target does not exist (fail-closed) ---
50
50
  m="$SANDBOX/missing"; mkdir -p "$m"
@@ -10,7 +10,7 @@
10
10
  # matching none), the widened arm over git-object-shaped tokens in the OTHER four
11
11
  # fields, which the hermetic pair cannot reach for the same reason, and its valve;
12
12
  # plus the two inert shapes (no record at all, a header-only record), and a
13
- # repository git refuses, which exits 2 rather than degrading to grammar only.
13
+ # repository git refuses, which exits 3 rather than degrading to grammar only.
14
14
  #
15
15
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
16
16
  set -uo pipefail
@@ -139,7 +139,7 @@ check_case "valve-no-reason-still-probes" "$noreason" 1 "token names no object i
139
139
  refused="$SANDBOX/refused"; mkdir -p "$refused"
140
140
  printf 'gitdir: %s/absent\n' "$refused" >"$refused/.git"
141
141
  write_record "$refused" "$(printf 'a%.0s' {1..40})"
142
- check_case "refused-repository" "$refused" 2 "marks a repository"
142
+ check_case "refused-repository" "$refused" 3 "marks a repository"
143
143
 
144
144
  if [[ "$fails" -gt 0 ]]; then
145
145
  echo "check-survey-record.test.sh: $fails case(s) failed"
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — --open-lead-journal end-to-end through a sandboxed enter-stage: the heading keyed on fields 2 through the last of the last stamp, creation with its directory, append after an undisposed segment, a disposed segment dropped, the idempotent no-op, --simulate writing nothing, the surplus refusal, the none key on a stampless state file, the session-role marker (written, rewritten on the journal no-op, left alone when held, skipped where the id does not derive, simulated unwritten, never written on a refusal), and no stamp ever appended
2
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — --open-lead-journal end-to-end through a sandboxed enter-stage: the heading keyed on fields 2 through the last of the last stamp, creation with its directory, append after an undisposed segment, a disposed segment dropped, the idempotent no-op, --simulate writing nothing, the surplus refusal, the none key on a stampless state file, the session-role marker (written, naming a resumed lead beside a newer stage child, rewritten on the journal no-op, left alone when held, skipped where the id does not derive, simulated unwritten, never written on a refusal), and no stamp ever appended
3
3
  set -uo pipefail
4
4
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
5
 
@@ -83,6 +83,22 @@ out="$( cd "$sk" && unset LIFECYCLE_KIT_SESSION_ID CLAUDE_CODE_SESSION_ID CLAUDE
83
83
  [[ -e "$sk/scratch/session-role" ]] && note marker-skip-file "an underived id wrote a marker"
84
84
  grep -qF 'skipped the session-role marker' <<<"$out" || note marker-skip-report "the skip is not named: $out"
85
85
 
86
+ # --- a resumed lead: the harness's child flag set beside the lead's own uuid, a stage child's
87
+ # transcript newer than the lead's, and the marker still names the lead ---
88
+ rl="$SANDBOX/resumed-lead"
89
+ seed "$rl" stamps
90
+ lead_uuid=11112222-3333-4444-5555-666677778888
91
+ mkdir -p "$rl/sessions/$lead_uuid/subagents"
92
+ touch -t 202001010000 "$rl/sessions/$lead_uuid.jsonl"
93
+ touch -t 202001010001 "$rl/sessions/$lead_uuid/subagents/agent-aaaabbbb0000.jsonl"
94
+ out="$( cd "$rl" && unset LIFECYCLE_KIT_SESSION_ID \
95
+ && gate_env GATE_SDK_TMP_DIR="$rl/scratch" LIFECYCLE_KIT_SESSIONS_DIR="$rl/sessions" \
96
+ CLAUDE_CODE_SESSION_ID="$lead_uuid" CLAUDE_CODE_CHILD_SESSION=1 \
97
+ && gate_arm_run --enter-stage --open-lead-journal 2>&1 )"; rc=$?
98
+ [[ "$rc" -eq 0 ]] || note marker-resumed-lead "want exit 0, got $rc -- $out"
99
+ [[ "$(cat "$rl/scratch/session-role" 2>/dev/null)" == "lead 11112222" ]] \
100
+ || note marker-resumed-lead-id "the marker does not name the lead: $(cat "$rl/scratch/session-role" 2>/dev/null)"
101
+
86
102
  # --- --simulate relays the marker line and path under its prefix and writes no marker ---
87
103
  ms="$SANDBOX/marker-simulate"
88
104
  seed "$ms" stamps
@@ -156,5 +172,5 @@ out="$(run_open "$no" --open-lead-journal)"; rc=$?
156
172
  || note none-heading "a stampless state file did not key on none: $(cat "$no/scratch/lead-journal.md" 2>/dev/null)"
157
173
 
158
174
  [[ "$fails" -eq 0 ]] || { echo "lead-journal-open.test: $fails assertion(s) failed"; exit 1; }
159
- echo "lead-journal-open.test: clean (--open-lead-journal creates its keyed heading, appends after an undisposed segment, drops a disposed one, no-ops at the same cursor, simulates read-only under its prefix, refuses a surplus argument with nothing written, keys on none without a stamp, writes the session-role marker, rewrites it on the no-op, leaves a held one alone, skips it at exit 0 where the id does not derive, simulates it unwritten, and never stamps)"
175
+ echo "lead-journal-open.test: clean (--open-lead-journal creates its keyed heading, appends after an undisposed segment, drops a disposed one, no-ops at the same cursor, simulates read-only under its prefix, refuses a surplus argument with nothing written, keys on none without a stamp, writes the session-role marker, names a resumed lead in it beside a newer stage child, rewrites it on the no-op, leaves a held one alone, skips it at exit 0 where the id does not derive, simulates it unwritten, and never stamps)"
160
176
  exit 0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §The peer request channel — the four arms end-to-end over a scratch channel outside any repository: a request files from a non-git directory and lists as received, every legal move lands and an illegal one is refused leaving the reply byte-identical, both bulk forms move their matches and a bulk form matching none prints nothing, the ready notice prints a later release and stays silent on an earlier one, a malformed body, a tab in the need line or a refused reason, a multibyte filing time, a relative channel, a missing one and one inside a work tree are refused at exit 2, an unset channel reads as nothing, moves nothing in bulk and refuses a filing or a targeted move, and with no repository a stray scripts/ knob file configures neither peer arm
2
+ # spec: lifecycle-kit/SPEC.md §The peer request channel — the four arms end-to-end over a scratch channel outside any repository: a request files from a non-git directory and lists as received, every legal move lands and an illegal one is refused leaving the reply byte-identical, both bulk forms move their matches and a bulk form matching none prints nothing, the ready notice prints a later release and stays silent on an earlier one, a malformed body, a tab in the need line, an edited request and a multibyte filing time are input errors at exit 3, a tab in a refused reason, a relative channel, a missing one and one inside a work tree are refused at exit 2, a same-second refiling is a collision at exit 2 with the id alone on stdout and every other refusal prints nothing there, an unset channel reads as nothing, moves nothing in bulk and refuses a filing or a targeted move, and with no repository a stray scripts/ knob file configures neither peer arm
3
3
  set -uo pipefail
4
4
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
5
 
@@ -81,30 +81,59 @@ out="$(arm "$CH" --emit-peer-ready peer-c)"; rc=$?
81
81
  cp "$CH/$id.md" "$SANDBOX/keep.md"
82
82
  printf 'more\n' >>"$CH/$id.md"
83
83
  out="$(arm "$CH" --emit-peer-list)"; rc=$?
84
- [[ "$rc" -eq 2 && "$out" == *"$id.md"*"edited after filing"* ]] || note edited "got $rc -- $out"
84
+ [[ "$rc" -eq 3 && "$out" == *"$id.md"*"edited after filing"* ]] || note edited "got $rc -- $out"
85
85
  cp "$SANDBOX/keep.md" "$CH/$id.md"
86
86
 
87
87
  # --- a malformed body is refused naming the section, and nothing is filed ---
88
88
  n="$(find "$CH" -name '*.md' | wc -l)"
89
89
  out="$(printf '## need\nx\n\n## wanted\ny\n' | arm "$CH" --emit-peer-file peer-a)"; rc=$?
90
- [[ "$rc" -eq 2 && "$out" == *"## wanted"*"## repro"* ]] || note malformed "got $rc -- $out"
90
+ [[ "$rc" -eq 3 && "$out" == *"## wanted"*"## repro"* ]] || note malformed "got $rc -- $out"
91
91
  [[ "$(find "$CH" -name '*.md' | wc -l)" -eq "$n" ]] || note malformed-write "a malformed body was filed"
92
92
 
93
93
  # --- a tab is refused where peer-list prints it: the need line and a refused reason ---
94
94
  TAB=$'\t'
95
95
  out="$(printf '%s' "${BODY/the gate refuses a path/a tabbed${TAB}ask}" | arm "$CH" --emit-peer-file peer-a)"; rc=$?
96
- [[ "$rc" -eq 2 && "$out" == *"holds a tab"* ]] || note tab-need "got $rc -- $out"
96
+ [[ "$rc" -eq 3 && "$out" == *"holds a tab"* ]] || note tab-need "got $rc -- $out"
97
97
  [[ "$(find "$CH" -name '*.md' | wc -l)" -eq "$n" ]] || note tab-need-write "a tabbed need line was filed"
98
98
  out="$(arm "$CH" --emit-peer-reply "$id3" refused $'no\tthanks')"; rc=$?
99
99
  [[ "$rc" -eq 2 && "$out" == *"holds a tab"* ]] || note tab-reason "got $rc -- $out"
100
100
 
101
- # --- a multibyte character across the filing time's byte 10 is malformed at exit 2, never a panic ---
101
+ # --- a multibyte character across the filing time's byte 10 is malformed at exit 3, never a panic ---
102
102
  bad_id=r20261124-00000000
103
103
  printf '# peer-request v1\nid: %s\nfrom: peer-a\nfiled: 2026-11-2\xc3\xa910:20:30Z\n\n%s' "$bad_id" "$BODY" >"$CH/$bad_id.md"
104
104
  out="$(arm "$CH" --emit-peer-list)"; rc=$?
105
- [[ "$rc" -eq 2 && "$out" == *"$bad_id.md"*"not a UTC time"* ]] || note multibyte-filed "got $rc -- $out"
105
+ [[ "$rc" -eq 3 && "$out" == *"$bad_id.md"*"not a UTC time"* ]] || note multibyte-filed "got $rc -- $out"
106
106
  rm -f "$CH/$bad_id.md"
107
107
 
108
+ # --- a collision is exit 2 with the existing id alone on stdout, the streams captured apart ---
109
+ # Two filings straddling a second boundary are two requests, so the pair refiles until one lands in one second.
110
+ split() { # $1=channel value $2..=the arm flag and its argv; stdout to $SANDBOX/out, stderr to $SANDBOX/err
111
+ local ch="$1"; shift
112
+ ( cd "$FREE" && gate_env LIFECYCLE_KIT_PEER_CHANNEL="$ch" && gate_arm_run "$@" >"$SANDBOX/out" 2>"$SANDBOX/err" )
113
+ }
114
+ CC="$SANDBOX/collide"
115
+ landed=''
116
+ for _ in 1 2 3 4 5; do
117
+ rm -rf "$CC" && mkdir -p "$CC"
118
+ printf '%s' "$BODY" | split "$CC" --emit-peer-file peer-a
119
+ first="$(cat "$SANDBOX/out")"
120
+ printf '%s' "$BODY" | split "$CC" --emit-peer-file peer-a; rc=$?
121
+ if [[ "$rc" -ne 0 ]]; then landed=yes; break; fi
122
+ done
123
+ if [[ -z "$landed" ]]; then
124
+ note collision-pair "five refilings never landed in one second"
125
+ else
126
+ [[ "$rc" -eq 2 && "$(cat "$SANDBOX/out")" == "$first" && "$(wc -l <"$SANDBOX/out" | tr -d ' ')" -eq 1 ]] \
127
+ || note collision "want exit 2 and the id alone on stdout, got $rc -- $(cat "$SANDBOX/out")"
128
+ [[ "$(cat "$SANDBOX/err")" == *"$first"* ]] || note collision-err "stderr does not name the filed ask: $(cat "$SANDBOX/err")"
129
+ fi
130
+ printf '## need\nx\n' | split "$CC" --emit-peer-file peer-a; rc=$?
131
+ [[ "$rc" -eq 3 && ! -s "$SANDBOX/out" ]] || note quiet-malformed "a malformed body printed to stdout or did not exit 3 ($rc)"
132
+ printf '%s' "$BODY" | split "" --emit-peer-file peer-a; rc=$?
133
+ [[ "$rc" -eq 2 && ! -s "$SANDBOX/out" ]] || note quiet-unset "an unset channel printed to stdout or did not exit 2 ($rc)"
134
+ printf '%s' "$BODY" | split "$CC" --emit-peer-file Peer_A; rc=$?
135
+ [[ "$rc" -eq 2 && ! -s "$SANDBOX/out" ]] || note quiet-peer "a peer outside its grammar printed to stdout or did not exit 2 ($rc)"
136
+
108
137
  # --- a bad channel value is refused at exit 2 naming the knob ---
109
138
  mkdir -p "$SANDBOX/repo" && git -C "$SANDBOX/repo" init -q
110
139
  : >"$SANDBOX/a-file"
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the one-shot pre-flight valve end-to-end through a sandboxed enter-stage: an armed line admits the entry past a refusing LIFECYCLE_KIT_ENTRY_PREFLIGHT command and is rewritten to used; an arming for another stage, another iteration, or one already used admits nothing; both malformed ledger shapes are exit 2 with nothing written; a configured-but-absent path is not-armed rather than an error and the refusal names it; and --simulate reports the would-be admission leaving the ledger byte-identical.
2
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the one-shot pre-flight valve end-to-end through a sandboxed enter-stage: an armed line admits the entry past a refusing LIFECYCLE_KIT_ENTRY_PREFLIGHT command and is rewritten to used; an arming for another stage, another iteration, or one already used admits nothing; both malformed ledger shapes are exit 3 with nothing written; a configured-but-absent path is not-armed rather than an error and the refusal names it; and --simulate reports the would-be admission leaving the ledger byte-identical.
3
3
  set -uo pipefail
4
4
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
5
 
@@ -119,7 +119,7 @@ sh="$(seed short 'demo-iteration build armed
119
119
  ')"
120
120
  cp "$sh/.workflow/WORKFLOW-STATE.txt" "$sh/s.before"
121
121
  out="$(run_enter "$sh" build)"; rc=$?
122
- [[ "$rc" -eq 2 ]] || note short-rc "a reason-less line must be exit 2, got $rc -- $out"
122
+ [[ "$rc" -eq 3 ]] || note short-rc "a reason-less line must be exit 3, got $rc -- $out"
123
123
  grep -qF 'fewer than the four' <<<"$out" || note short-msg "the fail-closed refusal did not name the shape: $out"
124
124
  cmp -s "$sh/s.before" "$sh/.workflow/WORKFLOW-STATE.txt" || note short-write "a fail-closed refusal wrote the state file"
125
125
 
@@ -127,7 +127,7 @@ cmp -s "$sh/s.before" "$sh/.workflow/WORKFLOW-STATE.txt" || note short-write "a
127
127
  bt="$(seed bad-token 'demo-iteration build pending a token no reader knows
128
128
  ')"
129
129
  out="$(run_enter "$bt" build)"; rc=$?
130
- [[ "$rc" -eq 2 ]] || note token-rc "an unknown state token must be exit 2, got $rc -- $out"
130
+ [[ "$rc" -eq 3 ]] || note token-rc "an unknown state token must be exit 3, got $rc -- $out"
131
131
  grep -qF 'neither armed nor used' <<<"$out" || note token-msg "the fail-closed refusal did not name the token: $out"
132
132
 
133
133
  # --- a configured path that does not exist is NOT ARMED, not an error, and the refusal names it ---
@@ -166,5 +166,5 @@ cmp -s "$sm/v.before" "$sm/.workflow/preflight-valve.txt" || note sim-ledger "--
166
166
  cmp -s "$sm/s.before" "$sm/.workflow/WORKFLOW-STATE.txt" || note sim-state "--simulate wrote the state file"
167
167
 
168
168
  [[ "$fails" -eq 0 ]] || { echo "preflight-valve.test: $fails assertion(s) failed"; exit 1; }
169
- echo "preflight-valve.test: clean (armed admits once and flips to used with the prior-use count printed; another stage, another iteration and a spent line admit nothing; both malformed shapes exit 2 writing nothing; an absent path refuses and is named; --simulate relays the would-be admission and writes nothing)"
169
+ echo "preflight-valve.test: clean (armed admits once and flips to used with the prior-use count printed; another stage, another iteration and a spent line admit nothing; both malformed shapes exit 3 writing nothing; an absent path refuses and is named; --simulate relays the would-be admission and writes nothing)"
170
170
  exit 0
@@ -2,7 +2,7 @@ The `consult` skill — a session that reconsiders a ruling with the operator or
2
2
 
3
3
  The write authority this skill leans on is **not** the skill's to grant: it belongs to the ruling record itself, which states who may record a ruling there and under what condition. What this skill adds on top of that authority is **obligation**. Any session that closes a ruling with the operator is permitted to record it; a consultation has not finished until it has.
4
4
 
5
- **First step — verify your tier.** A consultation runs on the class `--emit knob-values LIFECYCLE_KIT_CONSULT_CLASS` names. Run `--model-verdict --expect <that class>` on the gate binary `GATE_SDK_NATIVE_BIN` names (delegation-kit/SPEC.md §model-verdict; without delegation-kit, skip this). On exit 1, stop before reading in. Say that this session is below its floor, quoting the verdict line, so it is restarted on that class: to the operator, or, dispatched, to the lead in one escalation block. On exit 2 the tier is unverified and not refused: state the verdict line in your first message and proceed.
5
+ **First step — verify your tier.** A consultation runs on the class `--emit knob-values LIFECYCLE_KIT_CONSULT_CLASS` names. Run `--model-verdict --expect <that class>` on the gate binary `GATE_SDK_NATIVE_BIN` names (delegation-kit/SPEC.md §model-verdict; without delegation-kit, skip this). On exit 1, stop before reading in. Say that this session is below its floor, quoting the verdict line, so it is restarted on that class: to the operator, or, dispatched, to the lead in one escalation block. On exit 2 or 3 the tier is unverified and not refused: state the verdict line in your first message and proceed.
6
6
 
7
7
  ## Session ritual
8
8
 
@@ -14,7 +14,7 @@ The `scope` stage of an iteration — the exploratory half of design. Identify a
14
14
 
15
15
  **Read each promoted entry's `[observed-by: <producer>]` and take one of two branches.** The tag says the entry's completion predicate is an observation of a remote run rather than a tree state (queue-kit/SPEC.md §The tag algebra), and this stage is the `<producer>` field's only reader. If a **mid-iteration push** produces that run, the push-placement rule governs (lifecycle-kit/SPEC.md §The state machine), the observation arrives in time to be drained, and the push counts toward the set's push need (below). If **only a release run** produces it, the placement is unsatisfiable — a release run is tag-triggered, so no mid-iteration push can fire it — and the entry **splits here**: promote the produce half now and file the observe half deferred, carrying the producer name, so the next iteration's first act is reading a run that already exists. Split at promotion rather than later because this is the one moment the unit set is bounded and the one session that may write the queue.
16
16
 
17
- **An entry whose remaining work runs at the drain stage or later is never promoted untagged**, since that stage's entry refuses it (lifecycle-kit/SPEC.md §check-stage-entry, assertion B). Tag it `[drain-exempt: <reason>]` where the drain stage moves it; otherwise keep it deferred and land the obligation in the set record.
17
+ **An entry whose remaining work runs at the drain stage or later is never promoted untagged**, since that stage's entry refuses it (lifecycle-kit/SPEC.md §check-stage-entry, assertion B). Tag it `[drain-exempt: <reason>]` only where the drain stage itself moves it; work of a later stage, a release cut or a notice at close, keeps it deferred with the obligation in the set record.
18
18
 
19
19
  **A standing directive is a theme, not a unit list.** A directive received from a lead or operator at iteration open bounds this survey — it names the theme, never the units. The intake sweep and the premise re-verification run regardless, and the proposed unit set is escalated for ruling before promotion: to the lead under the split posture, to the user directly under none — the stage's ordinary stop. The destination changes; the proposal step does not.
20
20
 
@@ -65,7 +65,7 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
65
65
  "$gates" --emit queue-migrate --write TASK-QUEUE.md # once, on upgrade: bullet entries become ### headings with a tag line
66
66
  ```
67
67
 
68
- Each `--queue` verb runs the gates coupled to the queue file after it writes, and never stages or commits: exit 0 is written and green, 1 is written with a red to fix before you commit, 2 is nothing written.
68
+ Each `--queue` verb runs the gates coupled to the queue file after it writes, and never stages or commits: exit 0 is written and green, 1 is written and not green, to fix before you commit, 2 is nothing written.
69
69
 
70
70
  The roadmap projection is opt-in: it emits nothing until you set the horizon and track vocabularies and a projection page in your config (step 3 above), so an unconfigured consumer gets a clean skip rather than a kit-shaped roadmap.
71
71
 
@@ -97,7 +97,7 @@ printf '%s\n' "$queue" >"$sb/TASK-QUEUE.md"
97
97
  printf '# page\n\nThe pending `old-task` work.\n' >"$sb/docs/page.md"
98
98
  mv "$sb/.git" "$sb/.git-saved"
99
99
  printf 'gitdir: %s/absent\n' "$sb" >"$sb/.git"
100
- expect refused-repository-exits-2 cite.knobs 2 "marks a repository"
100
+ expect refused-repository-exits-3 cite.knobs 3 "marks a repository"
101
101
  rm "$sb/.git"
102
102
  mv "$sb/.git-saved" "$sb/.git"
103
103
 
@@ -105,5 +105,5 @@ if [[ "$fails" -gt 0 ]]; then
105
105
  echo "check-queue-slug-liveness.test.sh: $fails case(s) failed"
106
106
  exit 1
107
107
  fi
108
- echo "check-queue-slug-liveness.test.sh: clean (retired set from the scratch repo's own history: the empty knob skips, a retired citation reds, a live name and a reasoned valve clear, a reasonless valve reds, a stale status reds and accurate ones clear, a refused repository exits 2, 8 cases)"
108
+ echo "check-queue-slug-liveness.test.sh: clean (retired set from the scratch repo's own history: the empty knob skips, a retired citation reds, a live name and a reasoned valve clear, a reasonless valve reds, a stale status reds and accurate ones clear, a refused repository exits 3, 8 cases)"
109
109
  exit 0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: queue-kit/SPEC.md §check-task-conservation — the repository answer no case dir can carry: outside a repository there is no HEAD baseline and the gate is clean, while a repository git refuses, a nested one git skips included, exits 2 rather than reading as none.
2
+ # spec: queue-kit/SPEC.md §check-task-conservation — the repository answer no case dir can carry: outside a repository there is no HEAD baseline and the gate is clean, while a repository git refuses, a nested one git skips included, exits 3 rather than reading as none.
3
3
  #
4
4
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
5
5
  set -uo pipefail
@@ -23,16 +23,16 @@ expect no-repository-clean "$SANDBOX/none" 0 "no git repository"
23
23
 
24
24
  mkdir -p "$SANDBOX/refused"
25
25
  printf 'gitdir: %s/absent\n' "$SANDBOX/refused" >"$SANDBOX/refused/.git"
26
- expect refused-repository-exits-2 "$SANDBOX/refused" 2 "marks a repository"
26
+ expect refused-repository-exits-3 "$SANDBOX/refused" 3 "marks a repository"
27
27
 
28
28
  git init -q "$SANDBOX/outer"
29
29
  mkdir -p "$SANDBOX/outer/inner/.git"
30
30
  printf 'garbage\n' >"$SANDBOX/outer/inner/.git/HEAD"
31
- expect nested-skipped-exits-2 "$SANDBOX/outer/inner" 2 "marks a repository beneath it"
31
+ expect nested-skipped-exits-3 "$SANDBOX/outer/inner" 3 "marks a repository beneath it"
32
32
 
33
33
  if [[ "$fails" -gt 0 ]]; then
34
34
  echo "check-task-conservation.test.sh: $fails case(s) failed"
35
35
  exit 1
36
36
  fi
37
- echo "check-task-conservation.test.sh: clean (no repository clean, a refused and a nested skipped repository exit 2, 3 cases)"
37
+ echo "check-task-conservation.test.sh: clean (no repository clean, a refused and a nested skipped repository exit 3, 3 cases)"
38
38
  exit 0
@@ -43,14 +43,14 @@ run_case() {
43
43
 
44
44
  printf '%s\n' 'SITE_KIT_LIQUID_PARSER[] = bash' 'SITE_KIT_LIQUID_PARSER[] = -c' \
45
45
  "SITE_KIT_LIQUID_PARSER[] = tr -cd '\\000'" > "$tmp/blind.knobs"
46
- run_case "a parser answering every document with an empty verdict" "$tmp/blind.knobs" 2 "failed its probe"
46
+ run_case "a parser answering every document with an empty verdict" "$tmp/blind.knobs" 3 "failed its probe"
47
47
 
48
48
  printf '%s\n' 'SITE_KIT_LIQUID_PARSER[] = bash' 'SITE_KIT_LIQUID_PARSER[] = -c' \
49
49
  'SITE_KIT_LIQUID_PARSER[] = cat >/dev/null; printf "\000err\000"' > "$tmp/short.knobs"
50
- run_case "a parser passing the probe and then returning a short count" "$tmp/short.knobs" 2 "verdict(s) for 3 document(s)"
50
+ run_case "a parser passing the probe and then returning a short count" "$tmp/short.knobs" 3 "verdict(s) for 3 document(s)"
51
51
 
52
52
  printf '%s\n' 'SITE_KIT_LIQUID_PARSER[] = site-kit-no-such-liquid-parser' > "$tmp/unresolvable.knobs"
53
- run_case "an unresolvable parser command" "$tmp/unresolvable.knobs" 2 "failed its probe"
53
+ run_case "an unresolvable parser command" "$tmp/unresolvable.knobs" 3 "failed its probe"
54
54
 
55
55
  run_case "an error below a front-matter block" "" 1 "docs/late.md: Liquid syntax error (line 8):"
56
56
 
@@ -58,5 +58,5 @@ if [[ "$fails" -gt 0 ]]; then
58
58
  echo "check-docs-liquid-parse-parser.test: $fails assertion(s) failed"
59
59
  exit 1
60
60
  fi
61
- echo "check-docs-liquid-parse-parser.test: ok (a blind parser, a short count and an unresolvable command each exit 2; an error below front matter reports the file's own line)"
61
+ echo "check-docs-liquid-parse-parser.test: ok (a blind parser, a short count and an unresolvable command each exit 3; an error below front matter reports the file's own line)"
62
62
  exit 0
@@ -4,7 +4,7 @@
4
4
  # The pair sets no renderer knob, so the kit's batch default fills and the pair
5
5
  # already runs the batch path — what it leaves untested is everything that needs
6
6
  # a second configuration: the kit's two defaults agreeing, the per-document
7
- # fallback, and the two exit-2 refusals. The fill condition itself is a unit test
7
+ # fallback, and the two exit-3 refusals. The fill condition itself is a unit test
8
8
  # on the crate's site-kit knob table (site-kit/SPEC.md §Knob defaults).
9
9
  #
10
10
  # Five assertions:
@@ -14,8 +14,8 @@
14
14
  # 2/3. verdicts — the batch path and the per-document fallback return the SAME
15
15
  # verdict on the same pages, so the speedup changed no finding.
16
16
  # 4. count — a batch renderer that passes the probe but returns the wrong
17
- # document count exits 2 (fail-closed), never 1.
18
- # 5. probe — an unresolvable batch command exits 2 rather than silently
17
+ # document count exits 3 (fail-closed), never 1.
18
+ # 5. probe — an unresolvable batch command exits 3 rather than silently
19
19
  # falling back to a different parser.
20
20
  # The gate enumerates tracked pages via git ls-files, so the fixture is a
21
21
  # throwaway git repo.
@@ -118,7 +118,7 @@ for mode in batch per-document; do
118
118
  || { echo " FAIL: $mode path: faithful page expected exit 0, got $rc: $out"; fails=$((fails + 1)); }
119
119
  done
120
120
 
121
- # --- 4. count mismatch is fail-closed (exit 2), not a finding -----------------
121
+ # --- 4. count mismatch is fail-closed (exit 3), not a finding -----------------
122
122
  # The stub emits exactly two documents whatever it is fed, so it PASSES the
123
123
  # two-document probe and only the corpus count catches it — which is the point:
124
124
  # a stub the probe already rejected would never reach the count assertion.
@@ -128,8 +128,8 @@ printf '%s\n' 'SITE_KIT_RENDERER_BATCH[] = bash' 'SITE_KIT_RENDERER_BATCH[] = -c
128
128
  git -C "$tmp" add docs/p1.md docs/p2.md docs/p3.md
129
129
  out="$( cd "$tmp" && gate_env SITE_KIT_KNOB_FILE="$tmp/miscount.knobs" \
130
130
  && gate_run check-docs-render-fidelity "$CHECKS" docs 2>&1 )"; rc=$?
131
- [[ "$rc" -eq 2 ]] \
132
- || { echo " FAIL: batch count mismatch expected exit 2 (fail-closed), got $rc: $out"; fails=$((fails + 1)); }
131
+ [[ "$rc" -eq 3 ]] \
132
+ || { echo " FAIL: batch count mismatch expected exit 3 (fail-closed), got $rc: $out"; fails=$((fails + 1)); }
133
133
  grep -qF -- "document(s) for" <<<"$out" \
134
134
  || { echo " FAIL: count-mismatch refusal does not name the counts: $out"; fails=$((fails + 1)); }
135
135
 
@@ -138,8 +138,8 @@ printf '%s\n' 'SITE_KIT_RENDERER_BATCH[] = site-kit-no-such-batch-renderer' > "$
138
138
 
139
139
  out="$( cd "$tmp" && gate_env SITE_KIT_KNOB_FILE="$tmp/unresolvable.knobs" \
140
140
  && gate_run check-docs-render-fidelity "$CHECKS" docs 2>&1 )"; rc=$?
141
- [[ "$rc" -eq 2 ]] \
142
- || { echo " FAIL: unresolvable batch renderer expected exit 2, got $rc: $out"; fails=$((fails + 1)); }
141
+ [[ "$rc" -eq 3 ]] \
142
+ || { echo " FAIL: unresolvable batch renderer expected exit 3, got $rc: $out"; fails=$((fails + 1)); }
143
143
  grep -qF -- "failed its probe" <<<"$out" \
144
144
  || { echo " FAIL: batch probe refusal does not name the probe: $out"; fails=$((fails + 1)); }
145
145
  grep -qF -- "DOCS-RENDER-FIDELITY: clean" <<<"$out" \
@@ -149,5 +149,5 @@ if [[ "$fails" -gt 0 ]]; then
149
149
  echo "check-docs-render-fidelity-batch.test: $fails assertion(s) failed"
150
150
  exit 1
151
151
  fi
152
- echo "check-docs-render-fidelity-batch.test: ok (defaults agree byte-for-byte; both paths agree on verdicts; count mismatch and probe failure both exit 2)"
152
+ echo "check-docs-render-fidelity-batch.test: ok (defaults agree byte-for-byte; both paths agree on verdicts; count mismatch and probe failure both exit 3)"
153
153
  exit 0