feat(#196): expose blocks/disk_growth/xvb_history on /api/state (Tier-1)#707
Merged
VijitSingh97 merged 2 commits intoJul 21, 2026
Merged
Conversation
The #196 telemetry backbone (PR #600) added persisted SQLite tables and capture hooks for five series but shipped without surfacing any of them to the client. This adds the missing /api/state exposure for the three Tier-1 series — blocks, disk_growth, xvb_history — range-filtered like share_stats and bucket-averaged past the existing 700-point chart cap for the two higher-cadence series. network_history and worker_history (Tier-2) are untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e-series helper
ponytail-review: build_disk_growth and build_xvb_history duplicated the same
filter -> downsample -> {x, ...cols} shape, differing only in which columns
they carry. Shared _gauge_series helper, net -13 lines.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 tasks
VijitSingh97
added a commit
that referenced
this pull request
Jul 21, 2026
…d branch — union CHANGELOG + dashboard.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Partial #196 — Tier-1 persistence.
The #196 telemetry-persistence epic's backbone (PR #600, already on
develop/develop-v1.11) addedfive dedicated SQLite tables —
blocks,xvb_history,network_history,disk_growth,worker_history— each with its own capture hook, retention, and per-table write-health signal.That PR was deliberately scoped to storage only: "Backbone only — capture, storage, retention, and
a getter per series; charts/UI and
/api/stateexposure are deliberate follow-ups."This PR is that follow-up for the three series the parent task calls Tier-1:
blocks— pool block-found events (permanent, event-driven)disk_growth— hourly monerod-DB-size + host-disk-usage samples (permanent)xvb_history— ~5-min XvB-credited scalar samples (30-day retention)Each is now assembled in
build_state()(build/dashboard/mining_dashboard/web/views.py) from theexisting
StateManager.get_blocks()/get_disk_growth()/get_xvb_history()getters, range/window-filtered the same way as the existing
share_statsseries, and bucket-averaged past the existing700-point chart cap for
disk_growth/xvb_history(both can exceed that cap over a long-livedinstall;
blockscan't — a handful of rows a week — so it isn't downsampled). A ponytail-review passfolded the two gauge-series formatters into one shared helper (net -13 lines).
Deferred / out of scope (per the parent task's explicit instructions):
network_historyandworker_history(Tier-2) are not exposed here — separate slice of the epic.exposure are done; charting is a further follow-up.
share_stats) was already shipped under Store share stats as time-series for reject-rate trends/charting #116 — untouched.Because the storage/capture/retention/counter-reset backbone (including its own tests) was already
merged in #600, this PR is scoped to exactly the missing piece: the
/api/stateformatters, theirwiring, and their tests.
Targets the v1.11 integration branch; merges to develop after v1.10 ships.
Test plan
make lint— all surfaces pass exceptlint-proto(needs a Docker daemon, unavailable inthis sandbox; unrelated to this change — the vendored Tari protos aren't touched).
make test-dashboard— 1472 passed, 96.66% overall coverage (gate: 80%).diff-cover coverage.xml --compare-branch=origin/develop-v1.11 --fail-under=90— 96.3% patchcoverage (1 pre-existing-pattern uncovered defensive line, matching the identical branch in
the existing
_downsample_share_stats/_downsample_history).bash tests/stack/run.sh— 1541 passed, 0 failed.bash tests/stack/test_compose.sh— all checks passed.bash tests/integration/selftest.sh— 132 passed, 0 failed.uv run pytest tests/integration/fakes— 23 passed.node --test build/dashboard/tests/frontend/*.test.mjs— 222 passed.make lint-docs-voice/make lint-md— clean on the doc/changelog edits.🤖 Generated with Claude Code