[0.1.x] feat(workflow): report every data reason of an unavailable affordance #65
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/support!65
Loading…
Reference in a new issue
No description provided.
Delete branch "MEDECA-655-affordance-all-reasons-0.1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
For MEDECA-655. An unavailable
Affordancecarried only the DFS-first data message of its guard failure. MEDECA must show every missing prerequisite under a disabled button (for example "plán projektu" and "plán nákladů").Affordancegets an additive fieldfailure: Option[GuardFailure] = None: the whole failure of the gatedrequiresguard.Nonewhen available.GuardFailure.dataMessages(f): List[UserMessage]:Conjunction: all data leaves of all parts, DFS order, no duplicates.Disjunction: only the data leaves of the first branch that has a data leaf (any one branch is enough to pass, so joining the branches would ask for every alternative).Unauthorizedleaves give no message.firstDataMessage, the messagedecidereports asRejection.Invalid(property test over generated trees).reasonis unchanged.Compatibility: source-compatible for callers that construct
Affordancewith 4 arguments or read its fields. A pattern matchcase Affordance(a, b, c, d)would no longer compile; no such match exists in this repository or in MEDECA.Cherry-pick of the
mainPR (clean, no adaptation: theworkflowmodule is identical on both lines).0.1.25 is to carry this change together with the MEDECA-630
MongoFileStorechange.Tests
./mill workflow.jvm.test: 76 passed, 0 failed (63 before; +10GuardFailureSpec, +3AffordancesSpec)../mill workflow.js.test: 76 passed, 0 failed../mill __.test: passed.Disjunctionbranches makes 2GuardFailureSpectests fail.🤖 Generated with Claude Code