Skip to content

test(dashboard): close the #808 review gaps — fixture drift, window wiring, count trim - #810

Merged
VijitSingh97 merged 1 commit into
developfrom
fix/808-review-riders
Aug 1, 2026
Merged

test(dashboard): close the #808 review gaps — fixture drift, window wiring, count trim#810
VijitSingh97 merged 1 commit into
developfrom
fix/808-review-riders

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

Riders from the pre-v1.16.0 four-lens repo review (security / docs / concision / testing). The testing lens found one real gap: the frontend fixture predated earnings_summary, so the #808 card's null-guard silently skipped it in every frontend render test — zero render coverage for a 95-line component while the whole suite stayed green.

  • Fixture regenerated + four node tests for the card's real branches: presence in both views, yield-to-nothing, stale-payload survival (mid-upgrade poll), percent + partial asterisk + footnote, view-key hints instead of zeros, two-significant-digit Tari block expectation, XvB win row and its gating.
  • Standing drift guard: a pytest pins the fixture's top-level key set to the live build_state() contract — the failure message names the regeneration script. This class of silent coverage loss can't recur.
  • build_metrics window wiring asserted: a 3-day-old history sample counts toward p2pool_7d/p2pool_30d, a 40-day-old one doesn't — a wrong window constant previously passed every test (the new Dashboard: expected vs actual earnings never meet — no comparison surface, and the Simple view shows no earnings at all #808 tests injected the fields via the constructor).
  • Concision (ponytail lens): the unconsumed n_24h/n_yesterday/n_7d payload keys are trimmed — n_30d (the Tari block count) is the only consumer. The confirmed-block counting assertion is scoped to the sub-panel class rather than tooltip prose.
  • Docs lens riders: hashrate_drop_threshold phrasing un-inverted; the XvB last-win recency wording now says it can predate the window; testing-strategy scenario F gains the Dashboard: expected vs actual earnings never meet — no comparison surface, and the Simple view shows no earnings at all #808 catalog row.

All suites green locally: dashboard 1639 pass (96.9% total, patch 100%), frontend suite incl. the four new card tests, make lint clean.

🤖 Generated with Claude Code

…iring, count trim

Pre-v1.16.0 repo review riders:

- Regenerate the frontend fixture (state.json) — it predated #808's
  earnings_summary key, so ExpectedVsActualCard's null-guard silently
  skipped the card in EVERY frontend render test; add four node tests
  covering its real branches (both views, empty-yield, stale-payload
  survival, percent + partial asterisk + footnote, view-key hints,
  two-sig-fig Tari blocks, XvB win row and its gating).
- Standing drift guard: a pytest pins the fixture's top-level key set to
  the live build_state() contract, so a new payload key without a
  fixture regen fails loudly instead of silently disabling coverage.
- Assert build_metrics wires p2pool_7d/p2pool_30d with their OWN
  windows (a 3-day-old sample is in, a 40-day-old one is out) — a wrong
  window constant previously passed every test.
- Trim the unconsumed n_24h/n_yesterday/n_7d payload keys — n_30d (the
  Tari block count) is the only consumer; the sibling assertion counting
  confirmed sub-panels is scoped to the panel class, not tooltip prose.
- testing-strategy scenario F gains the #808 catalog row; two doc
  wording fixes (hashrate_drop_threshold phrasing, last-win recency).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 merged commit 8d786ff into develop Aug 1, 2026
16 checks passed
@VijitSingh97
VijitSingh97 deleted the fix/808-review-riders branch August 1, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant