You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bound_root collapses .. lexically, so a typed root that crosses a symlink then .. binds the wrong repository in every generated command #6960
agent::loop_commands::bound_root_path joins a relative root onto the working directory and runs lexically_clean, which drops .. without touching the filesystem. The operating system instead follows a symlink before applying the next ... Take a typed root link/../repo, where link points to /outside/child:
the analysis reads /outside/repo;
every bound command prints --root /work/repo.
This applies to every producer that binds through bound_root or bound_root_path, not just one surface: check drill-ins, the agent loop, first-pr, pilot (its next commands and, since #6959, its language routes), the LSP, and anchored_redirect_target. Devin raised it on #6959 (thread), and the #6959 review lane noted the same for portable redirects.
#3999 lists "no general filesystem canonicalization or symlink-security claim" as a non-goal, and lexically_clean avoids filesystem I/O on purpose because redirect targets usually do not exist yet.
Repro
From /work, with link -> /outside/child and repositories at both /outside/repo and /work/repo, run ripr pilot --root link/../repo or ripr check --root link/../repo --base HEAD. The printed commands name /work/repo.
Expected
The root that commands are bound to is the directory the producer actually analyzed. One option: canonicalize the selected root once at the producer boundary when it exists (std::fs::canonicalize, or dunce-style on Windows to avoid \\?\ prefixes), and keep lexical cleaning only for redirect targets that do not exist yet. Note that canonicalizing changes the display of every symlinked checkout (/tmp → /private/tmp on macOS), so the golden <cwd>/ projection would need to follow.
Goal hurt
Trustworthy verdicts: a pasted command silently analyzes a different repository. This is an edge case, since it needs a typed root that crosses a symlink and then uses ...
Codex raised this as P1 on #6963 (pr_summary/json.rs), and Devin raised it earlier on the same line. The #3948 follow-ups thread takes this next, after #6963 merges, so every bound surface changes together.
Delivered by #6996 (2518647). On Unix, bound roots, redirect targets, generated-command route recovery and gap-ledger refresh sources keep a .. that follows an existing symlink, so the printed commands name the directory that was analyzed. Windows is unchanged. Follow-ups are in #7017 (edge cases) and #7005 (test temp-dir cleanup).
Activity
EffortlessSteven commentedon Oct 7, 2026
Codex raised this as P1 on #6963 (
pr_summary/json.rs), and Devin raised it earlier on the same line. The #3948 follow-ups thread takes this next, after #6963 merges, so every bound surface changes together.Generated by Claude Code
fix(agent): keep a declared repo-exposure source under a symlink-pare…
fix(agent): resolve declared refresh sources with the symlink-aware c…
fix(agent): bind the analyzed directory when a root crosses a symlink…
EffortlessSteven commentedon Oct 7, 2026
Delivered by #6996 (2518647). On Unix, bound roots, redirect targets, generated-command route recovery and gap-ledger refresh sources keep a
..that follows an existing symlink, so the printed commands name the directory that was analyzed. Windows is unchanged. Follow-ups are in #7017 (edge cases) and #7005 (test temp-dir cleanup).Generated by Claude Code
fix(agent): refuse a root-named refresh source and guard test scratch…