Skip to content

Canary 403 NOT fixed by #745/#746 — release-manager App can't bypass tag ruleset even repo-scoped; need effective-permission diagnostic #749

Description

@don-petry

The #745 hypothesis was wrong — token scoping is NOT the cause

PR #746 (repo-scoped CANARY_WRITE_TOKEN) merged and is live, but the first promotion-due run after it (#29489643941, 10:06Z) still failed all 4 moves with the identical error:

_gh_move_tag: could not move refs/tags/agent-shield/v2-ring0 (HTTP):
{"message":"Resource not accessible by integration","status":"403"}

Verified in that run:

  • The write token is minted and used: _gh_write routes PATCH /git/refs/tags through CANARY_WRITE_TOKEN (canary-rollout.sh:120-122, 144).
  • It is repo-scoped correctly: repositories: [.github, .github-private], permission-contents: write.
  • Still 403. So an owner-wide token AND a repo-scoped token both fail — token scoping was never the cause.

What is definitively established

  • OrgAdmin can move the tag — a manual admin-token PATCH (no-op, same sha) of auto-rebase/v2-ring0 returned 200. API + ruleset + tag state are healthy.
  • The release-manager App (4193127) cannot — 403 on the same endpoint, regardless of token scope.
  • Nothing config-side changed across the break: release-channel-tags ruleset (#18516227) last updated 2026-07-04 (bypass_actors = OrgAdmin + 3167543 + 4193127, all mode=always); App installation last updated 2026-07-11. Last successful move was 2026-07-13 20:55Z (#29284341779); first failure 2026-07-15 06:12Z.
  • "Resource not accessible by integration" is a permission/accessibility 403 — NOT a "repository rule violations" message — which is odd given the App both has contents:write AND is a listed bypass actor.

Ask: get DATA, don't guess again

  1. Add a one-shot diagnostic in the _gh_move_tag failure path (behind the existing un-suppress from feat: implement issue #743 — Canary promotions fail at tag-move step — _gh_move_tag swallows the API error (persistent since 2026-07-15) #744): on a 403, dump the write-token's effective permissions — e.g. gh api -i /repos/petry-projects/.github and print X-Accepted-GitHub-Permissions / the /installation permissions the token actually carries, plus whether the token is repo- or owner-scoped. This distinguishes:
    • (a) token lacks effective contents:write → minting bug (code-fixable — e.g. the permission-contents: write request isn't being honored owner-side, or the App's install perm on the specific repo differs from the org view).
    • (b) token HAS contents:write but the ruleset bypass isn't applied → NOT a code bug. A maintainer must re-save the release-channel-tags bypass_actors (re-applying sometimes re-establishes an Integration bypass that silently lapsed) or open GitHub support. Do not loosen/remove the ruleset.
  2. Post the diagnostic output on this issue so the next step is decided from data.

Guardrails

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions