test(temporal): record cross-version replay histories for every runner path - #134
Open
dawidaksamski wants to merge 1 commit into
Open
test(temporal): record cross-version replay histories for every runner path#134dawidaksamski wants to merge 1 commit into
dawidaksamski wants to merge 1 commit into
Conversation
…r path Adds the fail-policy, incomplete-branch and cancel-mid-run scenarios next to parallel-wave, recorded from the harness rather than the UI so the inputs carry no secrets. The committed files replay through Worker.runReplayHistories, so one broken history no longer hides the rest, and UPDATE_REPLAY_HISTORIES now takes a scenario name so adding one does not re-baseline the others.
dawidaksamski
requested review from
librowski,
lukasz-jazwa,
piotrblaszczyk and
szymon-t-sc
as code owners
September 10, 2026 14:38
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.
Cross-version replay histories for @workflowbuilder/temporal
Completes the replay guard WB-527 started. A published version of this package must replay an Event History recorded by an older one, since a run can wait in history across several deploys. Until now only the happy path had a committed history, and it was replayed through the singular call, so one broken history would have hidden the rest.
What changed
packages/temporal/test/replay/histories/, one per remaining path through the sandbox code:v0-fail-policy.json: a node failing under the defaultfailpolicy, wave finishes, join never reached, Workflow Execution fails.v0-incomplete-branch.json: a node names a port with no edge, downstream skipped asbranch_not_taken, run closesincomplete.v0-cancel-mid-run.json: cancel while an activity is in flight, non-cancellable cleanup emitsexecution_cancelled, Workflow Execution closes as Canceled.test/fixtures/replay-scenarios.tsdeclares all four graphs next to their expected terminal state, Temporal close event and scheduled-activity counts. The oldgraph.tsfixture is split: the recording store moved torecording-store.ts, the graph moved into the table.Worker.runReplayHistories. Every committed file replays in one pass and each broken one is named. The test also checks coverage both ways: every scenario has a recording, every recording belongs to a scenario. The version prefix is free so later<version>-files sit next to thev0-ones.UPDATE_REPLAY_HISTORIES=<scenario>records one scenario;=1re-records all. Unknown names fail at load. Before this, adding a scenario would silently re-baseline the others.v0-at the first release, and the secrets note for the live-run route.Deviations from the ticket
Histories were recorded from the test harness (in-memory Temporal via
@temporalio/testing) rather than by walking flows through the UI. This is deterministic, re-recordable by command, and the inputs carry emptyvariables/globalbags, so the secrets review the ticket warns about does not apply.v0-parallel-wave.jsonis byte-identical to main.Verification
emitEventingraph-runner.tsturns all four committed histories red in a single assertion naming each file, and trips the per-scenario activity-count pins. Reverted..DS_Storeor av9-copy passes the guard; an orphanv0-unknown.jsonfails it.No changeset: the package is unpublished. Nothing under
packages/temporal/srcchanged.