PDJB-896: Merge Task and DuplicableTaskWithDependencies - #1665
Draft
AEPR wants to merge 2 commits into
Draft
Conversation
Fold DuplicableTaskWithDependencies into Task<TState, TDependencies>: every task now owns its own JourneyState (via AbstractJourneyState), is route-scopable, and can optionally declare typed dependencies on the enclosing state.
Rename the zero-dependencies convenience subclass DuplicableTask to TaskWithoutDependencies to reflect that after the merge every task is 'duplicable'.
Collapse the redundant DSL split: duplicableTask { } becomes task { } and duplicableCheckAnswerTask becomes checkAnswerTask (the previously unused bare-Task overloads are deleted). Update ~45 call sites and 11 task-subclass supertypes accordingly, and consolidate DuplicableTaskTests + DuplicableTaskWithDependenciesTests into TaskTests with nested groupings.
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.
Ticket number
PDJB-896
Goal of change
Fold
DuplicableTaskWithDependenciesintoTasknow that every task in the codebase owns its own state, so the journey framework exposes a single concrete task base rather than three.Description of main change(s)
Task<TState, TDependencies>becomes the merged base — always route-scoped, self-stated viaAbstractJourneyState, with an optional typeddependenciesreference to the enclosing state.DuplicableTaskis renamed toTaskWithoutDependencies(after the merge, "duplicable" no longer distinguishes anything — every task is).duplicableTask { }→task { }andduplicableCheckAnswerTask→checkAnswerTask(the previously unused bare-Taskoverloads are deleted).journeys/**and 11 task-subclass supertypes; consolidatesDuplicableTaskTests+DuplicableTaskWithDependenciesTestsintoTaskTestswith three nested groupings; introducesOccupationTask.inJourney(journey)(called at the mount site) so the legacy task'staskState get() = dependenciesbinding is safe against eager evaluation by the DSL.Anything you'd like to highlight to the reviewer?
OccupationTask.inJourney(journey)is a legacy shim needed because that task'staskState get() = dependencieswould otherwise be evaluated by the DSL beforewithDependencies { }runs. It's called at the four mount sites and will be removed withOccupationTaskitself under PDJB-1340.Checklist