🐛 repro: external resolve advances action-orchestrated loop (#1188)#1189
Closed
taras wants to merge 1 commit into
Closed
🐛 repro: external resolve advances action-orchestrated loop (#1188)#1189taras wants to merge 1 commit into
taras wants to merge 1 commit into
Conversation
Two failing tests reproducing #1188: when shutdown is triggered externally via scope.run(() => resolve(...)) from inside an action-orchestrated loop, the loop advances into the next iteration (round-2-start) before teardown completes. - "nested scoped + race" mirrors the original report. - "minimal action baseline" strips out scoped() and race() entirely and still leaks round-2-start, isolating the root cause to the action + external-resolve path rather than scoped/race (the latter was the narrower #1185, already fixed by #1186). These tests are expected to fail until the underlying action unwind propagation is fixed.
commit: |
Member
Author
|
this is not a problem. It just shows that we can interrupt sync loop which is not expected to be possible |
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.
Reproduction for #1188. These tests are expected to fail — they document the bug and should go green once the underlying fix lands.
What it shows
When shutdown is triggered externally via
scope.run(() => resolve(...))from inside anaction-orchestrated loop, the loop advances into the next iteration (round-2-start) after the shutdown trigger, instead of stopping once the current iteration finishes.Two tests are added to
test/scoped.test.ts:does not advance loop after external resolve with nested scoped + race— mirrors the original report (actionwrapping a loop, each round runsscoped(scoped(race(...)))). Observed events:does not advance loop after external resolve in minimal action baseline— strips outscoped()andrace()entirely; justaction+ aforloop +sleep+ externalresolve. Still leaks:Why the baseline matters
The minimal baseline has no
scopedand norace, yet it still advances toround-2-start. That isolates the root cause to theaction+ external-resolve path — i.e. resolving anactionfrom outside (viascope.run) does not unwind the operation that is currently suspended awaiting that action before the loop takes its next step.This is the broader category #1188 refers to: #1185 was the narrower
scoped+racemanifestation (fixed in #1186 /49fe66f0), but the same "external resolve doesn't halt the in-flight iteration" problem reproduces with a plainactionloop.Run