Skip to content

ci(ui-kit): wire ui-kit's vitest suite into ui:test/CI, add test-wiring checker - #10217

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-10049
Jul 31, 2026
Merged

ci(ui-kit): wire ui-kit's vitest suite into ui:test/CI, add test-wiring checker#10217
JSONbored merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-10049

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

ci(ui-kit): wire ui-kit's vitest suite into ui:test/CI, add test-wiring checker

@loopover/ui-kit declares "test": "vitest run" but nothing runs it -- ui:test
only ever exercised ui and ui-miner, test:ci reaches ui-kit through
build/pack/lint/typecheck but never its own test script, and ci.yml has no
ui-kit test step. The 12-file suite has been silently unexecuted since it was
added.

Add the ui-kit workspace to ui:test (after ui:kit:build) and a matching
"UI tests (ui-kit)" CI step alongside the ui/ui-miner ones. Add
scripts/check-test-coverage-wiring.ts, a test-script analogue of
check-typecheck-coverage.ts: it walks the same npm-run reference graph to
report any workspace whose declared test script test:ci never reaches, so
the next orphaned suite gets caught instead of sitting there unexecuted.
Wire it in as test-wiring:check, chained into test:ci.

Closes #10049

…ng checker

@loopover/ui-kit declares "test": "vitest run" but nothing runs it -- ui:test
only ever exercised ui and ui-miner, test:ci reaches ui-kit through
build/pack/lint/typecheck but never its own test script, and ci.yml has no
ui-kit test step. The 12-file suite has been silently unexecuted since it was
added.

Add the ui-kit workspace to ui:test (after ui:kit:build) and a matching
"UI tests (ui-kit)" CI step alongside the ui/ui-miner ones. Add
scripts/check-test-coverage-wiring.ts, a test-script analogue of
check-typecheck-coverage.ts: it walks the same npm-run reference graph to
report any workspace whose declared test script test:ci never reaches, so
the next orphaned suite gets caught instead of sitting there unexecuted.
Wire it in as test-wiring:check, chained into test:ci.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 31, 2026 12:50
@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 13:20:49 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 fixes a real, verified gap: @​loopover/ui-kit's `test` script was never invoked by `ui:test`, `test:ci`, or `ci.yml`, so its 12-file vitest suite silently never ran. The fix adds the workspace to `ui:test` and a matching `ci.yml` step, and introduces `scripts/check-test-coverage-wiring.ts` — a pure, BFS-based reachability checker (mirroring the existing `check-typecheck-coverage.ts` pattern) with thorough unit tests covering direct/transitive coverage, both `--workspace` flag orderings, scoped-name stripping, directory-path matching, and cycle termination. I traced the regex logic against the real root `package.json` `ui:test`/`test:ci` strings and it resolves correctly; CI for this commit (validate-code, validate-tests, validate) already passed, giving real evidence the wiring works and ui-kit's suite is green. The unrelated Superagent Supply Chain Scan failure has no detail provided and this branch is 5 commits behind main, so it's more likely explained by that staleness than by this diff's content.

Nits — 6 non-blocking
  • scripts/check-test-coverage-wiring.ts:30 — the nested `(?:--\S+\s+)*` quantifier was flagged by static analysis as ReDoS-prone; the `\S+`/`\s+` character classes are disjoint so it isn't practically exploitable, and the only input is this repo's own trusted package.json, but consider flattening it (e.g. split on whitespace tokens) for hygiene.
  • scripts/check-test-coverage-wiring.ts:96-104 (workspacesDeclaringTest) isn't exercised by the new test file — only the pure `findTestWiringGaps` function is unit-tested; since scripts/** sits outside the src/** coverage gate this isn't required, but a small fixture-dir test would pin the filesystem-walk logic too.
  • scripts/check-test-coverage-wiring.ts's referencedWorkspaces/referencedRootScripts only recognize `--workspace`/`run` in the specific orderings used by this repo's package.json (not `-w`, and not flags interposed between `--workspace <name>` and `run`) — fine for current usage, but worth a one-line comment noting the assumption so a future contributor doesn't assume it's a general npm-script parser.
  • Consider adding a brief comment above the new `UI tests (ui-kit)` step in .github/workflows/ci.yml (~line 892) noting it intentionally runs independently of the ui/ui-miner steps via `!cancelled()`, matching the existing convention, so a future editor doesn't 'simplify' it into a fail-fast chain.
  • Now that ui-kit's suite actually executes in CI, watch the first few runs for any latent failures in that 12-file suite that were never caught while it was unwired.
  • 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: 130 registered-repo PR(s), 92 merged, 3 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 130 PR(s), 3 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR wires @​loopover/ui-kit's test script into ui:test after ui:kit:build, adds a matching 'UI tests (ui-kit)' CI step with the required condition, and adds scripts/check-test-coverage-wiring.ts mirroring check-typecheck-coverage.ts's pure findTestWiringGaps(scripts, workspaces, entry) shape, wired as test-wiring:check into test:ci, with tests confirming behavior.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 130 PR(s), 3 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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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.

Decision record
  • action: hold · clause: guardrail_hold
  • config: 36d4331b465e19dadfd46281fcf0b569a42b9b1f0fe62ddf4b365e74d34d38fb · pack: oss-anti-slop · ci: failed
  • note: diverted by the randomized close-audit holdout (calibration: randomized ε-holdout on would-close PRs with propensity logging #8831) — the deterministic pipeline would otherwise have closed this PR
  • record: 6bdbe953a62702cf2ff7ebf35ddd89807cb0c78dc56dcf4e083a6d2c73fdef24 (schema v6, head 6c80498)

🟩 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.

@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 92.22%. Comparing base (cc9d102) to head (6c80498).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10217   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         937      937           
  Lines      114362   114362           
  Branches    27650    27650           
=======================================
  Hits       105468   105468           
  Misses       7588     7588           
  Partials     1306     1306           
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 added the manual-review Gittensor contributor context label Jul 31, 2026
@JSONbored
JSONbored merged commit 6fdbbc1 into JSONbored:main Jul 31, 2026
8 of 9 checks passed
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. manual-review Gittensor contributor context

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