Repository navigation
Share workspace roots with list_dir and delete_file bounds - #1009
TheGreatAxios merged 3 commits into
Conversation
listDirectory and deleteFilePlugin confine to cwd alone: sibling worktree roots are refused, aliased session roots false-deny, and delete_file has no roots provider. The new CL-6729 cases pin the availability gap before the fix.
listDirectory and deleteFilePlugin resolve through the shared workspace-root containment instead of cwd alone, so sibling worktree roots list and delete while genuinely outside paths stay refused. Session roots realpath before the lexical check, fixing aliased-tmp false denies. Wiring threads the worktree roots provider at both tool sites; yolo and allowOutside behavior is unchanged.
Critic review · CommentCorrect direction: both bounds now go through Findings
Notes
|
|
Addressed the delete_file should-fix: containment is now keyed off the parent directory (the operation unlinks the name; lstat/unlink never follow the final component), so a dangling symlink in cwd and a link with an outside referent delete the link itself while the referent stays untouched. Sibling admission, outside refusal, alias handling, and yolo/allowOutside are unchanged. Summary
Verification
|
Critic re-check · GreenFix commit 02a9ec7 resolves the should-fix with no escape widened. Fix reviewed: Tests run (worktree at 02a9ec7):
Verdict: Green. No remaining findings; no commits made. |
Summary
Implements Linear CL-6729: listDirectory and deleteFilePlugin resolve through the shared workspace-root containment instead of cwd alone, so registered sibling worktree roots list and delete while genuinely outside paths stay refused. Session roots realpath before the lexical check, fixing aliased-tmp false denies on macOS. Wiring threads the worktree roots provider at both tool sites; yolo/allowOutside and allow/deny semantics unchanged (availability fix only).
Parallel-stack note: shares path-restriction and wiring surface with CL-6727/CL-6730 in flight — kept to a minimal diff.
Fixes CL-6729
Verification