Skip to content

ci(ui-kit): wire ui-kit vitest into ui:test/CI and add test-wiring checker - #10139

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/ci-ui-kit-test-wiring-10049
Closed

ci(ui-kit): wire ui-kit vitest into ui:test/CI and add test-wiring checker#10139
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/ci-ui-kit-test-wiring-10049

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Add npm --workspace @loopover/ui-kit run test to root ui:test (after ui:kit:build).
  • Add UI tests (ui-kit) CI step alongside ui / ui-miner.
  • Add scripts/check-test-coverage-wiring.ts (mirror of typecheck-coverage) + test-wiring:check in test:ci.
  • Unit coverage for the checker's pure core.

Closes #10049

Test plan

  • npm run test-wiring:check exits 0
  • npm run checkers-wired:check exits 0
  • npm --workspace @loopover/ui-kit run test — 12 files / 60 tests pass
  • Pure findTestWiringGaps cases (direct, intermediate, build-only gap, cycle, missing entry)

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 31, 2026 08:52
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent Supply Chain Scan

Superagent flagged 1 dependency introduced by this pull request.

High risk: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9

  • Change: added 55cc8345863c7cc4c66a329aec7e433d2d1c52a9
  • Dependency path: .github/workflows/ci.yml → jobs → validate-code → steps → 66 → actions/cache/save
  • Correlated risks: 3
  • Why flagged: Detects keylogging and input capture patterns. Location: cache-55cc8345863c7cc4c66a329aec7e433d2d1c52a9/dist/restore-only/index.js. Rules: threat-runtime-keylogging
  • Risk score: 4.9

View Superagent Supply Chain Scan

@loopover-orb

loopover-orb Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-31 09:28:56 UTC

4 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): .github/workflows/ci.yml (matched .github/workflows/**).

Review summary
This PR closes #10049 by adding a `test:ci` reachability checker for workspace `test` scripts (mirroring the existing `check-typecheck-coverage.ts` pattern), wiring `@​loopover/ui-kit`'s previously-orphaned vitest suite into both `ui:test` and a new `UI tests (ui-kit)` CI step, and adding direct unit tests for the pure `findTestWiringGaps` function. I traced the regex-based script-graph walk (`referencedWorkspaces`/`referencedRootScripts`) against the actual root `package.json` `test:ci` chain and it correctly resolves both `--workspace X run test` and `run test --workspace X` forms, transitively follows `ui:test` to pick up ui-kit/ui/ui-miner, and terminates on the cyclic-graph case via the `seen` set — the accompanying tests exercise the real function, not a fabricated scenario. The change is narrow, closes a real silently-partial gap, and is scoped correctly to its stated intent.

Nits — 6 non-blocking
  • scripts/check-test-coverage-wiring.ts:28 — the `(?:--\S+\s+)*` nested inside the outer match is ReDoS-shaped in form, but since this script only ever parses this repo's own trusted package.json (never externally-supplied input) it isn't practically exploitable; still worth simplifying since `--\S+` can't contain whitespace anyway.
  • scripts/check-test-coverage-wiring.ts:88-103 (workspacesDeclaringTest) — the filesystem-walking half (readdirSync/readFileSync/JSON.parse + try/catch swallow for a non-workspace package.json) has no test coverage in this diff; only the pure `findTestWiringGaps` is tested.
  • scripts/check-test-coverage-wiring.ts:88-103 nests for/try-catch 5 levels deep — consider extracting the per-dir manifest parse into a small helper for readability, matching the flatter shape of `referencedWorkspaces`/`referencedRootScripts` above it.
  • The Superagent Supply Chain Scan CI failure ('Supply chain risks detected') isn't explained by anything in this diff — no new dependencies are added — and is more likely attributable to this branch being 10 commits behind the default branch; worth rebasing to confirm before treating it as a real finding here.
  • Confirm `test-wiring:check` is itself reachable/verified by `checkers-wired:check` in CI, since (unlike the ui-kit test step) it isn't added as its own named ci.yml step in this diff.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.

CI checks failing

  • Superagent Supply Chain Scan — Supply chain risks detected

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #10049
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ❌ 8/20 High 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: 244 registered-repo PR(s), 95 merged, 38 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 244 PR(s), 38 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff adds ui-kit's vitest run to root ui:test (after ui:kit:build), adds a matching 'UI tests (ui-kit)' CI step with the same guard condition as the ui/ui-miner steps, and introduces scripts/check-test-coverage-wiring.ts mirroring check-typecheck-coverage.ts with a pure findTestWiringGaps function, wired via test-wiring:check into test:ci, plus unit tests for the pure core — covering all state

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, TypeScript, Svelte, Cuda, JavaScript, Markdown, MDX
  • Official Gittensor activity: 244 PR(s), 38 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 1 step in the Signals table above.
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.

🟩 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

@superagent-security

Copy link
Copy Markdown
Contributor

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

…ecker

Run the package-local ui-kit suite from ui:test and a dedicated CI step,
and add check-test-coverage-wiring so a declared workspace test that
test:ci never reaches fails loudly.

Closes JSONbored#10049

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.99%. Comparing base (1d2b142) to head (9072937).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10139   +/-   ##
=======================================
  Coverage   91.99%   91.99%           
=======================================
  Files         931      931           
  Lines      113994   113994           
  Branches    27523    27523           
=======================================
  Hits       104871   104871           
  Misses       7823     7823           
  Partials     1300     1300           
Flag Coverage Δ
backend 95.67% <ø> (ø)
control-plane 100.00% <ø> (ø)
rees 89.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@loopover-orb

loopover-orb Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (Superagent Supply Chain Scan)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(ui-kit): @loopover/ui-kit's 12-file vitest suite is invoked by nothing, and no checker notices

2 participants