Repository navigation
Async IDC: Local Outbox - #6377
Draft
Shubham8287 wants to merge 11 commits into
Draft
Shubham8287 wants to merge 11 commits into
Shubham8287 wants to merge 11 commits into
Conversation
Shubham8287
marked this pull request as draft
October 25, 2026 20:13
Shubham8287
force-pushed
the
shub/idc-source-receiver-references
branch
3 times, most recently
from
October 26, 2026 14:18
2de1197 to
41f6ff1
Compare
Shubham8287
force-pushed
the
shub/idc-rust-outbox-macro-split
branch
from
October 27, 2026 14:55
e657762 to
9d87560
Compare
Shubham8287
force-pushed
the
shub/idc-source-receiver-references
branch
from
October 27, 2026 16:57
742eb67 to
32401dd
Compare
Shubham8287
force-pushed
the
shub/idc-rust-outbox-macro-split
branch
from
October 28, 2026 11:34
2a2be07 to
64a3a96
Compare
Shubham8287
changed the base branch from
shub/idc-rust-outbox-macro-split
to
master
October 29, 2026 11:23
Shubham8287
force-pushed
the
shub/idc-source-receiver-references
branch
from
November 28, 2026 07:31
32401dd to
ed66d62
Compare
A TypeScript module can now send to a reducer in its own module without
generating receiver bindings for itself. The table declares
`outbox: 'local'`, and the receiving reducer names it with
`receiverFor`, as `onSchedule` and `onResult` name their tables.
Declaring the link on the reducer avoids a type cycle between the table
and a reducer that uses the schema containing it.
When the schema is built, the receiver's parameters are mapped to columns
by name or `.param({ name })` and checked by type. The module emits a
`LocalOutboxes` entry with the reducer's source name, and the host
resolves the canonical name and signature hash. The section is omitted
from modules without a local outbox, so they still load on hosts that
predate it.
A C# outbox table can now call a reducer of its own module. Set
Outbox to the class declaring the reducer and OutboxReducer to its
name:
[Table(Accessor = "PingOutbox", Outbox = typeof(Module),
OutboxReducer = nameof(Module.ReceivePing))]
[Outbox(typeof(Module), ReducerName = nameof(Module.ReceivePing))]
declares the columns the same way it does for receiver bindings.
The generator checks the columns against the reducer's parameters at
compile time, as it does for generated receivers, and emits a
RawLocalOutboxDefV10 with the reducer's source name and the argument
columns in parameter order. The host resolves the name and computes the
signature hash, so the module computes no hash. A local outbox's target
column is a SpacetimeDB.Identity, and [OnResult] works as for remote
outboxes.
Run the self-outbox scenario, which sends a nested message from a module to its own reducer without receiver bindings, against TypeScript and C# ports of the Rust fixture. Fixture setup for Rust, TypeScript and C# moves out of `IdcTest` so this test can share it.
Shubham8287
force-pushed
the
shub/idc-source-receiver-references
branch
from
November 28, 2026 09:05
ed66d62 to
8749b00
Compare
This branch has not been deployed
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.
Description of Changes
Based on #6376.
API and ABI breaking changes
Rollback safety impact
Expected complexity level and risk
Testing