fix(workflow-executor): accept orchestrator wire form for composite columnType [PRD-464]#1632
Open
ShohanRahman wants to merge 1 commit into
Conversation
…olumnType [PRD-464]
The orchestrator serializes composite column types (e.g. an `embedded`
computed field declared with `columnType: { data: "String" }`) as
`{ fields: [{ field, type }] }` rather than the native datasource-toolkit
record shape. The Zod `ColumnTypeSchema` had no branch for that shape, so
every collection containing such a field rejected the step dispatch with
a `DomainValidationError` at `fields.N.type`.
Add a fourth union branch that accepts the wire form and `.transform`s
it back to the canonical `Record<string, ColumnType>` so downstream
consumers stay untouched.
fixes PRD-464
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (1)
🛟 Help
|
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
ColumnTypeSchemarejected the orchestrator's wire-form representation of composite column types ({ fields: [{ field, type }] }), breaking any workflow targeting a collection that contains a composite/embedded field — e.g. anembeddedfield declared withcolumnType: { data: "String" }..transforms it back to the canonicalRecord<string, ColumnType>shape so downstream consumers see no difference.Bug
Step dispatch failed with:
Stack:
ReadRecordStepExecutor.getCollectionSchema→ForestServerWorkflowPort.callPort→CollectionSchemaSchema.parse.Test plan
yarn workspace @forestadmin/workflow-executor test— 914 tests pass, 4 new tests inforest-server-workflow-port.test.tsembeddedcomputed fieldfixes PRD-464
🤖 Generated with Claude Code
Note
Accept orchestrator wire form for composite
columnTypein workflow executorColumnTypeSchemain collection.ts to accept composite types in the orchestrator's wire form{ fields: [{ field, type }] }, in addition to the native record form.🖇️ Linked Issues
Relates to PRD-464.
Macroscope summarized de33f2a.