Repository navigation
Commit 205bb4a
simplify: hand the Codex Cloud approvals to wt, at worktrunk 0.74.0 (#987)
`.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](https://github.com/max-sixty/worktrunk/releases/tag/v0.74.0)
fixes that
([max-sixty/worktrunk#3819](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.
<details>
<summary>Verification</summary>
- 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
</details>
> _This was written by Claude Code on behalf of max-sixty_
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>1 parent 8831087 commit 205bb4a
3 files changed
Lines changed: 10 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
37 | 16 | | |
38 | 17 | | |
39 | 18 | | |
| |||
0 commit comments