mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 16:03:45 +00:00
The published group->tab invariant read "no group may name a tab absent from `tabs`". That is not the contract. A terminal occupies its group under the parent tab id but publishes one row per pane, so `tabOrder` names `term-a` while `tabs` carries `term-a::<leafId>`. The rule passed only because both fixtures were browser/editor-only; adding an ordinary mounted terminal to one fails it. The real rule is resolvability, not equality: a group may only name a tab the client can resolve, and the client's `buildHostToLocalTabIdMap` keys terminals by surface id *and* `parentTabId`. Move the invariants into a named module that says so, and put a terminal in the fixture so the terminal case is covered rather than avoided. Also pins a guard that was silently unpinned: the mirrored-tab check runs twice — once choosing which terminals the group projection may name, once emitting rows — and deleting the projection copy left the whole runtime suite green, because no fixture had a web-only mirrored terminal inside a group.