The board read passes the caller to list_summaries - #306
Merged
Conversation
list_summaries(account_id: str | None) receives the caller. The board route reads current_account_id.get() at handler entry and passes it. The stream route captures the value at handler entry and closes over it, because the request context ends before the generator polls. A model method takes data, not request context. A caller-scoped board uses the argument. A shared board ignores it. A call from a cron, a subscriber, or a test now states its caller. Before, it silently answered for nobody. No compatibility shim: a nullary list_summaries fails loudly at the call.
czpython
force-pushed
the
subject-caller-scope
branch
from
August 22, 2026 09:53
f6f114c to
18bb3f5
Compare
czpython
enabled auto-merge (squash)
August 22, 2026 09:54
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.
list_summaries(account_id: str | None)receives the caller. The board route readscurrent_account_id.get()at handler entry and passes it. The stream route captures the value at handler entry and closes over it. The request context ends before the generator polls, so the captured argument keeps the stream on the same caller.A model method takes data, not request context. A caller-scoped board uses the argument. A shared board ignores it. The signature still carries it, so the contract is one shape. A call from a cron, a subscriber, or a test now states its caller. Before, it silently answered for nobody.
Every implementer updates in the same sweep: the platform stubs, ship, review, and the proof extension. There is no compatibility shim. A nullary
list_summariesfails loudly at the call. The author guide shows the new signature and says the board passes the caller. The route-scoped caller read stays as it was.Out of scope: the single-subject read (
get_for_subject_id) stays unscoped. Per-subject tenancy changes 404 semantics and needs its own decision.