Repository navigation
Declare plan documents from the session's other checkouts - #1538
Conversation
A file in another worktree of the session's repository is sent by absolute path with that worktree as its root; a checkout of another repository must be named as workspace_root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
PR Summary by QodoDeclare plan documents from other session checkouts
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
🔇 Additional comments: 7
src/Capacitor.Cli.Core/GitRepository.cs: 1
96-110: LGTM!test/Capacitor.Cli.Core.Tests.Unit/GitRepositoryGitDirTests.cs: 1
26-40: LGTM!test/Capacitor.Cli.Tests.Unit/Commands/McpPlansServerTests.cs: 1
26-35: LGTM!Also applies to: 180-237
src/Capacitor.Cli/Plans/DeclaredDocument.cs: 1
9-35: LGTM!kcap/skills/plans/SKILL.md: 1
21-26: LGTM!Also applies to: 63-63, 69-69
src/Capacitor.Cli/Commands/McpPlansServer.cs: 1
329-332: 🔒 Security & Privacy | 🛡️ Detected with Advanced TierSecurity Misconfiguration
Reachability: External
Exploitability: Moderate
CWE: CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
workspace_rootintentionally selects another Git checkout.NamedCheckoutrequires the directory to be inside a Git working tree, andContainedPathstill rejects paths and symlinks outside that checkout. The tool schema documents worktrees and clones as supported selectors, and tests cover cross-repository declarations and replay. This is an explicit, approval-marked operation, not an accidental bypass of the session boundary.Likely an incorrect or invalid review comment.
README.md-737-737: 1
737-737: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Reduce the repeated "again" in the
declare_plan_documentbullet.The sentence uses "again" twice: once for re-declaring the same file and once for re-declaring after a change. Rewrite one clause to remove the repeat.
Source: Linters/SAST tools
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
a9cfa0eb-7ef8-4d83-9f39-ecb3df616406
📒 Files selected for processing: 7
README.mdkcap/skills/plans/SKILL.mdsrc/Capacitor.Cli.Core/GitRepository.cssrc/Capacitor.Cli/Commands/McpPlansServer.cssrc/Capacitor.Cli/Plans/DeclaredDocument.cstest/Capacitor.Cli.Core.Tests.Unit/GitRepositoryGitDirTests.cstest/Capacitor.Cli.Tests.Unit/Commands/McpPlansServerTests.cs
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
kurrent-io/skills(auto-detected)
Limit details: You’ve used all 10 included reviews currently available.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes AI-3854 (no GitHub issue: a new one would import into Linear as a duplicate of AI-3854)
What & why
declare_plan_documentfixed its boundary at the harness's project directory, so a plan document in the worktree a session actually works in was refused by relative and by absolute path. A file in another working tree of the same repository (sharing its git common dir, nested or beside it) is now accepted and sent by absolute path with that worktree asworkspace_root; a checkout of another repository is accepted when the agent names it asworkspace_root. The tool also takesplan_id, so a session resuming a plan from a new checkout attaches the document to that plan instead of starting a second one.Where to look
McpPlansServer.DocumentCheckout: the symlink and..containment check is unchanged and runs against the chosen checkout. A named checkout is recorded so the edit-refresh hook replays it. The server half is kurrent-io/kcap-server#2435; against an older server a worktree path is still refused with a 400 andplan_idis ignored.Verification
Unit tests: a document in a sibling and in a nested linked worktree is keyed off that worktree and replays identically; another repository is refused until named; a named root outside any git tree is refused;
plan_idrides the body but not the replay;ResolveCommonDiragrees for a checkout and its worktree.dotnet publish -c Releasereports no IL2026/IL3050 warnings.🤖 Generated with Claude Code
Summary by CodeRabbit
workspace_rootfor a document in another repository.plan_id.