checkwright 0.17.0 → 0.19.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 (93) hide show
  1. package/package.json +2 -2
  2. package/payload/canon-kit/README.md +1 -0
  3. package/payload/canon-kit/SPEC.md +162 -16
  4. package/payload/canon-kit/checks/check-amendment-queue.sh +17 -16
  5. package/payload/canon-kit/checks/check-install-claim.sh +146 -0
  6. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +1 -1
  7. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +1 -1
  8. package/payload/canon-kit/gate-tests/check-install-claim/bad/README.md +12 -0
  9. package/payload/canon-kit/gate-tests/check-install-claim/bad/expect.txt +1 -0
  10. package/payload/canon-kit/gate-tests/check-install-claim/bad/install.md +24 -0
  11. package/payload/canon-kit/gate-tests/check-install-claim/bad/posts/note.md +7 -0
  12. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +10 -0
  13. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/install-transports.sh +7 -0
  14. package/payload/canon-kit/gate-tests/check-install-claim/good/README.md +12 -0
  15. package/payload/canon-kit/gate-tests/check-install-claim/good/expect.txt +1 -0
  16. package/payload/canon-kit/gate-tests/check-install-claim/good/install.md +24 -0
  17. package/payload/canon-kit/gate-tests/check-install-claim/good/posts/note.md +7 -0
  18. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +10 -0
  19. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/install-transports.sh +7 -0
  20. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +1 -1
  21. package/payload/canon-kit/lib/spec.sh +32 -2
  22. package/payload/context-kit/SPEC.md +5 -0
  23. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -1
  24. package/payload/delegation-kit/SPEC.md +12 -0
  25. package/payload/drift-kit/README.md +4 -4
  26. package/payload/drift-kit/SPEC.md +58 -5
  27. package/payload/drift-kit/bin/drift-report.sh +14 -11
  28. package/payload/drift-kit/bin/overhead-meter.sh +1 -1
  29. package/payload/drift-kit/kpis/kpi-deferred-age.sh +7 -5
  30. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +74 -0
  31. package/payload/drift-kit/smoke/install.sh +1 -1
  32. package/payload/gate-sdk/README.md +1 -0
  33. package/payload/gate-sdk/SPEC.md +305 -15
  34. package/payload/gate-sdk/bin/upgrade-smoke.sh +35 -15
  35. package/payload/gate-sdk/checks/check-action-gh-repo.sh +321 -0
  36. package/payload/gate-sdk/gate-tests/check-action-gh-repo/bad/args +3 -0
  37. package/payload/gate-sdk/gate-tests/check-action-gh-repo/bad/expect.txt +1 -0
  38. package/payload/gate-sdk/gate-tests/check-action-gh-repo/bad/tree/workflows/publish.yml +78 -0
  39. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/args +4 -0
  40. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/expect.txt +1 -0
  41. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/tree/action.yml +11 -0
  42. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/tree/not-actions.yml +10 -0
  43. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/tree/workflows/arms.yml +93 -0
  44. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/tree/workflows/root-env.yml +18 -0
  45. package/payload/gate-sdk/gate-tests/check-action-gh-repo/good/tree/workflows/valves.yml +39 -0
  46. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +112 -0
  47. package/payload/gate-sdk/lib/declaration.sh +59 -0
  48. package/payload/lifecycle-kit/README.md +2 -2
  49. package/payload/lifecycle-kit/SPEC.md +57 -34
  50. package/payload/lifecycle-kit/bin/enter-stage.sh +1 -1
  51. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +1 -1
  52. package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
  53. package/payload/lifecycle-kit/templates/{skills → stages}/build.md +15 -0
  54. package/payload/lifecycle-kit/templates/{skills → stages}/close.md +8 -8
  55. package/payload/lifecycle-kit/templates/{skills → stages}/scope.md +1 -1
  56. package/payload/queue-kit/README.md +26 -10
  57. package/payload/queue-kit/SPEC.md +463 -32
  58. package/payload/queue-kit/bin/queue-index.sh +62 -11
  59. package/payload/queue-kit/bin/roadmap.sh +76 -0
  60. package/payload/queue-kit/checks/check-queue-entry-budget.sh +104 -0
  61. package/payload/queue-kit/checks/check-roadmap-fresh.sh +110 -0
  62. package/payload/queue-kit/checks/check-tag-lead-line.sh +12 -8
  63. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +33 -0
  64. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +4 -0
  65. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +6 -0
  66. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +35 -0
  67. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +6 -0
  68. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +24 -0
  69. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/args +5 -0
  70. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/emit.txt +8 -0
  71. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -0
  72. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/projection.txt +16 -0
  73. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +6 -0
  74. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +22 -0
  75. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/args +5 -0
  76. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/emit.txt +7 -0
  77. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/expect.txt +1 -0
  78. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/projection.txt +16 -0
  79. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +6 -0
  80. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +3 -0
  81. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +1 -0
  82. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +2 -1
  83. package/payload/queue-kit/gate-tests/queue-index.test.sh +45 -4
  84. package/payload/queue-kit/gate-tests/roadmap.test.sh +197 -0
  85. package/payload/queue-kit/lib/queue.sh +87 -1
  86. package/payload/queue-kit/smoke/install.sh +1 -0
  87. package/payload/queue-kit/templates/TASK-QUEUE.md +1 -1
  88. package/payload/site-kit/SPEC.md +9 -3
  89. /package/payload/lifecycle-kit/templates/{skills/release-sweep.md → release-sweep.md} +0 -0
  90. /package/payload/lifecycle-kit/templates/{skills → stages}/align.md +0 -0
  91. /package/payload/lifecycle-kit/templates/{skills → stages}/spec.md +0 -0
  92. /package/payload/lifecycle-kit/templates/{skills → stages}/validate.md +0 -0
  93. /package/payload/lifecycle-kit/templates/{skills/upgrade.md → upgrade.md} +0 -0
@@ -0,0 +1,22 @@
1
+ ## Iteration: fixture
2
+
3
+ ## New Features
4
+
5
+ - **first-thing** [roadmap: soon/alpha] — the nearest thing. A second sentence
6
+ the projection must not reach, because only the declaration is projected.
7
+ roadmap-summary: The nearest thing, said the way a public reader wants it.
8
+
9
+ ## Technical Debt
10
+
11
+ - **second-thing** — untagged, so it is not projected.
12
+
13
+ ## Deferred
14
+
15
+ - **third-thing** [design-pending] [roadmap: someday/beta] — a demand-gated rung.
16
+ roadmap-summary: A rung promoted when a consumer's demand attests it.
17
+
18
+ ## Done
19
+
20
+ - retired-thing
21
+
22
+ ## Lessons Learned
@@ -0,0 +1,5 @@
1
+ # Hermetic freshness case: the committed marker block byte-matches the emission,
2
+ # and both [roadmap:] tags name a configured horizon and track.
3
+ # Two args steer assertion A off the live emitter onto pre-baked fixture files.
4
+ projection.txt
5
+ emit.txt
@@ -0,0 +1,7 @@
1
+ ### soon
2
+
3
+ - **`first-thing`** *(alpha)* — The nearest thing, said the way a public reader wants it.
4
+
5
+ ### someday
6
+
7
+ - **`third-thing`** *(beta)* — A rung promoted when a consumer's demand attests it.
@@ -0,0 +1 @@
1
+ ROADMAP-FRESH: clean
@@ -0,0 +1,16 @@
1
+ # Fixture roadmap
2
+
3
+ Hand-authored framing the splice never touches.
4
+
5
+ <!-- roadmap:begin -->
6
+ ### soon
7
+
8
+ - **`first-thing`** *(alpha)* — The nearest thing, said the way a public reader wants it.
9
+
10
+ ### someday
11
+
12
+ - **`third-thing`** *(beta)* — A rung promoted when a consumer's demand attests it.
13
+
14
+ <!-- roadmap:end -->
15
+
16
+ Trailing framing, likewise untouched.
@@ -0,0 +1,6 @@
1
+ # shellcheck shell=bash
2
+ # spec: queue-kit/SPEC.md §Layout and configuration — the fixture's own roadmap vocabulary, so the case reads no tree state outside this directory
3
+ # shellcheck disable=SC2034 # consumed by queue-kit/lib/queue.sh after sourcing
4
+ QUEUE_KIT_HORIZONS=(soon someday)
5
+ # shellcheck disable=SC2034 # consumed by queue-kit/lib/queue.sh after sourcing
6
+ QUEUE_KIT_TRACKS=(alpha beta)
@@ -14,6 +14,9 @@
14
14
 
15
15
  ## Deferred
16
16
 
17
+ - **delta-idea** — a parked idea whose state marker reflowed off the lead
18
+ line: it is still [design-pending] but no tag reader scans this far.
19
+
17
20
  ## Done
18
21
 
19
22
  ## Lessons Learned
@@ -1 +1,2 @@
1
1
  [drain-exempt] on a continuation line
2
+ [design-pending] on a continuation line
@@ -17,7 +17,8 @@
17
17
 
18
18
  ### Later
19
19
 
20
- - **gamma-feature** — revisit when the alpha surface settles.
20
+ - **gamma-feature** [design-pending] — revisit when the alpha surface settles.
21
+ a continuation mentioning [design-pending] is tolerated (lead carries it).
21
22
 
22
23
  ## Done
23
24
 
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env bash
2
- # Behavioral test of bin/queue-index.sh's attention block — the [attend] Lessons
3
- # lead lines it appends (both default and --collapse-deferred output), capped at
2
+ # Behavioral test of bin/queue-index.sh's rendering: the one-line title of a
3
+ # tagged entry (active and deferred), and the attention block of [attend] Lessons
4
+ # lead lines (both default and --collapse-deferred output), capped at
4
5
  # QUEUE_KIT_ATTEND_CAP with an overflow note. queue-index is a tool, not a gate,
5
6
  # so it has no good/bad pair; this drives it directly. Config is isolated via
6
- # QUEUE_KIT_CONFIG_FILE=/dev/null so the repo's queue-config.sh does not leak in.
7
+ # QUEUE_KIT_CONFIG_FILE so the repo's queue-config.sh does not leak in.
7
8
  #
8
9
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
9
10
  set -uo pipefail
@@ -17,6 +18,7 @@ trap 'rm -rf "$SANDBOX"' EXIT
17
18
  export QUEUE_KIT_CONFIG_FILE="$SANDBOX/empty-config.sh"
18
19
 
19
20
  fails=0
21
+ checks=0
20
22
 
21
23
  cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
22
24
  # TASK-QUEUE.md
@@ -42,9 +44,11 @@ cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
42
44
  EOF
43
45
 
44
46
  want() { # $1=label $2=output $3=substring-that-must-be-present
47
+ checks=$((checks + 1))
45
48
  grep -qF -- "$3" <<<"$2" || { echo " FAIL [$1]: output lacks '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); }
46
49
  }
47
50
  absent() { # $1=label $2=output $3=substring-that-must-be-absent
51
+ checks=$((checks + 1))
48
52
  grep -qF -- "$3" <<<"$2" && { echo " FAIL [$1]: output should not contain '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); } || true
49
53
  }
50
54
 
@@ -110,9 +114,46 @@ EOF
110
114
  out="$(bash "$IDX" "$SANDBOX/none.md")"
111
115
  absent "none-block" "$out" "Attention (Lessons"
112
116
 
117
+ # Title rendering: tags come off without leaving the separator they sat next to.
118
+ # A tag between the slug and the em-dash used to survive the slug-and-dash strip
119
+ # and render `slug — — prose`; a lead line that is all tag has no title at all
120
+ # and renders as the bare slug rather than a dangling separator.
121
+ cat >"$SANDBOX/titles.md" <<'EOF'
122
+ # TASK-QUEUE.md
123
+
124
+ ## Iteration: demo
125
+
126
+ ## New Features
127
+
128
+ - **feat-tagged** [design-pending] — a tagged active entry.
129
+ - **feat-two-tags** [design-pending] [roadmap: later/thing] — two tags here.
130
+ - **feat-alltag** [design-pending]
131
+ - **feat-exempt** [drain-exempt: half pending] — exempt and titled.
132
+
133
+ ## Technical Debt
134
+
135
+ ## Deferred
136
+
137
+ - **def-tagged** [design-pending] — a tagged deferred entry.
138
+ - **def-alltag** [spec: some-kit/SPEC.md §A Long Pointer Section]
139
+
140
+ ## Done
141
+
142
+ ## Lessons Learned
143
+ EOF
144
+ out="$(bash "$IDX" "$SANDBOX/titles.md")"
145
+ want "title-one-tag" "$out" "• feat-tagged — a tagged active entry."
146
+ want "title-two-tags" "$out" "• feat-two-tags — two tags here."
147
+ want "title-exempt" "$out" "• feat-exempt — exempt and titled. [drain-exempt: half pending]"
148
+ want "title-deferred" "$out" "def-tagged — a tagged deferred entry."
149
+ want "title-empty" "$out" "• feat-alltag"
150
+ absent "title-empty-sep" "$out" "feat-alltag —"
151
+ want "title-empty-def" "$out" "def-alltag"
152
+ absent "title-empty-defsep" "$out" "def-alltag —"
153
+
113
154
  if [[ "$fails" -gt 0 ]]; then
114
155
  echo "queue-index.test.sh: $fails case(s) failed"
115
156
  exit 1
116
157
  fi
117
- echo "queue-index.test.sh: clean (attend block: cap+overflow, default cap, --collapse-deferred, empty; drain-exempt echo; 14 checks)"
158
+ echo "queue-index.test.sh: clean (titles: tag residue, multi-tag, drain-exempt echo, empty title; attend block: cap+overflow, default cap, --collapse-deferred, empty; $checks checks)"
118
159
  exit 0
@@ -0,0 +1,197 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of check-roadmap-fresh assertion B and the bin/roadmap.sh emit
3
+ # grammar. The gate's good/bad pair proves assertion A (the byte-compare), which
4
+ # is the one axis a single pair can carry; B's rejection shapes and the emitter's
5
+ # projection rules are driven directly here. Config is isolated via
6
+ # QUEUE_KIT_CONFIG_FILE so the repo's queue-config.sh does not leak in.
7
+ #
8
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
9
+ set -uo pipefail
10
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
11
+
12
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # queue-kit/
13
+ GATE="$DIR/checks/check-roadmap-fresh.sh"
14
+ EMIT="$DIR/bin/roadmap.sh"
15
+ SANDBOX="$(mktemp -d)"
16
+ trap 'rm -rf "$SANDBOX"' EXIT
17
+
18
+ cat >"$SANDBOX/config.sh" <<'EOF'
19
+ QUEUE_KIT_HORIZONS=(soon someday)
20
+ QUEUE_KIT_TRACKS=(alpha beta)
21
+ QUEUE_KIT_ROADMAP_FILE=ROADMAP.md
22
+ EOF
23
+ export QUEUE_KIT_CONFIG_FILE="$SANDBOX/config.sh"
24
+
25
+ fails=0
26
+ want() { # $1=label $2=output $3=substring-that-must-be-present
27
+ grep -qF -- "$3" <<<"$2" || { echo " FAIL [$1]: output lacks '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); }
28
+ }
29
+ absent() { # $1=label $2=output $3=substring-that-must-be-absent
30
+ grep -qF -- "$3" <<<"$2" && { echo " FAIL [$1]: output should not contain '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); } || true
31
+ }
32
+ code() { # $1=label $2=actual $3=expected
33
+ [[ "$2" == "$3" ]] || { echo " FAIL [$1]: expected exit $3, got $2"; fails=$((fails + 1)); }
34
+ }
35
+
36
+ queue() { # $1=the entry lead line, $2=optional body line(s) — writes a minimal well-formed queue
37
+ { printf '## Iteration: demo\n\n## New Features\n\n'
38
+ printf '%s\n' "$1"
39
+ [[ $# -ge 2 ]] && printf '%s\n' "$2"
40
+ printf '\n## Technical Debt\n\n## Deferred\n\n## Done\n\n## Lessons Learned\n'
41
+ } >"$SANDBOX/TASK-QUEUE.md"
42
+ }
43
+ decl=' roadmap-summary: A sentence an author marked for the public page.'
44
+
45
+ # The projection page is kept fresh throughout, so every verdict below is
46
+ # assertion B's and never assertion A's.
47
+ refresh() {
48
+ printf 'framing\n\n<!-- roadmap:begin -->\n<!-- roadmap:end -->\n' >"$SANDBOX/ROADMAP.md"
49
+ ( cd "$SANDBOX" && bash "$EMIT" --write >/dev/null )
50
+ }
51
+
52
+ run_gate() { ( cd "$SANDBOX" && bash "$GATE" 2>&1 ); }
53
+
54
+ # Every field valid, one declaration -> clean.
55
+ queue '- **ok-thing** [roadmap: soon/alpha] — a valid entry.' "$decl"
56
+ refresh
57
+ out="$(run_gate)"; code "valid-exit" "$?" 0
58
+ want "valid" "$out" "ROADMAP-FRESH: clean"
59
+
60
+ # Unknown horizon -> named, with the offending value.
61
+ queue '- **bad-horizon** [roadmap: eventually/alpha] — an unconfigured horizon.' "$decl"
62
+ refresh
63
+ out="$(run_gate)"; code "horizon-exit" "$?" 1
64
+ want "horizon-slug" "$out" "bad-horizon"
65
+ want "horizon-value" "$out" "unknown horizon 'eventually'"
66
+
67
+ # Unknown track -> named, with the offending value.
68
+ queue '- **bad-track** [roadmap: soon/gamma] — an unconfigured track.' "$decl"
69
+ refresh
70
+ out="$(run_gate)"; code "track-exit" "$?" 1
71
+ want "track-value" "$out" "unknown track 'gamma'"
72
+
73
+ # Missing slash -> a parse failure, not a membership failure.
74
+ queue '- **no-slash** [roadmap: soon] — one field where two are required.' "$decl"
75
+ refresh
76
+ out="$(run_gate)"; code "slash-exit" "$?" 1
77
+ want "slash" "$out" "does not parse as <horizon>/<track>"
78
+
79
+ # A second [roadmap:] tag on one entry -> rejected.
80
+ queue '- **two-tags** [roadmap: soon/alpha] [roadmap: someday/beta] — two tags.' "$decl"
81
+ refresh
82
+ out="$(run_gate)"; code "twotags-exit" "$?" 1
83
+ want "twotags" "$out" "carries 2 [roadmap:] tags"
84
+
85
+ # An untagged, unmarked entry is simply not projected — the normal case.
86
+ queue '- **plain-thing** — no tag at all.'
87
+ refresh
88
+ out="$(run_gate)"; code "untagged-exit" "$?" 0
89
+ want "untagged" "$out" "ROADMAP-FRESH: clean"
90
+
91
+ # Assertion C — a tagged entry with no declaration reds rather than projecting a
92
+ # bullet with no prose.
93
+ queue '- **no-decl** [roadmap: soon/alpha] — tagged, but nothing marked.'
94
+ refresh
95
+ out="$(run_gate)"; code "nodecl-exit" "$?" 1
96
+ want "nodecl" "$out" "carries 0 roadmap-summary: declaration(s)"
97
+
98
+ # Assertion C — two declarations are ambiguous, so they red too.
99
+ queue '- **two-decl** [roadmap: soon/alpha] — tagged twice over.' "$decl
100
+ $decl"
101
+ refresh
102
+ out="$(run_gate)"; code "twodecl-exit" "$?" 1
103
+ want "twodecl" "$out" "carries 2 roadmap-summary: declaration(s)"
104
+
105
+ # Assertion C, the other direction — a declaration with no tag is a dead marking,
106
+ # which is what a dropped or reflowed tag looks like from the page's side.
107
+ queue '- **dead-marking** — the tag fell off this lead line.' "$decl"
108
+ refresh
109
+ out="$(run_gate)"; code "dead-exit" "$?" 1
110
+ want "dead-slug" "$out" "dead-marking"
111
+ want "dead" "$out" "no [roadmap:] tag"
112
+
113
+ # The declaration count and the tag fields are independent, so one run reports
114
+ # both rather than costing the author a second round trip.
115
+ queue '- **both-wrong** [roadmap: eventually/alpha] — bad horizon and no mark.'
116
+ refresh
117
+ out="$(run_gate)"; code "both-exit" "$?" 1
118
+ want "both-decl" "$out" "carries 0 roadmap-summary: declaration(s)"
119
+ want "both-horizon" "$out" "unknown horizon 'eventually'"
120
+
121
+ # Emit grammar. The whitelist is the load-bearing property: only the declaration
122
+ # is projected, so the lead-line prose, the surrounding body, and the cost block
123
+ # all stay off the page. The done section is history, never direction.
124
+ { printf '## Iteration: demo\n\n## New Features\n\n'
125
+ printf -- '- **live-thing** [roadmap: soon/alpha] — LEADPROSE, an internal one-liner.\n'
126
+ printf ' BODYPROSE that no reader should ever see.\n'
127
+ printf ' roadmap-summary: The public sentence, and only this.\n'
128
+ printf ' **Cost while deferred:** COSTPROSE, the accounting a public page must not inherit.\n'
129
+ printf '\n## Technical Debt\n\n## Deferred\n\n'
130
+ printf -- '- **deferred-thing** [roadmap: someday/beta] — internal framing.\n'
131
+ printf ' roadmap-summary: A deferred rung, said publicly.\n'
132
+ printf '\n## Done\n\n- shipped-thing\n\n## Lessons Learned\n'
133
+ } >"$SANDBOX/TASK-QUEUE.md"
134
+ out="$( cd "$SANDBOX" && bash "$EMIT" --emit )"
135
+ want "emit-declared" "$out" '- **`live-thing`** *(alpha)* — The public sentence, and only this.'
136
+ absent "emit-leadprose" "$out" "LEADPROSE"
137
+ absent "emit-bodyprose" "$out" "BODYPROSE"
138
+ absent "emit-costprose" "$out" "COSTPROSE"
139
+ want "emit-deferred" "$out" '- **`deferred-thing`** *(beta)* — A deferred rung, said publicly.'
140
+ absent "emit-done" "$out" "shipped-thing"
141
+ want "emit-heading" "$out" "### soon"
142
+
143
+ # The whitelist holds even with the gate bypassed: a tagged entry whose
144
+ # declaration is missing contributes no bullet at all rather than a naked one.
145
+ queue '- **unmarked** [roadmap: soon/alpha] — LEADPROSE only, nothing marked.' ' BODYPROSE here too.'
146
+ out="$( cd "$SANDBOX" && bash "$EMIT" --emit )"
147
+ absent "bypass-slug" "$out" "unmarked"
148
+ absent "bypass-leadprose" "$out" "LEADPROSE"
149
+ absent "bypass-bodyprose" "$out" "BODYPROSE"
150
+
151
+ # An empty horizon still gets its heading, carrying the placeholder.
152
+ queue '- **only-soon** [roadmap: soon/alpha] — the only entry.' "$decl"
153
+ out="$( cd "$SANDBOX" && bash "$EMIT" --emit )"
154
+ want "empty-heading" "$out" "### someday"
155
+ want "empty-placeholder" "$out" "_Nothing is queued under this horizon._"
156
+
157
+ # The written block ends on a blank line before the :end marker — without it the
158
+ # Pages parser leaves the list open and renders the marker inside the last <li>.
159
+ printf 'framing\n\n<!-- roadmap:begin -->\n<!-- roadmap:end -->\n' >"$SANDBOX/ROADMAP.md"
160
+ ( cd "$SANDBOX" && bash "$EMIT" --write >/dev/null )
161
+ if ! grep -B1 -F -- '<!-- roadmap:end -->' "$SANDBOX/ROADMAP.md" | head -1 | grep -qx ''; then
162
+ echo " FAIL [write-trailing-blank]: no blank line before the :end marker:"
163
+ printf ' %s\n' "$(cat "$SANDBOX/ROADMAP.md")"
164
+ fails=$((fails + 1))
165
+ fi
166
+
167
+ # --write leaves every byte outside the markers untouched.
168
+ printf 'KEEP-ABOVE\n\n<!-- roadmap:begin -->\nstale\n<!-- roadmap:end -->\n\nKEEP-BELOW\n' >"$SANDBOX/ROADMAP.md"
169
+ ( cd "$SANDBOX" && bash "$EMIT" --write >/dev/null )
170
+ page="$(cat "$SANDBOX/ROADMAP.md")"
171
+ want "write-above" "$page" "KEEP-ABOVE"
172
+ want "write-below" "$page" "KEEP-BELOW"
173
+ absent "write-stale" "$page" "stale"
174
+
175
+ # An empty QUEUE_KIT_ROADMAP_FILE is the clean skip for a consumer with no page.
176
+ cat >"$SANDBOX/noroadmap.sh" <<'EOF'
177
+ QUEUE_KIT_HORIZONS=(soon someday)
178
+ QUEUE_KIT_TRACKS=(alpha beta)
179
+ EOF
180
+ out="$( cd "$SANDBOX" && QUEUE_KIT_CONFIG_FILE="$SANDBOX/noroadmap.sh" bash "$GATE" 2>&1 )"
181
+ code "skip-exit" "$?" 0
182
+ want "skip" "$out" "this consumer publishes no roadmap"
183
+
184
+ # A half-configured vocabulary is malformed config, not a lenient default.
185
+ cat >"$SANDBOX/halfconfig.sh" <<'EOF'
186
+ QUEUE_KIT_HORIZONS=(soon someday)
187
+ EOF
188
+ out="$( cd "$SANDBOX" && QUEUE_KIT_CONFIG_FILE="$SANDBOX/halfconfig.sh" bash "$GATE" 2>&1 )"
189
+ code "half-exit" "$?" 2
190
+ want "half" "$out" "QUEUE_KIT_TRACKS is empty"
191
+
192
+ if [[ "$fails" -gt 0 ]]; then
193
+ echo "roadmap.test.sh: $fails case(s) failed"
194
+ exit 1
195
+ fi
196
+ echo "roadmap.test.sh: clean (assertion B: valid, unknown horizon/track, unparseable field, duplicate tag, untagged; assertion C: missing/duplicate declaration, dead marking, independent findings reported together; emit whitelist: lead/body/cost prose excluded, done excluded, unmarked entry contributes nothing, empty-horizon placeholder; --write splice bounds + trailing blank; empty-page skip; half-configured vocabulary; 41 checks)"
197
+ exit 0
@@ -30,13 +30,21 @@ declare -p QUEUE_KIT_ACTIVE_SECTIONS &>/dev/null \
30
30
  || QUEUE_KIT_ACTIVE_SECTIONS=("New Features" "Technical Debt")
31
31
 
32
32
  [[ -v QUEUE_KIT_DEFERRED_SECTION ]] || QUEUE_KIT_DEFERRED_SECTION="Deferred"
33
+ [[ -v QUEUE_KIT_ICEBOX_SECTION ]] || QUEUE_KIT_ICEBOX_SECTION=""
33
34
  [[ -v QUEUE_KIT_DONE_SECTION ]] || QUEUE_KIT_DONE_SECTION="Done"
34
35
 
35
36
  [[ -v QUEUE_KIT_WRAP_BUDGET ]] || QUEUE_KIT_WRAP_BUDGET=100
36
37
 
38
+ [[ -v QUEUE_KIT_ENTRY_LINE_CAP ]] || QUEUE_KIT_ENTRY_LINE_CAP=50
39
+
40
+ [[ -v QUEUE_KIT_ICEBOX_AGE_DAYS ]] || QUEUE_KIT_ICEBOX_AGE_DAYS=30
41
+
37
42
  declare -p QUEUE_KIT_REQUIRED_SECTIONS &>/dev/null \
38
43
  || QUEUE_KIT_REQUIRED_SECTIONS=("Iteration:" "New Features" "Technical Debt" "Deferred" "Done" "Lessons Learned")
39
44
 
45
+ # spec: queue-kit/SPEC.md §Layout and configuration — the icebox joins the required set by derivation, never by a second consumer list: a configured-but-absent section would let every icebox assertion pass open on a section that is not there
46
+ [[ -n "$QUEUE_KIT_ICEBOX_SECTION" ]] && QUEUE_KIT_REQUIRED_SECTIONS+=("$QUEUE_KIT_ICEBOX_SECTION")
47
+
40
48
  declare -p QUEUE_KIT_PROSE_LEADS &>/dev/null || QUEUE_KIT_PROSE_LEADS=("Protocol:")
41
49
 
42
50
  declare -p QUEUE_KIT_PROSE_SURFACE_GLOBS &>/dev/null || QUEUE_KIT_PROSE_SURFACE_GLOBS=()
@@ -49,16 +57,31 @@ declare -p QUEUE_KIT_LESSON_SINKS &>/dev/null || declare -A QUEUE_KIT_LESSON_SIN
49
57
 
50
58
  [[ -v QUEUE_KIT_ATTEND_CAP ]] || QUEUE_KIT_ATTEND_CAP=3
51
59
 
60
+ declare -p QUEUE_KIT_HORIZONS &>/dev/null || QUEUE_KIT_HORIZONS=()
61
+
62
+ declare -p QUEUE_KIT_TRACKS &>/dev/null || QUEUE_KIT_TRACKS=()
63
+
64
+ [[ -v QUEUE_KIT_ROADMAP_FILE ]] || QUEUE_KIT_ROADMAP_FILE=""
65
+
66
+ [[ -v QUEUE_KIT_ROADMAP_MARKER ]] || QUEUE_KIT_ROADMAP_MARKER="roadmap"
67
+
52
68
  queue_alt() { local IFS='|'; printf '%s' "$*"; }
53
69
 
54
70
  # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
55
71
  QUEUE_ACTIVE_RE="^## ($(queue_alt "${QUEUE_KIT_ACTIVE_SECTIONS[@]}"))[[:space:]]*$"
56
72
  # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
57
73
  QUEUE_DEFERRED_RE="^## ${QUEUE_KIT_DEFERRED_SECTION}[[:space:]]*$"
74
+ # spec: queue-kit/SPEC.md §The icebox tier — an unset knob leaves a regex nothing can match, so every icebox reader degrades to "no icebox" rather than to "every section"
75
+ # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
76
+ QUEUE_ICEBOX_RE="${QUEUE_KIT_ICEBOX_SECTION:+^## ${QUEUE_KIT_ICEBOX_SECTION}[[:space:]]*$}"
58
77
  # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
59
78
  QUEUE_DONE_RE="^## ${QUEUE_KIT_DONE_SECTION}[[:space:]]*$"
79
+ _qk_task_sections=("${QUEUE_KIT_ACTIVE_SECTIONS[@]}" "$QUEUE_KIT_DEFERRED_SECTION")
80
+ # spec: queue-kit/SPEC.md §The icebox tier — the icebox is a *live* task section: joining the shared task regex is what makes eviction a conserved move and carries slug uniqueness, blocker resolution, the living-prose contract and the lead-line guard onto the tier with no gate edit
81
+ [[ -n "$QUEUE_KIT_ICEBOX_SECTION" ]] && _qk_task_sections+=("$QUEUE_KIT_ICEBOX_SECTION")
60
82
  # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
61
- QUEUE_TASK_RE="^## ($(queue_alt "${QUEUE_KIT_ACTIVE_SECTIONS[@]}" "$QUEUE_KIT_DEFERRED_SECTION"))[[:space:]]*$"
83
+ QUEUE_TASK_RE="^## ($(queue_alt "${_qk_task_sections[@]}"))[[:space:]]*$"
84
+ unset _qk_task_sections
62
85
  # shellcheck disable=SC2034 # consumed by sourcing gates, never within this lib
63
86
  QUEUE_SECTION_RE="^## "
64
87
  # spec: queue-kit/SPEC.md §The tag algebra — the Lessons heading is fixed spelling (a required-sections default), read by queue-index + check-tag-lead-line; no knob
@@ -89,6 +112,55 @@ queue_done_slugs() {
89
112
  ' "$1"
90
113
  }
91
114
 
115
+ # spec: queue-kit/SPEC.md §bin/roadmap.sh — the one [roadmap:] + roadmap-summary: parse, shared by the emitter and check-roadmap-fresh so the two never disagree on what an entry claims. One TSV line per live entry carrying either, in queue order: <tag-count> <raw-field> <slug> <declaration-count> <summary>. The summary is the entry's roadmap-summary: declaration verbatim — a whitelist, so unmarked body prose never reaches the page.
116
+ queue_roadmap_entries() {
117
+ awk -v taskre="$QUEUE_TASK_RE" -v sectre="$QUEUE_SECTION_RE" '
118
+ function tagcount(line, s, n) {
119
+ s = line; n = 0
120
+ while (match(s, /\[roadmap:/)) { n++; s = substr(s, RSTART + RLENGTH) }
121
+ return n
122
+ }
123
+ function field(line, f) {
124
+ if (!match(line, /\[roadmap:[^]]*\]/)) return ""
125
+ f = substr(line, RSTART, RLENGTH)
126
+ sub(/^\[roadmap:[[:space:]]*/, "", f); sub(/[[:space:]]*\]$/, "", f)
127
+ return f
128
+ }
129
+ function slugof(line) {
130
+ if (!match(line, /\*\*[a-z0-9][a-z0-9-]*\*\*/)) return ""
131
+ return substr(line, RSTART + 2, RLENGTH - 4)
132
+ }
133
+ function declared(line, t) {
134
+ t = line
135
+ sub(/^[[:space:]]*roadmap-summary:[[:space:]]*/, "", t)
136
+ gsub(/[[:space:]]+/, " ", t)
137
+ sub(/^ /, "", t); sub(/ $/, "", t)
138
+ return t
139
+ }
140
+ # spec: queue-kit/SPEC.md §lib/queue.sh — the field column of an untagged entry prints as "-", never empty: tab counts as IFS whitespace, so a reader splitting on it coalesces an empty column and silently shifts every field after it
141
+ function flush( f) {
142
+ f = (fieldv == "" ? "-" : fieldv)
143
+ if (slug != "" && (ntags > 0 || nsum > 0))
144
+ printf "%d\t%s\t%s\t%d\t%s\n", ntags, f, slug, nsum, sumtext
145
+ slug = ""; ntags = 0; nsum = 0; fieldv = ""; sumtext = ""
146
+ }
147
+ $0 ~ taskre { flush(); inq = 1; next }
148
+ $0 ~ sectre { flush(); inq = 0; next }
149
+ !inq { next }
150
+ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
151
+ flush()
152
+ slug = slugof($0); ntags = tagcount($0); fieldv = field($0)
153
+ next
154
+ }
155
+ # spec: queue-kit/SPEC.md §The tag algebra — the declaration is body-scoped by design, so it is read off a continuation line and counted per entry
156
+ slug != "" && /^[[:space:]]+roadmap-summary:/ {
157
+ nsum++
158
+ if (nsum == 1) sumtext = declared($0)
159
+ }
160
+ END { flush() }
161
+ ' "$1"
162
+ }
163
+
92
164
  _qk_errs=()
93
165
  [[ ${#QUEUE_KIT_ACTIVE_SECTIONS[@]} -gt 0 ]] || _qk_errs+=("QUEUE_KIT_ACTIVE_SECTIONS is empty")
94
166
  [[ -n "$QUEUE_KIT_DEFERRED_SECTION" ]] || _qk_errs+=("QUEUE_KIT_DEFERRED_SECTION is empty")
@@ -97,8 +169,22 @@ _qk_errs=()
97
169
  || _qk_errs+=("QUEUE_KIT_WRAP_BUDGET must be a positive integer (got '$QUEUE_KIT_WRAP_BUDGET')")
98
170
  [[ "$QUEUE_KIT_ATTEND_CAP" =~ ^[0-9]+$ && "$QUEUE_KIT_ATTEND_CAP" -gt 0 ]] \
99
171
  || _qk_errs+=("QUEUE_KIT_ATTEND_CAP must be a positive integer (got '$QUEUE_KIT_ATTEND_CAP')")
172
+ [[ "$QUEUE_KIT_ENTRY_LINE_CAP" =~ ^[0-9]+$ && "$QUEUE_KIT_ENTRY_LINE_CAP" -gt 0 ]] \
173
+ || _qk_errs+=("QUEUE_KIT_ENTRY_LINE_CAP must be a positive integer (got '$QUEUE_KIT_ENTRY_LINE_CAP')")
174
+ [[ "$QUEUE_KIT_ICEBOX_AGE_DAYS" =~ ^[0-9]+$ && "$QUEUE_KIT_ICEBOX_AGE_DAYS" -gt 0 ]] \
175
+ || _qk_errs+=("QUEUE_KIT_ICEBOX_AGE_DAYS must be a positive integer (got '$QUEUE_KIT_ICEBOX_AGE_DAYS')")
176
+ [[ "$QUEUE_KIT_ICEBOX_SECTION" != "$QUEUE_KIT_DEFERRED_SECTION" ]] \
177
+ || _qk_errs+=("QUEUE_KIT_ICEBOX_SECTION must not name the deferred section")
100
178
  [[ -n "$QUEUE_KIT_PRECONDITION_REGEX" ]] || _qk_errs+=("QUEUE_KIT_PRECONDITION_REGEX is empty")
101
179
  [[ ${#QUEUE_KIT_REQUIRED_SECTIONS[@]} -gt 0 ]] || _qk_errs+=("QUEUE_KIT_REQUIRED_SECTIONS is empty")
180
+ [[ -n "$QUEUE_KIT_ROADMAP_MARKER" ]] || _qk_errs+=("QUEUE_KIT_ROADMAP_MARKER is empty")
181
+ # spec: queue-kit/SPEC.md §Layout and configuration — the roadmap vocabulary is all-or-nothing: one array set while the other is empty would accept every value of the unconfigured field, so a half-configured pair is malformed config, not a lenient default
182
+ if [[ ${#QUEUE_KIT_HORIZONS[@]} -gt 0 && ${#QUEUE_KIT_TRACKS[@]} -eq 0 ]]; then
183
+ _qk_errs+=("QUEUE_KIT_HORIZONS is set but QUEUE_KIT_TRACKS is empty — the roadmap vocabulary is configured as a pair")
184
+ fi
185
+ if [[ ${#QUEUE_KIT_TRACKS[@]} -gt 0 && ${#QUEUE_KIT_HORIZONS[@]} -eq 0 ]]; then
186
+ _qk_errs+=("QUEUE_KIT_TRACKS is set but QUEUE_KIT_HORIZONS is empty — the roadmap vocabulary is configured as a pair")
187
+ fi
102
188
  if [[ ${#_qk_errs[@]} -gt 0 ]]; then
103
189
  printf 'queue-kit: malformed queue config — the gates cannot run:\n' >&2
104
190
  printf ' %s\n' "${_qk_errs[@]}" >&2
@@ -13,6 +13,7 @@ check-tag-lead-line
13
13
  check-task-names
14
14
  check-task-conservation
15
15
  check-queue-prose-precondition
16
+ check-roadmap-fresh
16
17
  EOF
17
18
 
18
19
  cp "$SMOKE_KIT_ROOT/templates/TASK-QUEUE.md" TASK-QUEUE.md
@@ -34,7 +34,7 @@
34
34
 
35
35
  ### Someday
36
36
 
37
- - **example-deferred** — a design-pending entry. [needs-spec]
37
+ - **example-deferred** — a design-pending entry. [design-pending]
38
38
 
39
39
  ## Done
40
40
 
@@ -104,6 +104,12 @@ rendered text — which is exactly the symptom the assertion keys on, so the gat
104
104
  a standing defense against the whole class rather than a stopgap against one
105
105
  backtick-fence shape of it.
106
106
 
107
+ **Reach is `SITE_KIT_DOCS_DIR`, and stays there.** A repo-root page has no site
108
+ URL and is served by the forge's own CommonMark view, so a kramdown-only
109
+ divergence there is not reader-visible and this gate is right not to walk it.
110
+ The renderer-to-surface map is a consumer's own documentation concern, not a
111
+ widened scan.
112
+
107
113
  The scan enumerates tracked `*.md` files under `SITE_KIT_DOCS_DIR` via
108
114
  `git ls-files` (every underscore-prefixed directory segment excluded — those are
109
115
  Jekyll internals, not published pages), strips Jekyll front matter so it renders
@@ -155,9 +161,9 @@ line naming the dependency (ruby plus the kramdown-parser-gfm gem, or a
155
161
  `SITE_KIT_RENDERER` override) — a gate that cannot run its oracle refuses, never
156
162
  a false clean. That dependency joins the *consumer's* toolchain only when the
157
163
  consumer registers this gate; it stays outside env-probe's probe-set floor, and
158
- `docs/install.md`'s Requirements prose states the tier (SPEC-os-support.md owns
159
- that page's ruling). A consumer with no published docs site simply omits the
160
- gate by the registry-not-array convention and never installs the dependency.
164
+ `docs/install.md`'s Requirements prose states the tier. A consumer with no
165
+ published docs site simply omits the gate by the registry-not-array convention
166
+ and never installs the dependency.
161
167
 
162
168
  The false-positive floor is the assertion's hard boundary, deliberately set. The
163
169
  backtick symptom rests on a property of well-formed markdown: every backtick