Skip to content

fix(oe): dedupe provider queries by schema and skip empty field paths - #586

Closed
ginaxu1 wants to merge 1 commit into
mainfrom
fix/508-federator-builder-dedup-and-paths
Closed

ginaxu1 wants to merge 1 commit into
mainfrom
fix/508-federator-builder-dedup-and-paths

Conversation

@ginaxu1

@ginaxu1 ginaxu1 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • BuildProviderLevelQuery now dedupes on {ServiceKey, SchemaID} so a second schema for the same provider gets its own query (fields are no longer silently dropped).
  • pushFieldToAst / pushArrayFieldToAst return early on empty path slices so dot-less array paths (BuildArrayProviderQuery) no longer panic; empty FieldPath is skipped when attaching.

Test plan

  • go test ./internal/oe/federator/ -count=1
  • Regression: same ServiceKey + two SchemaIDs → two queries with correct nested fields
  • Dot-less BuildArrayProviderQuery paths do not panic

Closes #508

BuildProviderLevelQuery keyed only on ServiceKey, so a second SchemaID
for the same provider never got a query and its fields were dropped.
Also guard push*Ast against empty path segments (dot-less array paths).

Closes #508

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e321f43a-c1d2-4473-9a50-61f90f285edb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mushrafmim

Copy link
Copy Markdown
Member

Closing as superseded, thanks @ginaxu1. builder.go was deleted in #671. Its replacement, internal/oe/federator/plan.go, makes one provider operation per provider, schema and set of argument values, and plans only the leaf fields a query selects. That covers both the deduplication and the empty-path cases.

@mushrafmim mushrafmim closed this Oct 20, 2026
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.

OE: federator/builder.go can silently drop provider fields and panic on malformed field paths

2 participants