fix: reject parse errors before execution#144
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR improves parse error handling in numscript by adding early validation in the core execution path and refactoring the MCP tool handler to properly return parse errors instead of silently continuing or constructing errors without returning them. ChangesParse Error Handling Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
==========================================
+ Coverage 66.96% 67.16% +0.19%
==========================================
Files 47 47
Lines 5068 5071 +3
==========================================
+ Hits 3394 3406 +12
+ Misses 1477 1468 -9
Partials 197 197 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I'm merging that @flemzord |
Summary
ParseResult.Runcalls when parsing produced errorsTDD evidence
RED before fix:
go test . -run TestRunRejectsParseErrors -count=1 -vpanicked throughbatch_balances_query.goon an AST with nil sourcego test ./internal/mcp_impl -run TestHandleEvalToolRejectsParseErrors -count=1 -vfailed before the handler seam/fix existedGREEN after fix:
go test . -run TestRunRejectsParseErrors -count=1 -vgo test ./internal/mcp_impl -run TestHandleEvalToolRejectsParseErrors -count=1 -vgo test ./...