Repository navigation
feat(go-agent): merge Google Scholar node params with runtime inputs - #16802
Conversation
📝 WalkthroughWalkthroughGoogle Scholar now supports expanded search filters, node-level defaults, the ChangesGoogle Scholar integration
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/agent/component/universe_a_wrappers.go (1)
1517-1518: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value
json.Marshalerror is silently ignored.If marshaling fails (unlikely for basic types but not impossible), the tool receives empty JSON and returns a parse error that is harder to trace.
♻️ Suggested fix
- argsJSON, _ := json.Marshal(args) + argsJSON, err := json.Marshal(args) + if err != nil { + return nil, fmt.Errorf("canvas: GoogleScholar: marshal args: %w", err) + } out, err := c.inner.InvokableRun(ctx, string(argsJSON))🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/agent/component/universe_a_wrappers.go` around lines 1517 - 1518, Handle the error returned by json.Marshal in the wrapper containing InvokableRun instead of discarding it. Check the marshal error before calling c.inner.InvokableRun, return or propagate it with appropriate context, and only pass string(argsJSON) when marshaling succeeds.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/agent/component/universe_a_wrappers.go`:
- Around line 1517-1518: Handle the error returned by json.Marshal in the
wrapper containing InvokableRun instead of discarding it. Check the marshal
error before calling c.inner.InvokableRun, return or propagate it with
appropriate context, and only pass string(argsJSON) when marshaling succeeds.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ea7b2491-561f-497f-b040-5e56b3103132
📒 Files selected for processing (8)
internal/agent/component/fixture_stubs.gointernal/agent/component/google_scholar_component_test.gointernal/agent/component/universe_a_wrappers.gointernal/agent/component/verify_p1_test.gointernal/agent/tool/google_scholar.gointernal/agent/tool/google_scholar_test.gointernal/agent/tool/registry.gointernal/agent/tool/registry_test.go
|
LGTM |
Summary
Verification
bash build.sh --test ./internal/agent/component/... -run TestGoogleScholar