Skip to content

ci(deploy): install SKILLS_GITHUB_TOKEN as GITHUB_TOKEN in the backend .env#160

Merged
DIodide merged 1 commit into
mainfrom
ci/prod-skills-github-token
Jul 4, 2026
Merged

ci(deploy): install SKILLS_GITHUB_TOKEN as GITHUB_TOKEN in the backend .env#160
DIodide merged 1 commit into
mainfrom
ci/prod-skills-github-token

Conversation

@DIodide

@DIodide DIodide commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Cherry-pick of the staging CI change (b6b74a5) so the prod host gets the skills GitHub token on this deploy rather than waiting for the next staging→main promotion.

The gateway's SKILL.md backfill calls the GitHub API unauthenticated from one EC2 IP — 60 req/hr shared across every user. The deploy now writes the SKILLS_GITHUB_TOKEN secret (already set) into the host .env as GITHUB_TOKEN — replace-on-deploy, so rotating the secret rotates the host; skipped when unset. Convex-side imports already have the token via the Convex prod env (set directly).

Scoped to the one CI commit — the post-1.0 staging work (#157) is deliberately NOT included. The identical patch is on staging, so the next promotion merges cleanly.

…d .env

The gateway's SKILL.md backfill (skill_content.py) calls the GitHub API
unauthenticated from one EC2 IP — 60 req/hr shared across every user. Write
the SKILLS_GITHUB_TOKEN secret into the host .env on deploy (replace-on-
deploy, so rotating the secret rotates the host; skipped when unset). The
Convex-side skill imports get the same token via the Convex env directly.

(cherry picked from commit b6b74a5)
@claude

claude Bot commented Jul 4, 2026

Copy link
Copy Markdown

Code review

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

@DIodide
DIodide merged commit 93edf83 into main Jul 4, 2026
4 checks passed
@DIodide
DIodide deleted the ci/prod-skills-github-token branch July 4, 2026 03:16
DIodide added a commit that referenced this pull request Jul 5, 2026
…-cd (#163)

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).
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