Repository navigation
fix(release): unify channel-tag moves onto the gh-api/App-token path (#1076) - #1087
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR unifies channel-tag and release-tag mutations in Estimated code review effort: 4 (Complex) | ~60 minutes ChangesUnify tag moves onto gh-api path
Premature-closure detection library
Sequence Diagram(s)sequenceDiagram
participant Agent
participant Script as canary-rollout.sh / cut-release.sh
participant HostResolver as agent_host_repo / host default
participant GhApi as gh api
Agent->>Script: run promote/rollback/cut
Script->>HostResolver: resolve host repo
HostResolver-->>Script: host
Script->>GhApi: PATCH/POST refs, git/tags
GhApi-->>Script: tag/ref result
Script-->>Agent: status output
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request unifies release and channel tag operations for both this-repo and cross-repo agents to consistently use the GitHub API (gh api) on the agent's host repository, eliminating local git tag and git push operations to ensure the release-manager App token can bypass rulesets on protected tags. Corresponding tests have been updated to verify this unified API-driven behavior. The review feedback suggests using more idiomatic Bash parameter expansion (${host:-$THIS_REPO}) to assign default host values in scripts/canary-rollout.sh.
There was a problem hiding this comment.
Pull request overview
Unifies agent release tag operations so both this-repo and cross-repo agents resolve refs, create annotated release tags, and move channel tags exclusively via gh api against the agent’s host repository—eliminating the previously split local git push --force path that could fail protected channel-tag updates (GH013) and lead to orphaned release tags.
Changes:
- Refactors
cut-release.shto use a single GitHub API path for ref resolution, tag creation, and channel moves, introducing host-repo resolution helpers. - Updates
canary-rollout.shpromote/rollback flows to move channel tags via_gh_move_tag(API) for all agents, not local git. - Adjusts and extends Bats tests with structural guards to prevent reintroduction of local
git tag/git pushtag-move paths and to validate host resolution behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/cut-release.sh | Routes all tag operations through gh api on the resolved agent host repo; removes local tag/push path. |
| scripts/canary-rollout.sh | Uses API-based channel-tag moves for promote/rollback regardless of agent host; aligns dry-run output. |
| tests/test_cut_release.bats | Replaces prior local-git identity/ordering guards with invariant tests enforcing API-only tag ops and host resolution. |
| tests/test_cut_release_cross_repo.bats | Updates expectations so this-repo agents also resolve/publish via API against their host repo. |
| tests/canary_rollout.bats | Adds assertions/guards ensuring promote/rollback paths do not use local git tag/git push and show API usage. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #1087 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/cut-release.sh`:
- Around line 34-51: The comment in cut-release.sh contains a typo where the
GitHub protected-ref error code is written as 013s instead of the correct GH013.
Update the explanatory comment near the release tag API logic to use the same
GH013 wording already used elsewhere in the script so the reference is
consistent.
In `@scripts/lib/premature-closure-detect.sh`:
- Line 36: The premature-closure threshold default is duplicated as a magic
value, so centralize it in a single readonly constant in
premature-closure-detect.sh near the PC_MAX_OPEN_MINUTES initialization. Then
update both _pc_threshold call sites to use that constant instead of the
hardcoded fallback value, keeping the default window consistent in the script.
In `@tests/test_cut_release.bats`:
- Around line 22-26: The regression guard in test_cut_release.bats is too narrow
because it only matches git tag/git push at the start of a line, so it can miss
reintroduced local-git paths inside conditionals, subshells, or chained
commands. Broaden the assertion in the cut-release test to scan the script for
any occurrence of the git tag or git push operations, while still keeping the
existing agent_host_repo check, so the guard reliably covers the cut-release.sh
path regardless of formatting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 3ec78deb-12ea-4244-9f3b-dda2bd6af0fa
📒 Files selected for processing (7)
scripts/canary-rollout.shscripts/cut-release.shscripts/lib/premature-closure-detect.shtests/canary_rollout.batstests/test_cut_release.batstests/test_cut_release_cross_repo.batstests/test_premature_closure_detect.bats
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Review — fix requested (cycle 1/3)The automated review identified the following issues. Please address each one: Findings to fixAutomated review — NEEDS HUMAN REVIEWRisk: MEDIUM SummaryThe core #1076 change is correct and well-tested, but the PR cannot merge: it is CONFLICTING with main (2 commits behind) because it bundles a duplicate, slightly-divergent copy of the #1077 premature-closure detector that already landed on main via a separate PR. Needs a rebase onto main that drops/reconciles the duplicated files. Linked issue analysisFixes #1076 (open) — root-cause fix for dev-lead orphan-tag spam. The issue calls for routing EVERY tag operation (resolve, create, channel-move, promote, rollback) through gh api against the agent's host repo, since a local git push --force is not granted the release-manager App's ruleset bypass for tag UPDATEs (GH013 on dev-lead/next). The diff substantively implements exactly this: cut-release.sh drops the local-git branch entirely (new this_repo/agent_host_repo helpers, gh CLI presence check, unified gh-api resolve/create/move, immutability guard via gh_tag_exists preserved), and canary-rollout.sh routes cmd_promote/cmd_rollback through _gh_move_tag for all agents. Tests pin the invariant (structural guards against reintroducing local git tag/push, agent_host_repo coverage, this-repo --push asserts API create+move). FindingsBlocking
Non-blocking notes
CI statusAll checks green at Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review. Additional tasks
The review cascade will automatically re-review after new commits are pushed. |
…ath (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45524be to
4aaeeb1
Compare
Dev-Lead — review-changes (applied)Changes committed and pushed. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1076) (#1087) * fix(release): unify all channel-tag moves onto the gh-api/App-token path (#1076) Root cause of the dev-lead orphan-tag spam: cut-release.sh and canary-rollout.sh each had a split move path. Cross-repo agents move tags via `gh api` (App token → release-channel-tags ruleset bypass → works); the THIS-repo agent (dev-lead) moved via local `git tag -f` + `git push --force`. A local force-push is NOT granted the App's ruleset bypass for a tag UPDATE, so `dev-lead/next` 013'd ("Cannot update this protected ref") every autocut tick while the release-tag CREATE (unrestricted) still succeeded — minting a fresh orphaned vX.Y.Z each time. Fix: route EVERY tag operation — resolve, create, channel-move, promote, rollback — through `gh api` against the agent's HOST repo, for this-repo and cross-repo agents alike. The App token is the same bypass actor via the API, so protected channel moves succeed uniformly. Also migration-robust: correctness no longer depends on which repo the workflow runs in (after the .github relocation, the 6 .github agents flip to the this-repo path and dev-lead to cross-repo — both keep working). - cut-release.sh: single gh-api path; new this_repo/agent_host_repo helpers resolve the host (GITHUB_REPOSITORY / origin); dropped the local git-tag/push branch and the git-identity source (setup_git_identity no longer needed here). - canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents (host defaults to THIS_REPO); removed the this-repo git branches. - Tests: replaced the git-identity structural tests with a consistent-path invariant + agent_host_repo coverage; this-repo cut/promote now assert the gh-api move; structural guards fail if a local git tag/push is ever reintroduced. 130/130 bats pass. Note (config): closing #1076 fully assumes the release-manager App bypass is honored via `gh api` on .github-private's release-channel-tags ruleset (it is a bypass actor, mode=always). If a channel move still 013s via the API, the bypass list itself needs fixing (ruleset change) — surfaced separately, not workaroundable in code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>



Fixes #1076 (re-scoped — see the issue for full root-cause).
Why
The dev-lead orphan-tag spam is a symptom of a split move path: cross-repo agents move channel tags via
gh api(App token →release-channel-tagsruleset bypass → works), but the this-repo agent (dev-lead) moved via localgit push --force, which is not granted the App's bypass for a tag UPDATE and 013s ondev-lead/next. The release-tag create (unrestricted) still succeeds, so every autocut tick mints a fresh orphanedvX.Y.Z.What
One consistent path: every tag op — resolve, create, channel-move, promote, rollback — goes through
gh apiagainst the agent's host repo, this-repo and cross-repo alike. Migration-robust (correctness no longer depends on where the workflow runs).cut-release.sh: single gh-api path;this_repo/agent_host_repohost resolution; dropped the local git-tag/push branch + git-identity source.canary-rollout.sh:cmd_promote+cmd_rollbackmove via_gh_move_tagon the host for all agents.agent_host_repocoverage, this-repo cut/promote assert the gh-api move, structural guards against reintroducing local git moves. 130/130 bats pass.Config caveat (cannot self-apply)
Assumes the App bypass is honored via
gh apion.github-private's ruleset (it is a bypass actor,mode=always). If a channel move still 013s via the API, the ruleset bypass list needs fixing — surfaced separately, not workaroundable in code.🤖 Generated with Claude Code
Summary by CodeRabbit