Repository navigation
docs(ci): correct the tend sandbox model for 0.2.14's copy-on-write view - #4224
Conversation
tend 0.2.14 runs the agent over a copy-on-write view of the job's own checkout and home instead of a separate tree behind Anthropic Sandbox Runtime. Three files still described the 0.2.5-0.2.13 arrangement, so they now claim things that are observably false from inside a session. Verified in this run: $HOME is /home/runner, the cwd is the runner's checkout, ~/.cargo and ~/.rustup are readable, and cargo-insta and cargo-nextest resolve from /home/runner/.cargo-install/<crate>/bin rather than the /usr/local/bin copy tend-setup publishes. Comments and instructions only; no step, key or behavior changes. `sandbox_setup:` stays, per the decision recorded in #4222.
worktrunk-bot
left a comment
There was a problem hiding this comment.
Self-review. The correction itself holds up — I re-ran the PR body's probes from this session, itself a 0.2.14 run, and every claim in the table reproduces: $HOME=/home/runner, cwd is the runner's checkout, ~/.rustup/toolchains and ~/.cargo-install read fine, cargo-insta resolves from ~/.cargo-install ahead of /usr/local/bin, pre-commit from /home/runner/.local/bin, and nix store info still fails on the socket. Four claims of exactly the kind this PR exists to correct survive it, though — two in files it edits, two in running-tend, which every tend session loads before it does anything.
.config/tend.yaml: the probe no longer files a tend-outage issue. The rewritten comment keeps "a tool that goes missing fails the job and files a tend-outage issue naming it". Filing is report_failure.py, which tend runs as a step inside the max-sixty/tend/claude composite action under if: failure(). 0.2.14's generator emits the sandbox_setup: commands as an ordinary - run: step before that action — visible in the generated .github/workflows/tend-review.yaml, where the mkdir -p ~/.local/bin / probe block sits between uses: ./.github/actions/tend-setup and uses: max-sixty/tend/[email protected]. A probe failure now fails the job with the action skipped entirely, so nothing files an issue. The ::error:: annotation naming the missing tool is what's actually left, and it still earns the probe its place — just not for the reason the comment now gives.
.github/actions/tend-setup/action.yaml: "from inside the sandbox". In the Nix block, the sentence beginning ".config/tend.yaml's probe asserts nix from inside the sandbox and runs everywhere" describes the pre-0.2.14 model — the probe is a runner step now. It sits one line above the hunk that rewrote the paragraphs under it, which is how it got missed. The "runs everywhere" half is what carries the argument against gating the install to the weekly workflow, so only the phrase needs to go.
running-tend carries two more. Under Weekly Maintenance: MSRV & Toolchain, "Expect both commands to fail with a permission error from tend 0.2.5 on" is the same wrong errno this PR corrects in action.yaml: nix store info reports cannot create Unix domain socket: Address family not supported by protocol. A weekly session told to expect a permission error can't match that against what it sees. Under Session Log Paths, the claim that the -home-runner-work-worktrunk-worktrunk/ prefix "appears only in runs predating the bump, and there is no literal to match on any more" is inverted by 0.2.14 — this session's own logs are under /home/tend-sandbox/.claude/projects/-home-runner-work-worktrunk-worktrunk/. The find recipe it recommends is version-agnostic and still correct, so this one only misleads a reader reasoning about the path rather than breaking the procedure.
Pushing fixes for all four in this session, and extending the PR body to cover the fourth file.
The probe no longer files a tend-outage issue: 0.2.14 emits the sandbox_setup: block as a runner step ahead of the tend action, and report_failure.py is a step inside that action, so a probe failure skips it. Drop "from inside the sandbox" from the Nix block's description of the same probe. In running-tend, give the nix daemon failure its real message instead of "a permission error", and record that the session-log path prefix is -home-runner-work-worktrunk-worktrunk/ again.
worktrunk-bot
left a comment
There was a problem hiding this comment.
Self-review, second round. The four corrections from the first review hold up — I re-ran each probe from this session: the session-log prefix is /home/tend-sandbox/.claude/projects/-home-runner-work-worktrunk-worktrunk/, both weekly nix commands (nix flake update rust-overlay and nix eval .#devShells.x86_64-linux.default.name) fail with exactly cannot create Unix domain socket: Address family not supported by protocol, and the generated tend-review.yaml puts the sandbox_setup: block between uses: ./.github/actions/tend-setup and uses: max-sixty/tend/[email protected], with report_failure.py a step inside that action under if: failure(). One claim in the same paragraphs is still wrong, and it is the one that assigns the probe its scope.
The probe's five tools are not "what the pre-merge gate needs" — nix isn't one of them. [[pre-merge]] in .config/wt.toml runs cargo update --workspace --locked, pre-commit run --all-files, cargo insta test --test-runner nextest … --all-features, cargo test --doc and cargo doc, which reach four of the five; nix appears in neither .pre-commit-config.yaml nor Taskfile.yaml. It is in the probe for the weekly toolchain bump, which this diff's own action.yaml states two files over: "Every tend workflow installs it, though only the weekly one runs nix." .config/tend.yaml carried the phrase in from the base, but .github/CLAUDE.md newly adopts it — the base there said the probe "asserts every tool on both routes". The consequence is a later sweep reading either file, checking the gate, finding nix unused there, and trimming it from the probe, which is the only thing that catches a missing nix install before the one job that needs it.
Inline suggestions on both lines; pushing them in this session.
Why dropping "or dropping the publish step below" from the action.yaml warning is right
The base comment warned that dropping the /usr/local/bin publish step "breaks every tend workflow at .config/tend.yaml's probe". That is no longer true and the diff correctly drops it, for a reason worth recording so it isn't re-derived: baptiste0928/cargo-install ends with core.addPath(path.join(install.path, 'bin')), so ~/.cargo-install/<crate>/bin lands on $GITHUB_PATH and is on the runner's PATH for every later step. Since 0.2.14 runs the probe as a runner step, it resolves both cargo tools there with the publish step gone. The surviving claim — that the publish is what would keep the probe green if the pre-0.2.14 isolation returned — still holds, because that PATH entry is exactly what the /home/runner rewrite used to drop.
The pre-merge gate reaches four of the five tools the sandbox_setup: probe asserts; nix is in it for the weekly toolchain bump's flake.lock refresh, as tend-setup's own comment says. Left as-is, a sweep checking the gate finds nix unused there and trims the one thing that catches a missing nix install before the job that needs it.
tend 0.2.14 (landed today in #4222) moved the agent off Anthropic Sandbox Runtime and onto a hardened systemd unit over a copy-on-write view of the job's own checkout and home. Four files here still describe the 0.2.5–0.2.13 arrangement they were written for, and their central claims are now observably false from inside a session. That matters because
.github/CLAUDE.mdandrunning-tendare what an agent reads before touching CI: told the runner's home is unreadable, it keeps building hand-offs nothing needs and rules out a cache that would now work. Comments and instructions only — no step, key, or behavior changes.What stopped being true
Probed from tend 0.2.14 sessions:
/home/runnerto/home/tend-sandbox$HOMEis/home/runner, and PATH entries resolve there/tmpclone/home/runner/work/worktrunk/worktrunk, the runner's own checkout~/.cargo,~/.rustup/toolchainsand~/.cargo-installall read fine/usr/local/binwhich -a cargo-instalists/home/runner/.cargo-install/cargo-insta/bin/cargo-instafirst,/usr/local/binsecond.config/tend.yaml's probe runs inside the sandbox, and a missing tool files a tend-outage issuemax-sixty/tend/claude, and the filing isreport_failure.py, a step inside that action underif: failure()— so a probe failure skips it and leaves only its::error::annotationrunning-tend: the weeklynixcommands fail with a permission errornix store inforeportscannot create Unix domain socket: Address family not supported by protocolrunning-tend:-home-runner-work-worktrunk-worktrunk/"appears only in runs predating the bump"/home/tend-sandbox/.claude/projects/-home-runner-work-worktrunk-worktrunk/— the prefix is backOne claim in the same paragraphs was checked and kept:
nixstill cannot reach the daemon, sosocket(AF_UNIX, …)is blocked under the systemd unit too, and the weeklyflake.lockrefresh still needs max-sixty/tend#1197. Only the errno was wrong, in two places —.github/actions/tend-setup/action.yamlsaidEPERMandrunning-tendsaid "a permission error"; both now carry the message the probe actually prints.What this deliberately leaves alone
sandbox_setup:stays. chore: update tend workflows (0.2.13 → 0.2.14) #4222 gave the reason: keeping the key means a release reverting 0.2.14 still finds it. The comment above the block now says so, so a later sweep reads it as a deliberate hold rather than drift to fix. Its closing probe is still worth its place — it asserts the five tools the pre-merge gate needs, whichever step installed them, and fails the job naming the one that went missing./usr/local/binpublish step stays, re-described as the second copy of those binaries it now is rather than the only route.One follow-up this opens but does not take
tend-setupcarries norust-cachestep because a restored~/.cargoand<checkout>/targetwere unreachable and at the wrong path. Both are now reachable at the path a restore writes them to, so tend sessions build cold only because nothing restores them. The comment moves from "blocked until max-sixty/tend#1198" to "a measurement", but no cache is added here: that is a behavior change with a real download cost across eight workflows, and it wants its own PR with numbers.Probe output
The probe-ordering claim comes from the generated workflows rather than a runtime probe:
.github/workflows/tend-review.yamlputs thesandbox_setup:block betweenuses: ./.github/actions/tend-setupanduses: max-sixty/tend/[email protected], andclaude/action.yamlat tag 0.2.14 runsreport_failure.pyas its ownif: failure()step.