Repository navigation
Done plan phases gate every PR - #3200
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
DonePhaseBroken reads every Plan family phase through PlanPhase.done at the base and the head, one process per revision, and fails the change for each phase done at the base and not at the head, keyed by phase and file:line. Evidence classes answer their failing sites through a concrete sites() (PatternAbsent, OwnClassChecksAbsent, RestatedMembersAbsent, ClassRostersAbsent, AllEvidence); the rest describe what is missing. MainTree keeps each path's last parsed blob, so one revision parses src once for all 73 phases instead of once per evidence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
trissim
marked this pull request as ready for review
October 25, 2026 02:50
trissim
enabled auto-merge
October 25, 2026 02:50
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
trissim
added a commit
that referenced
this pull request
Oct 25, 2026
This was referenced Oct 25, 2026
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.
A plan phase marked done blocked nothing: the multiple-inheritance plan read done at a2333ca, and then #2943, #2955 and #3130 put three of the deleted sites back with nothing in the way. Now every done phase's evidence is a standing guard on every PR.
What changed
DonePhaseBrokenin tools/debt_ratchet.py checks every phase in the Plan family registry (PlanPhase.members_with(PlanPhase), the same registryPlanPhase.donereads, so there is no second evaluator and no hand-written list).DonePhaseBroken:PHASE::PATH:LINE.srcmatrix leg.PhaseEvidence.sites()returns()by default. Overrides give file:line for PatternAbsent (git grep lines), OwnClassChecksAbsent (each own-class isinstance), RestatedMembersAbsent, ClassRostersAbsent, and AllEvidence (the sites of whichever parts fail). Evidence with no line falls back to itsdescribe().MainTree.moduleskeeps each path's last parsed blob, so one revision parses src once for all 73 phases instead of once per evidence. It is bounded by the number of paths, not by history.RestatedMembersAbsentcomparesast.dumponly for members whose names match, instead of dumping every member of every class.Classesusesast.walk.Proof
test_a_done_phase_fails_the_change_that_breaks_it: a fixture addsisinstance(value, Owned)on a class it declares. The result is status 1 and exactlyDonePhaseBroken:OwnTypeChecksPhase::src/agent_comms/owned.py:6. A clean head passes.InheritanceCleanupPhase::src/agent_comms/cli_protocol.py:46 CLI_FAILURES, which is the roster Reopened multiple inheritance phases: own-class isinstance and CLI failure roster become capabilities #3195 deleted.OwnTypeChecksPhase::src/agent_comms/field_codec.py:2382andregistry_document.py:299, plus the CLI_FAILURES roster. Those are exactly the sites re-added after the plan read done.tests/guards/test_debt_ratchet.py::test_a_done_phase_fails_the_change_that_breaks_it tests/test_phase_evidence.py tests/test_plan_stalled.pygave 32 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V