Skip to content

ci(generate): hand the shards a GitHub token for the agent they scaffold - #1302

Merged
antoinetoussaint-byte merged 1 commit into
mainfrom
ci/generate-qualification-github-token
Nov 4, 2026
Merged

antoinetoussaint-byte merged 1 commit into
mainfrom
ci/generate-qualification-github-token

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

Each cmd/generate fixture runs codefly add service --agent go-grpc with no
version, so core's agent manager asks api.github.com for the latest
service-go-grpc release and downloads it, four unauthenticated calls per
scaffold, eight scaffolds per run, from a runner IP whose 60 requests/hour
are shared behind the hosted NAT. When that 403s the manager Debug-logs it
and falls back to the test's fresh CODEFLY_HOME, whose agents directory does
not exist, and the CLI prints the innermost cause: "no such file or
directory". Three of today's thirteen runs failed that way (two of them the
v0.1.235 release pull requests #1297 and #1298), as did runs on 10-30 and
11-02; the same tree passes on re-run.

core reads GITHUB_TOKEN or GH_TOKEN for exactly this lookup
(agents/manager/manager.go newGitHubReleaseClient), and
container-recovery-native.yml already passes github.token to its steps, so
the test step gets the same. The workflow's read permission is enough for
public releases.

Follow-ups, not this change: the resolver should return both causes instead
of Debug-logging the GitHub one, and actionableRoot should keep the path of
an fs.PathError, so the next occurrence names itself.

Classification

Fix at the owner: the credential is the one core's agent manager defines as the only input it reads for this lookup; nothing is retried, skipped or pinned to make the gate quiet. Reused: the same github.token hand-off container-recovery-native.yml already makes.

Tests

None can be added here: the failure is an unauthenticated rate limit on hosted runners. Evidence is in the two failed shard logs (runs 41785300107 job 126425995637 and 41785991159) and the code path above. The workflow runs on this pull request; a green run is consistent with, not proof of, the fix.

Not verified

The GitHub error text itself (403 vs transient) — the per-test log that holds it is deleted by scripts/test-generate-isolated.sh's trap and not retained in the evidence artifact.

🤖 Generated with Claude Code

Each cmd/generate fixture runs `codefly add service --agent go-grpc` with no
version, so core's agent manager asks api.github.com for the latest
service-go-grpc release and downloads it, four unauthenticated calls per
scaffold, eight scaffolds per run, from a runner IP whose 60 requests/hour
are shared behind the hosted NAT. When that 403s the manager Debug-logs it
and falls back to the test's fresh CODEFLY_HOME, whose agents directory does
not exist, and the CLI prints the innermost cause: "no such file or
directory". Three of today's thirteen runs failed that way (two of them the
v0.1.235 release pull requests #1297 and #1298), as did runs on 10-30 and
11-02; the same tree passes on re-run.

core reads GITHUB_TOKEN or GH_TOKEN for exactly this lookup
(agents/manager/manager.go newGitHubReleaseClient), and
container-recovery-native.yml already passes github.token to its steps, so
the test step gets the same. The workflow's read permission is enough for
public releases.

Follow-ups, not this change: the resolver should return both causes instead
of Debug-logging the GitHub one, and actionableRoot should keep the path of
an fs.PathError, so the next occurrence names itself.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit a16db81 Nov 4, 2026
18 of 19 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.

1 participant