Repository navigation
Conversation
A stream-returning Nexus operation hands its caller's callback to a CHASM execution per stream, which delivers the producer's notifications as folded progress and completes every callback when the stream closes. Attaches are bounded, an idle stream closes with a failure, and a closed notifier keeps completing late attaches for its retention.
The close result becomes the stream operation's result, and SDKs check it against the blob limit before sending, so the server refuses an oversized one the same way.
An idle timeout now fails only the waiting callers, a callback whose caller closed is dropped, a full notifier makes room from finished or quiet callbacks, and an owner that ended without closing the stream closes it with a failure. Notifications and IDs are bounded, and the business ID names the owner kind.
A completion that beat the start response named no operation token, so the caller lost the stream; a caller's cancel left it waiting forever; and a reused Workflow ID reached the earlier chain's closed notifier.
A caller that refused progress, such as every HSM caller, still waits for its completion, so only callbacks that are done make room.
Such a reference would key a second notifier, which the owner check would then close as ended while the stream still runs.
A reader that started after one day failed while the store still held its records.
They hold each caller's token, and a reader could forge a completion with one.
No notifier means no caller waits. This also leaves no orphan notifier for a wrong run ID.
Only the values hold a caller's token, and the keys help a reader debug.
A caller saw success when the owner failed, and the owner check failed callers of an owner that completed. The notifier now completes callers as a Workflow-run operation completes (DD-107).
An empty payload carries no encoding, so a typed caller couldn't decode it and its Workflow Task failed on every try.
The owner check could close a completed owner's stream with an empty result before the Worker's close with the real one, and the notifier keeps the first close (DD-108).
moetemp
marked this pull request as draft
October 12, 2026 06:59
This was referenced Oct 14, 2026
Owner
Author
|
Replaced by Jetty #51. Bridge was re-cut onto Jetty (stream wake-ups in one namespace) with no Ford content. The same-namespace notifier parts moved to Jetty, and the Nexus parts are in Bridge v2. |
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.
What changed?
This PR adds the stream notifier, a CHASM execution per stream that holds its callers' Nexus callbacks.
chasm/lib/streamnotifierkeys a notifier byworkflow/<id>/<first run>/<topic>, so one notifier serves the stream across a run chain.streamnotifier.maxCallbacks. Notify hands the highest counter to every callback, and close completes them all.streamnotifier.closedRetention(7 days).streamnotifier.ownerCheckIntervalcloses the stream when the owner chain ended.streamnotifier.ownerCloseGraceleaves a just-closed owner's stream to its Worker first.streamnotifier.enabled, off by default.Why?
A notifier keyed by the stream survives worker restarts and works for every producer kind (DD-31). An owner that ended closes the stream (DD-73), but the Worker's own close with the real result wins (DD-108).
How did you test it?
Link to a test plan if any -
Unit tests in
chasm/lib/streamnotifierand functionalTestStreamNotifierEndToEndon both caller kinds. The live lane covers it too.