Skip to content

The board read passes the caller to list_summaries - #306

Merged
czpython merged 1 commit into
mainfrom
subject-caller-scope
Aug 22, 2026
Merged

The board read passes the caller to list_summaries#306
czpython merged 1 commit into
mainfrom
subject-caller-scope

Conversation

@czpython

@czpython czpython commented Aug 22, 2026

Copy link
Copy Markdown
Owner

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. 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_summaries fails 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.

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
czpython force-pushed the subject-caller-scope branch from f6f114c to 18bb3f5 Compare August 22, 2026 09:53
@czpython
czpython enabled auto-merge (squash) August 22, 2026 09:54
@czpython
czpython merged commit 7d454a1 into main Aug 22, 2026
1 check passed
@czpython
czpython deleted the subject-caller-scope branch August 22, 2026 09:56
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