A declared browser session is stored the first time a run reaches for it - #259
Merged
Conversation
czpython
force-pushed
the
session-on-use
branch
from
August 16, 2026 13:41
084fb0e to
28a9611
Compare
Until a workflow borrows the login, the declaration is the only thing that exists — nothing is written at import or install. The first borrow writes the row, so the sessions pane can show the operator which login the extension is waiting on, and the borrow itself says the session is not ready yet. Reporting a bounced login lands on the same row.
czpython
force-pushed
the
session-on-use
branch
from
August 16, 2026 13:47
28a9611 to
fa8928b
Compare
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.
What
A
BrowserSessiondeclared on an extension had no way to reach its stored row: the identity is namespaced (x_me.x), and the only code path that creates a row isPOST /api/browser-sessions, whose name pattern accepts neither dots nor underscores. Every borrow of a declared session raisedBrowserSessionUnknownError, so the author surface documented inwriting-an-extension.mdcould not run.The declaration now resolves its row on first use, the way a
Servicegets itsServiceIdentityon connect — nothing is written at import or install. The first borrow writes the row asneeds_loginwith the declared site, which is what puts it in the sessions pane for the operator to sign into; the borrow itself still refuses, now saying the session is not ready rather than that it does not exist.mark_stale()resolves the same way, so reporting a bounced login before the first successful borrow lands on a row instead of raising.Testing
needs_loginrow carrying the declared site, raises not-ready, and a second borrow reuses that one row rather than writing another.