Repository navigation
Conversation
Lang issues the two commands, and each one's machine matches the recorded event by channel so replay catches a changed subscription. The machine files are the main lineage's, and their unit tests sit in sibling modules.
The server folds a channel's notifications onto a Workflow Task's scheduled event. Core turns them into one job per task, folded per channel, carries a failed task's notifications into the retry, and keeps a notified task out of the heartbeat chain so replay hands them over in the same activation.
The reporter panics on any machine it has no visualizer for. This also restores the external stream machine's entry, which the machines commit dropped.
This was referenced Oct 3, 2026
Owner
Author
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.
This PR lets a workflow on Max's external-stream Core subscribe to notification channels and hands it the notifications the server folds for each Workflow Task.
What changed?
SubscribeNotificationChannelandUnsubscribeNotificationChannelare bridge commands 29 and 30, each with its own state machine. Max's external commands keep 23 to 28. On replay each machine holds the reissued command to its recorded event, channel included.NotificationsReceivedjob, sorted with signals and updates.fold_notification. A higher counter wins. On a tie the held one stays.scheduled_with_notificationskeeps a notified task out of the heartbeat chain, so replay gives it its own activation, as the live run had.Part of AI-198 (epic AI-37).
Why?
The notifications live in History, so replay yields the same job at the same point. The server clears what it put on a scheduled event, so Core has to carry a failed task's notifications into the retry or lang loses them. The names match the main lineage so the unified Core has one vocabulary. One difference stays on purpose: the job is sent from
flush_pending_notificationsrather than inline, because the external runtime's wake hooks in there later. This PR doesn't resume parked external waits yet. That's the wake PR's job.How did you test it?
Link to a test plan if any -
The machine tests cover the matching event, a wrong channel, a wrong event type, the command on the completion and the replay cases. The external stream suite covers the retry fold, live and on replay, and a replayed notified task keeping its own activation. The whole Core lib suite passes, including the coverage reporter. The lints and fmt are clean, and every commit builds.