Bind every session through session_scope and start test requests unbound - #563
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
czpython
force-pushed
the
session-rule-everywhere
branch
from
September 14, 2026 18:15
8f9ab05 to
8790c10
Compare
czpython
force-pushed
the
session-rule-everywhere
branch
from
September 15, 2026 07:07
8790c10 to
955de95
Compare
czpython
force-pushed
the
session-rule-everywhere
branch
from
September 15, 2026 07:23
955de95 to
1bd5fc5
Compare
czpython
enabled auto-merge (squash)
September 15, 2026 07:25
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 changed
session_scopeis the one primitive that binds a session, and every place that runs outside a request now uses it.step_sessionreturnssession_scope(_step_engine());session_scopeyields its session for the callers that need it.dispatch()binds its own session wherever it is called.Workflow.__init_subclass__wraps a declareddispatch()inbound_session(), and the cron tick calls it without a session of its own. TheSessionNotBoundErrormessage, which namesdispatch()as a bound place, is now true.configure_app_for_testinstalls a boundary that hides the harness session for the request, and the fixture's on-demand session refuses inside one. A read the app never bound now fails in a test the way it fails on the host. The direct verifier test is gone; the wire test covers it. The generic-subjects fixture mounts its fake app through the app, so its routes get the request session like a loaded app's.The author guide states that
dispatch()binds its own session, that a row a step returns is detached, and that a test request starts with no session bound.