fix(t3x): pin sync-escalation gh calls to the fork (GH_REPO) - #18
Merged
Conversation
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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The daily
t3x upstream syncandt3x weekly verifyescalation steps kept failing withfailed to open t3x-sync issue— even after PR #12. Not3x-syncissue was ever opened, so the resolve-agent handoff channel stayed silent.Root cause (not the PR #12 label race)
The
Configure gitstep adds a remote namedupstream→pingdotgg/t3code(the parent).gh's base-repo resolution ranks a remote namedupstreamaboveorigin, so every un-pinnedghcall in the escalate step targeted the parent repo, whereGITHUB_TOKENhas no write access →gh issue createreturns 403 → empty URL → the error. The2>/dev/nullon the create hid the real 403.Reproduced empirically (gh 2.96.0): with
origin=fork +upstream=parent and no--repo/GH_REPO,gh issue listreturns the parent's issues; the fork returns[].Fix
GH_REPO: ${{ github.repository }}to both escalation steps — pins all gh subcommands (label create / issue list / comment / create / edit) to the fork.gh issue create(keep|| trueforset -e) so any future failure is visible in the run log.Verification
Dispatched
t3x-upstream-syncon this branch (dry-run). The real rebase conflict indocs/t3x/SEAMS.mdtriggered escalation, and it now opens the issue:(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