Skip to content

Let a hand-run host build choose Percy and the index cache - #6218

Merged
backspace merged 2 commits into
mainfrom
ci-host-workflow-dispatch
Sep 22, 2026
Merged

backspace merged 2 commits into
mainfrom
ci-host-workflow-dispatch

Conversation

@backspace

Copy link
Copy Markdown
Contributor

CI Host is 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:

  • Percy runs unconditionally. The guard says "Not a pull request — Percy will always run". Correct for main; on a branch it burns snapshots against a 10k/month quota, which is the exact thing draft PRs skip to protect.
  • The index cache is skipped, so realms index from scratch. The workflow's own comment puts that at about 1.5x per test and warns the penalty is uneven across modules — "weights taken here mis-assign work rather than merely mis-scale it".

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_dispatch inputs, both defaulting to today's behaviour, so a dispatch that sets nothing behaves exactly as it does now.

input default what it does
use_index_cache false Seeds the realms from the cached index, the way a pull_request run does.
run_percy false Takes Percy snapshots.

use_index_cache is 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 Host to run was to open a throwaway PR (#6217, since closed). With this, that is gh workflow run ci-host.yaml --ref <branch> -f use_index_cache=true.

Checks

yamllint with the repo's own .github/.yamllint.yml in strict mode passes, and the file parses with both inputs nested under workflow_dispatch. No job logic changes for push or pull_request events — the new branches are guarded on github.event_name == 'workflow_dispatch' and sit ahead of the existing != 'pull_request' checks.

🤖 Generated with Claude Code

`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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T09:22:31.194169Z 35d6f99 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/ci-host.yaml Outdated
`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>
@github-actions

Copy link
Copy Markdown
Contributor

Host Test Results

    1 files      1 suites   1h 50m 39s ⏱️
4 917 tests 4 903 ✅ 14 💤 0 ❌
4 932 runs  4 918 ✅ 14 💤 0 ❌

Results for commit 1c4db86.

@backspace
backspace requested a review from a team September 21, 2026 09:56
@backspace
backspace merged commit 263a46c into main Sep 22, 2026
53 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