fix(runtime): settle concurrent participant batches reliably - #1135
Open
doublewhy wants to merge 3 commits into
Open
fix(runtime): settle concurrent participant batches reliably#1135doublewhy wants to merge 3 commits into
doublewhy wants to merge 3 commits into
Conversation
doublewhy
marked this pull request as ready for review
August 12, 2026 21:14
doublewhy
marked this pull request as draft
August 13, 2026 04:01
Treat pre-dispatch reservation failures as exact rollback and post-dispatch indeterminate work as non-retryable settlement. Protect scheduler-owned snapshot fields, merge backend state deterministically, preserve unrelated service counters, and process capacity-bounded chunks iteratively. Stage shared snapshots once per batch so mutation isolation remains linear in participant count. Requirement: RUN-308 Refs: #1101
Split concurrent commit and dispatch phases into focused modules, carry indeterminate settlement state as one cohesive value, and cover every entry branch without changing dispatch semantics.\n\nRequirement: RUN-308\n\nRefs: #1101
doublewhy
force-pushed
the
RUN-308-scheduler-successor
branch
from
August 13, 2026 04:06
c26cc57 to
17dc65c
Compare
doublewhy
marked this pull request as ready for review
August 13, 2026 04:19
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.
Plain-language summary
Context: OpenRAE can ask several simulated participants to act at the same time. Its scheduler must still keep one trustworthy view of who is running, what changed, and how much execution capacity remains.
Problem: If one concurrent batch failed partway through, the scheduler could leave capacity stuck, erase accounting from earlier work, retry an action even though its external effect was uncertain, or let one backend result corrupt another participant's state. The old path also repeated expensive whole-snapshot work as a batch grew.
Fix: This change makes the safety boundary explicit. Before any action is sent, a failed batch can be rolled back exactly. After sending begins, every submitted action is settled without blind retry. Results are isolated and merged in a stable order, scheduler-owned state stays protected, and only this batch's capacity is released. The same path handles an 800-participant run without recursive or repeated full scans.
Closes #1101
What changes
RuntimeSnapshotfield to either backend merge ownership or scheduler protection. New fields fail the ownership guard until their concurrent semantics are explicit.failure_policy: stop.Current-base evidence
Verified after rebasing onto
devat96b20ae8422fae9936bae928bbd8a1c14d2001da:range-diff: all three commits are patch-identical to the reviewed pre-rebase series.Hosted CI and Sonar passed for exact head
17dc65cd36e56fe2d873d68401325ee262c4b1a6on base96b20ae8422fae9936bae928bbd8a1c14d2001da.Review boundary
This PR is deliberately limited to concurrent participant scheduling and its scale path. It does not change HTTP/API admission, durable workflow storage, the workflow-timeout implementation merged in #1132, the solver deadline implementation merged in #1142, dependency-cycle detection, or resolved-realization authority. It does not claim that native side effects can be rolled back after dispatch.
The rationale, alternatives, field-ownership boundary, and nonclaims are recorded in
docs/decisions/issue-1101-concurrent-participant-rollback-preflight.md.Base and provenance
devat96b20ae8422fae9936bae928bbd8a1c14d2001da.17dc65cd36e56fe2d873d68401325ee262c4b1a6.