Skip to content

Provision uv for Tend agent sessions - #1109

Merged
max-sixty merged 3 commits into
mainfrom
codex/direct-uv-setup
Aug 31, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/direct-uv-setup

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Tend skills now invoke uv tool run directly. Both harnesses install the same pinned fallback after adopter PATH entries, so a project-provided uv stays selected, while the Claude credential proxy continues to use a separate copy by absolute path.

This removes the plugin bootstrap wrapper and consolidates proxy and agent installation on one exact-version installer. The hosted sandbox test covers the runner-home UID boundary and adopter PATH priority.

Validation: wt test (850 Python tests, 32 worker tests, worker typecheck) and pre-commit run --all-files.

This was written by Codex on behalf of max-sixty

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two things on the sandbox side.

The blocked-command skip is keyed on uv alone, but uvx ships in the same directory. For an adopter whose setup: installs uv into the runner home (the astral installer's default is ~/.local/bin), that directory gets dropped and both binaries get 127 shims today. After this change uv skips the shim and falls through to the pinned fallback, while uvx still resolves to the came from the runner home and is unavailable shim — and TEND_BLOCKED_PATH is spliced in ahead of the shared paths, so it ranks above TEND_AGENT_UV_DIR at the tail. The pair splits, and the shim's message points at sandbox_setup: for a tool tend now provides. The bundled skills moved to uv tool run in this PR, but adopter overlays and the agent's own reflex still reach for uvx.

Nothing asserts the fallback is reachable. plant installs a shared uv, so verify's new assertion proves the adopter's copy wins — which is the half that was already working. The install step's own uv --version / uvx --version prove the binaries exist at whatever UV_INSTALL_DIR it was handed; nothing ties that back to the TEND_AGENT_UV_DIR that setup-sandbox.sh appends to the composed PATH. A divergence between those two, or the step going missing, ships green — and the case it breaks (a repo with no uv of its own) is the one this PR exists for.

Everything else reads clean: the fallback step lands before Run adopter sandbox setup, so the sandbox_setup: claim in docs/security-model.md holds; UV_UNMANAGED_INSTALL still forces NO_MODIFY_PATH=1 even with UV_INSTALL_DIR also in the environment taking precedence for the directory, so dropping the explicit UV_NO_MODIFY_PATH=1 is safe; and the sandbox user can read $GITHUB_ACTION_PATH scripts after the workspace handoff grants traversal, which the CI fixture doesn't cover since it substitutes the workspace path.

Happy to push both fixes if you'd rather not hand-apply them.

Comment thread proxy/setup-sandbox.sh Resolved
Comment thread proxy/test-setup-sandbox.sh Resolved
@max-sixty
max-sixty merged commit b0db285 into main Aug 31, 2026
22 checks passed
@max-sixty
max-sixty deleted the codex/direct-uv-setup branch August 31, 2026 03:03
max-sixty pushed a commit to max-sixty/leaf that referenced this pull request Aug 31, 2026
Automated nightly regeneration of tend's workflow files.

**tend version:** 0.1.22 → 0.1.24

## Notable changes

- **Conflicted bot PRs are now repaired on the frequent poll**
(max-sixty/tend#1108). `tend-notifications` gains a `conflict_count`
boot gate: it runs a GraphQL scan for open bot PRs whose `mergeable` is
not `MERGEABLE`, skips ones already carrying a `tend-conflict-deferred`
marker for the current head, and boots the agent when either
notifications or conflicts are outstanding. This is the bulk of the
workflow-body diff.
- **A multi-line adopter prompt now survives generation**
(max-sixty/tend#1103). Block scalars gain explicit indentation
indicators — `prompt: |` becomes `prompt: |2`, likewise `sandbox_setup:`
— so a prompt or setup script whose first line is itself indented no
longer changes meaning. This repo's `sandbox_setup:` (the Playwright
headless-shell install) is regenerated under the new form.
- **Review gating tightened** (max-sixty/tend#1087, max-sixty/tend#1107,
max-sixty/tend#1080). `APPROVE` is gated on the author stating merge
readiness rather than on the draft flag alone; the posting preflight is
bound to the outward action; and the code-review pass becomes its own
step, gated at submit.
- **`uv` is provisioned for agent sessions** (max-sixty/tend#1109), and
pre-check setup guards are preserved through regeneration
(max-sixty/tend#1106).
- Experimental Gist-backed Claude memory (max-sixty/tend#1110) — off
unless configured.

Full upstream range:
max-sixty/tend@0.1.22...0.1.24

## Also in this PR

`tend init` now writes `.github/actionlint.yaml` — a `concurrency.queue`
ignore scoped by glob to `**/.github/workflows/tend-*.yaml`. This repo
carried the same accommodation as a blanket `-ignore` arg on the
actionlint pre-commit hook, which suppressed that schema error
everywhere, including in workflows this repo owns. The generated file
replaces it, so the false positive stays ignored on the generated
workflows and a real one in `ci.yaml` or `publish-site.yaml` now fails.

Verified by running `pre-commit run actionlint --all-files` in the
regeneration worktree with the blanket arg removed and the generated
config in place: passed.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Aug 31, 2026
Nightly regeneration of tend's workflow files, picking up two upstream
releases.

**tend version:** 0.1.22 → 0.1.24

### Notable changes

- **The frequent poll now repairs conflicted bot PRs**, not just unread
notifications — the `tend-notifications` boot gate gained a GraphQL
query that test-merges open bot PRs and looks for deferral markers in
recent comments, so a conflicted PR wakes the queue instead of waiting
for the nightly sweep
([max-sixty/tend#1108](max-sixty/tend#1108)).
- **Review gating tightened**: `APPROVE` is now conditioned on the
author stating merge readiness rather than the draft flag alone, the
posting preflight is bound to the outward action, and the code-review
pass became its own step gated at submit
([max-sixty/tend#1087](max-sixty/tend#1087),
[max-sixty/tend#1107](max-sixty/tend#1107),
[max-sixty/tend#1080](max-sixty/tend#1080)).
- **Generator fixes that change this repo's YAML**: an adopter's
`prompt:` may now span more than one line (the `|2` block-indent markers
in the diff), pre-check setup guards are preserved, and the
`concurrency.queue` actionlint ignore is written out
([max-sixty/tend#1103](max-sixty/tend#1103),
[max-sixty/tend#1106](max-sixty/tend#1106),
[max-sixty/tend#1095](max-sixty/tend#1095)).
- **`uv` is provisioned for agent sessions**, and Gist-backed Claude
memory ships as experimental
([max-sixty/tend#1109](max-sixty/tend#1109),
[max-sixty/tend#1110](max-sixty/tend#1110)).
- Pinned harness versions moved with the releases: Claude 2.1.251, Codex
0.151.0, uv 0.12.7.

### A second commit, outside the usual regen

`tend init` now also writes `.github/actionlint.yaml` (the
`concurrency.queue` ignore from max-sixty/tend#1095). The nightly recipe
stages only `.github/workflows` and `.config`, so it landed untracked
and would be re-created on every future run — the second commit tracks
it. This repo runs no actionlint job or pre-commit hook, so the file is
inert here; it only suppresses a false positive for anyone linting these
workflows locally.

Full compare: max-sixty/tend@0.1.22...0.1.24

---------

Co-authored-by: worktrunk-bot <[email protected]>
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