Skip to content

fix(t3x): pin sync-escalation gh calls to the fork (GH_REPO) - #18

Merged
radroid merged 1 commit into
mainfrom
t3x/fix-sync-escalation-gh-repo
Jul 27, 2026
Merged

fix(t3x): pin sync-escalation gh calls to the fork (GH_REPO)#18
radroid merged 1 commit into
mainfrom
t3x/fix-sync-escalation-gh-repo

Conversation

@radroid

@radroid radroid commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Problem

The daily t3x upstream sync and t3x weekly verify escalation steps kept failing with failed to open t3x-sync issueeven after PR #12. No t3x-sync issue was ever opened, so the resolve-agent handoff channel stayed silent.

Root cause (not the PR #12 label race)

The Configure git step adds a remote named upstreampingdotgg/t3code (the parent). gh's base-repo resolution ranks a remote named upstream above origin, so every un-pinned gh call in the escalate step targeted the parent repo, where GITHUB_TOKEN has no write access → gh issue create returns 403 → empty URL → the error. The 2>/dev/null on the create hid the real 403.

Reproduced empirically (gh 2.96.0): with origin=fork + upstream=parent and no --repo/GH_REPO, gh issue list returns the parent's issues; the fork returns [].

Fix

  • Add step-level GH_REPO: ${{ github.repository }} to both escalation steps — pins all gh subcommands (label create / issue list / comment / create / edit) to the fork.
  • Stop swallowing stderr on gh issue create (keep || true for set -e) so any future failure is visible in the run log.

Verification

Dispatched t3x-upstream-sync on this branch (dry-run). The real rebase conflict in docs/t3x/SEAMS.md triggered escalation, and it now opens the issue:

https://github.com/radroid/t3code/issues/17
::notice::opened new t3x-sync issue #17

(The run still ends red on purpose — the escalate step exit 1s so the failed sync stays visible in the Actions tab.)

🤖 Generated with Claude Code

The daily upstream-sync and weekly-verify escalation steps still failed
after PR #12: `gh issue create` errored and no t3x-sync issue was ever
opened, so the resolve-agent handoff channel stayed silent.

Root cause is not the label-attach race PR #12 fixed. The "Configure git"
step adds a remote named `upstream` (the parent pingdotgg/t3code). gh's
base-repo resolution ranks a remote named `upstream` above `origin`, so
every un-pinned gh call in the escalate step targeted the PARENT repo,
where GITHUB_TOKEN has no write access -> `gh issue create` returns 403
(reproduced empirically with gh 2.96.0) -> empty URL -> "failed to open
t3x-sync issue" and a red run.

Fix: pin every gh call to this fork via step-level `GH_REPO:
${{ github.repository }}` (honored by label/list/comment/create/edit),
and stop swallowing stderr on `gh issue create` so any future failure is
visible in the run log. Applied to both escalation workflows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c2649067-f405-4e21-9a47-c9f0f9ad54ad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3x/fix-sync-escalation-gh-repo

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.

@radroid
radroid merged commit 24edfb1 into main Jul 27, 2026
1 of 2 checks passed
@radroid
radroid deleted the t3x/fix-sync-escalation-gh-repo branch July 27, 2026 03:35
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.

1 participant