Repository navigation
Freeze released work-boards and read them with the current readers (#271) - #312
Merged
Merged
Conversation
) The first half of the Board family of the persisted-contracts D rows. tests/fixtures/persisted/board/<release>/ holds the board databases v0.1.2, v0.2.0 and v0.3.0 wrote with their own CLIs: board add, run (a fake codex whose behaviour each run sets), update, import-review- candidates, decide and, from v0.2.0, compact. - lifecycle: gate evidence passing (route) and failing (pipeline; route drops a rejected gate report), the agent's done and review blocks with handoff and outputs, an agent failure, a killed claim reclaimed by the release's next run, manual evidence, sign-off, a refused bare done, a human block, an annotate, human-required set and cleared, dependencies on a done, a planned and a missing item, an imported review candidate, and decisions global, scoped and superseded; - running: a run SIGKILLed while its agent works, with its WAL; - crash-blocked: a SIGINT and an orchestration crash (a .pth hook loaded for the run only raises inside Supervisor.run); - compacted (v0.2.0, v0.3.0): partly compacted, so one item's claims and reclaim live only in the rollups and another's are split between the rollups and the live audit. The generator fails unless every shape the tests read is present, and refuses a cell holding the box path, home or hostname, so nothing is rebound. After copying each database it has the release's own interpreter read a scratch copy (Board.get, list, transitions, active_decisions, _row_to_decision on every row, stats at a fresh and an aged clock and on both sides of an item's aging cutoff): those reads are the expected values. The test works on copies and reads: - HEAD's first open: the added columns and tables, every released cell kept, a second open a no-op, the files 0600; - Board.get, list (filtered too) and transitions field by field against the release's reads and against the raw cells; - board list and board show, both against the release's reads through the renderers and line by line from the release's values alone; - active_decisions, _row_to_decision (retired rows included), board decisions, project_lessons (no released decision is a lesson), stats and board stats; - the human path on released rows: done counting stored evidence or refused without it, sign-off, clear-human-required, an annotate keeping a released lease, supersede in and out of scope, a re-import skipped, and refused when the stored provenance differs in any checked part. No source under src/ changes; no current reader misread a released row. 48 injected one-line regressions in board.py each fail the test. 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 first half of the Board family. It follows the convention of the artifacts, rooms, workflows and sessions families. The issue stays open.
The family is split in two PRs. This one freezes the databases and covers the readers and the human path. The second covers HEAD
board run, GC, compaction andrenew_claimon a released board, plus the gateway, dashboard and TUI readers. It adds no fixtures.What
tests/fixtures/persisted/board/freeze.pywrites the board databases for v0.1.2, v0.2.0 and v0.3.0 using each release's own CLI:board add,run,update,import-review-candidates,decide, and from v0.2.0compact.codex, and each run sets its behaviour.add(2, 3) == 5on a one-file repository.lifecycle:doneandreviewblocks, with handoff and outputs;done;human-requiredset and cleared;running: a run SIGKILLed while its agent works, together with its WAL.crash-blocked: a SIGINT, and an orchestration crash. The crash comes from a.pthhook that is loaded for that run only and raises insideSupervisor.run.compacted(v0.2.0 and v0.3.0): partly compacted. One item's claims and reclaim are only in the rollups. Another item's are split between the rollups and the live audit, so each count needs both sources.Board.get,list,transitions,active_decisions,_row_to_decisionon every row, andstats. The stats are taken at a fresh clock, at an aged clock, and on both sides of one item's aging cutoff.Board.get,list(filtered too) andtransitionsare compared field by field with the release's reads and with the raw cells.board listandboard showare checked against the release's reads through the renderers. They are also checked line by line using only the release's values, so a reader and a renderer that drift together still fail.active_decisions;_row_to_decisionon every row, retired ones included;board decisions;project_lessons, which is empty because no released decision is a lesson.statsat every recorded clock, andboard statsat the fresh and aged clocks.update --state donecounts stored evidence, and is refused without it.--sign-off, and--clear-human-requiredon a crash.decide --supersedes: allowed in the same scope; refused out of scope and for an already-superseded decision.docs/architecture/persisted-contracts.md: the Board row now names these, and also what no release wrote:test_lessons.py.test_board.pystay the coverage.No source under
src/changes. No current reader misread a released row. One release difference is pinned rather than reported: v0.1.2 leavesblocked_reasonempty on a crash-blocked item, and v0.2.0 onward stores the crash note there.Verification
suite-runis CLEAN, andruff check .is clean.board.py, injected exactly once and restored from a byte copy. Each fails the test. They include:_row_to_itemfield, plus list order and list fields;_load_evidencefield;_row_to_decisionfield, and theactive_decisionssuperseded, goal and unbound clauses;_same_review_provenanceclause;_add_missing_columns, both whole and for one column;from_stateterms, the aging cutoff, and the stats default clock;render_board,render_itemandrender_board_statsdropping content.Board.listwas checked for ids only. That is fixed.🤖 Generated with Claude Code