Skip to content

Done plan phases gate every PR - #3200

Merged
trissim merged 3 commits into
mainfrom
fix/done-phases-gate
Oct 25, 2026
Merged

trissim merged 3 commits into
mainfrom
fix/done-phases-gate

Conversation

@trissim

@trissim trissim commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

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

  • DonePhaseBroken in tools/debt_ratchet.py checks every phase in the Plan family registry (PlanPhase.members_with(PlanPhase), the same registry PlanPhase.done reads, so there is no second evaluator and no hand-written list).
    • It reads each phase at the base and at the head, one process per revision.
    • It fails the PR once per site for every phase done at the base and not done at the head. The report key is DonePhaseBroken:PHASE::PATH:LINE.
    • Phases not yet done at the base are skipped, so plan work in progress isn't blocked.
    • It runs only in the src matrix 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 its describe().
  • MainTree.modules keeps 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.
  • RestatedMembersAbsent compares ast.dump only for members whose names match, instead of dumping every member of every class.
  • Classes uses ast.walk.

Proof

🤖 Generated with Claude Code

https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V

trissim and others added 3 commits October 24, 2026 22:32
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
trissim marked this pull request as ready for review October 25, 2026 02:50
@trissim
trissim enabled auto-merge October 25, 2026 02:50
Copilot AI balanced review requested due to automatic review settings October 25, 2026 02:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants