Skip to content

bug(sessions): retire replacement when its source placement disappears #815

Description

@Juliusolsson05

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions