checkwright 0.26.0 → 0.27.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 (79) hide show
  1. package/README.md +7 -7
  2. package/bin/checkwright.ps1 +59 -40
  3. package/bin/checkwright.sh +53 -53
  4. package/package.json +3 -3
  5. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  6. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  7. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  8. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  9. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  11. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  12. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
  13. package/payload/artifact/targets.list +29 -16
  14. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  16. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  17. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  18. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  19. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  20. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  21. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
  22. package/payload/canon-kit/README.md +3 -1
  23. package/payload/canon-kit/checks/check-citation-link.gate +4 -0
  24. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  25. package/payload/canon-kit/checks/check-deprecation-task.gate +1 -1
  26. package/payload/canon-kit/checks/check-docs-page-repeat.gate +4 -0
  27. package/payload/canon-kit/checks/check-spec-pointer.gate +1 -1
  28. package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
  29. package/payload/canon-kit/gate-tests/check-citation-link/bad/expect.txt +6 -0
  30. package/payload/canon-kit/gate-tests/check-citation-link/bad/scripts/canon-config.knobs +2 -0
  31. package/payload/canon-kit/gate-tests/check-citation-link/bad/site/page.md +13 -0
  32. package/payload/canon-kit/gate-tests/check-citation-link/good/expect.txt +1 -0
  33. package/payload/canon-kit/gate-tests/check-citation-link/good/scripts/canon-config.knobs +2 -0
  34. package/payload/canon-kit/gate-tests/check-citation-link/good/site/page.md +28 -0
  35. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.github/workflows/ci.yml +15 -0
  36. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +2 -0
  37. package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +2 -0
  38. package/payload/canon-kit/gate-tests/check-comment-tier/good/.github/workflows/ci.yml +23 -0
  39. package/payload/canon-kit/gate-tests/check-comment-tier/good/config.yml +2 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  41. package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +2 -0
  42. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/expect.txt +2 -0
  43. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/scripts/canon-config.knobs +2 -0
  44. package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/page.md +8 -0
  45. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/expect.txt +1 -0
  46. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/scripts/canon-config.knobs +2 -0
  47. package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/page.md +24 -0
  48. package/payload/context-kit/README.md +2 -2
  49. package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +2 -0
  50. package/payload/context-kit/templates/session-context.sh +1 -1
  51. package/payload/delegation-kit/README.md +6 -6
  52. package/payload/doctrine-kit/README.md +1 -1
  53. package/payload/drift-kit/README.md +9 -9
  54. package/payload/evidence-kit/README.md +8 -4
  55. package/payload/gate-sdk/README.md +4 -4
  56. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +2 -2
  57. package/payload/gate-sdk/templates/gates-workflow.yml +6 -35
  58. package/payload/guard-kit/README.md +4 -4
  59. package/payload/guard-kit/gate-tests/scratch-run.test.sh +3 -2
  60. package/payload/lifecycle-kit/README.md +10 -8
  61. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +6 -4
  62. package/payload/lifecycle-kit/gate-tests/capture-linked-worktree.test.sh +53 -0
  63. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +23 -20
  64. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +1 -0
  65. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +11 -4
  66. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
  67. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +11 -4
  68. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +25 -17
  69. package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +13 -2
  70. package/payload/lifecycle-kit/templates/lead.md +6 -2
  71. package/payload/queue-kit/README.md +2 -2
  72. package/payload/site-kit/README.md +5 -2
  73. package/payload/site-kit/checks/check-docs-collapsible.gate +3 -0
  74. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/docs/regions.md +23 -0
  75. package/payload/site-kit/gate-tests/check-docs-collapsible/bad/expect.txt +4 -0
  76. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/plain.md +3 -0
  77. package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/regions.md +26 -0
  78. package/payload/site-kit/gate-tests/check-docs-collapsible/good/expect.txt +1 -0
  79. package/payload/site-kit/templates/site-health.yml +10 -101
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe end-to-end through a sandboxed enter-stage: the iteration-boundary entry deletes the scratch dir's members, keeps the .gitkeep and lead-journal kit invariants and every LIFECYCLE_KIT_BOUNDARY_PRESERVE name at the scratch root only (a spared directory whole, a nested keep-name deleted with its ancestors), names the wiped set by immediate child rather than by the nested paths deleted to remove it, names each non-root keep-list entry in its report, raises the undisposed-journal advisory without blocking for every prior segment while exempting the live lead's, and a non-boundary entry wipes no scratch at all
2
+ # spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe end-to-end through a sandboxed enter-stage: the iteration-boundary entry deletes the scratch dir's members, keeps the .gitkeep, self-ignore .gitignore and lead-journal kit invariants and every LIFECYCLE_KIT_BOUNDARY_PRESERVE name at the scratch root only (a spared directory whole, a nested keep-name deleted with its ancestors), names the wiped set by immediate child rather than by the nested paths deleted to remove it, names each non-root keep-list entry in its report, raises the undisposed-journal advisory without blocking for every prior segment while exempting the live lead's, and a non-boundary entry wipes no scratch at all
3
3
  set -uo pipefail
4
4
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
5
 
@@ -74,7 +74,8 @@ out="$(run_enter "$bnd" scope)"; rc=$?
74
74
  [[ "$rc" -eq 0 ]] || note boundary-entry "want exit 0, got $rc -- $out"
75
75
 
76
76
  [[ -f "$bnd/scratch/.gitkeep" ]] || note keep-invariant ".gitkeep was deleted (kit invariant)"
77
- [[ -f "$bnd/scratch/keep-me" ]] || note keep-listed "the PRESERVE member was deleted"
77
+ [[ "$(cat "$bnd/scratch/.gitignore" 2>/dev/null)" == "*" ]] || note self-ignore "the scratch dir's self-ignore was not written or was wiped (kit invariant)"
78
+ [[ -f "$bnd/scratch/keep-me" ]] || note keep-listed "the PRESERVE member was deleted"
78
79
  [[ -e "$bnd/scratch/mixed-sub" ]] && note wipe-nested-name "a keep-list basename below the scratch root was spared"
79
80
  [[ -e "$bnd/scratch/x" ]] && note wipe-nested-gitkeep "a nested .gitkeep kept its ancestors alive"
80
81
  [[ -f "$bnd/scratch/kept-dir/deep/file" ]] || note keep-dir-whole "a spared root directory was descended and emptied"
@@ -105,8 +106,9 @@ seed "$non"
105
106
  before="$(find "$non/scratch" | sort)"
106
107
  out="$(run_enter "$non" build)"; rc=$?
107
108
  [[ "$rc" -eq 0 ]] || note nonboundary-entry "want exit 0, got $rc -- $out"
108
- after="$(find "$non/scratch" | sort)"
109
- [[ "$before" == "$after" ]] || note nonboundary-scratch "a non-boundary entry changed the scratch dir"
109
+ after="$(find "$non/scratch" ! -path "$non/scratch/.gitignore" | sort)"
110
+ [[ "$before" == "$after" ]] || note nonboundary-scratch "a non-boundary entry changed the scratch dir beyond its self-ignore"
111
+ [[ -f "$non/scratch/.gitignore" ]] || note nonboundary-self-ignore "a stamping entry left the scratch dir without its self-ignore"
110
112
  grep -qF 'boundary-wiped' <<<"$out" && note nonboundary-report "a non-boundary entry reported a wipe: $out"
111
113
 
112
114
  # --- an unset keep-list still spares the invariant ---
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env bash
2
+ # spec: lifecycle-kit/SPEC.md §The committed gap inbox — the two tracked capture arms run from a real linked worktree of a sandbox repository: each refuses at exit 2 with the hand-back steer and leaves the record absent in both the worktree and the main checkout, and each files from the main checkout. The refusal's text is pinned in native/src/emit/file_survey.rs's own #[cfg(test)] tests; the crate may not add a linked worktree itself, so the real one lives here.
3
+ set -uo pipefail
4
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
+
6
+ SANDBOX="$(mktemp -d)"
7
+ trap 'rm -rf "$SANDBOX"' EXIT
8
+
9
+ fails=0
10
+ note() { echo " FAIL [$1]: $2"; fails=$((fails + 1)); }
11
+
12
+ main="$SANDBOX/main"
13
+ mkdir -p "$main"
14
+ printf 'seed\n' >"$main/seed.txt"
15
+ git -C "$main" init -q
16
+ git -C "$main" add -A
17
+ git -C "$main" -c user.email=t@t.invalid -c user.name=t -c commit.gpgsign=false commit -qm seed
18
+ wt="$SANDBOX/wt"
19
+ git -C "$main" worktree add -q -b agent-branch "$wt" HEAD
20
+
21
+ run_in() { # $1=dir $2.. = arm argv -> stdout+stderr, exit code preserved
22
+ ( cd "$1" && gate_arm_run "${@:2}" 2>&1 )
23
+ }
24
+
25
+ # --- from the linked worktree: both arms refuse, steer the hand-back, and write nowhere ---
26
+ for arm in gap survey; do
27
+ if [[ "$arm" == gap ]]; then
28
+ out="$(run_in "$wt" --emit-file-gap "a gap an isolated child found")"; rc=$?
29
+ rec=".workflow/gap-inbox.md"
30
+ else
31
+ out="$(run_in "$wt" --emit-file-survey "q" "seed.txt" "o" "none" "f")"; rc=$?
32
+ rec=".workflow/survey-record.md"
33
+ fi
34
+ [[ "$rc" -eq 2 ]] || note "$arm-status" "want exit 2 from a linked worktree, got $rc -- $out"
35
+ grep -qF "linked worktree of" <<<"$out" || note "$arm-names-main" "the refusal does not name the main checkout: $out"
36
+ grep -qF "hands the finding back to its dispatcher" <<<"$out" || note "$arm-steer" "no hand-back steer: $out"
37
+ [[ -e "$wt/$rec" ]] && note "$arm-wt-write" "the arm wrote $rec in the worktree on a refusal"
38
+ [[ -e "$main/$rec" ]] && note "$arm-main-write" "the arm routed $rec into the main checkout"
39
+ done
40
+
41
+ # --- from the main checkout: both arms file as before ---
42
+ out="$(run_in "$main" --emit-file-gap "a gap the dispatcher files")"; rc=$?
43
+ [[ "$rc" -eq 0 ]] || note gap-main "want exit 0 from the main checkout, got $rc -- $out"
44
+ grep -qF -- "— a gap the dispatcher files" "$main/.workflow/gap-inbox.md" 2>/dev/null \
45
+ || note gap-main-append "the main checkout's inbox lacks the bullet"
46
+ out="$(run_in "$main" --emit-file-survey "does the main checkout file" "seed.txt" "o" "none" "f")"; rc=$?
47
+ [[ "$rc" -eq 0 ]] || note survey-main "want exit 0 from the main checkout, got $rc -- $out"
48
+ grep -qF -- "— does the main checkout file" "$main/.workflow/survey-record.md" 2>/dev/null \
49
+ || note survey-main-append "the main checkout's record lacks the block"
50
+
51
+ [[ "$fails" -eq 0 ]] || { echo "capture-linked-worktree.test: $fails assertion(s) failed"; exit 1; }
52
+ echo "capture-linked-worktree.test: clean (file-gap and file-survey refuse in a linked worktree with the hand-back steer and write the record in neither checkout, and both file from the main checkout)"
53
+ exit 0
@@ -2,25 +2,8 @@
2
2
  # Behavioral test of check-stage-entry assertions B, C, D and E — the
3
3
  # scenarios the one-pair good/bad harness cannot hold. The good/bad fixture
4
4
  # pair (--run-gate-tests) covers assertion A (prerequisite-stamp ordering: a
5
- # close cursor with no validate stamp); the harness admits only one
6
- # bad/ dir, so assertion B drives untagged residue at drain entry (exit 1),
7
- # [drain-exempt:] residue at drain entry (exit 0, reason echoed), an
8
- # empty-reason tag (exit 1), tagged residue at the drain successor's
9
- # entry (exit 1 — the no-exemption backstop), and [observed-by:] residue at
10
- # drain entry (exit 1, named separately and citing its own remedy);
11
- # assertion C drives four
12
- # cross-component build-entry scenarios (2-dir amendments ±waiver,
13
- # single-amendment cross-component body, single-component amendment) and
14
- # pins its help's respell-is-not-a-remedy line;
15
- # assertion D drives five build-entry marker scenarios (not-run red,
16
- # reasoned cannot-run clean with its count, a fenced, backticked mid-line and
17
- # templates/-stub mention all clean, a marker on an active queue entry red,
18
- # the same marker on a deferred entry clean) and pins its help's
19
- # keep-the-honest-limit line; assertion E drives five
20
- # marker-grammar scenarios, four at an align cursor (empty-reason red,
21
- # command-less not-run red, a bare mid-line and a line-split spelling each red
22
- # as misplaced, a well-formed not-run marker clean because residue is not
23
- # yet due) and one at build entry (a malformed marker reported once, as E).
5
+ # close cursor with no validate stamp), and the harness admits only one bad/
6
+ # dir. Each scenario's label below is its roster entry.
24
7
  #
25
8
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
26
9
  set -uo pipefail
@@ -296,6 +279,26 @@ demo-iteration build bbbbbbbb 2026-06-02 none
296
279
  EOF
297
280
  check_case "C5 templates-stub-not-counted" "$c5" 0 "STAGE-ENTRY: clean"
298
281
 
282
+ # C6 (bad): an amendment glob carrying `/` matches by path — two in-flight deltas
283
+ # under one change, in two directories, are two components.
284
+ c6="$SANDBOX/c6"
285
+ build_queue "$c6"
286
+ mkdir -p "$c6/.workflow" "$c6/changes/c1/specs/alpha" "$c6/changes/c1/specs/beta"
287
+ : >"$c6/changes/c1/specs/alpha/delta.md"; : >"$c6/changes/c1/specs/beta/delta.md"
288
+ cp "$c5/.workflow/WORKFLOW-STATE.txt" "$c6/.workflow/"
289
+ export LIFECYCLE_KIT_AMENDMENT_GLOB='changes/*/specs/*/delta.md'
290
+ check_case "C6 path-glob-two-dirs" "$c6" 1 "changes/c1/specs/alpha changes/c1/specs/beta"
291
+
292
+ # C7 (good): the same glob does not reach a delta one level deeper, so an
293
+ # archived delta beside one in-flight delta is no second component.
294
+ c7="$SANDBOX/c7"
295
+ build_queue "$c7"
296
+ mkdir -p "$c7/.workflow" "$c7/changes/c1/specs/alpha" "$c7/changes/archive/c0/specs/beta"
297
+ : >"$c7/changes/c1/specs/alpha/delta.md"; : >"$c7/changes/archive/c0/specs/beta/delta.md"
298
+ cp "$c5/.workflow/WORKFLOW-STATE.txt" "$c7/.workflow/"
299
+ check_case "C7 path-glob-archived-not-counted" "$c7" 0 "STAGE-ENTRY: clean"
300
+ unset LIFECYCLE_KIT_AMENDMENT_GLOB
301
+
299
302
  # --- assertion D: a build entry refuses an amendment still carrying an unrun inferred-claim marker ---
300
303
 
301
304
  d_sandbox() { # $1=dir $2=amendment body — a single-component amendment at build entry
@@ -393,5 +396,5 @@ if [[ "$fails" -gt 0 ]]; then
393
396
  echo "check-stage-entry.test.sh: $fails case(s) failed"
394
397
  exit 1
395
398
  fi
396
- echo "check-stage-entry.test.sh: clean (assertion B queue-empty + drain-exempt model + observed-by refusal branch + assertion C cross-component align/waiver + templates-stub exclusion + assertion D inferred-claim residue over amendments and active queue entries + assertion E marker grammar at every cursor, 20 scenarios)"
399
+ echo "check-stage-entry.test.sh: clean (assertion B queue-empty + drain-exempt model + observed-by refusal branch + assertion C cross-component align/waiver + templates-stub exclusion + path-shaped amendment glob + assertion D inferred-claim residue over amendments and active queue entries + assertion E marker grammar at every cursor, 22 scenarios)"
397
400
  exit 0
@@ -4,4 +4,5 @@ expected the '- oracle:' line here, found '- rev:'
4
4
  valve carries no reason
5
5
  empty inferred
6
6
  block is missing its '- inferred:' line
7
+ corpus word (all carries a character the shell or git would read
7
8
  help:
@@ -1,14 +1,14 @@
1
1
  # contract: lifecycle-kit/SPEC.md §The survey record — carried surveys, one block per survey; boundary-truncated, cited only behind a passing witness.
2
2
 
3
3
  ## 2026-01-02 scope — which registered gates meet every port criterion?
4
- - corpus: scripts/gates.list */checks/
4
+ - corpus: scripts/gates.list '*/checks/'
5
5
  - oracle: bash gate-sdk/bin/run-gates.sh check-gate-substrate-parity
6
6
  - rev: 0123456
7
7
  - finding: four gates meet all six criteria; the remaining eleven fail the pure-function criterion.
8
8
  - inferred: none
9
9
 
10
10
  ## 2026-01-03 align — which specs still cite the retired section?
11
- - corpus: */SPEC.md
11
+ - corpus: '*/SPEC.md'
12
12
  - oracle:
13
13
  - rev: 89abcdef0123456789abcdef0123456789abcdef
14
14
  - finding: two specs still cite it.
@@ -22,10 +22,10 @@
22
22
 
23
23
  ## 2026-01-05 build — which commit did the ported cohort land on?
24
24
  <!-- survey-token-exempt: -->
25
- - corpus: native/src/gates/ as of deadbeef1
25
+ - corpus: native/src/gates/
26
26
  - oracle: bash gate-sdk/bin/run-gate-tests.sh
27
27
  - rev: 2222222222222222222222222222222222222222
28
- - finding: one commit carried the whole cohort.
28
+ - finding: one commit, deadbeef1, carried the whole cohort.
29
29
  - inferred: none
30
30
 
31
31
  ## 2026-01-06 scope — which deferred entries does the queue converge on?
@@ -40,3 +40,10 @@
40
40
  - oracle: bash queue-kit/bin/queue-edges.sh
41
41
  - rev: 5555555555555555555555555555555555555555
42
42
  - finding: two entries, both promoted.
43
+
44
+ ## 2026-01-08 spec — which sections does the brevity pass still owe?
45
+ - corpus: TASK-QUEUE.md (all sections)
46
+ - oracle: bash queue-kit/bin/queue-edges.sh
47
+ - rev: 6666666666666666666666666666666666666666
48
+ - finding: four sections.
49
+ - inferred: none
@@ -1 +1 @@
1
- SURVEY-RECORD: clean (3 block(s)
1
+ SURVEY-RECORD: clean (4 block(s)
@@ -1,14 +1,14 @@
1
1
  # contract: lifecycle-kit/SPEC.md §The survey record — carried surveys, one block per survey; boundary-truncated, cited only behind a passing witness.
2
2
 
3
3
  ## 2026-01-02 scope — which registered gates meet every port criterion?
4
- - corpus: scripts/gates.list */checks/
4
+ - corpus: scripts/gates.list '*/checks/'
5
5
  - oracle: bash gate-sdk/bin/run-gates.sh check-gate-substrate-parity
6
6
  - rev: 0123456789abcdef0123456789abcdef01234567
7
7
  - finding: four gates meet all six criteria; the remaining eleven fail the pure-function criterion.
8
8
  - inferred: none
9
9
 
10
10
  ## 2026-01-03 spec — does any kit README still name the retired knob?
11
- - corpus: */README.md
11
+ - corpus: '*/README.md'
12
12
  - oracle: none
13
13
  - rev: 89abcdef0123456789abcdef0123456789abcdef
14
14
  - finding: a reading of prose, so this block is a note — re-derive before relying on it.
@@ -16,8 +16,15 @@
16
16
 
17
17
  ## 2026-01-04 build — which commit did the ported cohort land on?
18
18
  <!-- survey-token-exempt: the shas below are illustrative, and name no object in a tree this fixture is copied into -->
19
- - corpus: native/src/gates/ as of deadbeef1
19
+ - corpus: native/src/gates/
20
20
  - oracle: bash gate-sdk/bin/run-gate-tests.sh
21
21
  - rev: 2222222222222222222222222222222222222222
22
- - finding: one commit, c0ffee12, carried the whole cohort.
22
+ - finding: one commit, c0ffee12, carried the whole cohort, as of deadbeef1.
23
+ - inferred: none
24
+
25
+ ## 2026-01-05 validate — did the remote run finish green on every triple?
26
+ - corpus: none
27
+ - oracle: gh run view 1 --json conclusion
28
+ - rev: 3333333333333333333333333333333333333333
29
+ - finding: the run finished green.
23
30
  - inferred: none
@@ -6,9 +6,10 @@
6
6
  # other half: the bare (configured-record) mode in a real sandbox repo, where the
7
7
  # rev-existence probe runs — a rev naming a real commit passes, a well-formed
8
8
  # 40-hex rev naming nothing is the wrong-rev finding the shape check cannot make
9
- # — plus the widened arm over git-object-shaped tokens in the OTHER four fields,
10
- # which the hermetic pair cannot reach for the same reason, and its valve; plus
11
- # the two inert shapes (no record at all, a header-only record).
9
+ # — plus the corpus-match probe (a pathspec matching a path at rev, and one
10
+ # matching none), the widened arm over git-object-shaped tokens in the OTHER four
11
+ # fields, which the hermetic pair cannot reach for the same reason, and its valve;
12
+ # plus the two inert shapes (no record at all, a header-only record).
12
13
  #
13
14
  # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
14
15
  set -uo pipefail
@@ -43,20 +44,20 @@ seed_repo() { # $1=dir -> a one-commit git repo, printing its HEAD sha
43
44
  git -C "$1" rev-parse HEAD
44
45
  }
45
46
 
46
- write_record() { # $1=dir $2=rev
47
- write_token_record "$1" "$2" "checks/"
47
+ write_record() { # $1=dir $2=rev [$3=corpus value]
48
+ write_token_record "$1" "$2" "four of them." "" "none" "${3-seed.txt}"
48
49
  }
49
50
 
50
- write_token_record() { # $1=dir $2=rev $3=corpus value [$4=valve line] [$5=inferred value]
51
+ write_token_record() { # $1=dir $2=rev $3=finding value [$4=valve line] [$5=inferred value] [$6=corpus value]
51
52
  mkdir -p "$1/.workflow"
52
53
  cat >"$1/.workflow/survey-record.md" <<EOF
53
54
  # contract: lifecycle-kit/SPEC.md §The survey record — carried surveys.
54
55
 
55
56
  ## 2026-01-02 scope — which gates meet every port criterion?
56
- ${4-}- corpus: $3
57
+ ${4-}- corpus: ${6-seed.txt}
57
58
  - oracle: bash run-gates.sh
58
59
  - rev: $2
59
- - finding: four of them.
60
+ - finding: $3
60
61
  - inferred: ${5-none}
61
62
  EOF
62
63
  }
@@ -66,6 +67,13 @@ live="$SANDBOX/live"; mkdir -p "$live"
66
67
  head_sha="$(seed_repo "$live")"
67
68
  write_record "$live" "$head_sha"
68
69
  check_case "rev-exists" "$live" 0 "1 rev(s) name a real commit"
70
+ check_case "corpus-matches" "$live" 0 "1 corpus pathspec(s) match a path at their rev"
71
+
72
+ # --- bare mode, a well-formed pathspec matching no path at the rev: the vacuous witness ---
73
+ nomatch="$SANDBOX/corpus-unmatched"; mkdir -p "$nomatch"
74
+ nomatch_sha="$(seed_repo "$nomatch")"
75
+ write_record "$nomatch" "$nomatch_sha" "seed.txt checks/"
76
+ check_case "corpus-unmatched" "$nomatch" 1 "corpus pathspec 'checks/' matches no path at rev"
69
77
 
70
78
  # --- bare mode, well-formed 40-hex rev naming nothing: the wrong-rev finding ---
71
79
  ghost="$SANDBOX/ghost"; mkdir -p "$ghost"
@@ -86,26 +94,26 @@ printf '# contract: lifecycle-kit/SPEC.md §The survey record — carried survey
86
94
  check_case "header-only" "$hdr" 0 "clean (0 block(s)"
87
95
 
88
96
  # --- the widened arm: a git-object-shaped token OUTSIDE the rev field. The attested fabrication
89
- # landed in `corpus`, which the rev arm never read, so these four cases are the whole reason
90
- # the arm exists. ---
97
+ # landed in `corpus`, where the corpus-match probe now refuses it as a word matching no path,
98
+ # so these cases ride `finding`, the free prose only this arm reads. ---
91
99
 
92
100
  # a resolvable token in a non-rev field passes, and is counted apart from the rev
93
101
  tok_ok="$SANDBOX/token-ok"; mkdir -p "$tok_ok"
94
102
  tok_sha="$(seed_repo "$tok_ok")"
95
- write_token_record "$tok_ok" "$tok_sha" "checks/ as of ${tok_sha:0:9}"
103
+ write_token_record "$tok_ok" "$tok_sha" "four of them, as of ${tok_sha:0:9}."
96
104
  check_case "token-exists" "$tok_ok" 0 "1 cited token(s) name a real object"
97
105
 
98
106
  # an unresolvable one is the minted-identifier finding: shaped like a citation, naming nothing
99
107
  tok_bad="$SANDBOX/token-bad"; mkdir -p "$tok_bad"
100
108
  tok_bad_sha="$(seed_repo "$tok_bad")"
101
- write_token_record "$tok_bad" "$tok_bad_sha" "checks/ as of deadbeef1"
109
+ write_token_record "$tok_bad" "$tok_bad_sha" "four of them, as of deadbeef1."
102
110
  check_case "token-unknown" "$tok_bad" 1 "token names no object in this repository: deadbeef1"
103
111
 
104
112
  # the valve exempts its block, so a deliberately illustrative sha is not a red
105
113
  valve="$SANDBOX/valve"; mkdir -p "$valve"
106
114
  valve_sha="$(seed_repo "$valve")"
107
- write_token_record "$valve" "$valve_sha" "checks/ as of deadbeef1" \
108
- '<!-- survey-token-exempt: an illustrative sha in the corpus pathspec -->
115
+ write_token_record "$valve" "$valve_sha" "four of them, as of deadbeef1." \
116
+ '<!-- survey-token-exempt: an illustrative sha in the finding -->
109
117
  '
110
118
  check_case "valve-exempts" "$valve" 0 "clean (1 block(s)"
111
119
 
@@ -113,14 +121,14 @@ check_case "valve-exempts" "$valve" 0 "clean (1 block(s)"
113
121
  # other, and it is covered by the arm that exists rather than by a second one
114
122
  inf_tok="$SANDBOX/inferred-token"; mkdir -p "$inf_tok"
115
123
  inf_sha="$(seed_repo "$inf_tok")"
116
- write_token_record "$inf_tok" "$inf_sha" "checks/" "" "the cohort landed at deadbeef1"
124
+ write_token_record "$inf_tok" "$inf_sha" "four of them." "" "the cohort landed at deadbeef1"
117
125
  check_case "inferred-token-unknown" "$inf_tok" 1 "token names no object in this repository: deadbeef1"
118
126
 
119
127
  # a valve with no reason is a finding AND does not exempt: a malformed valve must not buy the
120
128
  # skip it failed to justify
121
129
  noreason="$SANDBOX/valve-no-reason"; mkdir -p "$noreason"
122
130
  noreason_sha="$(seed_repo "$noreason")"
123
- write_token_record "$noreason" "$noreason_sha" "checks/ as of deadbeef1" \
131
+ write_token_record "$noreason" "$noreason_sha" "four of them, as of deadbeef1." \
124
132
  '<!-- survey-token-exempt: -->
125
133
  '
126
134
  check_case "valve-no-reason" "$noreason" 1 "valve carries no reason"
@@ -130,5 +138,5 @@ if [[ "$fails" -gt 0 ]]; then
130
138
  echo "check-survey-record.test.sh: $fails case(s) failed"
131
139
  exit 1
132
140
  fi
133
- echo "check-survey-record.test.sh: clean (rev-exists + rev-unknown probe arms, the widened non-rev token arm resolvable and not and over the inferred field, the valve and a reasonless valve that does not exempt, absent-record and header-only inert shapes, 10 cases)"
141
+ echo "check-survey-record.test.sh: clean (rev-exists + rev-unknown probe arms, the corpus-match probe matching and not, the widened non-rev token arm resolvable and not and over the inferred field, the valve and a reasonless valve that does not exempt, absent-record and header-only inert shapes, 12 cases)"
134
142
  exit 0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # spec: lifecycle-kit/SPEC.md §check-dispatch-entry — the workflow-state guard's stamp-before-write rule end-to-end through a sandboxed --hook: a configured stage-session caller with no stamp is blocked, a stamped one, a caller of another type and a top-level caller pass, an empty roster is inert, an unreadable state file declines through the advise envelope, and the state-file rule still blocks a stamped caller and follows a relocated LIFECYCLE_KIT_STATE_FILE
2
+ # spec: lifecycle-kit/SPEC.md §check-dispatch-entry — the workflow-state guard's stamp-before-write and superseded-stage rules end-to-end through a sandboxed --hook: a configured stage-session caller with no stamp is blocked, a caller whose stage the cursor has left is blocked outside the scratch dir and allowed inside it, a stamped one holding the cursor, a caller of another type and a top-level caller pass, an empty roster is inert, an unreadable state file declines through the advise envelope, and the state-file rule still blocks a stamped caller and follows a relocated LIFECYCLE_KIT_STATE_FILE
3
3
  set -uo pipefail
4
4
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
5
5
 
@@ -45,6 +45,17 @@ out="$(hook roster.knobs "$(payload - - notes.md)")"; rc=$?
45
45
  out="$(hook empty.knobs "$(payload stage-session b1b2b3b4c5c6c7c8d notes.md)")"; rc=$?
46
46
  [[ "$rc" -eq 0 && -z "$out" ]] || note inert "want a silent exit 0 under an empty roster, got $rc -- $out"
47
47
 
48
+ # the third rule: the scope-stamped caller's stage has been left, so it writes only under the scratch dir
49
+ out="$(hook roster.knobs "$(payload stage-session aaaaaaaa00000000 notes.md)")"; rc=$?
50
+ [[ "$rc" -eq 2 ]] || note superseded "want exit 2 for a caller whose stage the cursor has left, got $rc -- $out"
51
+ grep -qF "entered 'scope', and the cursor has moved to 'build'" <<<"$out" || note superseded-stages "the block does not name both stages: $out"
52
+ out="$(hook roster.knobs "$(payload stage-session aaaaaaaa00000000 "$sb/.tmp/journal/stage-journal.md")")"; rc=$?
53
+ [[ "$rc" -eq 0 && -z "$out" ]] || note superseded-scratch "want a silent exit 0 for a superseded caller writing under the scratch dir, got $rc -- $out"
54
+ out="$(hook roster.knobs "$(payload stage-session aaaaaaaa00000000 "$sb/.tmp/../notes.md")")"; rc=$?
55
+ [[ "$rc" -eq 2 ]] || note superseded-climb "want exit 2 for a superseded caller climbing out of the scratch dir, got $rc -- $out"
56
+ out="$(hook roster.knobs "$(payload stage-session a94d72dcd2db52dbf notes.md)")"; rc=$?
57
+ [[ "$rc" -eq 0 && -z "$out" ]] || note cursor-holder "want a silent exit 0 for the caller holding the cursor, got $rc -- $out"
58
+
48
59
  out="$(hook roster.knobs "$(payload stage-session a94d72dcd2db52dbf .workflow/WORKFLOW-STATE.txt)")"; rc=$?
49
60
  [[ "$rc" -eq 2 ]] || note first-rule "want exit 2 for a stamped caller writing the state file, got $rc -- $out"
50
61
 
@@ -62,5 +73,5 @@ out="$(hook absent.knobs "$(payload stage-session b1b2b3b4c5c6c7c8d notes.md)")"
62
73
  grep -qF '"additionalContext"' <<<"$out" || note decline-envelope "the decline did not write the PreToolUse advise envelope: $out"
63
74
 
64
75
  [[ "$fails" -eq 0 ]] || { echo "stamp-before-write.test: $fails assertion(s) failed"; exit 1; }
65
- echo "stamp-before-write.test: clean (an unstamped stage-session caller is blocked naming its id and the remedy; a stamped one, another type, a top-level caller and an empty roster pass silently; an unreadable state file declines through the advise envelope; the state-file rule still blocks a stamped caller and follows a relocated LIFECYCLE_KIT_STATE_FILE)"
76
+ echo "stamp-before-write.test: clean (an unstamped stage-session caller is blocked naming its id and the remedy; a caller whose stage the cursor has left is blocked naming both stages, allowed under the scratch dir and blocked climbing out of it; a stamped one holding the cursor, another type, a top-level caller and an empty roster pass silently; an unreadable state file declines through the advise envelope; the state-file rule still blocks a stamped caller and follows a relocated LIFECYCLE_KIT_STATE_FILE)"
66
77
  exit 0
@@ -122,7 +122,7 @@ A pull channel is read, never consumed: the lead **does not delete** a stage ses
122
122
 
123
123
  ## A running session is asked, never instructed
124
124
 
125
- A dispatched stage session is not a tool call the lead may re-issue. Three rules bind the lead here and each was paid for; the root cause under all three is one habit, stated after them. The section closes on the one act against a running session the lead never takes on its own authority: stopping it.
125
+ A dispatched stage session is not a tool call the lead may re-issue. Three rules bind the lead here and each was paid for; the root cause under all three is one habit, stated after them. The section closes on the one act against a running session the lead never takes on its own authority, stopping it, and on the read owed before calling a worktree it may own stale.
126
126
 
127
127
  **An instruction to run something is destructive when the answer is "already did".** §The lead model already forbids the lead *itself* re-running the evidence producer; this is the same harm through the other actor. When the lead does not know what a session has run, the message is a **question** — *what have you run, and what did it report?* — never a command. A question costs one turn and destroys nothing.
128
128
 
@@ -136,6 +136,8 @@ A dispatched stage session is not a tool call the lead may re-issue. Three rules
136
136
 
137
137
  **A running session is never stopped on the lead's authority alone.** Stopping a background stage session, or any subagent it dispatched — the harness's stop or kill, whatever it is named — takes either the operator's explicit confirmation of that stop or a grant for this iteration that names the act. A grant lives in the lead's resume journal (lifecycle-kit/SPEC.md §The steering vocabulary), so the lead reads it there rather than recalling it. The ground is a cost already stated: an interrupt destroys the session's in-flight uncommitted unit (delegation-kit/templates/agent-execution.md, the one-commit-per-unit bullet), so a stop re-buys that unit's tokens, and how much spend to discard is the operator's to choose exactly as how much to spend is (§Opening an iteration). The stall a lead most often stops a session over is the one the rules above refuse to read off the channel, so a session that looks stuck is asked, and its artifact read, before a stop is proposed at all.
138
138
 
139
+ **Read a worktree's provenance before you call it stale.** Before you describe a linked worktree as stale, obsolete or safe to remove, read who made it and what it holds: its branch and lock reason (`git worktree list --porcelain`), whether it is dirty (`git -C <path> status --porcelain`), its commits the main checkout lacks (`git log --oneline HEAD..<branch>`), and the journal or dispatch that names its path. A worktree a live or unreported session may own is that session's: ask it, as above. Your description names what you read.
140
+
139
141
  ## Policy is config, not prose
140
142
 
141
143
  All *standing* dispatch policy — everything true of every dispatch, not the ruling-class roster alone — lives in the tracked agent-definition the dispatch names, never in ad-hoc per-dispatch instructions, so there is one gated source of the policy rather than a second one improvised per dispatch. Journal mechanics, environment wiring, the shared-index caution, the escalation shape, and the escalate-versus-decide roster are all standing; a dispatch prompt carries only what varies per dispatch — the stage skill to invoke, the batch's task slugs, and pointers specific to that batch. The tell that content is misplaced: the same sentence appearing in two dispatch prompts. The agent-definition points at its owning docs rather than restating them (content-tiering) — it cites delegation-kit's resume-journal mechanics, say, never transcribes them.
@@ -152,7 +154,9 @@ The lead writes **no** lifecycle state — no WORKFLOW-STATE stamps, no queue wr
152
154
 
153
155
  **A recurrence you judge is still yours to record, and your discharge differs.** The no-queue-write rule above leaves you no way to stamp one, so you **file the judgment and its grounds into a gap bullet** (`--emit file-gap`) and the session that may write the queue stamps from your prose — at the boundary as safely as mid-iteration (lifecycle-kit/SPEC.md §The committed gap inbox). What you must not do is leave the judgment unrecorded on the ground that you cannot stamp it.
154
156
 
155
- **And file and commit it yourself, between dispatches.** While a dispatched stage session is live, a capture you make — a gap bullet, a survey block — goes to your own journal, never to its tracked channel: a lead write into the tree mid-batch is foreign dirt to that batch, which a clean-tree precondition refuses and a batch's `git add` can sweep into its own commit. At the first moment no dispatched stage session is live, file each held capture to its channel (`--emit file-gap`, `--emit file-survey`) and commit it on its own. The invariant above enumerates stamps, queue writes and evidence files; a capture commit is none of them, and reading the omission as a ban leaves a bullet riding uncommitted into the next iteration. Neither capture arm makes a `git` call: judging when the tree is free is the filing session's (lifecycle-kit/SPEC.md §The committed gap inbox).
157
+ **While a dispatched stage session is live, write nothing into the checkout.** A stage session is live from its dispatch until its completion notification. While one is, write nothing into the checkout or any linked worktree: no file, no directory, no worktree added or removed, no `git` write, gitignored scratch included. Three writes stay yours: your resume journal, your session-role marker, and what the arms you run write for you (`--dispatch`, `--dispatch-withdraw`, `--open-lead-journal`, a budget verdict). A capture you make, a gap bullet or a survey block, goes to your journal. A probe that must write runs after the stage completes, or in a clone outside the checkout.
158
+
159
+ **File and commit your captures between dispatches.** At the first moment no dispatched stage session is live, file each held capture to its channel (`--emit file-gap`, `--emit file-survey`) and commit it on its own. A capture commit is none of the lifecycle state the invariant above enumerates, so it is yours to make. Neither capture arm makes a `git` call: judging when the tree is free is the filing session's (lifecycle-kit/SPEC.md §The committed gap inbox).
156
160
 
157
161
  An answer that amounts to a design ruling is landed **by the stage session**, in the governed surface it belongs to (the amendment, the queue entry), *before* the session acts on it — and a ruling whose acting session is **not imminent** is filed to a durable governed surface (a queue entry, an amendment) in the moment it is made, because "the stage session lands it" holds only when that session exists. So is an answer that nothing changes: relay it as an answer to be landed, naming the surface that recorded the question, never as a close of the matter (lifecycle-kit/SPEC.md §The stamp protocol). The message thread is transport, never a store — so a lead crash or a lost transcript costs nothing the tracked surfaces do not already hold.
158
162
 
@@ -1,10 +1,10 @@
1
1
  # queue-kit
2
2
 
3
- A git-native, agent-readable task tracker: one Markdown file where `##` sections are queues, `### <slug>` headings are the tasks — each kebab-case slug the task's handle and link anchor — and square-bracket tags on the line under each heading are the state machine ([SPEC.md](https://checkwright.dev/queue-kit/SPEC) §The tag algebra owns the tag set). Gates hold the grammar a coding agent selects work by, and the arms under [Use](#use) read and project the file.
3
+ A git-native, agent-readable task tracker: one Markdown file where `##` sections are queues, `### <slug>` headings are the tasks — each kebab-case slug the task's handle and link anchor — and square-bracket tags on the line under each heading are the state machine ([SPEC.md §The tag algebra](https://checkwright.dev/queue-kit/SPEC#the-tag-algebra) owns the tag set). Gates hold the grammar a coding agent selects work by, and the arms under [Use](#use) read and project the file.
4
4
 
5
5
  Why: an agent picks work by *parsing*, not reading — so everything selection trusts (section position, slugs, tags) must be grammar a gate can enforce, and everything a human writes freely (task prose) must stay off the parse path. Drift between what the prose says and what the parser sees is the failure mode; all but three of the gates each close one instance of it — a tag written off its tag line, a duplicate slug, a live reference left unlinked, a lost task, a forward precondition stated in prose but never tagged. The three exceptions hold a different axis: projection freshness, and the deferred pool's filing contract — its per-entry budget and its tag-line board tags. See [SPEC.md](https://checkwright.dev/queue-kit/SPEC) for the full contracts.
6
6
 
7
- This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is gate-sdk/SPEC.md §Consumer payload.
7
+ This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://github.com/checkwright/checkwright/blob/master/gate-sdk/SPEC.md#consumer-payload).
8
8
 
9
9
  ## Install
10
10
 
@@ -8,11 +8,13 @@ Deployment-truth governance for a docs site served from the repo (GitHub Pages a
8
8
 
9
9
  `check-docs-liquid-parse` parses every docs file the Pages build runs Liquid over — the markdown pages, any file carrying front matter, and the layout, include and post templates — through the Liquid parser Pages runs, so one unbalanced `{{` or unclosed tag reds in the tree instead of failing the site's build and freezing the deployment. It fails closed when the parser is absent or cannot detect an error.
10
10
 
11
+ `check-docs-collapsible` holds every `<details>` region on a docs page to the form the Pages parser renders: `markdown="1"` on the opening tag, a `<summary>` naming what opens, no heading inside and a closing tag. It reads source only, so it needs no renderer.
12
+
11
13
  `check-docs-highlight-coverage` holds a layout that restyles code highlighting to the theme it restyles: every token class a tracked snapshot says the theme colours must have an override rule, or it keeps the theme's colour — black on a dark code background, for one. It is disarmed until `SITE_KIT_HIGHLIGHT_TOKENS` names the snapshot.
12
14
 
13
15
  The template — `templates/site-health.yml` — is a scheduled probe of the live site (apex/www/http HTTPS, redirects, certificate expiry, release-body note pointers, and theme highlight-class drift against that snapshot). It verifies a *deployment*, not a tree, so it ships as a workflow a consumer copies, never a gate: the line is where the asserted object lives, and none of what it asserts is in any checkout. See [SPEC.md](https://checkwright.dev/site-kit/SPEC#the-monitor-boundary) for why that boundary is load-bearing.
14
16
 
15
- This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is gate-sdk/SPEC.md §Consumer payload.
17
+ This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://github.com/checkwright/checkwright/blob/master/gate-sdk/SPEC.md#consumer-payload).
16
18
 
17
19
  ## Install
18
20
 
@@ -25,6 +27,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
25
27
  check-docs-cname-parity
26
28
  check-docs-highlight-coverage
27
29
  check-docs-render-fidelity
30
+ check-docs-collapsible
28
31
  check-docs-liquid-parse
29
32
  ```
30
33
  <!-- gate-roster:end -->
@@ -37,7 +40,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
37
40
 
38
41
  4. Optional highlight coverage — if your layout restyles code highlighting, track a snapshot of the classes your theme's stylesheet colours (one `.<class>` per line under a `# contract:` header) and set `SITE_KIT_HIGHLIGHT_TOKENS` to it in `site-config.knobs`. The monitor's theme-drift arm prints the list to paste.
39
42
 
40
- 5. Optional live monitor — copy `templates/site-health.yml` verbatim into `.github/workflows/`, then set three groups of step env or delete the arm each belongs to: `ALT_DOMAIN` (drop the alternate-host probe if you serve no redirect alias), `RELEASE_NOTE_GLOB` / `RELEASE_NOTE_TAG_KEY` / `RELEASE_NOTE_URL_PATH` (drop the release-body arm if you publish no release notes), and `HIGHLIGHT_CSS_PATH` / `HIGHLIGHT_TOKENS_FILE` (the theme-drift arm, skipped while both are empty). It opens/updates/closes a `site-health` issue on its own schedule. The release-body arm needs the template's `contents: read` permission — it is an allowlist, not an addition — and `RELEASE_NOTE_URL_PATH` is the value worth checking twice: site-kit/SPEC.md §templates/site-health.yml names the trap.
43
+ 5. Optional live monitor — copy `templates/site-health.yml` verbatim into `.github/workflows/`, then set three groups of step env or delete the arm each belongs to: `ALT_DOMAIN` (drop the alternate-host probe if you serve no redirect alias), `RELEASE_NOTE_GLOB` / `RELEASE_NOTE_TAG_KEY` / `RELEASE_NOTE_URL_PATH` (drop the release-body arm if you publish no release notes), and `HIGHLIGHT_CSS_PATH` / `HIGHLIGHT_TOKENS_FILE` (the theme-drift arm, skipped while both are empty). It opens/updates/closes a `site-health` issue on its own schedule. The release-body arm needs the template's `contents: read` permission — it is an allowlist, not an addition — and `RELEASE_NOTE_URL_PATH` is the value worth checking twice: [site-kit/SPEC.md §templates/site-health.yml](https://checkwright.dev/site-kit/SPEC#templatessite-healthyml) names the trap.
41
44
 
42
45
  ## Test
43
46
 
@@ -0,0 +1,3 @@
1
+ # graph: couples=knob:SITE_KIT_DOCS_DIR/*.md,knob:SITE_KIT_DOCS_DIR/*/index.md,knob:SITE_KIT_DOCS_DIR/posts/*.md dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # spec: site-kit/SPEC.md §check-docs-collapsible — every collapsible region on a tracked docs page opens with markdown="1", names what it holds in a <summary>, hides no heading and closes
@@ -0,0 +1,23 @@
1
+ # Regions that break the form
2
+
3
+ <details>
4
+ <summary>Raw body</summary>
5
+
6
+ Its **markdown** prints raw.
7
+ </details>
8
+
9
+ <details markdown="1">
10
+
11
+ A region with no summary.
12
+ </details>
13
+
14
+ <details markdown="1">
15
+ <summary>A hidden section</summary>
16
+
17
+ ## Hidden heading
18
+ </details>
19
+
20
+ <details markdown="1">
21
+ <summary>Never closed</summary>
22
+
23
+ The page ends inside it.
@@ -0,0 +1,4 @@
1
+ docs/regions.md:3: region opens without markdown="1"
2
+ docs/regions.md:9: region carries no <summary>
3
+ docs/regions.md:14: region hides a heading
4
+ docs/regions.md:20: region is never closed
@@ -0,0 +1,3 @@
1
+ # A page with no region
2
+
3
+ Nothing on this page collapses.
@@ -0,0 +1,26 @@
1
+ # Regions in the form
2
+
3
+ Run the one-line install first.
4
+
5
+ <details markdown="1">
6
+ <summary>Step by step</summary>
7
+
8
+ ```sh
9
+ # a comment line, not a heading
10
+ echo step
11
+ ```
12
+
13
+ | Step | Command |
14
+ | --- | --- |
15
+ | one | `echo one` |
16
+
17
+ <details markdown="1">
18
+ <summary>A nested region</summary>
19
+
20
+ Its own body.
21
+ </details>
22
+ </details>
23
+
24
+ ```html
25
+ <details>
26
+ ```
@@ -0,0 +1 @@
1
+ DOCS-COLLAPSIBLE: clean (2 tracked markdown page(s) under docs, 2 collapsible region(s)