Repository navigation
fix(mcp): stop Sentry noise for unpublished HEAD on repo_open_session - #1059
Conversation
…sion Artifacts HEAD ahead of published_commit is expected after a git-lane push before publish/reconcile. Keep the safety gate, but return McpCallerError so triage does not treat it as a platform bug. 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 (4)
📝 WalkthroughWalkthroughThe change detects published commit HEAD mismatches during repository session opening and converts them into caller-facing ChangesPublished HEAD mismatch handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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-1059.kody-a99.workers.dev Worker: Mocks:
|
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Summary
Sentry KODY issue 7642635997:
repo_open_sessionthrew a plainErrorwhen Artifacts default-branch HEAD did not matchpublished_commit.That mismatch is expected after a git-lane push (
package_get_git_remote) beforepackage_publish_external_pushor the reconcile cron lands. The production source-safety gate correctly refuses to open a session in that state; reporting it to Sentry made it look like a platform bug and tripped triage.Change
RepoSession.openSessionMcpCallerErrorfromrepo_open_session(coversrepo_run_commandstoo) with guidance to publish/reconcile firstMcpCallerError, so these stay onmcp-eventlogs onlyTests
source-safety-policyhelper coverage for mismatch detectionrepo_open_sessionmaps the DO recovery message toMcpCallerErrorNot in this PR
Sibling 7642291485 (bundle artifact UNIQUE constraint after publish) is a different source/root cause and is left alone.
System recap — composes existing primitives (low risk)
Mode: recap · Base:
main· Head:cursor/sentry-triage-kody-cloudflare-7642635997-fdfcClassification: composes — keeps the existing source-safety gate; only reclassifies the unpublished-HEAD precondition as
McpCallerErrorso Sentry skips it.Primitives touched
capability-registryrepo_open_sessionwraps HEAD mismatch as caller errorrepo-sessionsSystem map
Caller opens a repo session; when Artifacts HEAD is ahead of
published_commit, the DO still refuses, but the capability returnsMcpCallerErrorso MCP observability does not open a Sentry issue.Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Change flow
Summary by CodeRabbit