Repository navigation
fix(skills): remove a refused launch's new evidence dirs and the proof's init evidence - #372
Conversation
…f's init evidence `vcn.sh launch` checks the evidence dir again after `mkdir -p`. When that check refused, the dirs `mkdir -p` had just made stayed behind. A default ACL triggers it with no race: under umask 077, `mkdir` still makes a 770 dir. Launch now records the dirs that `mkdir -p` will make and removes them with `rmdir` when it refuses. `rmdir` removes only empty dirs, and a dir that existed before is never on the list. `proof-launch-refusals.sh` now fails a refused case that adds or removes a path under its temp dir. Two new cases, out-made-unsafe and parent-made-unsafe, use a default ACL to reach the check after mkdir. They print SKIP when setfacl cannot set one. The init case's `mktemp -d` evidence dir is deleted when every case passes. When the init case fails, the proof keeps it and prints its path. SKILL.md says that out-dash and init need Playwright Chromium for the user who runs the proof, that the ACL cases need setfacl, and how the init evidence is cleaned up. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_
|
@codex review |
|
@codex security review |
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. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Re-recorded on the merge with main (#373, #367, #372). The facts and the model are unchanged by the merge, and check.sh passes. The only covered file main changed outside the record is selection.lua, which cannot reach diff state. Part of #363 _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_
Why
The operator goal is to clear the open follow-up issues in this repository (#362 and #363 now) with small reviewed PRs. This PR covers items 8 and 9 of #363. Both are about the
verify-claudecode-nvimskill.vcn.sh launchchecks the evidence dir again aftermkdir -p. When that check refused, the dirs thatmkdir -phad just made stayed on disk. The harness runs withumask 077, but a default ACL on a parent dir still makesmkdircreate a 770 dir. Such a parent triggers the refusal on every run, with no race. In the default layout, the leftover group-writableverify-claudecode-nvimdir also blocks every later run at the first check.initcase's evidence in/tmp.proof-launch-refusals.shgives theinitcase a freshmktemp -devidence dir and never deletes it. SKILL.md does not say to delete it. It also does not say that the cases that start a real run need Playwright Chromium for the user who runs the proof.What changed
vcn.sh: beforemkdir -p, launch records the dirs that are missing on the evidence dir's path, deepest first. When the check aftermkdirrefuses, launch removes those dirs withrmdir, then exits 1 as before.rmdirremoves only empty dirs, and a dir that existed before launch is never on the list.proof-launch-refusals.sh:setfacl -d -m u::rwx,g::rwx,o::---) to reach the check aftermkdir.out-made-unsafeuses a newVERIFY_OUT.parent-made-unsafeuses the default parent under an existingXUM_SCRATCH_DIR, which must survive. Both printSKIPwhensetfaclcannot set a default ACL.initcase's evidence dir is deleted on exit when every case passes. When theinitcase fails, the proof keeps the dir and printsinit evidence kept in <dir>.SKILL.md: theVERIFY_OUTentry says that a refusal aftermkdirremoves the empty dirs thatmkdirmade. The proof entry says thatout-dashandinitneed Playwright Chromium for the user who runs the proof, that the ACL cases needsetfacl, and how theinitevidence is cleaned up.Scope
The
verify-claudecode-nvimskill only: one harness function, the proof script and SKILL.md. No plugin code, no tests and no CI change.Blast Radius
Agents and people who run the skill. A launch that passes both checks behaves as before. A refused launch now removes only the empty dirs it made. A passing proof run no longer leaves a dir in
/tmp.Verification
I ran every case below for real on this host (Neovim 0.12.3, agent-tty 0.5.0, Node 26). Each proof run used a fresh private
TMPDIR, so leftovers were easy to see and other agents' runs could not interfere.vcn.shVERIFY_OUTnew under a default-ACL dir770 $R/acl/outXUM_SCRATCH_DIR= a default-ACL dirverify-claudecode-nvimandverify-claudecode-nvim/<time>-<id>, both 770initevidence dir (session.webm,final.png,ws-*.jsonl, ...) inTMPDIRFAIL: out-made-unsafe: launch changed ... > .../acl/outout-made-unsafe(red)FAIL: parent-made-unsafe: launch changed ... > .../acl/verify-claudecode-nvim > .../acl/verify-claudecode-nvim/<time>-<id>TMPDIRempty afterwardsinitcheck edited to want-32601FAIL: init: ...,init evidence kept in <dir>, exit 1, only that dir leftsetfaclthat failsSKIP out-made-unsafe, parent-made-unsafe, exit 0PLAYWRIGHT_BROWSERS_PATH= an empty dirFAIL: out-dash: launch failed: vcn: agent-tty doctor failed: browser_cache_accessible .... A copy withoutout-dashfailsinitat the same doctor step.shellcheck --exclude=SC1091,SC2016andshfmt -i 2 -d(the options intreefmt.toml) report nothing on both scripts.treefmt --cireports 0 changes,prettier --checkpasses on SKILL.md,mise run checkreports 0 warnings, andmise run testreports 810 successes and 0 failures.Part of #363.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh