Skip to content

fix(deploy): pass the job token to the Feed cutover smoke - #673

Merged
hikariming merged 1 commit into
mainfrom
fix/smoke-github-token
Nov 25, 2026
Merged

hikariming merged 1 commit into
mainfrom
fix/smoke-github-token

Conversation

@hikariming

Copy link
Copy Markdown
Collaborator

Incident

The production cutover of ghfind-server v1.0.17 (deploy commit 39b84f6) failed twice in Deploy production (Cloudflare) run 45523214889, at Verify bounded authenticated Go service contracts before opening the gateway. Production is on Web v1.0.17 with the Feed gateway paused and the Feed queue consumers detached; the Feed stays down until a cutover passes.

That step runs scripts/feed-production-smoke.mjs --mode all, which reads the service account's public identity from https://api.github.com/user/<id> without credentials. GitHub answers 403 to anonymous REST calls from hosted-runner addresses on every attempt; the same request returns 200 from an ordinary machine.

Change

  • deploy-cf-production.yml: pass GITHUB_TOKEN: ${{ github.token }} to that one step. The read is public, so it needs none of the token's permissions, and the workflow and job permissions are unchanged. The workflow mints no other token in this job; the release-bot key is only used by the assemble action.
  • docs/runbook.md: record the incident under Release order, and note that the two deploy workflows start by workflow_run, so GitHub runs their files from main.

The server half is the ghfind-server PR "fix(feed): authenticate the smoke's GitHub identity read when GITHUB_TOKEN is set" (linked in a comment below). It sends the token from v1.0.18 on. This change alone does not fix the cutover: v1.0.17 ignores the variable.

No other step on the cutover path calls api.github.com anonymously: the remaining calls in this job go through gh or GH_TOKEN, and pnpm smoke:deployment only calls the ghfind origin.

Verification

  • scripts/check-cf-release-workflow.mts (from ghfind-server) passes against this workflow.
  • Not run: any production workflow. The step is only exercised by a real cutover.

Release order

  1. Merge this PR and the server PR.
  2. Tag hub v1.0.6, then server v1.0.18 right after it. The hub release composes with server v1.0.17 first; if that composition reaches the cutover it fails at the same step again and stays paused, and the v1.0.18 composition is the one that should pass.

🤖 Generated with Claude Code

The service-contract smoke reads the service account's public GitHub identity
from api.github.com. GitHub answers 403 to anonymous REST calls from
hosted-runner addresses, so the cutover of ghfind-server v1.0.17 failed twice
at that step (run 45523214889) and left the Feed paused.

Pass github.token as GITHUB_TOKEN to that step only. The read is public, so it
needs none of the token's permissions; the job's permissions are unchanged.
ghfind-server sends it from v1.0.18 on.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@hikariming

Copy link
Copy Markdown
Collaborator Author

@hikariming
hikariming merged commit 3883093 into main Nov 25, 2026
3 checks passed
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.

2 participants