Repository navigation
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
The revert is clean and complete: at the reviewed head the whole tree is byte-identical to b953f683 apart from the 0.2.12 release artifacts — CHANGELOG.md, generator/pyproject.toml, uv.lock, and the regenerated .github/workflows/tend-*.yaml plus review-reviewers.yaml. Nothing is partially applied, and nothing dangles: enter_view and event_checkout have no remaining mentions, the -n<number> artifact name read-session-logs greps for is back to being computed by claude/action.yaml's Compute artifact name step, and that skill's restored "Codex runs aren't recallable this way" caveat matches codex/action.yaml, which keys only on INVOCATION_ID. The auto-memory key file is back under RUNNER_TEMP, outside anything dispose removes.
Two things this leaves open, neither a change to the diff:
- #1340 fixes the same regression (#1338) from inside the copy-on-write design — it excludes the
/dev/nullmasks via.git/info/exclude— and callsevent_checkout.main(), a module this PR deletes. The two are mutually exclusive rather than mergeable in either order, so if this lands #1340 is obsolete and not merely conflicted. - 0.2.12 told consumers that what
setup:prepares is visible to the agent, anddocs/tend.example.yamlreverts that guidance with the rest. A consumer who dropped asandbox_setup:step on that basis gets a silently different environment on 0.2.13 — worth an explicit line in its release notes, since nothing else will warn them.
|
This revert also clears a third Reproduced against the released action by this week's integration test, before the revert landed — Same root as #1338, one branch further along. Nothing to fix here: with The durable part is the coverage gap. Re-ran the whole integration recipe against |
Releases 0.2.13, which ships the revert of the copy-on-write view ([#1339](#1339)). Bumps the generator version, syncs `uv.lock`, and adds the `## 0.2.13` changelog section. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…ite view, and deprecate sandbox_setup and sandbox_path (#1346) Reapplies #1333 and #1334, which #1339 reverted after 0.2.12's live check, fixes the defects that check and the weekly integration test found, and deprecates `sandbox_setup:` and `sandbox_path:`, which the view makes redundant. Ten commits: - The first two revert the two reverts #1339 squashed, and leave the code byte-identical to 6d74214, the 0.2.12 tree. - The third, `Resolve SRT's write protections off the checkout, and keep the memory key past dispose`, fixes the regressions. - The fourth, `Remove sandbox_setup, and refuse a checkout outside the runner's home by name`, and the fifth, `Remove sandbox_path: the agent runs with the job's PATH`, remove both keys' machinery. - The sixth, `Warn on sandbox_setup and sandbox_path, and carry them over as setup: steps`, keeps configs that still set them working. - The seventh added a `setup-uv` step to the migration, the eighth reverts it, and the ninth, `Say that a setup: step installs the tools it calls`, puts that in the warning and the example config. - The tenth, `Run migrated sandbox_setup commands in one shell, and keep sandbox_path's order`, makes the migration match how the keys ran. Closes #1198: a cache `setup:` restores into the runner's checkout or home now reaches the agent, at the path it was restored to. ## What 0.2.12's live check found **SRT's write protections landed in the checkout the agent commits from** (#1338). SRT 0.0.76 resolves its mandatory deny list (shell rc files, `.gitconfig`, `.gitmodules`, `.mcp.json`, `.vscode`, `.idea`, `.claude/commands`, `.claude/agents`, `.git/hooks`) against its own process cwd, and binds only the entries inside `allowWrite`: one that exists is re-bound read-only, one that doesn't gets a `/dev/null` bind, or a read-only empty directory when an intermediate component is what's missing (`dist/sandbox/linux-sandbox-utils.js`, `linuxGetMandatoryDenyPaths` and the deny loop in `generateFilesystemArgs`). #1333 put the runner's home in `allowWrite` and chdir'd the launcher to the checkout, which sits under that home, so every session's checkout held thirteen character devices: `git add -A` failed with `can only add regular files`, and every git command reading submodule config warned `unable to access '.gitmodules': Permission denied`. Under 0.2.11 the launcher's cwd was the runner checkout, outside `allowWrite`, so the list bound nothing at all. **The experimental memory-gist save failed on every run.** #1333 moved the baseline key out of `RUNNER_TEMP`, correctly: the view's idmap shows the runner's 0600 files in the home to the agent as its own. It moved the key into the private directory inside the runtime container, which `Dispose sandbox resources` deletes right after the reap, before `Save experimental memory Gist` reads it (`cat: /var/tmp/tend-runtime.…/private/tend-auto-memory-key.…: No such file or directory`). The save is `continue-on-error`, so the job stayed green. ## Three further defects the fix removes - **A repository without `.claude/` could not start the agent.** `.claude/commands` and `.claude/agents` sit two levels deep, so where `.claude` itself is missing SRT mounted a read-only empty directory over `.claude`, and `run_claude` failed writing `.claude/settings.local.json` before the harness started (`tee: …/.claude/settings.local.json: Read-only file system`). The weekly integration test hit this; tend's own checkout tracks `.claude/`, so `test-sandbox` could not. - **Tracked protected paths were read-only.** A repository that tracks `.vscode/`, `.idea/`, `.gitmodules`, `.mcp.json`, `.claude/commands/` or `.claude/agents/`, at the root or up to SRT's search depth of 3, got each re-bound read-only, so the agent could not edit them. - **A pull request touching one of those paths could not be checked out.** The binds are computed once, at launch, against the reviewed base tree; `event_checkout` then moves that same checkout to the PR's ref inside the sandbox, and git cannot write a path that is a read-only bind or create one beneath a `/dev/null` stub. This one is inferred from the binds rather than reproduced. ## The fix - **`shared/steps/sandbox_runtime.mjs`** chdirs the launcher to its own staged directory, under the runtime container and outside every `allowWrite` path, so SRT's list binds nothing. The list exists to stop something unsandboxed from later running what a sandboxed process wrote, and under the view nothing outside the process tree runs what the agent writes in the home: every write lands in the overlay's upper layer, which the dispose step deletes. It was never a boundary on the agent's own config either — it leaves out `.claude/settings.json`, `CLAUDE.md` and skills. SRT has no switch for this list alone (`filesystem.disabled` drops all filesystem policy), so the cwd is the lever. The lifecycle's own cwd comes from the `spawn`'s `cwd`, so the harness still starts in the checkout. Resolving from the home instead is what #1333's first CI run hit: `~/.gitconfig` masked and `git config --global` failing. - **`claude/action.yaml`** creates the memory key beside the memory directory in `/var/tmp`, a 0600 runner file outside both the home and the runtime container. Moving the save ahead of dispose would also work, but `test_sandbox_resources_are_removed_immediately_after_agent_reap` pins dispose to the step after the reap. - **`docs/security-model.md`** says where the key lives and that SRT's built-in protections bind nothing, and why. Running SRT 0.0.76's own `wrapCommandWithSandboxLinux` (argument generation only, no bwrap) with `allowWrite` covering a runner home: a launcher cwd in the checkout emits exactly #1338's thirteen `/dev/null` binds plus read-only `.vscode` and `.git/hooks`; a cwd in the home emits a read-only `~/.gitconfig` and twelve more; a cwd in the staged directory emits none. #1340 took the other route, excluding the stubs from git after `event_checkout`; it would have left the read-only `.claude`, the read-only tracked paths, the failing PR checkout and the `.gitmodules` warning. ## `sandbox_setup:` and `sandbox_path:` are deprecated, and migrate themselves `sandbox_setup:` ran consumer commands inside the sandbox so the agent could have what `setup:` built, which a separate home and checkout kept from it. `sandbox_path:` prepended directories to the agent's PATH. Under the view `setup:` output is at the path it was left at and the agent's PATH is the job's, so both are redundant, and the view broke `sandbox_path:` besides: its `~` still expanded to the sandbox account's home rather than the runner home the agent now runs in. Their action inputs, `shared/steps/sandbox_setup.py`, the lifecycle's call (with its unused `probe` harness) and the `~` expansion in `proxy/setup_sandbox.py` are gone, and the docs no longer mention either key. At the maintainer's call, and against CLAUDE.md's rule that an old format fails, `init` does not refuse them yet, so that nothing breaks in a consumer before it migrates. It warns, naming the key and its migration, and performs that migration: each key becomes one `setup:` step appended after the consumer's own, in every agent job. `sandbox_path` comes first, since `sandbox_setup` ran with those directories on PATH, and becomes `echo "<dir>" >> "$GITHUB_PATH"` lines, with a leading `~` as `$HOME`. They are written last-first: the runner adds each `$GITHUB_PATH` line to its prepend list in order and builds PATH from that list reversed, so the first entry stays first. `sandbox_setup`'s commands share one `shell: bash` step, the `-eo pipefail` bash they were joined into before, so an `export`, `cd` or `source` still reaches the entries after it. The setup renderer now emits a multi-line string as a `|` block scalar rather than a double-quoted line of `\n` escapes, which also covers a consumer's own multi-line `run:`. A `TODO(2026-10-21)` in `config.py` marks turning the warnings back into refusals once the consumers have migrated. `enabled` keeps refusing. A migrated command runs as an ordinary `setup:` step, with what the consumer's `setup:` and the runner image provide. Inside the sandbox it also had tend's `uv` fallback on PATH, which no `setup:` step gets: tend's own `uv` stays off PATH, and the ubuntu-24.04 image ships none. So a command that calls `uv` needs `astral-sh/setup-uv` earlier in `setup:`, as in any workflow; the warning and `docs/tend.example.yaml` say so. Of the five consumers only PRQL/prql is affected: its `uv tool install pre-commit` needs `setup-uv` in its `tend-setup` composite before it takes this release. leaf and numbagg list `setup-uv` in `setup:`, and worktrunk's `tend-setup` composite runs it. On ubuntu-24.04, `~/.local/bin` and `~/.cargo/bin` are both on the job PATH the agent inherits: the `sandbox PATH:` line in this PR's `test-sandbox` log carries `/home/runner/.local/bin` and `/home/runner/.cargo/bin`. `sandbox_env` stays: the job's environment already crosses, but it is still the one way to give a value to the agent alone, which a consumer uses for a secret on some events only. ## Self-hosted layouts The view is an overlay of the runner account's home, so a self-hosted runner whose work folder is elsewhere would give the agent a read-only checkout and fail later, in the sandbox, on a probe that cannot say why. `proxy/setup_sandbox.py` now refuses that layout in the "Set up credential-isolation sandbox" step, naming both paths, and `docs/tend.example.yaml` says it is not supported yet and how to avoid it. #1348 tracks supporting it. ## Testing - `proxy/test-setup-sandbox.sh` (the `test-sandbox` job) asserts from inside the lifecycle that the checkout holds no character device, that `git add -A --dry-run` succeeds, and that `.claude/commands/` and `.mcp.json` are writable there. Those assertions ran through the `sandbox_setup:` hook; the Claude stub now runs them, from where the agent starts. The Claude launch moves `.claude/` out of the checkout first, so it runs the case most consumers are in, and the stub sits where the real Claude binary installs rather than on a `sandbox_path` entry. At 6d74214 the test never ran `git add`, `git commit` or `git status` in the checkout, which is why it stayed green. - `shared/steps/test_launch_sandbox_runtime.py` drives the real launcher against a stand-in SRT, with the workspace under the runner home as on a hosted runner, and asserts the cwd SRT reads while wrapping is outside every `allowWrite` path. It is Linux-only; run on macOS through a `process.platform` shim, it passes, and it fails against the 0.2.12 launcher. - `generator/tests/test_repo_pins.py` pins the memory directory and key to `/var/tmp`; `test_config_edge_cases.py` asserts both deprecated keys warn with their migration and turn into the expected `setup:` steps, `test_migrated_sandbox_setup_commands_share_one_shell` runs the migrated step under the bash GitHub uses and checks an `export` reaches a later entry and a failure stops the rest, and a regtest snapshots them rendered after the consumer's own step under the notifications pre-check; `proxy/test_setup_sandbox.py` asserts the layout refusal names both paths. - `uv run pytest`: 1216 passed, 4 skipped. All thirteen pre-commit hooks pass; the `sandbox_env` reserved-set parity hook now scopes to that list's new paragraph, and still reads every reserved name from it. Only a live run verifies the memory-gist save (no CI job runs the Gist steps) and a review in PR mode. ## For the release notes - 0.2.13 reverted the view, so this restores what 0.2.12 announced: what `setup:` builds reaches the agent again. - `sandbox_setup:` and `sandbox_path:` are deprecated. Their entries move to `setup:` automatically, one step per key after the consumer's own, and `tend init` warns with the migration; a later release will refuse them. Five consumers set `sandbox_setup` (worktrunk, PRQL/prql, numbagg, leaf, cargo-affected), none `sandbox_path`. A migrated command now runs as an ordinary `setup:` step, without the `uv` the sandbox provided, so a command that calls `uv` needs `astral-sh/setup-uv` earlier in `setup:`; PRQL/prql is the one consumer that needs it. - A self-hosted runner whose work folder is outside the runner account's home is refused by name (#1348). > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Regenerates the nine `tend-*` workflows against tend 0.2.13 (from 0.2.11). The committed diff is only the pinned action ref and the `uv` setup version (`0.12.13` → `0.12.17`); everything below rides in the action and the plugin it loads. ## What changes for this repo **A cancelled gating check no longer reads as green.** `poll_pr_checks.py` now treats only `SUCCESS`, `NEUTRAL`, and `SKIPPED` as green and exits 2 — unverified — on anything else ([max-sixty/tend#1323](max-sixty/tend#1323)). Cancelled runs are routine here: main serializes the complete suite, so a newer commit replaces the one waiting for its turn, and `running-tend` already carries a rule for reading that shape. Under 0.2.11 a session polling its own push could report such a check as verified; it now has to say it could not verify. **CI sessions ignore the bot's claude.ai account.** Skills, plugins, and MCP connectors enabled on the `leaf-agent` account no longer load into sessions that push and post as it ([max-sixty/tend#1328](max-sixty/tend#1328)). Sessions run with this repo's skills and tend's own, and nothing else. **`/tmp` is writable inside the sandbox**, as scratch private to the run ([max-sixty/tend#1324](max-sixty/tend#1324)). A tool that hard-codes a `/tmp` path no longer needs an override; `$TMPDIR` stays the documented place to write. **The sandbox launch retries a transient bridge-socket failure**, up to three attempts ([max-sixty/tend#1327](max-sixty/tend#1327)). SRT gives socat 600 ms to bind, and a slow runner previously lost the whole job before the agent started. Three plugin-side fixes also land: `review-runs` can now cancel a run parked in GitHub's `waiting` state that holds its concurrency group without ever concluding ([#1320](max-sixty/tend#1320)); `ground-claims` reads a past run's code at that run's commit rather than at the current default branch ([#1319](max-sixty/tend#1319)); and `run-tend` corrects its list of instruction paths restored to the base version on a PR ([#1311](max-sixty/tend#1311)). ## No configuration change needed 0.2.12 moved the agent into the job's own checkout through a copy-on-write view, which would have changed where dependency setup belongs. 0.2.13 reverts it ([#1339](max-sixty/tend#1339)): `setup:` and `sandbox_setup:` behave as they did at 0.2.11, so `.config/tend.yaml` is unchanged here. This repo pins no `model:`, so the harness default applies as before. Full comparison: [0.2.11...0.2.13](max-sixty/tend@0.2.11...0.2.13). Co-authored-by: leaf-agent <[email protected]>
Regenerates the `tend-*` workflows with tend 0.2.13 (from 0.2.11). Mechanically the diff is the action pin `max-sixty/tend/[email protected]` → `@0.2.13` in the eight workflows that run the agent, the `astral-sh/setup-uv` pin `0.12.13` → `0.12.17` in the two that install uv directly (`tend-mention`, `tend-notifications`), and a regenerated header comment in all nine. The upgrade that matters for this repo is in CI polling. `poll_pr_checks.py` previously treated any gating check that settled without a red conclusion as green — so a required check belonging to a **cancelled** or **stale** run, or a `COMPLETED` check carrying no conclusion at all, let the bot report a PR as green when nothing had actually verified it. 0.2.13 splits those out as `unverified` and gives `poll` a distinct exit code for them (max-sixty/tend#1323). Practically: fewer "checks went green" claims on PRs whose required jobs were cancelled, at the cost of some polls ending unverified rather than green. The rest, in rough order of how visible it is here: - **Sandbox reliability** — the sandbox runtime now retries past a transient bridge-socket failure at launch (max-sixty/tend#1327). That failure is one of the shapes that produces a `tend-outage` issue, so it should show up as fewer of those. - **Sandbox environment** — root `/tmp` is writable inside the sandbox (max-sixty/tend#1324); the `run-tend` skill's note that it was read-only is gone. This repo's `running-tend` skill still restates that note, so it goes stale when this merges — I'll follow up separately rather than mix a skill edit into the generated-workflow diff. - **Instruction-path pinning** — the `run-tend` skill's description of which paths get restored from the PR base, and on which events, was wrong in 0.2.11; `.agents/` is now named alongside `.claude/`, and the event list is corrected (max-sixty/tend#1311). The restore behavior itself is unchanged. - **Auth hygiene** — the bot's claude.ai account is kept out of CI sessions (max-sixty/tend#1328). - **Harness pins** — claude-code 2.1.278 (max-sixty/tend#1330), uv 0.12.17 (max-sixty/tend#1331). `.config/tend.yaml` pins no model, so the harness-default check found nothing to adjust. Full comparison: max-sixty/tend@0.2.11...0.2.13 <details><summary>Copy-on-write sandbox view: landed and reverted within this range</summary> max-sixty/tend#1333 and max-sixty/tend#1334 moved the agent into the job's own checkout and home through a copy-on-write view; max-sixty/tend#1339 reverted both before 0.2.13. Nothing from that work is in this diff — noted so a later reader doesn't chase it out of the commit list. </details> Co-authored-by: worktrunk-bot <[email protected]>
Reverts #1334 and #1333, which shipped in 0.2.12. The code under
shared/,proxy/,claude/,codex/,generator/src/anddocs/is byte-identical tob953f683, the commit before #1333. A 0.2.13 release follows.The release's live check on tend found two regressions:
chdirto$GITHUB_WORKSPACE, so SRT resolves its mandatory deny list (.bashrc,.gitconfig,.gitmodules,.vscode, …) there and binds/dev/nullover each name.git add -Athen fails withcan only add regular files, every session sees thirteen untracked entries, and git warnsunable to access '.gitmodules': Permission denied. Under 0.2.11 the launcher sets no working directory, so SRT resolved the list against the step's default, the runner's checkout, while the agent committed from a separate disposable clone.RUNNER_TEMPinto the runtime's private directory, which the dispose step deletes before the save reads it.🤖 Generated with Claude Code