Visitar URL original
Let carry.py Carry an Unpromoted Registry Entry From a Develop Checkout by ptr727 · Pull Request #4125 · ptr727/ProjectTemplate · GitHub
Skip to content

Let carry.py Carry an Unpromoted Registry Entry From a Develop Checkout - #4125

Merged
ptr727 merged 3 commits into
developfrom
fix/carry-develop-registry-entry
Nov 13, 2026
Merged

ptr727 merged 3 commits into
developfrom
fix/carry-develop-registry-entry

Conversation

@ptr727

@ptr727 ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses #4085, per the maintainer's answer there (option 1). scripts/carry.py could not run STANDUP.md step 2 for a repository whose registry entry had merged to develop but not yet reached main. It refused any hub checkout not at origin/main, and the target's entry was missing there.

  • verify_hub accepts develop for an unpromoted entry. A hub checkout at origin/develop is accepted when the target has no entry on origin/main. It is refused for a target main already registers, so every other carry stays on main. This matches repo-config/configure.sh and spec/audit.py since Refuse a configure.sh Apply for an Unregistered Repository and Name the Develop Checkout for an Unpromoted Entry #4082.
  • From main, a develop-only entry is named. The run says to use a develop checkout rather than reporting the repository unregistered.
  • Both branches are fetched by explicit refspec. The hub menus clone main with --single-branch, where a plain git fetch origin main develop never creates origin/develop.
  • The menus stay main-only, as their own policy. Their --ref/-Ref refusal now names the unpromoted case and points at running scripts/carry.py from a develop checkout. Their comments, which stated the old carry.py rule, now state the menu's.
  • Docs agree. STANDUP.md step 2, GOVERNANCE.md "Hub-Hosted Tooling", scripts/README.md "carry.py", and host-setup/README.md.

registry_matches replaces the duplicate entry matching in resolve_repo.

Verification

  • tests/test_carry.py: 85 tests pass. The new CarryHubTests build a real two-branch hub and cover main, develop, the refusals both ways, a checkout at neither, and a --single-branch main clone. Against the old plain fetch, the single-branch case fails with fatal: invalid object name 'origin/develop', the defect it pins.
  • Pre-commit gates clean: ruff format and check, mypy, prose gate, EOL. shellcheck host-setup/menu.sh and a PowerShell parse of host-setup/menu.ps1 are clean.
  • The menu change is a message string and comments only. menu.ps1 was parsed with pwsh on Linux, not run on native Windows.

Labels

comments: the change corrects existing comments in both menus that the new behavior made false.

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 12, 2026 15:34
carry.py refused any hub checkout not at origin/main, while the target's
registry entry reaches main only at the next hub promotion. So a standup
could not run STANDUP.md step 2 between the entry merging to develop and
that promotion.

verify_hub now accepts a checkout at origin/develop when the target has
no entry on origin/main, and refuses develop for a target main already
registers. Run from main for a develop-only entry, it names the develop
checkout rather than reporting the repository unregistered. STANDUP.md,
GOVERNANCE.md "Hub-Hosted Tooling", and scripts/README.md say the same.

Fixes #4085

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hub menus clone main with --single-branch, so a plain `git fetch
origin main develop` there never creates origin/develop. A name missing
from main's registry then failed with git's raw invalid-object error
rather than naming the develop checkout. The fetch now names both
remote-tracking refs explicitly, and a single-branch clone test pins it.

registry_matches replaces the duplicate entry matching, and the registry
read drops a guard the trusted registry never needs. The menu comments
and host-setup/README.md now say the menu carries from main only, and an
unpromoted entry is carried from a develop checkout outside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A menu user carrying an unpromoted repository got carry.py's pointer to
a develop checkout, then the menu's own --ref refusal sent them back to
main. The refusal now says such a repository is carried outside the
menu from a develop checkout, and its comments state the main-only rule
as the menu's own policy rather than a carry.py limit.

The develop-only check tests truthiness like its main-side twin, and
the hub fixture no longer depends on the host's commit signing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 13, 2026 00:46
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f5194ae and f44d9d5.

Files selected for processing: 8

  • GOVERNANCE.md
  • STANDUP.md
  • host-setup/README.md
  • host-setup/menu.ps1
  • host-setup/menu.sh
  • scripts/README.md
  • scripts/carry.py
  • tests/test_carry.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head f44d9d588303273107aa4d7b8076cde48338e011, the content this pull request carries at that commit against develop, and it recorded 0 findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The review found no unresolved issues, with the branch-aware carry behavior and its promoted, unpromoted, refusal, and single-branch scenarios covered by corresponding tests and documentation.

No open issues 🎉

What changed in this PR

This PR updates scripts/carry.py to support carrying repositories whose registry entries exist on develop but have not yet reached main, while preserving main for promoted entries.

Changes:

  • Accepts origin/develop for unpromoted registry entries.
  • Fetches both main and develop explicitly, including from single-branch clones.
  • Updates tests, documentation, and menu messaging for the revised carry behavior.
File Description
tests/​test_carry.py Adds coverage for promoted and unpromoted entries, invalid checkout states, refusal cases, and single-branch clones.
STANDUP.md Documents using a develop checkout for carrying unpromoted registry entries.
scripts/​README.md Describes the updated carry.py branch-selection behavior.
scripts/​carry.py Adds branch-aware hub verification and shared registry matching for promoted and unpromoted entries.
host-setup/​README.md Explains the menu's main-only policy and the direct develop carry workflow.
host-setup/​menu.sh Updates comments and refusal guidance while keeping menu carries restricted to main.
host-setup/​menu.ps1 Mirrors the main-only menu policy and develop-checkout guidance on PowerShell.
GOVERNANCE.md Aligns hub-hosted tooling guidance with the new develop-checkout behavior.

Review effort: Lite

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.69%. Comparing base (b38e084) to head (f44d9d5).
⚠️ Report is 172 commits behind head on develop.

Files with missing lines Patch % Lines
scripts/carry.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4125      +/-   ##
===========================================
- Coverage    81.60%   76.69%   -4.92%     
===========================================
  Files           26       40      +14     
  Lines         9070    14146    +5076     
===========================================
+ Hits          7402    10849    +3447     
- Misses        1668     3297    +1629     
Flag Coverage Δ
python-3.13 76.69% <94.11%> (-4.92%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit b9f70b3 into develop Nov 13, 2026
14 checks passed
@ptr727
ptr727 deleted the fix/carry-develop-registry-entry branch November 13, 2026 01:01
ptr727 added a commit that referenced this pull request Nov 13, 2026
## Summary

Promotes the .NET SDK line work and two changes from other hub sessions
from `develop` to `main`.

- #4110:
- The Linux host installer's default dotnet set is the fleet's SDK line
plus the newest line the feed carries, so a host whose feed has moved
past 10.0 still builds fleet .NET repositories.
- Each installer names the line itself (`DOTNET_FLEET_LINE` on Linux,
`$DOTNET_MAJOR` on Windows) so it still runs fetched on its own, and a
test holds both to the `global.json` baseline.
- The hub's setup-dotnet steps go through a new
`.github/actions/dotnet-sdk`, which installs the line the caller's
`global.json` selects. It falls back to `10.x` for a caller carrying no
`sdk.version` yet.
- #4127: the shared SDK step's ordering comment states the required
order plainly, answering a Copilot finding on this promotion.
- #4129: the `dotnet-sdk` action reads `global.json` as the dotnet host
and setup-dotnet do, so a commented file selects its line, answering a
Copilot finding on this promotion.
- #4130: a `global.json` whose `sdk` is null gets the fallback line, as
the dotnet host treats it, answering a Copilot thread on this promotion.
- #4116: the agent setup runs past a failed tool upgrade, and a held
`cswap` is skipped.
- #4125: `carry.py` carries a registry entry not yet promoted to `main`
when run from a `develop` checkout.

Closes #4106
Closes #4107

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants