Repository navigation
Conversation
978e5ee to
a4162d6
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughRuntime graph synchronization now resolves and projects eligible runtime-owned PTYs for terminal panes. It also preserves qualifying published panes and retains reload-time handling for PTYs with a handle or matching incarnation. Runtime tests cover projection, pane changes, and orphan reporting. Test harness updates adjust Codex probing, E2E setup, and Node and SQLite runtime test selections. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The PR aims to preserve live terminals through the renderer’s first mount. The supplied review evidence establishes no specific failure, so it presents no evidence-based merge blocker. 🚥 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.
Compared with #23749 and #23785. The earlier projection could reuse a PTY from another workspace; exact workspace/tab/pane identity and one live unclaimed owner are now required. The native oracle verifies PID, PTY incarnation, input, and no second launch across reload. Short viewport tokens prevent Windows line wrapping from invalidating the oracle. Real shell fixtures run in Node rather than Bun. Main also passes the native flow; deterministic graph regressions provide the red reproduction.
Final assembled verification: 6,313 tests pass (five skips) in 563 suites, plus 48 upstream authority tests and 81 serial compatibility tests. Typecheck and changed-code quality pass (147 files, zero findings). Fresh hidden macOS and isolated Windows/Linux each pass all four native flows. Windows: https://github.com/stablyai/orca/actions/runs/37556420437. Linux: https://github.com/stablyai/orca/actions/runs/37557129429. Current-head CI is green on 510642b1d92e; merge recommended. Contributor originals remain open until their replacements merge.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 Major · Track the exact-leaf layout PTY as published. · runtime-owned-terminal-projection.ts:43-52
src/main/runtime/runtime-owned-terminal-projection.ts:43-52
🎯 Functional Correctness | 🟠 Major | ⚡ Quick winTrack the exact-leaf layout PTY as published.
When
tab.ptyIdis null, the renderer can publish the PTY throughtab.parentLayout.ptyIdsByLeafId[tab.leafId]. This collector then classifies the pane as empty and omits that PTY fromboundPtyIds. Graph sync can therefore retain an old runtime PTY and miss the layout PTY claim.Suggested fix
- if (tab.ptyId) { - boundPtyIds.add(tab.ptyId) + const publishedPtyId = + tab.ptyId || tab.parentLayout?.ptyIdsByLeafId?.[tab.leafId] + if (publishedPtyId) { + boundPtyIds.add(publishedPtyId)
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
64c35931-4855-4ad1-a0ee-acbcdb406dc1
📒 Files selected for processing (3)
config/scripts/vitest-node-runtime-files.mjsconfig/scripts/vitest-sqlite-database-runtime-files.mjstests/e2e/live-background-terminal-mount-authority.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
510642b to
573a597
Compare
nwparker
left a comment
There was a problem hiding this comment.
Adversarial self-review of rebased head 573a597645dc.
Rebased onto main 00984ccb2504, including #24863 and #26088. Exact workspace/tab/pane matching, captured PTY incarnation, and conflicting-owner rejection remain intact. The fresh hidden macOS run retains the same running agent/Setup PTYs without a second launch. Low risk once current-head CI passes.
Validation of the assembled rebased application tree: 6,117 tests passed (four skips), full typecheck, zero changed-code quality findings across 151 files, fresh app/CLI builds, and all four hidden macOS flows. The final main refresh is CI-only and its 82 planner tests pass. Earlier Windows/Linux native runs were on the previous base; current-head CI must pass before merge.
Contributor references and coauthor trailers are preserved. The original damaged Windows+WSL profile and a native nested SSH recovery/save journey remain unverified; this does not justify closing #21489. No PRs were merged or superseded contributor PRs closed during this rebase.
ELI5
Opening the desktop window must attach to the agent and Setup terminals already running in the background. It must not discard their live connections or start them again.
What Changed
Preserve a host-owned PTY when the incoming renderer leaf has the same workspace, tab and pane identity but has not bound that PTY yet. Require one live owner, reject conflicting claims, and retain inactive panes only when the renderer published that exact identity. Reload preservation now also requires the same workspace.
Why
A temporarily empty renderer graph is incomplete evidence, not permission to retire a host-owned process. Adopt the narrow projection approach from #23749, also addressing #23785. Adversarial review found and fixed cross-workspace reuse during reload. The fake Codex launcher now answers version probes without recording them as agent launches.
Linked Issue
Addresses part of #21489. Replacement for #23749 and #23785; leave originals open until this merges.
Visual Proof
Native macOS validation after reload, with input reaching the original Setup and agent PTYs:


These are validation images. Current main also passes the native flow; the reproducible failures are in the deterministic host-graph tests, so there is no native before/after failure claim.
Testing
573a597645dc; wait for current-head checks before merging.Review
Compared with #23749 and #23785. The earlier projection could reuse a PTY from another workspace; exact workspace/tab/pane identity and one live unclaimed owner are now required. The native oracle verifies PID, PTY incarnation, input, and no second launch across reload. Short viewport tokens prevent Windows line wrapping from invalidating the oracle. Real shell fixtures run in Node rather than Bun. Main also passes the native flow; deterministic graph regressions provide the red reproduction.
The series includes local/direct SSH isolation, folder workspaces, and remote authority coverage. Real Windows+WSL reproduction of the original damaged profile and a native nested SSH recovery/save journey remain unverified. #25938 and the independent CI memory fix #26049 are merged.
Rebased onto main
00984ccb2504, including #24863 and #26088. Exact workspace/tab/pane matching, captured PTY incarnation, and conflicting-owner rejection remain intact. The fresh hidden macOS run retains the same running agent/Setup PTYs without a second launch. Low risk once current-head CI passes.Agent skill upstream boundary
Checklist