Skip to content

fix(browser-surface): persist refreshed browser connections - #608

Merged
tnunamak merged 3 commits into
mainfrom
fix/browser-surface-metadata-refresh-20261027
Oct 28, 2026
Merged

tnunamak merged 3 commits into
mainfrom
fix/browser-surface-metadata-refresh-20261027

Conversation

@tnunamak

@tnunamak tnunamak commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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-surface 1.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

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>
@tnunamak
tnunamak marked this pull request as ready for review October 28, 2026 01:11
@tnunamak
tnunamak merged commit 605f294 into main Oct 28, 2026
46 of 47 checks passed
@tnunamak
tnunamak deleted the fix/browser-surface-metadata-refresh-20261027 branch October 28, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant