Skip to content

Read the done-phase source root without an origin - #3212

Merged
trissim merged 2 commits into
mainfrom
fix/done-phase-root-no-origin
Oct 25, 2026
Merged

trissim merged 2 commits into
mainfrom
fix/done-phase-root-no-origin

Conversation

@trissim

@trissim trissim commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes a red that #3200 put on main: test_growth_lines_end_the_merged_log[src/agent_comms] and [src/toad], reported by fork-integrate.

Cause

  • DonePhaseBroken.parts built Repo.of(repo) only to read the default "src".
  • Repo.of runs git remote get-url origin (repo.py:191).
  • The fixture repositories have no origin, so the whole ratchet run died with GitCommandError: No such remote 'origin' before it printed any growth lines.

Fix

  • The measure's root is now the top directory of the module that declares the phases, plan_phases, relative to the ratchet's repository. That is where the declarations actually live.
  • Repo.of now runs only when the measure actually measures.

Proof: PYTHONPATH=$PWD/src pytest -p no:xdist tests/guards/test_debt_ratchet.py -k "growth_lines_end_the_merged_log or done_phase" gave 3 passed: both formerly red cases plus the done-phase pinning test.

🤖 Generated with Claude Code

https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V

trissim and others added 2 commits October 24, 2026 23:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
DonePhaseBroken.parts built Repo.of(repo) only to read "src", and Repo.of
runs git remote get-url origin, so every ratchet run on a checkout with no
origin (the test fixtures) died with GitCommandError before printing its
growth lines. The root is now the top directory of the module that declares
the phases, read from where it is imported; no Repo is built unless the
measure runs.

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 03:06
@trissim
trissim enabled auto-merge October 25, 2026 03:06
Copilot AI balanced review requested due to automatic review settings October 25, 2026 03:06

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 76d3f3f into main Oct 25, 2026
14 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