Repository navigation
fix(preview): freeze render host selection at tab admission - #836
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client and agent tabs could choose their render host only when asynchronous placement ran, allowing a later default change to move an already opened tab. Popup adoption could also pair the opener's page with another companion attachment.
Freeze render-host selection synchronously before Manager publishes
opened. Agent admission composes after reservation/adoption hooks; popups inherit only the opener's recorded host or explicit server. Conflicting prebindings and unsupported companion popup adoption are refused before another attachment. Placement retains typed companionnot_startedfailures without fallback.Failed initial admissions become inert before releasing bindings and closing sessions, including client opens and refused human popups already queued in the serial Manager mirror. Logical admission state survives runtime detach: an established companion tab keeps its Manager session, original binding and assignment through offline viewer retries. Reconnecting the companion and using Try again recreates the same logical tab on that host. Logical close waits for pending creation to settle before release and retires its lifecycle state; pending finalizers check their own instance. Existing capacity reservations, adopted page/context/CDP consistency and outcome fences remain covered.
Jones behavior uses the existing companion modules and narrow WS integration. The lifecycle correction stays in ServerBrowser because that owner controls runtime establishment, pending creation and ordered Manager-event consumption. Integration tests require its existing harness; the existing boundary coverage records that exception.
Refs PBH-COR-001.
Validation:
0320dc682c43b71746befb115af5f9dcbaa75521: client and human-popup replay enter placement twice; offline reconnect destroys the established session; close during pending reconnect releases too early.72485ec85cd00fc604ee5a2e708fd03a183d2c34; incoming input-isolation source matches main exactly and both lanes' boundary records are retained. All 99 tests and scoped checks pass on composed head313f3b12d1a92b960b250c58f877abf7b5c8005e(typecheck used its valid cache).Source qualification uses real application services, real companion registry/transport disconnect and reconnection, and synthetic Playwright/CDP attachment seams. Installed apps, native Electron/Apple Silicon behavior, socket authentication and interactive UI evidence remain unverified. ROOT owns independent re-review, current-head CI and merge. No runtime installation, update or restart is part of this change.
Implemented by GPT-6.1 Sol (xhigh repair), Codex harness in Jones Code.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.