Skip to content

feat(observability): add dashboard panel + alert for review-floor clamps - #3932

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
feat/onmerge-clamped-dashboard-alert
Jul 7, 2026
Merged

feat(observability): add dashboard panel + alert for review-floor clamps#3932
loopover-orb[bot] merged 1 commit into
mainfrom
feat/onmerge-clamped-dashboard-alert

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • gittensory_ai_review_onmerge_clamped_total fires whenever a repo's .gittensory.yml tries to loosen the operator's onMerge/combine/reviewer-count floor and gets clamped back — per its own surrounding comment, this exists to ensure "a fired clamp increments a metric so it is surfaced, not silently ignored." The metric was registered and incremented correctly, but no Grafana panel queried it and no Prometheus alert referenced it — a counter nobody scrapes into a dashboard or alert is functionally silent for an operator not manually curling /metrics.
  • This is a governance-relevant signal (a repo attempting to bypass an operator-set review-strictness floor), not routine noise — its sibling metric gittensory_ai_review_inconclusive_total (a very similar shape) already has both a panel-equivalent story and a Prometheus alert, confirming this was a real asymmetric gap.
  • Added a stat panel to grafana/dashboards/gittensory.json and a new GittensoryAiReviewOnMergeFloorBypassAttempted alert to prometheus/rules/alerts.yml, mirroring the exact > 0 / for: 5m / severity: warning shape already used by GittensoryAiProviderCircuitOpen for the same "any occurrence over a window" alert style.

Found via a fresh performance/scalability/accuracy hardening audit of the self-host ORB stack. Tracked under #1667.

Scope

  • grafana/dashboards/gittensory.json — new panel (appended at the end, its own gridPos row — no existing panel repositioned)
  • prometheus/rules/alerts.yml — new alert rule
  • test/unit/selfhost-grafana-dashboard.test.ts — cover both

Validation

  • npm run typecheck
  • npm run selfhost:validate-observability (dashboards + alert rules valid)
  • npx vitest run test/unit/selfhost-grafana-dashboard.test.ts — 11/11 passing
  • git diff --check clean

Safety

  • Config-only change, no src/** lines, no secrets. New panel placed below every existing panel (its own gridPos) so no other panel was repositioned.

Closes #3901

gittensory_ai_review_onmerge_clamped_total was registered and
incremented whenever a repo's config tried to loosen the operator's
onMerge/combine/reviewer-count floor, but had no Grafana panel and no
Prometheus alert -- a governance-relevant signal nobody would actually
see. Its sibling gittensory_ai_review_inconclusive_total already gets
both; this closes the asymmetry.

Closes #3901
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-07 07:11:58 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a config-only observability addition: a new Grafana stat panel and Prometheus alert surfacing the previously-unmonitored `gittensory_ai_review_onmerge_clamped_total` counter, mirroring the existing `GittensoryAiProviderCircuitOpen` alert shape (increase over 1h > 0, for: 5m, severity warning). The added test asserts both the panel's `expr` and the alert's key fields exist in the respective files, and CI (including dashboard/alert validation and vitest) passed on this exact commit. The change is additive, low-risk, and internally consistent with the sibling `inconclusive_total` pattern the description cites.

Nits — 6 non-blocking
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #3901
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 343 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 343 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 343 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.58%. Comparing base (c433e59) to head (3fd0b5e).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3932   +/-   ##
=======================================
  Coverage   93.58%   93.58%           
=======================================
  Files         358      358           
  Lines       34342    34342           
  Branches    12570    12570           
=======================================
  Hits        32138    32138           
  Misses       1580     1580           
  Partials      624      624           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit c825ce6 into main Jul 7, 2026
11 checks passed
@loopover-orb
loopover-orb Bot deleted the feat/onmerge-clamped-dashboard-alert branch July 7, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(observability): add Grafana panel + alert for gittensory_ai_review_onmerge_clamped_total

1 participant