Repository navigation
DonePhaseBroken counts sites by phase and site; fix main's ratchet red after #3151 - #3216
Merged
Merged
Conversation
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
trissim
enabled auto-merge
October 25, 2026 03:26
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.
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.
Main is red, and has been since 03:20Z, on two leftovers of #3151, which deleted
Measure.key:cls.key(f"{phase}::{site}")and split it back withpartition(BOUND-4: structure flattened to text, then parsed back). Key every ratchet count by one record, not a spelled string #3151 merged at 3ad90ab, before this fold, so on main the first done phase that breaks raises AttributeError instead of failing the PR.StoreLockCalls.key. It merged a minute after Key every ratchet count by one record, not a spelled string #3151, sotests/guards/test_debt_ratchet.pyfails in both roots.Changes:
PhaseSiteCount(MeasureCount)carriesphase: type[PlanPhase]andsite. The count words its own growth line (MeasureCount.grew), andMeasure.grewasks it;Advisorystill overrides at the measure.DonePhaseBroken.grewand itspartitionare deleted.DonePhaseBroken.partsfinds the source root withinspect.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.Repositoryfixture adds theoriginremote every real checkout has. The DonePhaseBroken test's own copy of that line is deleted..at(path).text.Checks:
tests/guards/test_debt_ratchet.py: 211 passed. It fails 2 on main.tools/debt_ratchet.py: 33 errors, the same as main.e7009839d..c5cf4bdfd(main~6 to main) with the source rootsrc, the 1,262,499-byte JSON report and stderr are byte-identical to main's tool.git grep -nE 'partition\(":"\)' tools/debt_ratchet.pyprints nothing.::\{grep still prints 4 lines: the two GitHub annotation formats (::warning file=...::) and two counttextprojections. None of them is ever parsed back.Repo.ofstays incombine/readbecauseMainTreeneeds 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