Repository navigation
Conversation
Invalid-input and budget failures kept their message only in the Warn log, so measuring a tool's failure reasons meant joining logs to spans by trace. The message, capped at 500 characters, is now maple.mcp.error.message.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Maple review🟢 Confidence 10/10 · safe to merge Records an expected MCP 4xx's message as
Production impactTelemetry this change adds and removes (1)
What was checked
|
🍁 Maple PR previewThe preview is ready:
Web-only preview ( Smoke test: passed Sign in with the PR preview form on the sign-in page and the preview access key ( Deployed from |
Maple review🟢 Confidence 10/10 · safe to merge
Production impactTelemetry this change adds and removes (1)
What was checked
|
Preview test (
|
| Claim | Result |
|---|---|
Column fixes (service.name, Events.Name, trace_id, ServiceVersion, backticked table, t.trace_id in a join) |
Pass. Each returns rewrites and a "Ran with" note. |
No rewrite in literals, comments, AS service, CTE names, Severity, a shared column in a join |
Pass |
| Stops after 3 rewrites; a later failure names the rewrites already run | Pass |
| Errors free of internal database names and org id | Fail at 43a154e: the preview's pr_1961. database and the org id leaked. The scrubber only knew maple_us/maple_eu. Fixed in 92a6440 (any database name, alias kept, leftover org ids blanked); recheck below once redeployed. |
| Unbounded trace-id lookups | Pass. Identical rows to the same query with a 30-day window, for single ids, IN lists of 3 and 100, if()/countIf, NOT, OR, aliases, a subquery and a nonexistent id. |
| Row cap | Pass. No LIMIT / LIMIT 5000 returns 1,000 rows plus the notice; LIMIT 1000 (with or without OFFSET, or ;) gets no notice. |
Regressions (aggregations, $__orgFilter(alias) joins, CTE, UNION ALL, missing org filter rejected) |
Pass |
Not changed here: the maple CLI drops rewrites, notices, and all but the first error line, so CLI users don't see these yet. That's a follow-up in apps/cli.
Traces (deployment.environment = pr-1961)
| Span | Calls | p50 | p95 | max |
|---|---|---|---|---|
McpTool.runSql |
106 | 84 ms | 454 ms | 609 ms |
RawSql.execute |
131 | 47 ms | 206 ms | 428 ms |
WarehouseQueryService.executeSql |
126 | 49 ms | 204 ms | 428 ms |
- Statements per call: 85 calls ran one statement (p50 73 ms), 19 ran two because of a rewrite or a seek fallback (p50 140 ms), and 2 ran four because of three rewrites (max 518 ms). A rerun costs about one extra warehouse round trip.
- Span attribute:
maple.mcp.error.messageis on all 16 invalid-input failures;queryfailures keep their message in the span status. - No N+1 or slow spans beyond the per-statement audit insert, which already existed.
Maple review🟢 Confidence 10/10 · safe to merge Adds
What was checked
|
|
Recheck on the redeployed preview ( |
Maple review🟢 Confidence 10/10 · safe to merge Records the expected MCP 4xx failure message as
What was checked
|
Maple review🟢 Confidence 10/10 · safe to merge Records the capped failure message as What was checked
|
Maple review🟢 Confidence 10/10 · safe to merge Records the expected MCP 4xx failure message, capped at 500 characters, as What was checked
|
|
Note ⏳ Maple is reviewing this pull request at |
Maple review🟢 Confidence 10/10 · safe to merge Adds What was checked
|
|
Live recheck on the preview at
The quoted, dotted table alias fix ( |
Maple review🟢 Confidence 10/10 · safe to merge Records the expected-failure message, capped at 500 characters, as
What was checked
|
Maple review🟢 Confidence 10/10 · safe to merge
Before merge
What was checked
|
Maple review🟢 Confidence 10/10 · safe to merge Records the expected-failure
What was checked
|
|
Live recheck of the raw-SQL gate fix (
|
Maple review🟢 Confidence 10/10 · safe to merge Adds
What was checked
|
Invalid-input and budget failures recorded their message only in the Warn log, so finding out why a tool fails meant joining
logstotracesby trace id. That join was how therun_sqlfailure analysis behind #1959 and #1960 was done. The message, capped at 500 characters, is nowmaple.mcp.error.messageonMcpToolDispatcher.call, next toerror.typeandmaple.mcp.error.category.Checked with
dispatcher.test.ts, which now asserts the attribute, plus the scopedapps/aitypecheck andbun run lint:core.Stacked on #1960.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.