Repository navigation
A parallel scope keeps its own fork activation - #145
Merged
Merged
Conversation
FBBaseExecutor>>activationOf: answers the most recent activation of a node. A node has one activation per pass through the same fork, so the most recent activation of a fork is only the asking scope's while that scope is the one running - once it is over, the newest belongs to a later pass. A finished scope therefore read a running one's fork. #outputFor: asks whether the loop is over, was told "no" by another loop, and answered the slot of its own last iteration instead of its first value: the same activation said one thing while the second pass ran and another once everything was over. The scope resolves its fork once, on the first use - which is the first step of its own scope, when the newest activation of that fork is still its own, since a second pass cannot start before the scope is popped - and keeps it. Every other node is looked up as before; for those the most recent one is right, because only a live scope looks a node up and its own activations are the newest there are. Found while tracing a customer report of 2026-09-18 (a loop that ran twice wrote its first pass's last element 300 times); the reading path that report went through is ApptiveScript's step(id), fixed separately in apptive-base. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
FBBaseExecutor>>activationOf: answers the most recent activation of a node. A node has one activation per pass through the same fork, so the most recent activation of a fork is only the asking scope's while that scope is the one running - once it is over, the newest belongs to a later pass.
A finished scope therefore read a running one's fork. #outputFor: asks whether the loop is over, was told "no" by another loop, and answered the slot of its own last iteration instead of its first value: the same activation said one thing while the second pass ran and another once everything was over.
The scope resolves its fork once, on the first use - which is the first step of its own scope, when the newest activation of that fork is still its own, since a second pass cannot start before the scope is popped - and keeps it. Every other node is looked up as before; for those the most recent one is right, because only a live scope looks a node up and its own activations are the newest there are.
Found while tracing a customer report of 2026-09-18 (a loop that ran twice wrote its first pass's last element 300 times); the reading path that report went through is ApptiveScript's step(id), fixed separately in apptive-base.