test(miner-ui): bring the miner-ui under a real coverage gate#5613
Conversation
Adds vitest coverage config (v8 provider) with thresholds set at the measured baseline (~87/87/79/89), enforced via `npm test --coverage`. Verified the gate genuinely fails on a regression (temporarily raised a threshold above the real number, confirmed the run fails, reverted). Extension coverage (the other half of #4865) needs its own test suite built first -- no vitest setup exists there yet -- left for a follow-up.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
1 similar comment
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-13 09:39:47 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 2 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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.
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-13 09:40:18 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 6 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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.
|
Summary
coverageblock toapps/gittensory-miner-ui/vitest.config.ts(v8 provider,src/**/*.{ts,tsx}+ the root-levelvite-*.tsplugin files, excluding the TanStack Router-generatedrouteTree.gen.tsand the unit-untestablemain.tsxentry point).testscript tovitest run --coverage, so the gate runs wherevernpm --workspace @loopover/ui-miner run testalready runs (locally and innpm run ui:test/test:ci) — no new CI step needed.coverage.thresholdsto the real measured baseline the day this was wired up (~87.65% statements / 87.17% branches / 78.9% functions / 88.79% lines), with a small buffer below that so routine churn doesn't false-fail. This is a floor meant to catch a genuine regression, not a ratchet — per Bring the miner-ui and extension under a coverage gate #4865's own framing ("establish a coverage baseline"), not "achieve 100% everywhere in one PR."README.md.Scope
apps/gittensory-miner-uiandapps/gittensory-miner-extensionare both excluded today via the rootvitest.config.ts's blanketcoverage.exclude: ["apps/**"]. This PR only covers the miner-ui half. The extension has no vitest setup or test suite at all yet (confirmed: itspackage.jsononly haslint/typecheck/buildscripts, added by #4866/#5567) — #4865's own boundary note flags this ("extension's test instrumentation may need adjustment first"). Writing that suite from scratch is a separate, larger effort left for a follow-up; this PR does not touch the extension.Note: two pre-existing sibling API plugin files (
vite-portfolio-queue-api.ts,vite-run-state-api.ts) andvite-ledgers-api.tshave real coverage gaps at their own Vite-plugin-wiring layer (portfolioQueueApiPlugin()/runStateApiPlugin()/ledgersApiPlugin()themselves, as opposed to the already-testedhandleXRequestfunctions they wrap) — visible in the coverage report but out of scope here; the baseline threshold accounts for them honestly rather than inflating the number.Advances #4865 (not closing it — the extension half is still open).
Test plan
npm run ui:test— both apps' full suites pass (33+202 forgittensory-ui, 9+103 for miner-ui)npm run ui:typecheck,npm run ui:lint(0 errors),npm run ui:buildnpm run docs:drift-checkstatementsthreshold to 99%, confirmednpm testfails withERROR: Coverage for statements (87.65%) does not meet global threshold (99%), then reverted