Repository navigation
fix(sentry): filter offline remote connectors; accept audit id 0 - #1302
Conversation
Disconnected/empty/unavailable connector messages are caller-clearable user state. Keep them on mcp-event logs; skip Sentry via isCallerFailure and a beforeSend backstop (KODY issue 7659311570). Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
admin_audit_log_query used z.number().int().positive(), so an events[].id of 0 failed parse_output. SQLite allows explicit id=0; relax to nonnegative (KODY-CLOUDFLARE-42). Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe change allows audit queries to return SQLite rows with ID ChangesAudit row preservation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RemoteConnector
participant MCPObservability
participant RemoteStatusMatcher
participant Sentry
RemoteConnector-->>MCPObservability: connector availability error
MCPObservability->>RemoteStatusMatcher: match error message
RemoteStatusMatcher-->>MCPObservability: unavailable status
MCPObservability->>MCPObservability: retain structured mcp-event log
MCPObservability-->>Sentry: exclude unavailable connector event
RemoteConnector-->>MCPObservability: remote capability timeout
MCPObservability-->>Sentry: report timeout exception
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
|
🔎 Preview deployed: https://kody-pr-1302.kody-a99.workers.dev Worker: Mocks:
|
Intent
Stop two unrelated production Sentry failures from a deploy-window backfill batch: offline remote-connector guidance noise (issue 7659311570) and
admin_audit_log_queryoutput parse failures on SQLiteid = 0(KODY-CLOUDFLARE-42). Sibling KODY-CLOUDFLARE-41 is already fixed by #1301 and is not part of this diff.Summary
isCallerFailureand abeforeSendbackstop; keepmcp-eventlogs.admin_audit_log_queryeventidfrom.positive()to.nonnegative()so explicit SQLite zero rowids parse successfully.Testing
npx vitest runonstatus.node.test.ts,observability.node.test.ts,sentry-options.node.test.ts,admin-capabilities.node.test.ts,audit-log.node.test.ts(15 passed)npm run validatepending in this PRSibling dispositions (Sentry)
8d5f6fff) — resolve in that commitSystem recap — composes existing primitives (low risk)
Mode: recap · Base:
main@8d5f6fff· Head:86d156e1Classification: composes — Sentry/MCP observability wiring plus a permissive one-line admin output-schema fix; no new primitives.
Primitives touched
remote-connectorsconnector-ingressmcp-serverisCallerFailureskip pathrbacid >= 0System map
Offline remote-connector capability failures and admin audit query output parse both flow through MCP observability; this PR drops the former from Sentry and lets zero rowids pass output schema.
Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Summary by CodeRabbit
0, including their metadata.