Skip to content

[Bridge] Folded Nexus operation progress onto the next Workflow Task. - #39

Closed
moetemp wants to merge 20 commits into
moe/bridge/n5-progress-endpointfrom
moe/bridge/n6-fold-progress
Closed

moetemp wants to merge 20 commits into
moe/bridge/n5-progress-endpointfrom
moe/bridge/n6-fold-progress

Conversation

@moetemp

@moetemp moetemp commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR delivers Nexus operation progress to a CHASM caller Workflow on its next Workflow Task scheduled event, with no event of its own.

  • Progress schedules its own task at most once per nexusoperation.progressMinInterval (1 s by default). Sooner progress folds and waits for a timer.
  • A heartbeat task, its retry and a task a failover converts carry no progress. A marker holds it for a later task.
  • If the task that carried progress fails, the progress stays on its scheduled event. A worker reads every scheduled event since its last completed task.
  • A passive cluster forwards deliveries to the active one.

Why?

Progress rides the scheduled event (DD-34), and a burst costs at most one extra task (DD-55). SDKs replay a heartbeat chain differently from live, so progress there could land in another activation (DD-52).

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

Functional TestNexusOperationProgress* on both caller kinds, TestNexusProgressAcrossFailoverConversion, and the xdc TestNexusProgressForwardingSuite. The live lane covers it too.

moetemp added 20 commits October 9, 2026 19:33
Each operation keeps its highest counter until a Workflow Task scheduled event carries it, and newer progress folds into a scheduled task that has not started, so a burst costs one task and writes no event of its own. A passive cluster forwards progress to the active one.
SDKs replay a heartbeat chain differently from live, so progress on one of its tasks could reach
the Workflow in another activation. It now waits for the next normal task.
A retried heartbeat task is replayed within the same heartbeat chain, so the hold is persisted
on the Workflow task info and released only when a task that is not a retry is scheduled.
Progress that folds into a scheduled task is newer than what that task's event carries, so the
Workflow never saw the highest counter. It now waits for the next task once that one starts.
A cluster rebuilt from replicated events never has the heartbeat hold marker,
so a converted retry could carry progress. A test now pins that progress still
reaches the Workflow around a rejected Update.
A long stream could fill the caller's History, one task per delivery. Progress that a task can't carry now waits instead of being dropped.
It ran on every transaction close and resolved the CHASM root each time.
@moetemp

moetemp commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Replaced by Jetty #55 and Bridge v2 #58. 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.

@moetemp moetemp closed this Oct 14, 2026
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