Skip to content

feat(ui): add verify-this-review walkthrough and measured per-rule accuracy on the fairness report#8254

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-verify-review-8231
Jul 23, 2026
Merged

feat(ui): add verify-this-review walkthrough and measured per-rule accuracy on the fairness report#8254
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-verify-review-8231

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Adds the public reproducibility walkthrough doc content/docs/verify-this-review.mdx: export the checksummed backtest corpus snapshot (scripts/backtest-corpus-export.ts, --remote and --pg variants), verify the checksum via buildBacktestCorpusManifest, replay the scorer with scoreBacktest + buildConfidenceThresholdClassifier, and compare against the published numbers — with an honest closing callout that replay proves the numbers are real computations over a real corpus but does NOT prove the live gate ran that exact code (the attestation boundary, deliberately left to Research: is TEE hardware attestation necessary, or does a reproducible-backtest checksum approach cover the real threat? #8136/Research: survey viable TEE/confidential-compute options on Cloudflare Workers/Containers #8137).
  • Renders the Measured accuracy per rule section on the fairness report from the /v1/public/stats rulePrecision block (public-stats: measured per-rule precision endpoint (aggregates only, sanitizer-invariant) #8230): per-rule decided-case counts and precision, reversal-derived numbers, the insufficient data null state (a below-floor precision: null is rendered as the words, never as 0%), and the reproducibility freeze point showing the latest persisted backtest run's corpus checksum, linking to the new walkthrough.
  • rulePrecision is typed as optional on PublicStats and the section hides entirely when the field is absent (older deployed API) or has no rows — deployment skew can never throw.
  • Wires the doc into the docs nav, docs index, and command palette next to the backtest & calibration entry.

Closes #8231

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • This diff touches only apps/loopover-ui/** (docs MDX + fairness-report UI + its vitest suite). actionlint (no workflow changes), test:coverage/test:workers (no backend/root source or test changes), build:mcp/test:mcp-pack (no MCP changes), ui:openapi:check (no OpenAPI/route changes), and npm audit (no dependency changes) are not exercised by this change. ui:lint, ui:typecheck, ui:build, and the UI vitest suite (fairness-report-page.test.tsx, 8/8 passing, including the new rulePrecision render/null-state/absent-field cases) all pass locally.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Every viewport × theme combination, each row a labeled before/after pair. Before = current main; After = this branch. loopover-ui is a dark-mode-only build (the theme toggle was removed), so the Light rows show what a light-theme-preference (prefers-color-scheme: light) visitor sees — the same dark rendering, captured under that preference honestly rather than relabeled.

State / title Before (main) After (this PR)
Fairness report — measured accuracy per rule — Desktop · Light before Desktop Light after Desktop Light
Fairness report — measured accuracy per rule — Desktop · Dark before Desktop Dark after Desktop Dark
Fairness report — measured accuracy per rule — Tablet · Light before Tablet Light after Tablet Light
Fairness report — measured accuracy per rule — Tablet · Dark before Tablet Dark after Tablet Dark
Fairness report — measured accuracy per rule — Mobile · Light before Mobile Light after Mobile Light
Fairness report — measured accuracy per rule — Mobile · Dark before Mobile Dark after Mobile Dark
Docs — Verify this review walkthrough — Desktop · Light before Desktop Light after Desktop Light
Docs — Verify this review walkthrough — Desktop · Dark before Desktop Dark after Desktop Dark
Docs — Verify this review walkthrough — Tablet · Light before Tablet Light after Tablet Light
Docs — Verify this review walkthrough — Tablet · Dark before Tablet Dark after Tablet Dark
Docs — Verify this review walkthrough — Mobile · Light before Mobile Light after Mobile Light
Docs — Verify this review walkthrough — Mobile · Dark before Mobile Dark after Mobile Dark

Before for the fairness page is the page as main renders it (no per-rule section — the same view a deployed API without the rulePrecision block produces, which is also this PR's pinned hide-the-section fallback); before for the docs route is the real 404 (/docs/verify-this-review does not exist on main).

Notes

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 23, 2026 15:04
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

…ccuracy on the fairness report

Adds the public reproducibility walkthrough doc (export corpus snapshot,
verify checksum, replay scorer, compare against published numbers, with an
honest attestation-boundary callout) and renders the measured accuracy per
rule section on the fairness report from the public stats rulePrecision
block: decided cases, precision with the insufficient-data null state
(never 0%), reversal counts, and the corpus-checksum freeze point linking
to the walkthrough.

Closes JSONbored#8231
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 23, 2026
@loopover-orb

loopover-orb Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-23 15:10:40 UTC

7 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 5 non-blocking
  • The magnitude-16 slice on `data.rulePrecision.latestBacktestRun.corpusChecksum.slice(0, 16)` in fairness-report-page.tsx:312 is a magic number; a named constant like `CHECKSUM_PREVIEW_LENGTH` would self-document the truncation length.
  • The `console.log` calls in verify-this-review.mdx:49 and :66 are inside documentation code snippets meant for the reader to run locally, not actual debug leftovers in shipped code, so this is a non-issue but worth confirming intent is clear to readers.
  • fairness-report-page.tsx doesn't memoize `pctFmt`/`intFmt` instantiation per rule row, but this mirrors the existing pattern in the file for the other tables, so it's consistent rather than a new regression.
  • Consider extracting the checksum-preview length into a named constant for readability (nit only).
  • The new `rulePrecision` type in proof-of-power-stats-model.ts is well-documented with an explanatory comment on the optional-chaining rationale, consistent with the `fleetAccuracy` field above it — good precedent to keep following for future optional backend fields.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8231
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 342 registered-repo PR(s), 134 merged, 36 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 342 PR(s), 36 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds the verify-this-review.mdx docs walkthrough (export/checksum/replay/compare commands plus an explicit 'what this proves/does not prove' section citing #8136/#8137) and wires it into docs nav, docs index, and command palette, and it renders a public-stats-sourced 'Measured accuracy per rule' UI section with a deliberate 'insufficient data' null state (never 0%) and loading/empty handlin

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, Ruby, JavaScript, Svelte, TypeScript, Markdown, MDX, Rust
  • Official Gittensor activity: 342 PR(s), 36 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/docs desktop before /docs
before /docs
after /docs
after /docs
/docs mobile before /docs (mobile)
before /docs (mobile)
after /docs (mobile)
after /docs (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/docs before /docs (scroll)
before /docs (scroll)
after /docs (scroll)
after /docs (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit e4708ba into JSONbored:main Jul 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs+ui: 'verify this review' — public reproducibility walkthrough + measured-accuracy display

1 participant