feat(miner-selfimprove): calibration accuracy-trend view over a snapshot series - #4639
Conversation
…hot series Extend the single-snapshot calibration dashboard (JSONbored#4261/JSONbored#4504) into an accuracy *trend* over accumulated snapshots (JSONbored#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 JSONbored#4268
|
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 #4639 +/- ##
=======================================
Coverage 94.10% 94.11%
=======================================
Files 432 433 +1
Lines 38441 38468 +27
Branches 14014 14023 +9
=======================================
+ Hits 36176 36203 +27
Misses 1604 1604
Partials 661 661
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-10 09:01:39 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 3 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.
|
Extends the single-snapshot calibration dashboard (#4261 / merged #4504,
buildCalibrationDashboardView) into an accuracy trend over a series of accumulated snapshots — the trend-over-time view #4268 asks for, now that both prerequisites have landed (the browser-extension scaffold #4557 and the prediction-ledger #4263).What this adds
A pure, read-only engine module
packages/gittensory-engine/src/calibration-trend.ts(mirrors the siblingcalibration-dashboard.ts):buildCalibrationTrendView(snapshots)→{ direction, headline, sparkline, points, latestAccuracy, changeOverWindow, sampleCount, baselineAccuracy }improving/degrading/flat/insufficient▁▂▃▄▅▆▇█line normalized across the window (no divide-by-zero on a flat window)aboveBaselinecalibrationSnapshotFromResult(result, observedAt)bridges a computedPhase7CalibrationLoopResultinto a trend snapshotDeliverables from the issue
DOCUMENTED_CALIBRATION_BASELINE) over a rolling window, sourced from accumulated snapshots (a series input, not a single live call).Validation
test/unit/calibration-trend.test.tscovers the issue's required fixture series (empty, single-point, improving, degrading) plus flat, null-filtering, baseline-from-latest, and the result-bridge — every branch exercised.codecov/patch→ 100% branch coverage (22/22) on the new module — verified locally with v8. (Resubmit of feat(miner-selfimprove): calibration accuracy-trend view over a snapshot series #4630, which passed the gate with no blockers but missed patch coverage at 96.29% on one dead branch; that branch is removed.)npm run engine-parity:drift-check→ ok. Pure/deterministic, no I/O.Closes #4268