Repository navigation
Conversation
Preserve ::workspace:<uuid> in runtime identity comparisons so folder project sessions sharing one directory cannot adopt or select each other’s PTYs.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe runtime now uses 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
|
Thanks @dgk-dev — independently reproduced and confirmed your diagnosis: I've opened #12474 which carries your regression test over essentially verbatim (it drives the public It adds three follow-ons: collapsing the duplicated hand-rolled comparison in |
|
Duplicate of #12474. Same root cause and intended fix: isolate same-path folder workspace PTY identity so distinct |
|
Landed as #12474 → |
Summary
Folder projects intentionally support multiple independent workspace sessions backed by the same directory. Their IDs differ only by the synthetic
::workspace:<uuid>suffix.Runtime PTY ownership comparisons used
splitWorktreeIdForFilesystem, which deliberately strips that suffix for cwd/filesystem operations. As a result, two distinct folder workspace instances compared equal. During controller inventory refresh, an exact target could select or rebind a sibling workspace's PTY; paired/mobile clients could then receive a stale or perpetually pending terminal handle and remain on Loading terminal.This change keeps the suffix in runtime identity comparison and identity-map keys by using
splitWorktreeId. Filesystem callers continue usingsplitWorktreeIdForFilesystem, so both sessions still launch in the shared physical directory.User-visible result
Multiple workspaces under one Folder project can keep separate terminal graphs even though they intentionally share a directory. Opening one workspace from Mobile no longer allows another same-path workspace's PTY to satisfy its terminal refresh.
Regression coverage
The regression creates two live controller PTYs with the same folder path and different
::workspace:<uuid>owners, requests the second workspace by exact ID, and proves only its own PTY is selected and recorded. The pre-fix comparison admits both because the UUID suffix is stripped.Validation
src/main/runtime/orca-runtime.test.ts: 1,022 passed, 1 existing skipgit diff --checkpassedRelationship to #11868
This is complementary and substantially narrower. #11868 restores and reattaches persisted folder session snapshots across runtime generations and adds deletion/routing fences. This PR fixes the lower-level synthetic folder-project instance identity (
repo::path::workspace:<uuid>) that currently collapses before those snapshot/materialization decisions. It does not duplicate the reattachment or tombstone work.