Repository navigation
Give each run of a step its own instance key - #39
Merged
Merged
Conversation
added 10 commits
October 12, 2026 21:58
…reshold inside iterations
A debug-session human decision whose name is not a valid instance key now returns WV-DEBUG-HUMAN-TASK instead of a generic validation error. Pin that re-setting a step breakpoint keeps a paused instance paused.
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.
Summary
The runtime now names each run of a step by its instance key, so that a step can later run more than once in one run (once per loop iteration, for example) without sharing state with its other runs. Outside loops an instance key is the step ID. Nothing changes for existing workflows: every recorded golden transition replays byte-identically.
checks/credit[3])./steps/<step ID>.[3][0]. Each transition equals the recorded one with the same keys moved.{run_id}:{instance key}.instance_keyanditerationfor tasks created inside a loop iteration. Both are omitted for every other task, so existing payloads keep their bytes.There is no migration, no new operation and no Studio change.
Verification
make checkpassed all 17 stages, including 6558 unit and contract tests, 208 agentic-worker tests and 29 files-worker tests.scripts/golden_corpus.py --checkandscripts/language_fixtures.py --checkexit 0.{run}:work[2]pausetopause[2],worktowork[2],approvaltoapproval[2]). Those rows match what a loop body will store.offline,studio, Documentation and Acceptance (prprofile).cross-platformjobs run the golden and lifted corpus, the operations lookups and the contract tests.Decisions
A capacity overflow followed by a failing step in the same event ends in that step's incident. Capacity is now checked in batches within one event. Suppose an event grows its state past capacity before the next check, and a later step of the same event fails an expression. The run then opens a
WV-EXPR-MISSINGincident instead of failing withWV-RUNTIME-LIMIT. We accept this because:test_an_expression_failure_after_unadmitted_growth_ends_in_an_incidentpins this behavior.Signal receipts keep matching by step ID. Signal steps are not allowed inside loops, so a signal's key is always its step ID. Deadlines, which human tasks inside loops will also use, are matched through the step.
Incident views are unchanged here. Incident list and read views gain
instance_keytogether with the incident view rework. Until then, an incident of a step instance would show its full key innode_id. No such incident can exist before loops.In debug sessions, a human decision whose name is not a valid instance key (for example
[2],#aor~1) returns 422WV-DEBUG-HUMAN-TASK, like an unknown or inactive human task.Follow-ups
node:send[2], thennode:send, thenaction:.#keys, which until then refuse withWV-RUNTIME-EVENT.