feat(workflow-executor): type-specific PATCH body validation#1508
Merged
Scra3 merged 5 commits intofeat/prd-214-setup-workflow-executor-packagefrom Mar 25, 2026
Conversation
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (3)
🛟 Help
|
29a5aec to
bbda491
Compare
Base automatically changed from
refactor/workflow-executor-move-user-confirmed-to-pending-data
to
feat/prd-214-setup-workflow-executor-package
March 25, 2026 10:05
bbda491 to
4a01bf2
Compare
…chema relatedCollectionName - Add `relatedCollectionName` to `FieldSchema` (optional, for relationship fields) - Extract PATCH body schemas to `src/http/pending-data-validators.ts` - Replace identical schemas with type-specific ones: - `update-record`: accepts optional `value` override - `load-related-record`: accepts optional `name`, `displayName`, `selectedRecordId` - `trigger-action` / `mcp-task`: `userConfirmed` only - Fix `resolveFromSelection` (Branch A) to re-derive `relatedCollectionName` from FieldSchema instead of stale `pendingData`, so user-overridden relation names work - Remove `relatedCollectionName` from `LoadRelatedRecordPendingData` (redundant — frontend has access to the collection schema) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix stale comment on selectedRecordId (PATCH now accepts overrides) - Add test: relation name override end-to-end (user changes name via PATCH) - Add test: error message assertion when relatedCollectionName missing from schema - Add test: mcp-task happy path and extra field rejection - Add test: hasRunAccess enforced on PATCH route - Add test: saveStepExecution failure returns 500 on PATCH Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rameters utility type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4a01bf2 to
7758eb7
Compare
…lated-record tests RunStore interface now requires init() and close() after DatabaseStore merge. The mock factory was missing these methods. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
matthv
approved these changes
Mar 25, 2026
6e7858a
into
feat/prd-214-setup-workflow-executor-package
30 checks passed
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
/runs/:runId/steps/:stepIndex/pending-databody validationrelatedCollectionNametoFieldSchematypeStepExecutionDatacast instead ofParametersutility typePR 2/3 of the pending-data refactor chain. Depends on #1507.
Test plan
yarn workspace @forestadmin/workflow-executor testpassesyarn workspace @forestadmin/workflow-executor lintclean🤖 Generated with Claude Code
Note
Add type-specific Zod validation to the PATCH pending-data endpoint
update-record,trigger-action,mcp-task, andload-related-recordstep types./runs/:runId/steps/:stepIndex/pending-datahandler in executor-http-server.ts now looks up the step type, selects the matching schema, and returns 400 on validation failure or 404 for unsupported step types.LoadRelatedRecordStepExecutorno longer persistsrelatedCollectionNameinpendingData; instead, it re-derives it from the current collection schema at confirmation time, and fails with an error outcome if the field cannot be resolved.relatedCollectionNameis no longer accepted or stored inload-related-recordpending data.Macroscope summarized 5091231.