A read-only orchestration review of #812 reproduced a pre-existing replacement ownership race: close a source pane while replaceSession awaits provider spawn. The successor is inserted into session metadata and returned, but no grid/detached placement remains to remap. The new external lifecycle receipt can consequently report completed for an invisible orphan backend.
Expected: replacement revalidates the source's current durable placement and identity after asynchronous spawn/retirement. If it can no longer commit, retire the successor through the existing owned-backend cleanup and report failure/uncertainty, preserving the user's close/bury/layout action.
Reproduction evidence: production-hook in-memory deferred-spawn/concurrent-close probe from orchestration reviewer 8f6e2b0a-a700-44c6-804f-e76f4d13c038 at 961d542e. Add a deterministic real-hook regression. This is separate from #807's current-draft transfer bug and A5/A6's independently owned fixes.
Refs #795, #812.
A read-only orchestration review of #812 reproduced a pre-existing replacement ownership race: close a source pane while
replaceSessionawaits provider spawn. The successor is inserted into session metadata and returned, but no grid/detached placement remains to remap. The new external lifecycle receipt can consequently report completed for an invisible orphan backend.Expected: replacement revalidates the source's current durable placement and identity after asynchronous spawn/retirement. If it can no longer commit, retire the successor through the existing owned-backend cleanup and report failure/uncertainty, preserving the user's close/bury/layout action.
Reproduction evidence: production-hook in-memory deferred-spawn/concurrent-close probe from orchestration reviewer
8f6e2b0a-a700-44c6-804f-e76f4d13c038at961d542e. Add a deterministic real-hook regression. This is separate from #807's current-draft transfer bug and A5/A6's independently owned fixes.Refs #795, #812.