@windyroad/retrospective 0.23.0-preview.521 → 0.23.1
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.
package/package.json
CHANGED
|
@@ -38,13 +38,25 @@
|
|
|
38
38
|
# 2. Then all MUST_SPLIT lines, sorted by basename.
|
|
39
39
|
#
|
|
40
40
|
# Output is empty (no lines) when no topic files exceed the threshold.
|
|
41
|
-
#
|
|
41
|
+
#
|
|
42
|
+
# Two scan exclusions:
|
|
43
|
+
# 1. README.md — the Tier 2 index, not a Tier 3 topic file.
|
|
44
|
+
# 2. *-archive*.md — rotation SINKS produced by split-by-date.
|
|
45
|
+
# Archives are loaded on-demand only (per docs/briefing/README.md
|
|
46
|
+
# "load alongside when full historical context needed"); they are
|
|
47
|
+
# NOT session-start-loaded and therefore sit outside the per-topic
|
|
48
|
+
# session-surface budget that ADR-040 Tier 3 governs. Flagging them
|
|
49
|
+
# forces a churn-vs-defer choice with no correct destination
|
|
50
|
+
# (a sink has no chronologically-correct sibling slot for further
|
|
51
|
+
# splitting). P322 closes this — archives are explicitly out of
|
|
52
|
+
# scope for the OVER / MUST_SPLIT pass.
|
|
42
53
|
#
|
|
43
54
|
# Read-only — does NOT mutate any briefing file. Rotation is surfaced
|
|
44
55
|
# to the user via run-retro Step 3.
|
|
45
56
|
#
|
|
46
57
|
# @problem P099 (initial OVER advisory)
|
|
47
58
|
# @problem P145 (MUST_SPLIT escalation — closes the defer-recurrence gap)
|
|
59
|
+
# @problem P322 (archive-sink exclusion — closes the sink-rotation forced-choice)
|
|
48
60
|
# @adr ADR-040 (Session-start briefing surface — Tier 3 budget; this
|
|
49
61
|
# script promotes Tier 3 from informational to advisory enforcement;
|
|
50
62
|
# MUST_SPLIT promotes the 2× reassessment trigger to per-cycle)
|
|
@@ -87,6 +99,12 @@ for path in "${files[@]}"; do
|
|
|
87
99
|
if [ "$base" = "README.md" ]; then
|
|
88
100
|
continue
|
|
89
101
|
fi
|
|
102
|
+
# *-archive*.md files are rotation SINKS — loaded on-demand only,
|
|
103
|
+
# NOT session-start-loaded; out of scope for the session-surface
|
|
104
|
+
# budget. See P322 + header rationale.
|
|
105
|
+
case "$base" in
|
|
106
|
+
*-archive*.md) continue ;;
|
|
107
|
+
esac
|
|
90
108
|
bytes=$(wc -c < "$path" | tr -d ' ')
|
|
91
109
|
entries+=("$base $bytes")
|
|
92
110
|
done
|
|
@@ -146,6 +146,48 @@ write_briefing_entry() {
|
|
|
146
146
|
[ -z "$output" ]
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
# ── Archive-sink exclusion (P322) ───────────────────────────────────────────
|
|
150
|
+
#
|
|
151
|
+
# Archive files match `*-archive*.md` and are rotation SINKS — destination
|
|
152
|
+
# of split-by-date — loaded on-demand only, NOT session-start-loaded.
|
|
153
|
+
# Holding them to the per-topic session-surface budget forces a churn-vs-
|
|
154
|
+
# defer choice with no correct answer (re-rotating a sink has no
|
|
155
|
+
# chronologically-correct destination among existing siblings). The
|
|
156
|
+
# session-start surface budget (ADR-040 Tier 3) targets session-start-
|
|
157
|
+
# loaded files only. P322 closes this by excluding `*-archive*.md` from
|
|
158
|
+
# the OVER / MUST_SPLIT pass — same shape as the README.md exclusion.
|
|
159
|
+
#
|
|
160
|
+
# @problem P322
|
|
161
|
+
|
|
162
|
+
@test "check-briefing-budgets: archive file at or above threshold is excluded (P322 rotation sink)" {
|
|
163
|
+
mkdir -p "$FIXTURE_DIR/briefing"
|
|
164
|
+
# Archive sink that would otherwise trip OVER + MUST_SPLIT
|
|
165
|
+
write_briefing_entry "$FIXTURE_DIR/briefing/governance-workflow-archive.md" 20000
|
|
166
|
+
run "$SCRIPT" "$FIXTURE_DIR/briefing"
|
|
167
|
+
[ "$status" -eq 0 ]
|
|
168
|
+
[ -z "$output" ]
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@test "check-briefing-budgets: archive variant -archive-2026-05.md is also excluded" {
|
|
172
|
+
mkdir -p "$FIXTURE_DIR/briefing"
|
|
173
|
+
# Date-suffixed archive sibling created by split-by-date rotation
|
|
174
|
+
write_briefing_entry "$FIXTURE_DIR/briefing/hooks-and-gates-archive-2026-05.md" 12000
|
|
175
|
+
run "$SCRIPT" "$FIXTURE_DIR/briefing"
|
|
176
|
+
[ "$status" -eq 0 ]
|
|
177
|
+
[ -z "$output" ]
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@test "check-briefing-budgets: non-archive over-threshold file is still flagged alongside archive exclusion" {
|
|
181
|
+
mkdir -p "$FIXTURE_DIR/briefing"
|
|
182
|
+
# Mixed case: session-start surface file IS flagged; archive sink IS NOT.
|
|
183
|
+
write_briefing_entry "$FIXTURE_DIR/briefing/active-topic.md" 8000
|
|
184
|
+
write_briefing_entry "$FIXTURE_DIR/briefing/active-topic-archive.md" 8000
|
|
185
|
+
run "$SCRIPT" "$FIXTURE_DIR/briefing"
|
|
186
|
+
[ "$status" -eq 0 ]
|
|
187
|
+
echo "$output" | grep -E "^OVER active-topic.md bytes=[0-9]+ threshold=5120"
|
|
188
|
+
! echo "$output" | grep -q "active-topic-archive.md"
|
|
189
|
+
}
|
|
190
|
+
|
|
149
191
|
# ── Configurable threshold via env var ──────────────────────────────────────
|
|
150
192
|
|
|
151
193
|
@test "check-briefing-budgets: BRIEFING_TIER3_MAX_BYTES env var overrides default" {
|