test(dashboard): close the #808 review gaps — fixture drift, window wiring, count trim - #810
Merged
Merged
Conversation
…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>
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.
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.build_state()contract — the failure message names the regeneration script. This class of silent coverage loss can't recur.build_metricswindow wiring asserted: a 3-day-old history sample counts towardp2pool_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).n_24h/n_yesterday/n_7dpayload 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.hashrate_drop_thresholdphrasing 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 lintclean.🤖 Generated with Claude Code