Repository navigation
fix(browser-surface): persist refreshed browser connections - #608
Merged
Merged
Conversation
Refresh newly idle surfaces after boot releases and keep asynchronous surface writes ordered before returning a connection for dispatch. Persist allocator metadata and retention across storage reloads. Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Both clients need the refreshed allocator metadata API before controller acquisition can persist replacement browser connections. Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
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.
Replacing an idle browser can leave the controller using its old container ID and connection URLs. A restarted controller can also release a dead run's lease after its first allocator check, leaving the first new run with the stale address.
Persist the allocator's refreshed connection details, wait for an in-flight reconciliation before acquisition, and check newly idle surfaces again after boot releases are saved. Order surface writes so a delayed refresh cannot overwrite newer lease authority. Add nullable storage fields for allocator metadata and retention so those values survive reload.
Regression tests check the first post-boot binding, an active lease that stays unchanged, acquisition during a pending status request, recovery from a failed refresh write, and a refresh queued behind a release. Removing each ordering safeguard makes its corresponding test fail. SQLite tests also cover upgrade, reopen and retained-surface cleanup.
Both dependency declarations and the lockfile now require the published
@opendatalabs/remote-surface1.6.0 release. The store and controller suites pass with that registry package, as do the reference-implementation and console typechecks. Real PostgreSQL checks pass for schema upgrades, metadata round trips, commit ordering, lease authority and receipts. Broader repository checks and container qualification remain pending.Assisted-by: AI