Skip to content

ci: build site/ on the PR, and derive the Cloud approvals from wt - #986

Merged
max-sixty merged 1 commit into
mainfrom
simplify-test-runner
Aug 14, 2026
Merged

max-sixty merged 1 commit into
mainfrom
simplify-test-runner

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Two follow-ups from #981's sweep, each a pin whose bump nothing checked.

publish-site.yaml built site/ only on push to main, so an astro bump merged green and broke on the way to Pages — which is why the weekly-bump table carried an astro row telling the agent to run npm --prefix site run build by hand first. The build job now runs on any PR touching site/ or the workflow file, and deploy-site picks up github.event_name != 'pull_request'. Extending the workflow that already defines the build beat adding a ci.yaml job, which would have been a second copy of the same four steps. The astro row is gone with the manual step: it's an ordinary "move to latest and let CI decide" pin now.

.config/codex-cloud/environment.sh wrote the container's approvals.toml from a hand-copied duplicate of .config/wt.toml's command list — correct today, and stranded by the next alias edit, at which point every unattended wt run in Codex Cloud fails the approvals gate. wt config approvals list --format=json already emits every command the project declares, so the script reads the list from there and drift stops being possible rather than being caught after the fact. wt config approvals add is the primitive that should do this whole job, but it refuses a non-TTY even with --yes (checked against the pinned 0.73.0 binary, not just a local build), so the file is still written directly. If worktrunk gains a working add --yes, the block collapses to one command.

What that gives up: the copied list doubled as a review anchor, since a new wt.toml command couldn't run in the container until someone edited this script too. It guards nothing here — the container runs environment.sh itself from the same branch, so a wt.toml a reviewer wouldn't trust arrives with a setup script they wouldn't either.

The script now writes to ${XDG_CONFIG_HOME:-$HOME/.config}/worktrunk rather than a hardcoded $HOME/.config. That is where worktrunk documents it looks, and it is what makes the generation testable without touching a real approvals file.

Verification
  • against worktrunk v0.73.0 installed to a temp dir, under a temp XDG_CONFIG_HOME: the generated approvals.toml matches the hand-kept file it replaces exactly, and wt config approvals list then reports approved with 0 stale
  • appending a probe alias to .config/wt.toml puts it in the generated list and the state check still passes (reverted after)
  • wt config approvals add --yes exits 1 on that same pinned binary, in both flag positions — the comment's claim is observed, not assumed
  • npm --prefix site run build succeeds on this tree, so the new job lands green rather than red
  • this PR edits publish-site.yaml, which is in the new path filter, so build-site runs on the PR itself
  • pre-commit run --all-files clean; uv run pytest 554 passed

This was written by Claude Code on behalf of max-sixty

publish-site.yaml built site/ only on push to main, so a broken astro bump
merged green and failed on the way to Pages. The same job now runs on a PR
touching site/ or the workflow itself; deploy-site stays with push and
dispatch.

The Codex Cloud setup script hand-copied .config/wt.toml's command list into
the approvals.toml it writes, which the next alias edit silently strands.
It now reads the list out of `wt config approvals list --format=json`, so
drift is impossible rather than caught later.
@max-sixty
max-sixty merged commit 8831087 into main Aug 14, 2026
11 checks passed
@max-sixty
max-sixty deleted the simplify-test-runner branch August 14, 2026 11:32
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