Skip to content

feat(agent-isolation): hint and catalog notes for a sandboxed uv install - #1939

Open
justinmclean wants to merge 2 commits into
mainfrom
uv-install-hint-and-notes
Open

justinmclean wants to merge 2 commits into
mainfrom
uv-install-hint-and-notes

Conversation

@justinmclean

Copy link
Copy Markdown
Member

Summary

  • The sandbox-troubleshooting entry for uv python install / uv tool install failing inside the sandbox had only Symptom, Root cause and Fix, and sandbox-error-hint.sh had no branch for it, so an agent that hit it got no pointer.
  • Adds the entry's Notes in the catalog's own shape: the XDG_DATA_HOME / UV_PYTHON_INSTALL_DIR / UV_TOOL_DIR path variants and the macOS vs Linux error text; the interpreter-download path a plain uv run / prek run takes into the same directory; and why moving that directory somewhere sandbox-writable is not a fix.
  • Adds a hint branch matching a write failure under share/uv/, placed before the /tmp branch so a uv error that mentions a temporary path still points at the right entry.

Plan item uv-install-hint-and-notes (specs/sandbox-diagnostics.md).

Type of change

  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Other: tools/agent-isolation hint hook

Test plan

  • New tests: the bubblewrap, Seatbelt and uv tool install error shapes; ordering against the /tmp branch; a readable share/uv path stays silent; the entry carries all four sections.
  • Mutation-checked: with the old hint script the new tests fail (4 failed).
  • tests/test_sandbox_error_hint.py: 31 passed. tools/setup-preflight: 429 passed. plugins: 114 passed.
  • tools/agent-isolation full suite: the only failures are three test_gpg_touch_overlay.py cases that fail identically on untouched main in the authoring container (environmental).
  • prek run --all-files --skip workspace-pytest, run twice to confirm it converges: every hook passes except skill-token-count (tokenizer download blocked in the authoring sandbox; no SKILL.md touched). The first run regenerated the doctoc TOC and the secure-setup fingerprint, both committed.

RFC-AI-0004 compliance

  • Sandbox — no widening; the entry and the hint both steer away from granting the write

Linked issues

None.

Notes for reviewers (optional)

  • The secure-setup fingerprint (isolated_fingerprint.py) changes because the hint script is part of the installed setup; setup-isolated-setup-verify will report drift until operators re-run the update, as with any change to it.
  • Generative-AI disclosure: authored with Claude Code under maintainer direction; the commit carries the Generated-by: trailer.

The catalog entry for `uv python install` / `uv tool install` failing inside
the sandbox had only Symptom, Root cause and Fix, and the PostToolUse hint
hook had no branch for it, so the agent got no pointer when uv could not
write ~/.local/share/uv/.

- Add the entry's Notes section in the catalog's own shape: the
  XDG_DATA_HOME / UV_PYTHON_INSTALL_DIR / UV_TOOL_DIR path variants and the
  macOS vs Linux error text; the interpreter-download path a plain `uv run`
  or `prek run` takes into the same directory; and why moving that
  directory somewhere sandbox-writable is not a fix.
- Add a sandbox-error-hint.sh branch matching a write failure under
  `share/uv/`, placed before the /tmp branch so a uv error that mentions a
  temporary path still points at the right entry.
- Tests: the bubblewrap, Seatbelt and `uv tool install` error shapes, the
  ordering against the /tmp branch, a readable share/uv path staying silent,
  and the entry carrying all four sections.

The secure-setup fingerprint is regenerated because the hint script is part
of the installed setup.

Generated-by: Claude Code (Opus 5.5)
@github-actions github-actions Bot added family:setup setup-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) substrate:sandbox Tool substrate: agent isolation, egress control, settings audit labels Nov 1, 2026
@justinmclean

Copy link
Copy Markdown
Member Author

The CodeQL implicit-concatenation alerts are false positives: each case is one multi-line uv error. I've made the joins explicit with + so the intent is clear.

CodeQL read the implicitly concatenated strings in the uv share-write cases as a possible missing comma. Each case is one multi-line uv error, so the joins are now explicit with +; the three cases are unchanged.

Generated-by: Claude Code (Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:docs Docs, MISSION.md, READMEs family:setup setup-* skills family:tools tools/* substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants