Skip to content

feat(workflow-executor): PRD-553 apply build-time filters on 1–n Load Related Record#1690

Open
Scra3 wants to merge 2 commits into
feature/prd-552-backward-compat-load-relatedfrom
feature/prd-553-executor-filters-load-related
Open

feat(workflow-executor): PRD-553 apply build-time filters on 1–n Load Related Record#1690
Scra3 wants to merge 2 commits into
feature/prd-552-backward-compat-load-relatedfrom
feature/prd-553-executor-filters-load-related

Conversation

@Scra3

@Scra3 Scra3 commented Jun 21, 2026

Copy link
Copy Markdown
Member

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.filters added to the executor step-definition schema (z.unknown().optional() — trusted build config, forwarded verbatim; the agent validates it).
  • Threaded through GetRelatedDataQuery → adapter → agent-client SelectOptions.filters on the 1–n list fetch (fetchRelatedData). The agent-client already supports filters; this is pure wiring.
  • xToOne untouched: it goes through getSingleRelatedData (no list to filter) → 1–1 relations never receive a filter, per PRD.
  • Port stays agnostic (filters?: unknown); the adapter casts to the agent-client type at the single call site.

Tests

+1 executor test: HasMany with preRecordedArgs.filtersgetRelatedData called with that filters. 1085/1085 pass.

Base = PRD-552 branch (stacked). Retarget on merge.

fixes PRD-553

🤖 Generated with Claude Code

Note

Apply build-time filters to 1–n Load Related Record step in workflow executor

Macroscope summarized 32978a8.

… 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>
@linear-code

linear-code Bot commented Jun 21, 2026

Copy link
Copy Markdown

PRD-553

…th (PRD-553 review)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qltysh

qltysh Bot commented Jun 21, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant