feat(setup): probe prek and uv in the sandbox doctor - #1362
Merged
Merged
Conversation
The doctor skill's probes are meant to move in lock-step with the sandbox troubleshooting catalogue, but apache#1359 added the "prek or uv not found inside the sandbox" entry without a matching probe. Probe 7 (probe-7-dev-tools.sh) checks that prek and uv run inside the sandbox and can write ~/.cache. Inside the sandbox a read-denied ~/.local/bin looks exactly like an absent one, so when neither tool is found it reads the worktree's settings.local.json to tell a missing grant (warn) from a tool that is not installed (skip). - The error-hint hook and the setup doc now count seven probes, and the doc's hint table gains the prek / uv signature from apache#1359. - The troubleshooting entry no longer says the new paths apply only from the next session: the harness picks up settings.local.json changes on the next sandboxed command. - The interpret-probes eval grows a dev_tools_status field and a case-16 fixture for the missing grant. Generated-by: Claude Code (Opus 5)
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/setup/sandbox-troubleshooting.md, but fix(agent-isolation): let prek and uv run inside the sandbox #1359 added theprekoruvnot found inside the sandbox entry without a matching probe. Probe 7 (probe-7-dev-tools.sh) now covers it:prek/uvrun inside the sandbox and~/.cacheis writable;~/.local/binlooks exactly like an absent one. So when neither tool is found, the probe reads the worktree'ssettings.local.json(readable in the sandbox) to tell a missing grant (⚠) from a tool that is not installed (⊘).secure-agent-setup.mdnow count seven probes.command not found: prek|uv|uvxrow.settings.local.jsonchanges from the next sandboxed command.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
prek run --all-files, run inside the sandbox: every hook passes except the workspace pytest hook. Two suites fail there for sandbox reasons, and both pass outside it:agent-isolation'stest_agent_socket_rows_follow_the_connections_held_openopens a Unix socket, which the Linux sandbox refuses.pr-management-statscalls the realgh.HOMEpointing at an unwritable directory.PATH, grant absent.PATH, grant present.setup-isolated-setup-doctoreval suite, 23/23 withmagpie-run-evals.sh(claude -p).interpret-probesgrows adev_tools_statusfield (skipwhen nodev-toolsline is present, so existing fixtures expectskip) and the new fixturecase-16-dev-tools-not-granted.RFC-AI-0004 compliance
~/.cache, which the reference config already makes writable. It adds no host access.Linked issues
Refs #1359
Notes for reviewers (optional)
setup-isolated-setup-verifycheck 10 covers them. The doctor's wording now says so instead of claiming the probes cover "the six failure modes the catalog documents".docs/mode-economics.mdwas regenerated withskill-token-count --write. The doctor'ssurface_hashwas refreshed by theskill-surface-hashhook because its description now namesprekanduv.Generative AI disclosure: this change was prepared with Claude Code (Claude Opus 5) and reviewed by the author before submission.
🤖 Generated with Claude Code