fix: keep MCP stdio clean on routine update errors - #330
Conversation
There was a problem hiding this comment.
✨ PR Review
LGTM
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
==========================================
+ Coverage 69.34% 70.03% +0.68%
==========================================
Files 15 15
Lines 584 584
Branches 197 198 +1
==========================================
+ Hits 405 409 +4
+ Misses 101 100 -1
+ Partials 78 75 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Greptile SummaryThis PR fixes two sources of stdout pollution in the MCP stdio server: a stray
Confidence Score: 5/5Safe to merge — both changes are tightly scoped, directly address the reported issue, and are covered by new regression tests. The error-handler change is a straightforward log-channel consolidation with no behavioral impact on the returned MCP response. The routines change removes a null field from an outgoing API payload, which matches the API's expected contract and is validated end-to-end in the new test. No logic paths, auth boundaries, or data-persistence flows are affected beyond what is explicitly tested. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MCP Tool Call] --> B{withErrorHandling}
B -->|success| C[Return tool response]
B -->|throws| D[createErrorResponse]
D --> E{Extract errorCode?}
E -->|yes| F["console.error(msg + Type + Code, err) → stderr"]
E -->|no| G["console.error(msg + Type, err) → stderr"]
F --> H[Return isError MCP response to stdout]
G --> H
subgraph routines_ts ["routines.ts: update-routine set mapping"]
I[set.repRange input] --> J[buildRepRange]
J -->|both null/undefined| K["returns null → rep_range OMITTED from payload"]
J -->|at least one value| L["returns {start,end} → rep_range included in payload"]
end
Reviews (1): Last reviewed commit: "fix: keep MCP stdio clean on routine upd..." | Re-trigger Greptile |
## [1.23.14](v1.23.13...v1.23.14) (2026-06-01) ### Bug Fixes * keep MCP stdio clean on routine update errors ([#330](#330)) ([540c5eb](540c5eb))
Resolves #327
✨ PR Description
Purpose: Fix MCP stdio cleanliness by conditionally including rep_range and consolidating error logging to prevent debug output pollution.
Main changes:
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how