Fix andjoin orjoin missing typename - #79
Merged
Merged
Conversation
FBActivity had zero methods and zero references anywhere in the image outside of being FBTask's superclass declaration. Verified via a full source-string scan across every class/metaclass selector in the image (not just SystemNavigation allReferencesTo:, which is unreliable for class bindings here), plus a grep across all sibling repos. FBTask now inherits directly from FBNode. Verified FBNode's exposedNodeClasses set is unchanged before/after, and FBNodeTest/ FBFlowTest/FluxBase-Core-Tests pass at the same rate as before the change (one pre-existing, unrelated FullBlockClosure>>#matches: error in FBFlowTest predates this change).
FBTask and FBWait now declare their own abstractness the same way FBEvent/FBGateway/FBSplitGateway/FBMergeGateway already do: isAbstract ^ self == FBTask (respectively FBWait), so subclasses are exposed in the product UI by default instead of needing an explicit override. Before this change, FBTask/FBWait had no isAbstract override at all and thus inherited FBNode's hardcoded `^ true`, meaning every direct subclass without its own override was hidden from FBNode class>>exposedNodeClasses regardless of self-identity. Verified empirically (in the live test image) that naively switching to the self == X idiom silently exposes 8 classes that are currently hidden by omission rather than by design: FBParallelNode, FBParallelJoinNode, FBPluggableTask, FBErrorTestTask, FBSystemErrorTestTask, FBTestTask, FBTestTaskWithBehavior, and FBWaitForCondition (which would have also dragged FBPluggableWait along since it inherits from FBWaitForCondition and has no override of its own). To preserve their current (hidden) UI-exposure exactly, each of these now carries an explicit `isAbstract ^ true` override: FBParallelNode, FBParallelJoinNode, FBPluggableTask, FBErrorTestTask, FBSystemErrorTestTask, FBTestTask, FBTestTaskWithBehavior (this repo), and FBWaitForCondition (whose subclass FBPluggableWait inherits the override and needs none of its own). Note: AGAddEntityTestTask (package ApptiveBase-Core, apptive-base repo) is also a direct FBTask subclass with no override that would be silently exposed by this change. That fix ships as a separate, companion commit in the apptive-base repo since it lives outside FluxBase. Verified FBNode class>>exposedNodeClasses returns the exact same set of classes before and after this change. Added FBNodeTest>>testTaskIsAbstractOnlyForTheBaseClass and FBNodeTest>>testWaitIsAbstractOnlyForTheBaseClass to protect the invariant going forward, mirroring the existing FBGatewayTest>>testGatewayIsAbstractOnlyForTheBaseClass pattern. Ran FBNodeTest (6/6 pass), FBGatewayTest and FBFlowTest (same single pre-existing, unrelated FullBlockClosure>>#matches: error as before this change, no new regressions).
Unrelated pre-existing bug found while verifying Task 3 (AG-level concretization of FBParallelJoinNode): FBAndJoin and FBOrJoin are both in FBNode class>>exposedNodeClasses (unlike their sibling FBSimpleMerge, they never got a class-side #typeName override), yet FBNode class>>exposedNodes and FBNode class>>withType: both call #typeName on every exposed node class unconditionally. Any code path that iterates the full exposed set (REST node-type listing in apptive-base's AGBaseUriSpace/AGAddFlowNodeOperation, or any AGFlowHolder sample flow built via `FBNode withType: ...`) crashes with `FBAndJoin class >> #typeName` doesNotUnderstand as soon as it reaches either class. Confirmed this is real and pre-existing, not introduced by this session's other changes: apptive-base's own AGParallelNodeTest (11 tests, entirely unrelated to any of the 3 planned tasks) already errored 11/11 in the test image before this fix, all with the same `FBAndJoin class >> #typeName` message. Add `typeName` to both, following the exact pattern of their sibling FBSimpleMerge (`^ #simpleMerge`): FBAndJoin -> #andJoin, FBOrJoin -> #orJoin. Added FBMergeGatewayTest>>testAllExposedNodeClassesHaveATypeName as a regression guard (asserts FBNode exposedNodes does not raise MessageNotUnderstood). Verified: FBNode exposedNodes now returns typeNames for the full exposed set without error. AGParallelNodeTest goes from 11/11 errored to 11/11 passed (one intentionally self-skipped test). FBAndJoinBehaviorTest 5/5 pass. FBMergeGatewayTest 4/4 pass. FBOrJoinBehaviorTest and FBGatewayTest still show one pre-existing, unrelated FullBlockClosure>>#matches: error each, same as before this change.
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.
No description provided.