Skip to content

fix(observability): stop two Sentry noise sources — benign update-branch 422 and reconciler success logs#8276

Merged
JSONbored merged 2 commits into
mainfrom
claude/sentry-issues-analysis-bcbed5
Jul 23, 2026
Merged

fix(observability): stop two Sentry noise sources — benign update-branch 422 and reconciler success logs#8276
JSONbored merged 2 commits into
mainfrom
claude/sentry-issues-analysis-bcbed5

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • LOOPOVER-24 (regressed shape): update_branch fired off a stale/cached mergeable_state: behind read can hit GitHub's 422 "There are no new commits on the base branch." — the head was already up to date, nothing is stuck, and the caller (prReadyForReview/forceUpdateBranch) already falls through to reviewing the current head. It was still captured as agent_action_execution_failed and paged Sentry (21 events/week). New isNoNewBaseCommitsMessage predicate in src/services/merge-failure.ts + an audit-only carve-out in the executor, mirroring the existing merge-conflict carve-out for this action class.
  • LOOPOVER-2K: the active-review reconciler logged every successful orphan terminalization at level:error, so the structured-log forwarder shipped each healed row to Sentry — 547 error events in a day (one per healed row, fingerprint-collapsed into a single "escalating" issue) while it drained the historical backlog. Downgraded to console.warn/level:"warn", which stays in stdout/Workers Logs but sits below the default SENTRY_MIN_SEVERITY of error. The row_error/scan-error paths stay at error — a failed heal is still an anomaly.

Maintainer PR; no linked contributor issue (Sentry issue refs Fixes LOOPOVER-24 / Fixes LOOPOVER-2K are in the commit messages and auto-resolve on merge).

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves — maintainer PR, tracked by the two Sentry issues instead.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally — both sides of every new branch are exercised by the new tests (predicate match/non-match; carve-out taken/not-taken; warn-level log asserted present and error-level asserted absent)
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Full npm run test:ci first pass hit 4 pre-existing 15s-timeout flakes in untouched files (api.test.ts, miner-package-skeleton, satisfaction-floor-loosening-run) caused by concurrent local load; all 4 pass on re-run. A clean full re-run is in flight locally; CI here is authoritative.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests — n/a, none touched.
  • API/OpenAPI/MCP behavior is updated and tested where needed — n/a, no contract change.
  • UI changes — n/a, backend only.
  • Public docs/changelogs are updated where needed — n/a.

Notes

  • Regression tests: test/unit/merge-failure.test.ts (predicate both sides), test/unit/agent-action-executor.test.ts (422 shape does not page Sentry; non-matching failures still do), test/unit/active-review-reconciliation.test.ts (success log is warn-level and absent from console.error).

The readiness check can act on a stale/cached mergeable_state "behind"
read: by the time update-branch fires, the head already contains every
base commit and GitHub rejects with 422 "There are no new commits on
the base branch." Nothing is stuck — the caller already falls through
to reviewing the current head — but the failure was captured as
agent_action_execution_failed and paged Sentry on every occurrence.
Give it the same audit-only carve-out the merge-conflict shape of this
action class already has.

Fixes LOOPOVER-24
A successful reconciliation self-heal is the feature working, but the
per-row log carried level:error, so the structured-log forwarder
shipped every healed row to Sentry — 547 error events in one day while
the reconciler drained the historical backlog, fingerprint-collapsed
into a single escalating issue. warn keeps the row visible in stdout /
Workers Logs and sits below the default SENTRY_MIN_SEVERITY of error;
the row_error and scan-error paths stay at error, since a FAILED heal
is still an anomaly.

Fixes LOOPOVER-2K
@JSONbored JSONbored self-assigned this Jul 23, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored merged commit 516fb44 into main Jul 23, 2026
10 checks passed
@JSONbored
JSONbored deleted the claude/sentry-issues-analysis-bcbed5 branch July 23, 2026 22:28
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.64%. Comparing base (590befd) to head (a694682).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8276      +/-   ##
==========================================
- Coverage   92.16%   91.64%   -0.53%     
==========================================
  Files         786      786              
  Lines       78941    78943       +2     
  Branches    23840    23842       +2     
==========================================
- Hits        72757    72344     -413     
- Misses       5062     5524     +462     
+ Partials     1122     1075      -47     
Flag Coverage Δ
shard-1 56.16% <66.66%> (-0.55%) ⬇️
shard-2 49.41% <33.33%> (-0.76%) ⬇️
shard-3 54.57% <33.33%> (-0.62%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/review/active-review-reconciliation.ts 100.00% <100.00%> (ø)
src/services/agent-action-executor.ts 97.25% <100.00%> (+<0.01%) ⬆️
src/services/merge-failure.ts 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant