feat(miner-selfimprove): read-only calibration dashboard view - #4504
Conversation
`computePhase7CalibrationLoop` (phase7-calibration-loop.ts) already produces the tracked calibration metric — predicted-gate accuracy combined from the historical-replay and pr_outcome signals, against the documented 0.62 baseline. This adds the read-only VIEW that projects a Phase7CalibrationLoopResult into a human-readable dashboard shape (a CLI table or a UI panel renders the rows). Pure: it re-shapes an already-computed result and adds NO new calibration computation — accuracy vs realized pr_outcome is presented, never recomputed here. Public-safe: only accuracies, sample sizes, freshness, and the loop's holdReasons are surfaced (no raw scores/rewards). - packages/gittensory-engine/src/calibration-dashboard.ts: resolveCalibrationDashboardStatus (on_track / below_baseline / insufficient_signal / disabled) and buildCalibrationDashboardView — a headline plus labeled rows for combined accuracy, delta-from-baseline (signed points), each source (accuracy + sample size + freshness), the replay-harness state, and whether an autonomy increase is permitted, with hold reasons verbatim. - packages/gittensory-engine/src/index.ts: barrel re-export. - test/unit/calibration-dashboard.test.ts: on-track, below-baseline (negative delta), insufficient-signal (em-dash), and disabled/hold/replay-due branches. Closes JSONbored#4261
|
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 #4504 +/- ##
=======================================
Coverage 94.03% 94.03%
=======================================
Files 420 421 +1
Lines 37524 37541 +17
Branches 13702 13714 +12
=======================================
+ Hits 35285 35302 +17
Misses 1583 1583
Partials 656 656
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 22:20:52 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🟩 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.
|
…hot series (#4639) Extend the single-snapshot calibration dashboard (#4261/#4504) into an accuracy *trend* over accumulated snapshots (#4268): direction (improving/degrading/flat), a normalized sparkline, per-point delta vs baseline, and latest/change-over-window. Read-only and pure. A brand-new install has no snapshots and warming-up snapshots carry a null accuracy, so empty/single-point history renders an explicit insufficient-history state instead of a broken chart. Closes #4268
Closes #4261
What
computePhase7CalibrationLoop(phase7-calibration-loop.ts) already produces the tracked calibration metric — predicted-gate accuracy combined from thehistorical_replayandpr_outcomesignals, scored against the documented0.62baseline. This adds the read-only view that projects aPhase7CalibrationLoopResultinto a human-readable dashboard shape (a CLI table, or a panel in the miner dashboard, renders the rows).Pure — no new computation. It re-shapes an already-computed result (predicted-gate accuracy vs realized
pr_outcomeis presented, never recomputed here — that stays in the calibration loop). Public-safe: only accuracies, sample sizes, freshness, and the loop'sholdReasonsare surfaced (no raw scores/rewards).API (
packages/gittensory-engine/src/calibration-dashboard.ts)resolveCalibrationDashboardStatus(result)→"on_track" | "below_baseline" | "insufficient_signal" | "disabled".buildCalibrationDashboardView(result)→{ status, headline, rows, holdReasons }— a headline (e.g."68% combined (+6pts vs baseline)") plus labeled rows: combined accuracy, signed delta-from-baseline, each source (accuracy +n=sample size + fresh/stale), the replay-harness state, and whether an autonomy increase is permitted.holdReasonspass through verbatim so an operator sees why an increase is (or isn't) allowed.Files
packages/gittensory-engine/src/calibration-dashboard.ts— the view.packages/gittensory-engine/src/index.ts— barrel re-export.test/unit/calibration-dashboard.test.ts— tests.Testing
5/5 tests pass (on-track, below-baseline negative-delta, insufficient-signal em-dash, and disabled/harness-hold/replay-due branches); typecheck clean. New engine file at 100% line + branch coverage (12/12, 24/24, 5/5).