Repository navigation
Conversation
A SuperGrok access token lasts 6 hours, so CI needs a scheduled workflow that refreshes it. That workflow needs a refresh token that no other client uses, and setup-auth only handed out access tokens. `ecr setup-auth --ci-store <owner/repo> --ci-target <owner/repo>` signs in to SuperGrok in a temporary OpenCode store and writes both tokens to GitHub Actions secrets with `gh`. Each value goes through stdin, so no token is printed. The refresh token goes to the store repo only.
🤖 AI code reviewDecision: Ready for human review Overall PR risk: Medium. The change is additive, introducing new --ci-store and --ci-target flags. The new code path is isolated: without these flags, the original flow runs unchanged. The affected surface is limited to users running the new flags, and the most plausible issues are wrong --ci-target sending access tokens to an unintended repo or partial write failures leaving secrets out of sync. No code defects were found in review. 🔎 Reviewer summaries (3)
No findings. This review is advisory — it never blocks a merge and never auto-approves. |
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.
Why
A SuperGrok access token lasts 6 hours, and a review cannot renew it. CI needs a scheduled workflow that refreshes the token. That workflow needs a refresh token that no other client uses.
ecr setup-authonly handed out access tokens, so the first tokens had to come from a separate script.How
ecr setup-auth --ci-store <owner/repo> --ci-target <owner/repo>starts the chain.--yesskips the question.ghcan reach the secrets of each repo. This runs before the login.XAI_OAUTH_REFRESH_TOKENto the store repo first. Then it writesXAI_OAUTH_ACCESS_TOKENto the store repo and to each target repo.Each value goes to
gh secret setthrough stdin. So no token is on a command line, in an error message, or on the terminal.LLP 0007 said the refresh token never leaves OpenCode's store. The CI seed is now the one exception, and it uses a login that no OpenCode store keeps.
The refresh workflow is not part of this PR.
Test Plan
bun test: 1194 pass. 12 are new, inci-secrets.test.tsandsetup-auth.test.ts. They use a fakeghand a fakeopencode.bun run typecheck,bun run lint,bun run fmt:check, andbun run llp:check.gh: a full seed, a secret write that fails, a login that returns an expired token, a "no" at the question, and bad flags (exit 2).gh secret set.Stacked on #120.
🤖 Generated with Claude Code