Let a hand-run host build choose Percy and the index cache - #6218
Conversation
`CI Host` is already dispatchable, but the jobs read "not a pull request" as "push to main" and a hand-run branch is neither. Percy runs unconditionally against a 10k/month quota — the thing draft PRs skip to protect — and the index cache is skipped, which the workflow's own comment puts at roughly 1.5x per test and warns is uneven across modules. Together that makes a hand-run build expensive and not comparable with the PR runs it would usually be measured against, which is most of why anyone runs one by hand. Two inputs, both defaulting to today's behaviour, so a dispatch that sets nothing is unchanged. `use_index_cache` seeds the realms the way a pull_request run does: the reason main skips the cache is that main produces it, so the freshest artifact predates the commit under test — for a branch it is exactly as fresh as it would be for a PR on that branch. `run_percy` turns snapshots back on for the rare hand-run build that wants them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35d6f999df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`use_index_cache` returned before the changed-file check, so a branch that changes how indexing or rendering behaves could import rows main's code produced: untouched cards are not regenerated, and the run could miss the regression the check exists to catch — the same reason a pull request touching those paths disables the cache. The input is now permission to use the cache when the check passes, not an override of it. A dispatch takes its changed files from the merge base with main, which is the set a pull request for that branch would report, and runs the same gate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Host Test Results 1 files 1 suites 1h 50m 39s ⏱️ Results for commit 1c4db86. |
CI Hostis already dispatchable — that part needed nothing. What it lacks is a way for a hand-run build to be shaped like the PR runs it gets compared against.The jobs read "not a pull request" as "push to main", and a hand-run branch is neither:
Together that makes a hand-run build both expensive and not comparable with a PR run, which is most of what anyone would dispatch one for.
The change
Two
workflow_dispatchinputs, both defaulting to today's behaviour, so a dispatch that sets nothing behaves exactly as it does now.use_index_cachefalsepull_requestrun does.run_percyfalseuse_index_cacheis the one worth explaining. The documented reason main skips the cache is that main produces it, so the freshest artifact predates the commit under test. That reasoning is about main specifically — for a branch, the cached artifact is exactly as fresh as it would be for a pull request on that branch. So the default stays conservative and matches the existing comment, but anything comparing timings against PR runs can opt in.Why now
Sizing the remaining work on #6087 needed a host-test timing comparison for a branch with no PR. The only way to get
CI Hostto run was to open a throwaway PR (#6217, since closed). With this, that isgh workflow run ci-host.yaml --ref <branch> -f use_index_cache=true.Checks
yamllintwith the repo's own.github/.yamllint.ymlin strict mode passes, and the file parses with both inputs nested underworkflow_dispatch. No job logic changes forpushorpull_requestevents — the new branches are guarded ongithub.event_name == 'workflow_dispatch'and sit ahead of the existing!= 'pull_request'checks.🤖 Generated with Claude Code