Skip to content

fix(release): unify channel-tag moves onto the gh-api/App-token path (#1076) - #1087

Merged
don-petry merged 2 commits into
mainfrom
fix/cut-release-unify-gh-api
Jul 4, 2026
Merged

don-petry merged 2 commits into
mainfrom
fix/cut-release-unify-gh-api

Conversation

@don-petry

@don-petry don-petry commented Jul 4, 2026 •

Copy link
Copy Markdown
Collaborator

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-tags ruleset bypass → works), but the this-repo agent (dev-lead) moved via local git push --force, which is not granted the App's bypass for a tag UPDATE and 013s on dev-lead/next. The release-tag create (unrestricted) still succeeds, so every autocut tick mints a fresh orphaned vX.Y.Z.

What

One consistent path: every tag op — resolve, create, channel-move, promote, rollback — goes through gh api against 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_repo host resolution; dropped the local git-tag/push branch + git-identity source.
  • canary-rollout.sh: cmd_promote + cmd_rollback move via _gh_move_tag on the host for all agents.
  • Tests: consistent-path invariant, agent_host_repo coverage, 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 api on .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

  • New Features
    • Added premature-closure detection and reporting for issues, including a markdown summary of candidates and a clear “no candidates” message.
  • Bug Fixes
    • Standardized canary promotion, rollback, and release cut flows to use GitHub API-based tag updates consistently.
    • Improved dry-run output so it accurately reflects what would be changed.
  • Tests
    • Expanded coverage for release/tag workflows and added tests for premature-closure detection behavior.

Copilot AI review requested due to automatic review settings July 4, 2026 18:12
@don-petry
don-petry requested a review from a team as a code owner July 4, 2026 18:12
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 14a6f744-f4ba-4671-8780-1a7b4f7c8d35

📥 Commits

Reviewing files that changed from the base of the PR and between fd8ac3c and cdba129.

📒 Files selected for processing (6)
  • scripts/canary-rollout.sh
  • scripts/cut-release.sh
  • scripts/lib/premature-closure-detect.sh
  • tests/canary_rollout.bats
  • tests/test_cut_release.bats
  • tests/test_cut_release_cross_repo.bats
📝 Walkthrough

Walkthrough

This PR unifies channel-tag and release-tag mutations in canary-rollout.sh and cut-release.sh onto a single gh api-based path against a resolved host repo, removing local git tag/git push branches, with corresponding test updates. It also adds a new premature-closure-detect.sh library with a Bats test suite.

Estimated code review effort: 4 (Complex) | ~60 minutes

Changes

Unify tag moves onto gh-api path

Layer / File(s) Summary
Canary rollout documentation updates
scripts/canary-rollout.sh
Top-level and _gh_move_tag comments updated to describe API-based, PATCH-then-POST tag move semantics.
cmd_promote/cmd_rollback unified host-based move
scripts/canary-rollout.sh
Both commands always compute a host (default THIS_REPO) and move tags exclusively via _gh_move_tag/_gh_tag_commit, removing local git tag -f/git push --force branches.
Canary rollout test coverage
tests/canary_rollout.bats
Dry-run test now asserts gh api PATCH output and excludes local tag updates; new structural guard test forbids git tag/git push in move paths.
cut-release.sh host resolution helpers and docs
scripts/cut-release.sh
Adds this_repo() and agent_host_repo(), updates usage/help text and comments, clarifies strip_origin.
main() requires gh and resolves host
scripts/cut-release.sh
main() now requires the gh CLI and sets host via agent_host_repo.
Unified promote and release-cut API flows
scripts/cut-release.sh
--promote and release cut resolve, create, and move tags via gh_resolve_sha/gh_create_annotated_tag/gh_move_tag against the host, enforcing tag immutability and --push gating.
cut-release.sh test coverage
tests/test_cut_release.bats, tests/test_cut_release_cross_repo.bats
Tests assert no local git tag/push usage, validate agent_host_repo resolution, and confirm dry-run/push flows call gh api against the resolved host.

Premature-closure detection library

Layer / File(s) Summary
Detection library implementation
scripts/lib/premature-closure-detect.sh
Adds configurable PC_MAX_OPEN_MINUTES threshold, input parsing/truthiness helpers, premature_closure_reasons, is_premature_closure, minutes_between, and generate_premature_closure_report.
Detector test suite
tests/test_premature_closure_detect.bats
Adds Bats coverage for detection conditions, threshold overrides, defensive input handling, minutes_between, and report generation.

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
Loading

Possibly related PRs

Suggested labels: initiative

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also adds a new premature-closure detector library and tests for #1077, which are unrelated to #1076. Move the premature-closure detector work into a separate PR or remove it from this release-tag fix.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: moving channel-tag operations to the gh-api/App-token path.
Linked Issues check ✅ Passed The release scripts and tests now route resolve/create/move/promote/rollback through gh api on the host repo, matching #1076.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cut-release-unify-gh-api

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

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot 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.

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.

Comment thread scripts/canary-rollout.sh Resolved
Comment thread scripts/canary-rollout.sh Resolved

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.

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.sh to use a single GitHub API path for ref resolution, tag creation, and channel moves, introducing host-repo resolution helpers.
  • Updates canary-rollout.sh promote/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 push tag-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.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 18:28
@don-petry
don-petry disabled auto-merge July 4, 2026 18:28
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 18:30
@don-petry
don-petry disabled auto-merge July 4, 2026 18:30
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1087
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-04T19:03:34Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

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.
Next attempt after: 2026-07-04T19:03:34Z

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 18:33

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 10b328a and fd8ac3c.

📒 Files selected for processing (7)
  • scripts/canary-rollout.sh
  • scripts/cut-release.sh
  • scripts/lib/premature-closure-detect.sh
  • tests/canary_rollout.bats
  • tests/test_cut_release.bats
  • tests/test_cut_release_cross_repo.bats
  • tests/test_premature_closure_detect.bats

Comment thread scripts/cut-release.sh Resolved
Comment thread scripts/lib/premature-closure-detect.sh Resolved
Comment thread tests/test_cut_release.bats Resolved
@don-petry
don-petry disabled auto-merge July 4, 2026 18:40
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 4, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 45524be8495cc1ffc27db12e3b170cbab71ea574
Review mode: triage-approved (single reviewer)

Summary

The 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 analysis

Fixes #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).

Findings

Blocking

  1. Merge conflict (mergeable=CONFLICTING, mergeState=DIRTY). The branch is 2 commits behind main. scripts/lib/premature-closure-detect.sh exists on BOTH the branch and main with divergent content (the branch's copy extracts a _PC_DEFAULT_MAX_OPEN_MINUTES constant; main's merged copy repeats the literal 30). tests/test_premature_closure_detect.bats is byte-identical to main's. Resolution: rebase onto main; the dev-lead: issues closed as "completed" without the fix landing (premature closure) #1077 files should drop out of this PR (or, if the constant-extraction is worth keeping, land it as its own trivial PR).

  2. Scope mixing. The PR body says "Fixes release: unify all channel-tag moves onto the gh-api/App-token path (root fix for dev-lead orphan-tag spam) #1076" but the diff bundles the unrelated dev-lead: issues closed as "completed" without the fix landing (premature closure) #1077 premature-closure detector + 186-line test file — work that already landed on main separately. This appears to be a dev-lead fix-reviews commit landing on the wrong branch. After the rebase the PR should contain only the 4 release-path files.

Non-blocking notes

  • this_repo() fallback remote-URL parsing (${url#*github.com[:/]}) handles both git@ and https forms correctly; GITHUB_REPOSITORY is preferred on runners.
  • The structural guard in tests/canary_rollout.bats only matches line-start git tag/git push — a compound command (x && git push) would evade it. The cut-release guard uses the stronger \bgit[[:space:]]+(tag|push)\b form; consider aligning. (Prior CodeRabbit thread on this was resolved.)
  • Config caveat acknowledged in the PR body: the fix assumes the App bypass is honored via gh api on this repo's ruleset — not verifiable in review; if a channel move still GH013s via the API, the ruleset bypass list needs fixing (tracked separately per the PR body).
  • Secret scan: the run_secret_scanning MCP tool is not available in this environment; manual inspection of the diff found no secrets/credentials (gitleaks CI still applies).
  • All 5 prior review threads (gemini, CodeRabbit) are resolved; CodeRabbit's changes-requested review was dismissed. No unanswered human-reviewer questions.

CI status

All checks green at 45524be8495c: CodeQL SUCCESS, Analyze (actions) SUCCESS, Analyze (python) SUCCESS, CodeRabbit SUCCESS, dependabot-automerge SKIPPED (n/a). SonarCloud quality gate passed (comment). However, mergeStateStatus=DIRTY — the PR has merge conflicts with main and cannot merge until rebased.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

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>
@don-petry
don-petry force-pushed the fix/cut-release-unify-gh-api branch from 45524be to 4aaeeb1 Compare July 4, 2026 19:45
@don-petry
don-petry disabled auto-merge July 4, 2026 19:46
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 19:51
@don-petry
don-petry disabled auto-merge July 4, 2026 19:52
@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 19:54
@don-petry
don-petry merged commit c43a6f7 into main Jul 4, 2026
40 checks passed
@don-petry
don-petry deleted the fix/cut-release-unify-gh-api branch July 4, 2026 19:58
don-petry added a commit that referenced this pull request Aug 2, 2026
…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>
don-petry added a commit that referenced this pull request Aug 3, 2026
…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>
don-petry added a commit that referenced this pull request Aug 3, 2026
…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>
don-petry added a commit that referenced this pull request Aug 3, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 7, 2026
…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>
don-petry added a commit that referenced this pull request Aug 8, 2026
…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>
don-petry added a commit that referenced this pull request Aug 8, 2026
…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>
don-petry added a commit that referenced this pull request Aug 8, 2026
…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>
don-petry added a commit that referenced this pull request Aug 8, 2026
…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>
don-petry added a commit that referenced this pull request Aug 18, 2026
…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>
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.

release: unify all channel-tag moves onto the gh-api/App-token path (root fix for dev-lead orphan-tag spam)

3 participants