Skip to main content

Module submission

Module submission 

Source
Expand description

Validated dynamic task creation from handlers.

Provides SubmissionChannel — a typed mpsc channel through which handlers can propose new tasks. The dispatch loop owns all mutations: proposals flow through the channel and are validated through the mutation authority before being WAL-appended. Handlers cannot bypass the mutation authority.

§Invariant preservation

This design preserves ActionQueue Invariant 5: “External extensions cannot mutate persisted state directly.” Handlers propose via SubmissionChannel::submit; the dispatch loop validates and commits.

§Submission semantics

Submissions are fire-and-forget from the handler’s perspective:

  • If the channel is closed (dispatch loop shut down), the submission is silently dropped — handlers have no error path for this case.
  • The dispatch loop processes submissions on the next tick, not immediately.
  • Handlers must not assume submissions are visible before they return.

Structs§

SubmissionChannel
Concrete submission channel backed by a tokio mpsc channel.
SubmissionReceiver
Receiving end of the submission channel (held by the dispatch loop).
TaskSubmission
A proposed task submission from a handler.

Functions§

submission_channel
Creates a matched pair of SubmissionChannel (handler side) and SubmissionReceiver (dispatch loop side).