feat(workflow-executor): PRD-553 apply build-time filters on 1–n Load Related Record#1690
Open
Scra3 wants to merge 2 commits into
Conversation
… Record (PRD-553) Thread preRecordedArgs.filters (a trusted build-time conditionTree) through GetRelatedDataQuery into the agent-client's SelectOptions.filters on the 1–n list fetch (fetchRelatedData). xToOne goes through getSingleRelatedData (no list to filter), so it's untouched. The port stays agnostic (filters?: unknown); the adapter casts to the agent-client type at the single call site. The agent validates the filter at query time. fixes PRD-553 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…th (PRD-553 review) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 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.

Context
Filter half of PRD-553 (executor), stacked on #1688. Applies the build-time filter the editor sets on a 1–n relation, narrowing the candidate records.
What
preRecordedArgs.filtersadded to the executor step-definition schema (z.unknown().optional()— trusted build config, forwarded verbatim; the agent validates it).GetRelatedDataQuery→ adapter → agent-clientSelectOptions.filterson the 1–n list fetch (fetchRelatedData). The agent-client already supportsfilters; this is pure wiring.getSingleRelatedData(no list to filter) → 1–1 relations never receive a filter, per PRD.filters?: unknown); the adapter casts to the agent-client type at the single call site.Tests
+1 executor test: HasMany with
preRecordedArgs.filters→getRelatedDatacalled with thatfilters. 1085/1085 pass.fixes PRD-553
🤖 Generated with Claude Code
Note
Apply build-time filters to 1–n Load Related Record step in workflow executor
filtersfield topreRecordedArgsinLoadRelatedRecordStepDefinitionSchemaand toGetRelatedDataQueryinagent-port.ts.LoadRelatedRecordStepExecutornow forwardspreRecordedArgs.filterstoAgentPort.getRelatedDatafor 1–n relations; xToOne flows are unchanged.AgentClientAgentPortpasses the filter object through torelation().list()on the remote agent.Macroscope summarized 32978a8.