rev0 (PR #868, Gitea comment #18505) caught a real data-relocation bug:
the marker scan locked start_idx to the FIRST START but overwrote end_idx
on EVERY END, so a board with two BOARD-ROLL zones collapsed into one
first-START..last-END span. That span engulfed the curated `##` content
and the intermediate START/END markers between the two zones, silently
relocating pinned lines into the LEDGER — the exact failure this tool
exists to prevent.
Fix (conservative, matches the "no markers = exit 3" posture): count
START and END markers; if either appears more than once, refuse with
exit 3 and change nothing. Single-zone behavior is unchanged.
Adds regression group 8: two zones with a curated CANARY section between
them, cap 80 → asserts exit 3, LIVE unchanged, and the canary never
leaks into the LEDGER. shellcheck -S warning clean; 8/8 groups pass.
Refs #868
Coordinator boards (MOS/MS-LEAD LIVE) enforce a <8KB discipline via a board-write
self-guard that ABORTs when over cap; coordinators then hand-trim + retry every
time (38 ABORT-OVER-CAP cycles observed in one 24h window). board-roll.sh
automates that trim mechanically and reversibly: oldest archival ticks move to the
append-only LEDGER instead of being hand-deleted.
Conservative by design — only content inside explicit
<!-- BOARD-ROLL:START -->/<!-- BOARD-ROLL:END --> markers is eligible; pinned
title/blockquote/curated ## sections are never touched. Rolls whole oldest
(bottom-most) ### entry blocks until LIVE is under cap or the zone is empty.
No markers -> exit 3, no change (never guesses). Byte-accurate cap (UTF-8 safe),
atomic writes (temp+mv, LEDGER first), --dry-run, --help exits 0 (#701 discipline).
- board-roll.sh: the tool (self-documented header + usage)
- test-board-roll.sh: 7-group regression harness (under-cap no-op, no-markers
exit 3, roll-oldest-until-under-cap, LEDGER fidelity, dry-run inertness,
unsatisfiable-cap exit 3, help/bad-flag exit codes)
- README.md: orchestrator/ tool index + board-roll contract & usage
Shared-runtime helper: authored by enhance lane, STOP at PR-open; merge authority
is the coordinator's after the review gate (AGENTS.md rule 38). Deploy-gap caveat
per #701/#702: SSOT fix lands on web1 only on framework redeploy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>