fix(ci): use ambient github.token for CI timing report (adopt upstream fix)#113
Merged
Merged
Conversation
…m fix) The 'CI timing report' job failed on every push to main with 'ValueError: missing environment variable GITHUB_TOKEN' because the step's env used secrets.AUTOFIX_BOT_PAT — an upstream-only secret this fork does not have, so the env var was empty. Upstream (NousResearch/hermes-agent) has since migrated off AUTOFIX_BOT_PAT; their current ci-timings step uses github.token, which exists in every repo and carries the Actions: read permission the timings collector needs. Adopting the exact upstream line also prevents future upstream syncs from conflicting or reintroducing the failure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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.
Problem
The CI timing report job (step "Collect timings and generate report") fails on essentially every push to main — e.g. runs 29990409635 and 29990456363. Non-required, but it leaves an UNSTABLE overall check state on PRs and a red X on main.
Root cause
The step's env was:
AUTOFIX_BOT_PATis an upstream (NousResearch) secret this fork does not have, so the env var resolved to empty andscripts/ci/timings_report.pyfailed immediately:The
AUTOFIX_BOT_PATreference arrived via the upstream sync merge (upstream PR #66373). A later fork-safety pass (upstream #66577, fork commit 1e01a4bbe) added thesecrets.AUTOFIX_BOT_PAT || github.tokenfallback to the PR-gate step at line 58 but missed this one.Fix
Adopt upstream's current fix verbatim. NousResearch/hermes-agent has since migrated off
AUTOFIX_BOT_PAT(upstream commit7a69b82ad"ci: migrate AUTOFIX_BOT_PAT to GitHub App token"), and their ci-timings step today reads:This is a one-line change.
github.tokenexists in every repo — no secrets required — and the job's ambient token already carriesActions: read(visible in the failed run's permission block), which is all the timings collector needs. The script also fails soft (TimingsUnavailable→ degraded summary, exit 0) on API hiccups, so the job stays green.Upstream consideration
Disabling the job with
if: github.repository == 'NousResearch/hermes-agent'(the convention used bydocker.yml,deploy-site.yml,skills-index*.yml) was considered, but with a working token the job provides real value in the fork (per-PR timing diff reports), and matching upstream's exact current line means future upstream syncs merge cleanly instead of reintroducing the failure.Verification
yaml.safe_loadOK)collect_timingshas the Actions:read scope it needs🤖 Generated with Claude Code