fix(metadata-admin): align state_machine validation rule with ADR-0020; retire workflow designer#1425
Merged
Merged
Conversation
…0; retire workflow designer
The backend (ADR-0020) retired `workflow` as a metadata type and converged
record state machines onto a single `state_machine` validation rule with a
flat shape: `{ field, transitions: Record<string, string[]> }` (no
`stateField`, no `Array<{from,to,condition}>`, no guards).
BREAK fixes (state_machine rule now uses the new shape):
- types: StateMachineValidation → `field` + `transitions: Record<string,string[]>`.
- core: rewrite validateStateMachine to the Record shape with server-matching
semantics (insert → allow, unchanged field → allow, undeclared from-state →
lenient allow, `to ∉ transitions[from]` → reject). The old `for…of` over a
Record would have thrown at runtime.
- app-shell: ValidationPreview renders the `{from: [to,…]}` map (was reading
the old array shape and silently showing "No transitions declared").
- tests: rewrite engine state_machine cases to the new shape; replace the
(removed) conditional-transition case with no-op / lenient-from-state cases.
STALE cleanup (orphaned `workflow` metadata-type designer — server no longer
serves the type, so these were dead registrations):
- remove WorkflowPreview + WorkflowActionInspector and their registrations.
- drop the `workflow` clientValidation loader, anchors entry, and i18n labels.
Out of scope (intentionally untouched): @object-ui/plugin-workflow (a
standalone BPMN/process-designer component, unrelated to the backend metadata
type) and the workflow RPC service surface.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Summary
Brings the frontend metadata designer in sync with backend ADR-0020 (merged in framework #1413), which retired
workflowas a metadata type and converged record state machines onto a singlestate_machinevalidation rule with a flat shape:{ field, transitions: Record<string, string[]> }(nostateField, noArray<{from,to,condition}>, no guards).🔴 BREAK fixes —
state_machinerule now uses the new shapepackages/types/src/data-protocol.tsStateMachineValidation:stateField→field,Array<{from,to}>→Record<string,string[]>packages/core/.../object-validation-engine.tsvalidateStateMachineto the Record shape with server-matching semantics (insert→allow, unchanged field→allow, undeclared from-state→lenient allow,to ∉ transitions[from]→reject). The oldfor…ofover a Record threw at runtimepackages/app-shell/.../previews/ValidationPreview.tsx{from: [to,…]}map (was reading the old array shape and silently showing "No transitions declared")packages/core/.../object-validation-engine.test.ts🟡 STALE cleanup — orphaned
workflowmetadata-type designerThe server no longer serves the
workflowtype, so these were dead registrations:WorkflowPreview+WorkflowActionInspectorand their registrationsworkflowclientValidation loader, anchors entry, and i18n labelsOut of scope (intentionally untouched)
@object-ui/plugin-workflow— a standalone BPMN/process-designer component, unrelated to the backend metadata typeVerification
@object-ui/corevalidation tests: 21/21 passmetadata-adminsuite: 46/46 passtsc --noEmitclean on@object-ui/types,@object-ui/core,@object-ui/app-shell