Skip to content

docs(ci): correct the tend sandbox model for 0.2.14's copy-on-write view - #4224

Merged
max-sixty merged 3 commits into
mainfrom
nightly/clean-sandbox-model-docs
Sep 21, 2026
Merged

max-sixty merged 3 commits into
mainfrom
nightly/clean-sandbox-model-docs

Conversation

@worktrunk-bot

@worktrunk-bot worktrunk-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

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.md and running-tend are 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:

Documented claim Observed
Agent PATH rewrites a leading /home/runner to /home/tend-sandbox $HOME is /home/runner, and PATH entries resolve there
The agent builds in a disposable /tmp clone cwd is /home/runner/work/worktrunk/worktrunk, the runner's own checkout
Sandbox Runtime denies reads across the runner's home and checkout ~/.cargo, ~/.rustup/toolchains and ~/.cargo-install all read fine
The cargo tools reach the agent through /usr/local/bin which -a cargo-insta lists /home/runner/.cargo-install/cargo-insta/bin/cargo-insta first, /usr/local/bin second
.config/tend.yaml's probe runs inside the sandbox, and a missing tool files a tend-outage issue 0.2.14's generator emits the block as an ordinary runner step before max-sixty/tend/claude, and the filing is report_failure.py, a step inside that action under if: failure() — so a probe failure skips it and leaves only its ::error:: annotation
running-tend: the weekly nix commands fail with a permission error nix store info reports cannot create Unix domain socket: Address family not supported by protocol
running-tend: -home-runner-work-worktrunk-worktrunk/ "appears only in runs predating the bump" This session's logs are under /home/tend-sandbox/.claude/projects/-home-runner-work-worktrunk-worktrunk/ — the prefix is back

One claim in the same paragraphs was checked and kept: nix still cannot reach the daemon, so socket(AF_UNIX, …) is blocked under the systemd unit too, and the weekly flake.lock refresh still needs max-sixty/tend#1197. Only the errno was wrong, in two places — .github/actions/tend-setup/action.yaml said EPERM and running-tend said "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.
  • The /usr/local/bin publish 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-setup carries no rust-cache step because a restored ~/.cargo and <checkout>/target were 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
$ echo "HOME=$HOME"; whoami; pwd
HOME=/home/runner
tend-sandbox
/home/runner/work/worktrunk/worktrunk

$ which -a cargo-insta
/home/runner/.cargo-install/cargo-insta/bin/cargo-insta
/usr/local/bin/cargo-insta

$ ls ~/.rustup/toolchains
stable-x86_64-unknown-linux-gnu

$ which -a pre-commit
/home/runner/.local/bin/pre-commit

$ ls -d ~/.claude/projects/*/
ls: cannot access '/home/runner/.claude/projects/*/': No such file or directory
$ ls -d /home/tend-sandbox/.claude/projects/*/
/home/tend-sandbox/.claude/projects/-home-runner-work-worktrunk-worktrunk/

$ nix store info
Store URL: daemon
error: cannot create Unix domain socket: Address family not supported by protocol

The probe-ordering claim comes from the generated workflows rather than a runtime probe: .github/workflows/tend-review.yaml puts the sandbox_setup: block between uses: ./.github/actions/tend-setup and uses: max-sixty/tend/[email protected], and claude/action.yaml at tag 0.2.14 runs report_failure.py as its own if: failure() step.

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 worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Sep 21, 2026

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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 worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment thread .config/tend.yaml Resolved
Comment thread .github/CLAUDE.md Resolved
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.
@max-sixty
max-sixty merged commit a73730c into main Sep 21, 2026
37 checks passed
@max-sixty
max-sixty deleted the nightly/clean-sandbox-model-docs branch September 21, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants