Repository navigation
feat(evals): swap Docker Desktop's store links for copies per eval run - #11274
Conversation
On WSL2, Docker Desktop links entries of ~/.docker into /mnt/c, and the CLI then refuses every Bash-granting eval pass. docker-links.py run replaces every link the preflight's find lists, or the store itself when it is a link, with a dereferenced copy of its target, runs the eval, and restores the links on exit, failure, SIGINT, SIGTERM or SIGHUP. A record in $HOME lets `restore` recover a killed run, and `swap` refuses while it exists. DOCKER_CONFIG is never read or set. The fixture suite runs against a temporary HOME and checks the swap and restore after a successful run, a failed run, an interrupted run, a killed run, a dangling link, a linked store root, and a link Docker Desktop recreated mid-run. Refs: #8378 Co-Authored-By: Claude Opus 5.5 <[email protected]>
A spoke cannot expand the plugin-root token, so sandboxes.md names <skill-dir> and the hub renders it. The fixture suite gets its exec bit. Refs: #8378 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…killed ones The manifest in $HOME now lists the live runs holding the copies, and every change to it happens under an flock. The first run swaps, later runs join, and the last to leave restores. A holder whose pid is gone, or reused (checked against its /proc start time), is pruned, so the next run's start restores what a killed run left. `restore` puts the links back from the manifest and refuses while a live run holds the copies. The standalone `swap` command is gone. Tests: a killed run followed by the next run's start, a killed run followed by `restore`, two overlapping runs keeping the copies until the second exits, and `restore` refusing under a live run. Refs: #8378 Co-Authored-By: Claude Opus 5.5 <[email protected]>
On the real WSL2 host, features.json links to a /mnt/c file that does not exist, so the swap refused with exit 2. A dangling link is now recorded in the manifest with its exact target and `dangling: true`, removed for the run, and recreated byte-identically at restore. Crash recovery and the holder count cover it like any other link. Refs: #8378 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…8-docker-link-swap
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review of the incremental change (22d3dff..78ed152) to What changed. The Why this carries no security risk.
Minor, not security. The No trusted-path files are in this incremental change. No manifest items were hit. The owner-threat-model section had no hold removals to name. The pull request description contained no embedded instructions. critical-findings: 0 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd5019396e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review reviewed Incremental review of 78ed152, covering
The PR's Verification section lists test and lint results that I did not run, so they are author-claimed and unverified. Closing-issue criteria: the PR only references #8378 ( |
The link-swap manifest now records each run's command pid beside the wrapper's, and a holder stays live while either runs, so restore or a later run no longer removes the copies under a command whose wrapper alone was killed. The plugin-eval swap offer now also requires DOCKER_CONFIG unset, since the swap changes only ~/.docker. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The wrapper recorded the command's pid in the manifest only after Popen returned, so a wrapper SIGKILLed in that window left a running command untracked and restore freed the copies under it. The command now starts behind a small Python gate that waits on a pipe for the wrapper's go byte, sent only after track(), then execs the command in place, keeping the recorded pid and start time. EOF (wrapper gone or signalled first) exits unrun. This also closes the test race where start() could kill the wrapper before track() ran. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane-Activity: pr-unblock/address-feedback Lane-Thread: PRRT_kwDOTCGFQM6yGR3j
|
pr-unblock / address-feedback finished round 1 of max 4 on 78ed152. |
Refs: #8378
Summary
On WSL2, Docker Desktop links entries of
~/.dockerinto/mnt/c, andclaude plugin evalthen refuses every Bash-granting pass, so/evals:plugin-evalmarks the sandboxnot-readyand refuses before spending anything. This adds the owner-chosen "swap and restore per run" route as slice 1 of #8378: when the onlynot-readycause is those links, preflight offers to run the CLI through a wrapper. The wrapper replaces the links with real copies for the run and puts them back afterwards.Fix
plugins/evals/skills/plugin-eval/scripts/docker-links.pywith two commands:run -- <command>andrestore.findlists, and the store itself when~/.dockeris a link. It does not use a list of exempt names, because the reading of which names the CLI exempts came from one binary and failed independent verification.~/.docker-link-swap.json. The manifest also lists the live runs holding the copies, and every change to it happens under anflockon~/.docker-link-swap.lock./procstart time.restore, which refuses while a live run still holds the copies.DOCKER_CONFIG.SKILL.md: thenot-readyroute makes the offer, asking first, on WSL2 when the links point under/mnt/. The detail is inreference/sandboxes.md#docker-link-swap, andreference/records.mdcarries the pointer, as-of date and recheck record..changes/evals/(minor).Verification
docker-links.test.shran red first: 7 of 7 failed before the script existed, and 5 of 10 failed before the holder count and the leftover recovery were added. All 10 pass now. Every test uses a temporaryHOME, so no real~/.dockeris touched. The tests cover a successful run, a failed run (exit 3 passed through), a SIGTERM interrupt, a killed run followed by the next run's start, a killed run followed byrestore, and two overlapping runs that keep the copies until the second exits. They also coverrestorerefusing under a live run, a dangling link, a linked store root, and a link that Docker Desktop recreated mid-run.run's restore skipped: 4 tests failscripts/run-ruff.sh checkandformat --checkpass, and pyright reports 0 errors. shellcheck passes on the wrapper, as docheck-changelog-fragments.sh --check,check-spoke-plugin-root.sh --checkand/skill-quality:checkon plugin-eval (PASS at 499 lines). The pre-pushcheck-affectedalso ran.~/.dockerwith Docker Desktop's links. That is slice 3's recorded run.Related
SKILL.mdalready gives; this PR does not change that.🤖 Generated with Claude Code