feat(workflow): iw-support-workflow — declarative workflow kernel extracted from MEDECA #34
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!34
Loading…
Reference in a new issue
No description provided.
Delete branch "workflow-kernel-extraction"
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?
What
New cross-built (JVM + Scala.js) module
workflow, published asiw-support-workflow, packageworks.iterative.workflow. It is the executable workflow kernel extracted from MEDECAmdr.workflow(built under MEDECA-381/382; copied from merged MEDECA main @3db92b52f, byte-verified against the source worktree):Guard(Requirement / Invalid / RequireRole / RequireIdentity / And / Or / always) with co-locatedcheck/describe,GuardContext,GuardFailure,GuardDescription,Predicate,stripAuthCommandMatch,EventShape,Outcome,Transition(+Transition.simple),EngineDefinitionWorkflowInterpreter.decide— pure match → gate → classify → emit, withAuthEnforcement.Skip/EnforceandRejectionvocabularyConformanceCheck+Witness— in main sources (it is a pureList[String]harness with no test-framework deps; consumers exercise it from their own test suites, and published test sources don't exist)The role type is now a leading type parameter
R(e.g.Guard[R, S],EngineDefinition[R, State, Entity, Command, Event]), replacing the hardcodedmdr.poptavky.AppRole— this completes what MEDECA-379 anticipated.CommandMatch/EventShape/Outcome/Witness/Rejection/AuthEnforcementhold no guards and gain no parameter.Ported specs:
GuardSpec,WorkflowInterpreterSpec(all original test cases,AppRolefixtures replaced by a test-localTestRoleenum). MEDECA's descriptive layer (Phase, StateDefinition, ClockOwner, WorkflowDefinition, EngineProjection, WorkflowDiagram) deliberately stays in MEDECA — it carries MEDECA vocabulary and is a possible second extraction after generalization.Verification
workflow.{jvm,js}.{compile,test},checkFormat,fix --checkall green at Scala 3.3.7 LTS; full__.compileand pre-push__.testgreen across the repo0.1.19-SNAPSHOTvia publishLocal and compiled + executed a foreign consumer (Scala 3.8.4, Mill, ownenum SpikeRole) exercisingTransition.simple,decideunderEnforce,describe, andConformanceCheck.errors— full type inference, no explicit type args needed; runtime assertions passedNotes for reviewer
Engine.scala/GuardFailure.scala/Guard.scalastill uses MEDECA examples (Poptávka/Podání, MEDECA issue IDs) as motivating illustrations. Comment-only; left intact deliberately (onlyGuardContext's now-false MEDECA-379 deferral note andWorkflowInterpreter's CommandError references were generalized). Happy to sweep them if preferred.0.1.19-SNAPSHOT— no tag; release when a consumer needs a durable resolver.🤖 Generated with Claude Code