Repository navigation
Fix: num bind datasets in template by components - #19454
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe retrieval binding helpers now traverse graph and components views separately. Binding still updates both views. Counting uses the components view when available and falls back to the graph view to avoid duplicate counts. ChangesRetrieval binding view separation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Template retrieval dataset counts now avoid double-counting steps mirrored between graph and components views, while retaining graph-only template support. No current merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description includes the required Summary heading but does not provide a meaningful explanation. The text only says "As title" and omits the background and problem context required by the template.
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. A rabbit checks the graph with care Comment |
wangq8
left a comment
There was a problem hiding this comment.
This is an AI review comment.
Thanks for the fix. The refactor cleanly separates the two DSL views (walkGraphRetrievalParams vs walkComponentsRetrievalParams) and makes countUnboundRetrieval follow only the components view (with a graph fallback when no components block exists), while bindUnboundRetrieval still walks both views so a later save cannot silently unbind a step. This correctly eliminates the double-counting of a retrieval step mirrored in both views.
Minor points (non-blocking):
-
hasComponentstreats any object-typedcomponentsas "present", including an empty object{}. In that edge casecountUnboundRetrievalreturns 0 even ifgraph.nodesstill holds unbound retrieval steps. If an emptycomponentsblock can occur for a valid-but-unpersisted DSL, consider also falling back to the graph view whenObject.keys(components).length === 0. -
No unit tests were added for the new counting behavior. A small spec (empty components + graph-only fallback + mirrored step counted once) would lock in the fix.
Otherwise LGTM — the logic matches the engine's topology-of-record semantics.
This is an AI review comment.
Summary
As title.