Skip to content

ci(deploy): set GITHUB_TOKEN on the Convex deployment during frontend-cd#163

Merged
DIodide merged 1 commit into
stagingfrom
ci/convex-github-token
Jul 5, 2026
Merged

ci(deploy): set GITHUB_TOKEN on the Convex deployment during frontend-cd#163
DIodide merged 1 commit into
stagingfrom
ci/convex-github-token

Conversation

@DIodide

@DIodide DIodide commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Fixes skill-repo import on prod. convex/skills.ts calls the GitHub API from Convex egress; without a GITHUB_TOKEN env 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 --prod from this repo targets dusty-echidna-658 (the project this checkout is linked to), but the live app uses incredible-otter-96 (per VITE_CONVEX_URL + CONVEX_DEPLOY_KEY). My CLI login can't authorize incredible-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, run npx convex env set GITHUB_TOKEN "$SKILLS_GITHUB_TOKEN" against the same deployment the key targets — prod on main, staging otherwise. Idempotent, rotates with the SKILLS_GITHUB_TOKEN secret (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).

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).
@DIodide
DIodide merged commit 4b0692c into staging Jul 5, 2026
4 checks passed
@DIodide
DIodide deleted the ci/convex-github-token branch July 5, 2026 18:37
@claude

claude Bot commented Jul 5, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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