ci(deploy): set GITHUB_TOKEN on the Convex deployment during frontend-cd#163
Merged
Conversation
The skill-repo import (convex/skills.ts: listRepoSkills / importSkillRepo / ensureSkillDetails) calls the GitHub API from Convex egress. Without a GITHUB_TOKEN env var on the deployment it shares the anonymous 60/req/hr limit and fails (the browse dialog shows a rate-limit error / no skills). The token had never been set on the app's real Convex deployment (incredible-otter-96): a manual `convex env set --prod` from this repo targets a DIFFERENT project (dusty-echidna-658) that the repo happens to be linked to, not the one CONVEX_DEPLOY_KEY / VITE_CONVEX_URL point at. Fix it the durable way: right after `convex deploy`, set GITHUB_TOKEN on the SAME deployment the deploy key targets (prod on main, staging otherwise) from the existing SKILLS_GITHUB_TOKEN secret. Idempotent, rotates with the secret, fail-soft when unset. Mirrors the FastAPI host token step (#160).
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Fixes skill-repo import on prod.
convex/skills.tscalls the GitHub API from Convex egress; without aGITHUB_TOKENenv var on the deployment it shares the anonymous 60/hr limit and fails.Root cause (found via a Codex computer-use test of harness.nz): the token was never on the app's real Convex deployment. A manual
convex env set --prodfrom this repo targetsdusty-echidna-658(the project this checkout is linked to), but the live app usesincredible-otter-96(perVITE_CONVEX_URL+CONVEX_DEPLOY_KEY). My CLI login can't authorizeincredible-otter-96, so the durable fix is to let CI set it via the deploy key it already has.What this does: after
npx convex deploy, runnpx convex env set GITHUB_TOKEN "$SKILLS_GITHUB_TOKEN"against the same deployment the key targets — prod on main, staging otherwise. Idempotent, rotates with theSKILLS_GITHUB_TOKENsecret (already present), fail-soft if unset. Same pattern as the FastAPI host token (#160).The import code is already proven correct (reproduced end-to-end in the Convex runtime on dev: 38 skills discovered + cached, 6 categories, 0 errors); this was purely the missing prod env var.
Merge to staging sets it on the staging Convex deployment; promoting to main sets it on prod (
incredible-otter-96).