Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughGraph synchronization now uses runtime-owned terminal projection helpers to retain eligible PTYs and published panes. Added tests cover projection behavior across null publications, snapshot changes, replacement, removal, and orphan reporting. A comment identifies verdict frames as shared by journal translation and background-task projection. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The change keeps host-owned terminals from being duplicated when a pane briefly publishes an empty binding, and no behavioral problem was found in review. One cosmetic comment fix is suggested. Linux E2E validation is still pending on the author's side. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Exact ownership checks limit which terminals can be retained, and no security bypass was established. The updated behavior still needs Linux validation after an earlier candidate failed intermittently. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/runtime/orca-runtime-sync-window-graph.ts (1)
262-262: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRestore the first lines of the two truncated comments.
This change deleted only the opening line of each comment block. Line 262 now starts with "the tab/leaf graph (handles/titles/connected resolve from leaf state)". Line 279 now starts with "newer, so a graph-only change must mint a fresh stored version". Neither comment has a subject, so both are incomplete. Restore the removed opening lines, or delete each block completely.
Also applies to: 279-279
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 67189d8d-28e1-4360-b696-327db814fcc3
📒 Files selected for processing (4)
src/main/codex/codex-structured-journal-provider-verdicts.tssrc/main/runtime/orca-runtime-sync-window-graph.tssrc/main/runtime/runtime-owned-terminal-projection.tssrc/main/runtime/terminal-list-surface-lost-orphan.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
| const published = collectRendererPublishedEmptyTerminalPanes( | ||
| graph, | ||
| this.mobileSessionTabsByWorktree, | ||
| this.acceptedRendererMobileSnapshotByWorktree | ||
| ) |
There was a problem hiding this comment.
Published pane loses its binding When an unchanged worktree has both an unmounted, renderer-published empty pane and an unrelated host-preserved tab that has become stale,
syncMobileSessionTabs deletes the worktree’s accepted renderer identity before this code collects empty panes. The collector skips the still-published pane. Because its leaf is absent from graph.leaves, the host then drops the live runtime-owned binding and invalidates its handle before the requested republish arrives. Republish cannot restore the old leaf while it remains unmounted, so the terminal is reported as orphaned again. Keep the pane’s publication evidence available during the resync.
Knowledge Base Used: Terminal runtime and interaction
fix: preserve host-owned terminal identity during first mount
---BODY---
Linux validation of the updated candidate is pending; do not merge yet. The initial candidate failed 2/8 Linux repetitions. The follow-up also handles unmounted panes omitted from the transport graph while still explicitly present in the renderer session.
ELI5
Opening a workspace could create duplicate agent and Setup tabs even though their terminals were already running. Keep those terminals attached to their original panes while the screen catches up.
What Changed
The host preserves its existing terminal binding when the renderer publishes the same pane with an empty binding. It also retains an unmounted pane omitted from the transport graph when the renderer’s accepted current session still explicitly publishes that exact empty pane. Host-preserved session rows are excluded from that evidence. Preservation requires runtime ownership and an exact workspace, tab, and pane match. An explicit replacement, move to another pane, removed pane, or confirmed process exit still takes precedence.
Why
Linux binding traces showed activation creating extra tabs after an empty renderer projection made the host incorrectly report live terminals as orphaned. Fixing the host's ownership decision keeps all inventory readers consistent; delaying activation or weakening the identity assertions would leave the race intact.
Linked Issue
CI failure in
live-background-terminal-mount-authority.spec.ts; baseline diagnostic run: https://github.com/stablyai/orca/actions/runs/36502710956 (five failures in eight runs).Visual Proof
Before: Linux failure has five tabs after activation. After: macOS validation retains the three original tabs through input and remount checks. The unchanged E2E verifies exact tab, leaf, PTY, handle and process identity. Screenshots use different platform window sizes.
Testing
Terminal contract: host ownership survives a temporary renderer projection gap; no duplicate spawn or reminted identity. The oracle is full terminal inventory equality plus unchanged E2E identity/input/output assertions. Existing
agent-session.provider-ownershipfirst-mount coverage is the gate. Windows and live SSH validation remain gaps; runtime tests cover incarnation fencing andunverifiablehost contact.Review
No wire fields or opcodes change. Older clients receive the same existing terminal identity instead of a false orphan. No local-only paths, Git assumptions, or new polling; folder workspaces use the same exact workspace comparison. Each sync builds transient linear-time indexes of explicit incoming bindings and accepted empty session panes. An explicit session removal, replacement, or move supersedes retention; unchanged snapshot publications retain the same exact handle.
Agent skill upstream boundary
Checklist