feat(orb): surface fleet calibration analytics via dashboard + MCP - #1268
Merged
Conversation
Expose the fleet calibration analytics (computeFleetAnalytics, shipped in #1256) through two operator-facing read surfaces: - gittensory_get_fleet_analytics MCP tool — operator-gated (sessions need operator authority; trusted token/static identities pass), measurement only. Lets the owner audit fleet drift from their agent harness. - Operator dashboard fleetMetrics — median merge/close precision, FP + reversal rates, and cycle-time percentiles, plus two summary cards (Fleet instances, Fleet merge precision) and a Fleet health panel in the operator route. Both are read-only aggregates over the anonymized orb_signals; no per-repo or sensitive terms cross the boundary. Advances #1255.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1268 +/- ##
=======================================
Coverage 95.03% 95.03%
=======================================
Files 177 177
Lines 19894 19908 +14
Branches 7170 7176 +6
=======================================
+ Hits 18906 18920 +14
Misses 395 395
Partials 593 593
🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | ebdda69 | Commit Preview URL Branch Preview URL |
Jun 24 2026, 09:48 PM |
This was referenced Jun 24, 2026
Closed
12 tasks
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exposes the fleet calibration analytics (
computeFleetAnalytics, shipped in #1256) through the two operator-facing read surfaces that were deferred from #1255:gittensory_get_fleet_analyticsMCP tool — operator-gated (a session must carry operator authority; trusted token/static identities pass, mirroring the other measurement tools), measurement only. Lets the owner audit fleet drift directly from an agent harness. Returns the same shape as the existing/v1/internal/fleet/analyticsendpoint.fleetMetrics—buildOperatorDashboardPayloadnow folds in the 90-day fleet report. Two summary cards (Fleet instances,Fleet merge precision) join the metrics grid, and a Fleet health panel on the operator route renders median merge/close precision, false-positive + reversal rates, p50 cycle time, and the per-instance outlier count.Both surfaces are read-only aggregates over the anonymized
orb_signals(HMAC'd instance/repo/pr hashes + counts); no per-repo identity or sensitive terms cross the boundary. The MCP result still runs throughredactSensitiveForMcp, and the operator-dashboard test asserts the serialized payload contains none of the forbidden export terms.Advances #1255 (the collector + analytics fn + internal endpoint landed in #1256; the per-instance App retirement + always-on hardwire is #1257). Auto-tune wiring and the live end-to-end fleet loop remain as separate follow-ups.
Scope
wantedPaths(src/,apps/gittensory-ui/,test/)blockedPaths, no secrets / wallets / hotkeys / trust scores / reward valuesui:openapi:checkclean — the operator route is not an OpenAPI surface)Validation
npm run test:ci— green (actionlint, db:migrations:check, typecheck, test:coverage, test:workers, build:mcp, test:mcp-pack, ui:openapi:check, ui:version-audit, ui:lint, ui:typecheck, ui:test, ui:build)npm audit --audit-level=moderate— cleansrc/mcp/server.tsandsrc/services/operator-dashboard.tscovered (verified against the v8 JSON report) — both sides of the metric-card ternaries and all threerequireOperatorAccessarms (non-session / operator session / non-operator session)test/unit/mcp-fleet-analytics.test.ts(4 cases incl. the operator-gate matrix) + extendedtest/unit/operator-dashboard.test.ts(empty-fleet and populated-fleet-with-outlier cases)Safety
UI Evidence
The operator route gains a Fleet health section (median precision / FP rate / reversal rate / cycle p50 / outliers) plus two cards in the existing metrics grid. It renders only when
instanceCount > 0, so deployments with no fleet data see no empty panel. (Operator-only route; no public-facing visual change.)