Skip to content

Task: beside asserts it is not on the frame thread, and the Sans-IO doc says who may call it - #1132

Merged
GLinnik21 merged 1 commit into
mainfrom
beside-frame-guard
Oct 29, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
beside-frame-guard

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Follow-up to #956, from the Sans-IO review of task::beside: it fits as landed (each of its three callers is inside an IO body a runner already runs off the frame), but nothing stopped a machine step from calling it later and blocking the frame on the network.

  • beside / beside_with assert they are not on the frame thread, the same debug_assert! an OffFrame mint has. Free in release builds; catches a step-side call on any tested path.
  • Regression test a_beside_request_on_the_frame_thread_is_refused (failed before the assertion, passes after).
  • The beside doc comment now says why the workers gate does not count it (joined before the body returns) instead of telling callers how to spell it past the gate; docs/sans-io.md gets one bullet saying the same. No ledger or gate change.

Gates

Crate tests on the committed tree: plx_base 232 passed, plx_data 1295 passed, plx_media hostsim 2175 passed; ci/check-deps.sh green (workers: 7 sites, unchanged). PR CI is the gate.

No issue: a review follow-up to #956.

🤖 Generated with Claude Code

…oc says who may call it

`task::beside` joins its scoped sibling before the caller returns, so the caller waits for the
network. That is fine in an IO body a runner already runs off the frame (fetch_full, fetch_source,
build_stream) and would stall the frame in a machine step. The `workers` gate is path-scoped and
cannot tell a body from a step, and `beside` is deliberately not a ledger line (it is not a detached
worker start), so the check is a debug assertion in `beside_with`, the same one `OffFrame::mint`
has. A regression test puts the test thread on the frame and expects the panic.

The `beside` doc comment now says why the gate does not count it instead of telling callers how to
spell the call, and docs/sans-io.md gets one bullet saying who may call it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 14cd9da into main Oct 29, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the beside-frame-guard branch October 29, 2026 14:11
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