Skip to content

Fix gateway condition scope wrapping - #81

Merged
noha merged 2 commits into
mainfrom
fix-gateway-condition-scope-wrapping
Jul 20, 2026
Merged

Fix gateway condition scope wrapping#81
noha merged 2 commits into
mainfrom
fix-gateway-condition-scope-wrapping

Conversation

@noha

@noha noha commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

noha added 2 commits July 20, 2026 09:30
testAllExposedNodeClassesHaveATypeName called FBNode class>>exposedNodes,
which is an ApptiveBase-Core extension (exposedNodeClasses/exposedNodes/
withType: all live there, not in FluxBase-Core), so it only worked in a
shared image with both packages loaded. FluxBase's own CI (Core +
Core-Tests + Roassal only) hit a genuine doesNotUnderstand, exactly what
the test was trying to guard against -- just for the wrong reason.

Rewrote the test to check the same invariant (every non-abstract FBNode
subclass responds to #typeName) using only FluxBase-Core primitives
(allSubclasses/isAbstract/typeName), without needing the ApptiveBase-Core
collector methods.
FBExclusiveGatewayBehavior/FBMultiChoiceGatewayBehavior called
transition conditionMatches: directly during the "which transitions
match" selection phase, bypassing the activation entirely. This is the
hook AGFlowActivation (ApptiveBase-Core) overrides to set up the
transition's ApptiveScript scope (asApptiveScriptScope activation: self;
useDuring:) -- without it, conditions referencing "source" (e.g.
'source.input >= 5') can't resolve and silently evaluate to false via
ASNode>>matches:'s ASError-catch.

This bug has been latent since the WCP-04 exclusive-gateway rewrite
(#54) -- apptive-base's FluxBase pin simply never crossed that commit
until now, so it was never exercised.

Added FBBaseActivation>>transitionMatches: as the shared hook (default:
plain conditionMatches:, no context needed at the FluxBase-Core level),
routed both gateway behaviors and FBBaseActivation>>followTransition:
withToken: through it instead of calling conditionMatches: directly.
AGFlowActivation needs a companion override (not in this repo) to
actually restore correct behavior -- see the apptive-base-side commit.

Added FBRecordingTransitionActivation (test fixture) plus a
characterization test on each gateway behavior proving the hook is
actually invoked during selection, not just at follow-time.

Verified: FluxBase-Core-Tests 145/146 (1 pre-existing, unrelated
FBIdGeneratorTest failure). Proposal only -- do not merge without
Norbert's review.
@noha
noha merged commit 90341f8 into main Jul 20, 2026
3 checks passed
@noha
noha deleted the fix-gateway-condition-scope-wrapping branch July 23, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant