Skip to content

DonePhaseBroken counts sites by phase and site; fix main's ratchet red after #3151 - #3216

Merged
trissim merged 6 commits into
mainfrom
fix/done-phase-site-count
Oct 25, 2026
Merged

trissim merged 6 commits into
mainfrom
fix/done-phase-site-count

Conversation

@trissim

@trissim trissim commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Main is red, and has been since 03:20Z, on two leftovers of #3151, which deleted Measure.key:

Changes:

  • PhaseSiteCount(MeasureCount) carries phase: type[PlanPhase] and site. The count words its own growth line (MeasureCount.grew), and Measure.grew asks it; Advisory still overrides at the measure.
  • DonePhaseBroken.grew and its partition are deleted.
  • DonePhaseBroken.parts finds the source root with inspect.getfile(PlanPhase). Read the done-phase source root without an origin #3212 used __file__ or "", and an empty path resolves to the working directory, so the measure silently ran over nothing.
  • The ratchet's Repository fixture adds the origin remote every real checkout has. The DonePhaseBroken test's own copy of that line is deleted.
  • The StoreLockCalls test now reads .at(path).text.

Checks:

  • tests/guards/test_debt_ratchet.py: 211 passed. It fails 2 on main.
  • mypy on tools/debt_ratchet.py: 33 errors, the same as main.
  • On e7009839d..c5cf4bdfd (main~6 to main) with the source root src, the 1,262,499-byte JSON report and stderr are byte-identical to main's tool.
  • git grep -nE 'partition\(":"\)' tools/debt_ratchet.py prints nothing.
  • The ::\{ grep still prints 4 lines: the two GitHub annotation formats (::warning file=...::) and two count text projections. None of them is ever parsed back.
  • Repo.of stays in combine/read because MainTree needs the repository's GitHub name for the rules evidence (phase_evidence.py:420), and the origin remote is that name's only owner.

🤖 Generated with Claude Code

https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V

trissim and others added 6 commits October 24, 2026 23:10
Main's DonePhaseBroken spelled each site "Phase::site" through Measure.key
and split it back with partition to word the growth line. #3151 deletes
Measure.key, so the merge was textually clean and the ratchet would raise
AttributeError. PhaseSiteCount carries the phase class and the site as
fields, and the count words its own growth line; Measure.grew asks it.

The ratchet's Repository fixture now carries the origin remote every
real checkout has, and the DonePhaseBroken test's own copy is deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
…ses on a missing file

An empty __file__ fallback resolved to the working directory, so the measure
would silently run over nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
#3194 merged a minute after #3151 deleted Measure.key, so main's ratchet
suite raised AttributeError in both roots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
Copilot AI balanced review requested due to automatic review settings October 25, 2026 03:26
@trissim
trissim enabled auto-merge October 25, 2026 03:26

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.

@trissim
trissim merged commit fe3f9e0 into main Oct 25, 2026
8 checks passed
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