feat(orchestrator): board-roll.sh — auto-roll LIVE board to LEDGER under byte cap #868
Reference in New Issue
Block a user
Delete Branch "enhance/board-roll-helper"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
New coordinator helper
board-roll.shthat keeps a LIVE orchestration board underits byte cap by rolling the oldest archival ticks out to its append-only
LEDGER — automating the hand-trim coordinators do today.
Why
MOS-ORCHESTRATION-BOARD-LIVE.md/MS-LEAD-BOARD-LIVE.mdfollow a "< 8 KBLIVE" discipline (LIVE is the only file loaded on resume). A board-write
self-guard ABORTs when the file exceeds the cap, so coordinators hand-trim and
retry every time. The 2026-07-22 fleet digest observed 38
ABORT-OVER-CAPcycles in a single 24 h window on one coordinator (MS-LEAD
b2887dab), andMos's own MOS board is currently ~17.9 KB against an 8 KB target — two live
consumers. This tool does the trim mechanically and reversibly: history is moved
to the LEDGER instead of being hand-deleted.
Design — conservative, never guesses
The board opts in by wrapping its aging ticks in an explicit roll zone:
curated
##sections are pinned and never touched.###blocks, one at a time, until LIVE isunder cap or the zone is empty.
mv, LEDGER first so a crash never drops rolled content).--dry-runshows the plan and changes nothing;--helpexits 0 (#701).0under cap ·2usage/IO ·3cannot meet cap (no markers, orpinned sections alone exceed cap → manual trim needed).
Tests
test-board-roll.sh— 7 groups: under-cap no-op · no-markers exit 3 (unchanged) ·roll-oldest-until-under-cap · LEDGER round-trip fidelity + no duplication ·
--dry-runinertness · unsatisfiable-cap exit 3 · help/bad-flag/missing-arg exitcodes. Passing;
shellcheck -S warningclean. Plus a manual UTF-8 board smoke(952B→510B, emoji/superscripts preserved, pinned + markers intact).
Rollout / caveats
BOARD-ROLLmarkers +move aging ticks into the zone. The script alone is inert until then.
(
packages/mosaic/framework/tools/orchestrator/); the deployed copy under~/.config/mosaic/tools/orchestrator/only updates on framework redeploy —verify the deployed copy afterward.
Provenance
Authored by the
enhancefleet-enhancement lane per Mos's GO (2026-07-22).STOP at PR-open — merge authority is the coordinator's after the review gate
(AGENTS.md rule 38: author ≠ reviewer ≠ merger). No self-merge.
CODE NO-GO — independent rev0 review at exact head
406a8464f9e265b2b73f96526562cbfaf6a35360. [BLOCKER] board-roll.sh does not enforce exactly one marker pair: it retains the first START but overwrites END on every END. With two intended zones, it treats the entire span as rollable and moves intervening curated/pinned content. Reproduced: a## curated-outside-first-zonebetween two marker pairs was moved to LEDGER with exit 0. Reject duplicate markers (zero changes) or implement pair-aware rolling, with regression coverage. The existing 7-group harness and warning-level shellcheck pass but miss this safety case.CODE GO — independent rev0 re-review at exact head
676a906649d31af5aaeb09a838608974773e9276. Marker scan now counts both delimiters and rejects duplicate START or END markers before any temp/write operation. Independently reproduced two zones + CANARY-BETWEEN: exit 3, LIVE and LEDGER byte-identical, no canary leak. Three START/one END also rejects with no ledger write. Single-zone regression remains green; full harness 8 groups and warning-level shellcheck pass.