Repository navigation
Run released work-boards with the current board run, GC, compact and readers (#271) - #313
Merged
Merged
Conversation
…readers (#271) The second half of the Board family of the persisted-contracts D rows. No fixture is added: tests/test_frozen_board_ops.py drives HEAD's operational paths over copies of the databases v0.1.2, v0.2.0 and v0.3.0 wrote (tests/fixtures/persisted/board, frozen by the first half). Expected values come from the release's own reads in bindings.json, the raw cells or literals, never from the HEAD function under test. - board run (Supervisor.run_item with a fake agent and memory): FIFO dispatch skipping human-required items and unmet or missing dependencies, a dependency released once a human signs it off, --goal and --id; the released handoff, inputs and active decisions in the prompt (retired and other-scope decisions absent); the outcome added to the released row; an agent's done counted only with this run's gate, not the released one; - a released running lease: reclaimed exactly at claimed_at + lease (one ulp before, at, after), the ledger's reclaimed_at stamped (on v0.1.2 in the column HEAD added), redispatch counted; apply_update, the crash block and renew_claim fenced by the released lease, the wrong lease tried first; - the scratch GC over the released ledger: purged runs never collected, a live lease never, a reclaimed run only after one lease timeout of grace; a failed purge scheduled, then cleared by a successful one, in the columns HEAD added; memory unavailable leaves the ledger alone; - board compact of released history: the rows removed, rollups and counters added to, stats unchanged, a second compaction a no-op, and a cutoff between one item's two claims keeping both halves; - the gateway board_list / board_get / board_stats, dashboard take_snapshot and the TUI board tab, row by row from released values; - a lesson promoted onto a released board leaves the released decisions unbound, and cannot supersede one (the scope is refused before the project). docs/architecture/persisted-contracts.md: the Board row now names these. Not covered: a run v0.1.2 reclaimed but never purged (reclaimed_at NULL, so HEAD collects it without grace; v0.1.2 had none, and its own GC purged every such run in the fixtures), room promote onto a released board, and the memory a released board run wrote. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #271. This is the second half of the Board family. The issue stays open: the Memory backends, TUI jobs and Run envelope families remain.
The first half (#312) froze the board databases v0.1.2, v0.2.0 and v0.3.0 wrote, and covered HEAD's readers and the human update path. This half adds no fixtures and no
src/change. It runs HEAD's operational paths over copies of the same databases.What
tests/test_frozen_board_ops.py(110 cases). Expected values come from the release's own reads inbindings.json, from the raw cells, or from literals. A HEAD function is never its own oracle.board run(Supervisor.run_item, fake agent and memory, realBoardon the copy):bare-done-refused,annotated,human-cleared,needs-done, then nothing. Skipped: human-required, a missing dependency, a planned dependency, and everything not planned. Skipped rows are unchanged cell by cell.needs-planned, thenneeds-two.--goal backendreaches the reclaimed released item ahead of an older one.--idon released items: the handoff, the five inputs and the active backend decisions reach the prompt; superseded and other-scope decisions do not. The run's outcome is added to the released row (outputs appended, evidence and history kept).doneon a row whose released evidence already holds a passing gate:donewith a passing gate from this run, clamped toreviewwithout one.claimed_at + lease(one ulp before, at, after). The ledger'sreclaimed_atis stamped, on v0.1.2 in the column HEAD added. Redispatch is counted.apply_update, the crash block (transition(run_id=)) andrenew_claimare fenced by the released lease. The wrong lease is tried first, while the released one still owns the row. A renewal is observed at a later clock, since the fixture was frozen at the claim.board compactof released history: the rows removed (at < cutoff), the rollups and counters added to, stats unchanged at the fresh and aged clocks, and a second compaction a no-op. A cutoff between one item's two claims keeps both halves, andboard showkeeps only the later history.board_list(default, limited, per state, per goal),board_getandboard_stats;dashboard.take_snapshot; the TUI board tab (row keys and cells, the status line, each item's detail, read from the displayed widgets).docs/architecture/persisted-contracts.md: the Board row names these. Not covered:reclaimed_atis NULL, so HEAD collects it with no grace. v0.1.2 had no grace either, and its own GC purged every such run in the fixtures, so this is recorded rather than called a defect.room promoteonto a released board. It needs a room;test_lessons.pycovers the CLI.board.db.No current path mishandled a released row.
Verification
suite-runis CLEAN,ruff check .is clean andgit diff --checkpasses. The fixture directory is unchanged by the tests.38 injected regressions across
board.py,supervisor.py,dashboard.py,tui.pyandgateway.py. Each is injected exactly once and restored from a byte copy, and each fails a test with an assertion. They cover:reclaimed_atstamp, and the Supervisor's recovery call;renew_claim,apply_updateandtransition;list_recentand the gateway;The repeated compaction is checked by a direct comparison of every cell. No single-site change alters only a second compaction.
Codex review.
🤖 Generated with Claude Code