Skip to content

simplify: hand the Codex Cloud approvals to wt, at worktrunk 0.74.0 - #987

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

.config/codex-cloud/environment.sh hand-wrote the container's approvals.toml: read the project identifier out of wt config show --format json, render every command template through jq, write the file with a heredoc, then parse it back to confirm the schema still held. It was a reimplementation of wt config approvals add, and it existed for one reason — that command refused a non-TTY even when passed --yes, so there was no way to pre-approve a freshly cloned project unattended.

worktrunk 0.74.0 fixes that (max-sixty/worktrunk#3819), so the whole block is now wt config approvals add --yes. The schema re-parse goes with it: add --yes fails the command when it cannot save, rather than warning behind a ✓ saved and exiting 0, which is exactly what that check was standing in for. The pin and the new line have to move together — --yes does nothing useful on 0.73.0.

Testing against the released binary corrected a README claim. add --yes merges into approvals.toml rather than truncating it, so an unrelated project's entry survives; the old cat > genuinely replaced the file. "It replaces the container's Worktrunk approvals file" now reads as what actually makes the script Cloud-only — it approves this repo's wt commands without review.

The WORKTRUNK_VERSION row in running-tend loses its instruction to check two jq paths the script no longer uses.

Verification
  • v0.74.0 installed to a temp dir via the pinned worktrunk-installer.sh, and wt --version prints exactly wt v0.74.0 — the string the script's install guard compares against
  • git merge-base --is-ancestor 92dfb686b v0.74.0 confirms the release carries the fix, rather than trusting the release notes
  • with that binary, under a throwaway XDG_CONFIG_HOME: the approval line exits 0 from tend's root, records all 8 commands .config/wt.toml declares, and leaves wt config approvals list --format=json at state: approved with nothing stale
  • seeding that file with an unrelated project's entry first leaves it intact — the basis for the README correction
  • skimmed the rest of the 0.74.0 notes: the one breaking change (minijinja spelling JSON bools and null as True/False/None inside {{ vars.… }}) doesn't reach a .config/wt.toml that uses only {{ branch | hash_port }} and {{ args }}
  • pre-commit run --all-files clean; uv run pytest 554 passed

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

`environment.sh` wrote the container's `approvals.toml` itself — project
identifier, jq-rendered command list, heredoc, then a re-parse to confirm the
schema still held. That existed only because `wt config approvals add` refused
a non-TTY even with `--yes`; worktrunk 0.74.0 fixes that, so the command that
owns the format does the job. Twenty-two lines become one, and a save it cannot
make now fails the script rather than warning behind a `✓ saved`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 205bb4a into main Aug 14, 2026
9 checks passed
@max-sixty
max-sixty deleted the simplify-test-runner branch August 14, 2026 23:07
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