Repository navigation
fix(terminal): reject creates for durably closed tab identities - #32190
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Priority: Merge Risk:
|
# Conflicts: # config/reliability-gates.jsonc
|
Maintainer refresh: merged current main (2a20d2d). The only conflict was in |
A sleeping paired desktop can replay
terminal.createwith the identity of a tab the host explicitly closed, causing a fresh empty shell to start under the retired tab ID. The shipped Store admission path now checks existing durable close records before starting the PTY. A close recorded in a legacy runtime spill partition also blocks the replay. The runtime returns the existingtab_not_foundabsence message used by paired host-session operations. An older viewer may still surface that refusal until its own stale pane is reconciled; this patch prevents host spawning and does not claim client-side cleanup.The layout ownership rollout stays off. This reuses the existing SQLite close records and their expiry policy; unseen IDs, missing-PTY recovery without a tab-close record, splits and live
mustExistreconnects retain their existing paths. Related to #21341; this does not claim to resolve every scenario in that issue or replace direct SSH boot hydration work in #22334.Validation: 100 tests pass across 11 focused files; node typecheck, changed-code quality and reliability manifest checks pass. With both production changes reverted, the same new SQLite close/reload/registered-RPC oracle fails both stale-ID cases while its three valid controls pass; restoring the changes passes all five. The stale requests perform zero controller spawns and zero inventory reads.
Reliability invariant/gate:
terminal-lifecycle.closed-tab-create-admission(experimental): an unexpired host close record must reject a stale create before the controller starts a process. Existing terminal-topology refusal spans retaintab_closeddiagnostics. Admission adds one constant-time map lookup per existing host partition, with no polling, process enumeration or network work.Coverage limits: tests use a real SQLite Store and registered RPC handler with a synthetic controller and fixture workspace resolver on macOS. No actual PTY, network RPC socket, desktop sleep/wake or peer convergence was launched. Linux, Windows, WSL, SSH, mobile and folder-workspace physical journeys remain explicit gate gaps. Handle-based close and rendered close delivery are covered by adjacent suites rather than this new cold-reload oracle. Existing close records still expire after 30 days or their per-partition cap of 500.