You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
packages/loopover-ui-kit declares a test script and a package-local runner:
// packages/loopover-ui-kit/vitest.config.ts// ... No `coverage` block: this package is deliberately not in the root vitest.config.ts's coverage.include// and is not Codecov-gated -- the acceptance signal is that this suite runs and passes, not a percentage.test: {environment: "jsdom",
...
include: ["src/**/*.test.{ts,tsx}"],},
The documented acceptance signal is "this suite runs". It does not run. Nothing invokes it:
Root package.json's ui:test is npm run ui:kit:build && npm --workspace @loopover/ui run test && npm --workspace @loopover/ui-miner run test
— @loopover/ui-kit appears only via ui:kit:build.
test:ci reaches ui-kit through npm run build --workspace @loopover/ui-kit, npm run test:ui-kit-pack
(which is tsx scripts/check-ui-kit-package.ts, a published-tarball check), ui:lint and ui:typecheck —
never run test.
.github/workflows/ci.yml has UI tests (ui) (line 892-894) and UI tests (ui-miner) (line 895-897) and
no ui-kit equivalent.
turbo.json defines @loopover/ui-kit#build and @loopover/ui-kit#typecheck and no test task for any
package (ci.yml:882-884 states that is deliberate).
The root vitest config only globs test/**/*.test.ts, so it cannot pick these up either.
Grep confirms it: grep -rn "ui-kit" package.json returns only test:ui-kit-pack, ui:kit:build, ui:lint
and ui:typecheck, and grep -rn "ui-kit" .github/workflows/ci.yml returns only build/pack/comment lines.
The suite is 12 files: src/utils.test.ts, src/hooks/use-mobile.test.tsx, src/hooks/use-streaming-text.test.ts, and src/components/{accordion,carousel,chart,focus-visible-convention,pagination,sidebar,state-views,streaming-text,typing-indicator}.test.tsx.
Every one of them was written to pin real behaviour — chart.test.tsx's header says chart.tsx "shipped with
no tests at all -- so the migration's load-bearing behaviours were resting on the type-checker alone". They
are resting on it still: the tests exist, are never executed, and cannot fail.
This is the same shape as #9860's ui:typecheck incident (a check that is not missing but SILENTLY PARTIAL,
trusted precisely because everything around it is green), and #9860's own answer was to add scripts/check-typecheck-coverage.ts so npm run typecheck proves it reaches every workspace that declares
one. No equivalent exists for test.
Requirements
packages/loopover-ui-kit's suite must run in CI on every PR that can affect it. Add npm --workspace @loopover/ui-kit run test to root package.json's ui:test, ordered after npm run ui:kit:build (the suite imports from ../utils.js source, but ui:test's existing build prefix
must be preserved for the other two workspaces).
.github/workflows/ci.yml must gain a UI tests (ui-kit) step alongside the existing UI tests (ui) and UI tests (ui-miner) steps, using the same if: ${{ !cancelled() && (github.event_name == 'push' || needs.changes.outputs.ui == 'true') }} condition and the same one-step-per-workspace shape those two use —
the comment at ci.yml:882-891 explains why they are separate steps rather than an && chain, and that
reasoning applies identically here.
A new checker scripts/check-test-coverage-wiring.ts must report every workspace under apps/*/packages/*
that declares a test script which the root test:ci script chain never reaches, following npm run <name>
references transitively and counting npm --workspace <name> run test (both flag orders) as coverage —
i.e. the test-script analogue of scripts/check-typecheck-coverage.ts. It must expose a pure exported
function over (rootScripts, workspaces) the way findTypecheckGaps does, and exit 1 with the offending
workspace names when the set is non-empty.
The new checker must be wired: a test-wiring:check npm script in root package.json, chained into test:ci. (scripts/check-checkers-wired.ts fails CI otherwise.)
The whole ui-kit suite must PASS as it stands. If a test in it fails once it starts running, fix the test or
the component in this same PR — do not skip, it.skip, or delete a test to make the suite green.
packages/loopover-ui-kit/vitest.config.ts, its include glob, and its globalSetup node-version guard
must NOT change. The package must NOT be added to the root vitest.config.tscoverage.include — the
comment quoted above records that as a deliberate decision.
⚠️ Required pattern: mirror scripts/check-typecheck-coverage.ts exactly — same file shape, same find*Gaps(scripts, workspaces, entry) pure core, same transitive npm run walk, same failure message
style. What does NOT satisfy this issue: (a) adding the ui-kit test step to ui:test/ci.yml without the
checker, which leaves the next workspace's suite free to be added and never run; (b) adding the checker
without wiring ui-kit's suite in, which just makes test:ci red; (c) adding a test task to turbo.json,
which ci.yml:882-884 documents as a deliberate non-goal; (d) making the root vitest.config.ts glob packages/**/*.test.tsx, which would pull a jsdom/React suite into the node-environment backend run and
change what Codecov measures; (e) skipping or deleting any ui-kit test to get green.
Deliverables
Root package.json's ui:test invokes npm --workspace @loopover/ui-kit run test, and npm run ui:test runs all three workspaces' suites to completion.
.github/workflows/ci.yml contains a UI tests (ui-kit) step with the same guard condition as its two
siblings.
scripts/check-test-coverage-wiring.ts exists, exports a pure gap-finding function, and npm run test-wiring:check exits 0 on the resulting tree and exits 1 (naming the workspace) when ui:test is edited to drop the ui-kit invocation.
test-wiring:check is defined in root package.json and chained into test:ci, so npm run checkers-wired:check still passes.
All 12 packages/loopover-ui-kit/src/**/*.test.{ts,tsx} files pass under npm --workspace @loopover/ui-kit run test, with no test skipped or removed.
A test at test/unit/check-test-coverage-wiring-script.test.ts covering the new checker's pure core:
a workspace reached directly, a workspace reached through an intermediate script, a workspace whose build (not test) is invoked being reported, a cyclic script graph terminating, and a missing entry
script being reported rather than throwing.
All Deliverables above are required in a single PR. A PR that satisfies only some of them — for example one
that adds the ui-kit line to ui:test and the ci.yml step but ships no checker, leaving the class of gap open
for the next workspace — does not resolve this issue.
Test Coverage Requirements
This repo enforces 99%+ Codecov patch coverage, branch-counted. vitest.config.ts's coverage.include
covers src/**/*.ts, packages/loopover-engine/src/**/*.ts, packages/loopover-{miner,mcp}/{lib,bin}/**/*.ts, packages/loopover-contract/src/**/*.ts and packages/discovery-index/src/**/*.ts. It covers neither scripts/** (also named in codecov.yml's ignore: list) nor packages/loopover-ui-kit/**, and package.json / .github/workflows/** are not source. Codecov does not gate the patch on any file this
issue touches.
The tests are still mandatory and still gating: the root vitest suite (include: ["test/**/*.test.ts"]) runs test/unit/check-test-coverage-wiring-script.test.ts on every PR, and after this PR the ui-kit suite itself is
a required CI step — a failure in either is a red required check.
Every branch of the new checker needs both arms asserted in test/unit/check-test-coverage-wiring-script.test.ts:
the transitive npm run walk (a workspace reached through an intermediate script vs one not reached at all);
both --workspace flag orders (npm --workspace X run test and npm run test --workspace X) matched, and a
non-test script name (npm --workspace X run build) NOT counted; the seen-set cycle guard entered and not
entered; and a missing entry-script body producing a report rather than a throw.
Expected Outcome
@loopover/ui-kit's 12 test files actually execute on every UI-touching PR, so the design system's
logic-bearing exports are verified rather than merely written down — and a new checker makes it impossible for
the next workspace to declare a test script that test:ci never reaches.
Links & Resources
packages/loopover-ui-kit/package.json — the "test": "vitest run" script nothing calls
packages/loopover-ui-kit/vitest.config.ts — the config whose header states "the acceptance signal is that
this suite runs and passes"
package.jsonui:test / test:ci — the chains that omit it
.github/workflows/ci.yml:892-897 — UI tests (ui) / UI tests (ui-miner), the steps to mirror
scripts/check-typecheck-coverage.ts — the checker to mirror
test/unit/check-typecheck-coverage-script.test.ts — the test file to mirror
Context
packages/loopover-ui-kitdeclares a test script and a package-local runner:The documented acceptance signal is "this suite runs". It does not run. Nothing invokes it:
package.json'sui:testisnpm run ui:kit:build && npm --workspace @loopover/ui run test && npm --workspace @loopover/ui-miner run test—
@loopover/ui-kitappears only viaui:kit:build.test:cireaches ui-kit throughnpm run build --workspace @loopover/ui-kit,npm run test:ui-kit-pack(which is
tsx scripts/check-ui-kit-package.ts, a published-tarball check),ui:lintandui:typecheck—never
run test..github/workflows/ci.ymlhasUI tests (ui)(line 892-894) andUI tests (ui-miner)(line 895-897) andno ui-kit equivalent.
turbo.jsondefines@loopover/ui-kit#buildand@loopover/ui-kit#typecheckand notesttask for anypackage (ci.yml:882-884 states that is deliberate).
test/**/*.test.ts, so it cannot pick these up either.Grep confirms it:
grep -rn "ui-kit" package.jsonreturns onlytest:ui-kit-pack,ui:kit:build,ui:lintand
ui:typecheck, andgrep -rn "ui-kit" .github/workflows/ci.ymlreturns only build/pack/comment lines.The suite is 12 files:
src/utils.test.ts,src/hooks/use-mobile.test.tsx,src/hooks/use-streaming-text.test.ts, andsrc/components/{accordion,carousel,chart,focus-visible-convention,pagination,sidebar,state-views,streaming-text,typing-indicator}.test.tsx.Every one of them was written to pin real behaviour —
chart.test.tsx's header sayschart.tsx"shipped withno tests at all -- so the migration's load-bearing behaviours were resting on the type-checker alone". They
are resting on it still: the tests exist, are never executed, and cannot fail.
This is the same shape as #9860's
ui:typecheckincident (a check that is not missing but SILENTLY PARTIAL,trusted precisely because everything around it is green), and #9860's own answer was to add
scripts/check-typecheck-coverage.tssonpm run typecheckproves it reaches every workspace that declaresone. No equivalent exists for
test.Requirements
packages/loopover-ui-kit's suite must run in CI on every PR that can affect it. Addnpm --workspace @loopover/ui-kit run testto rootpackage.json'sui:test, ordered afternpm run ui:kit:build(the suite imports from../utils.jssource, butui:test's existing build prefixmust be preserved for the other two workspaces).
.github/workflows/ci.ymlmust gain aUI tests (ui-kit)step alongside the existingUI tests (ui)andUI tests (ui-miner)steps, using the sameif: ${{ !cancelled() && (github.event_name == 'push' || needs.changes.outputs.ui == 'true') }}condition and the same one-step-per-workspace shape those two use —the comment at ci.yml:882-891 explains why they are separate steps rather than an
&&chain, and thatreasoning applies identically here.
scripts/check-test-coverage-wiring.tsmust report every workspace underapps/*/packages/*that declares a
testscript which the roottest:ciscript chain never reaches, followingnpm run <name>references transitively and counting
npm --workspace <name> run test(both flag orders) as coverage —i.e. the
test-script analogue ofscripts/check-typecheck-coverage.ts. It must expose a pure exportedfunction over
(rootScripts, workspaces)the wayfindTypecheckGapsdoes, and exit 1 with the offendingworkspace names when the set is non-empty.
test-wiring:checknpm script in rootpackage.json, chained intotest:ci. (scripts/check-checkers-wired.tsfails CI otherwise.)the component in this same PR — do not skip,
it.skip, or delete a test to make the suite green.packages/loopover-ui-kit/vitest.config.ts, itsincludeglob, and itsglobalSetupnode-version guardmust NOT change. The package must NOT be added to the root
vitest.config.tscoverage.include— thecomment quoted above records that as a deliberate decision.
Deliverables
package.json'sui:testinvokesnpm --workspace @loopover/ui-kit run test, andnpm run ui:testruns all three workspaces' suites to completion..github/workflows/ci.ymlcontains aUI tests (ui-kit)step with the same guard condition as its twosiblings.
scripts/check-test-coverage-wiring.tsexists, exports a pure gap-finding function, andnpm run test-wiring:checkexits 0 on the resulting tree and exits 1 (naming the workspace) whenui:testis edited to drop the ui-kit invocation.test-wiring:checkis defined in rootpackage.jsonand chained intotest:ci, sonpm run checkers-wired:checkstill passes.packages/loopover-ui-kit/src/**/*.test.{ts,tsx}files pass undernpm --workspace @loopover/ui-kit run test, with no test skipped or removed.test/unit/check-test-coverage-wiring-script.test.tscovering the new checker's pure core:a workspace reached directly, a workspace reached through an intermediate script, a workspace whose
build(nottest) is invoked being reported, a cyclic script graph terminating, and a missing entryscript being reported rather than throwing.
All Deliverables above are required in a single PR. A PR that satisfies only some of them — for example one
that adds the ui-kit line to
ui:testand the ci.yml step but ships no checker, leaving the class of gap openfor the next workspace — does not resolve this issue.
Test Coverage Requirements
This repo enforces 99%+ Codecov patch coverage, branch-counted.
vitest.config.ts'scoverage.includecovers
src/**/*.ts,packages/loopover-engine/src/**/*.ts,packages/loopover-{miner,mcp}/{lib,bin}/**/*.ts,packages/loopover-contract/src/**/*.tsandpackages/discovery-index/src/**/*.ts. It covers neitherscripts/**(also named incodecov.yml'signore:list) norpackages/loopover-ui-kit/**, andpackage.json/.github/workflows/**are not source. Codecov does not gate the patch on any file thisissue touches.
The tests are still mandatory and still gating: the root vitest suite (
include: ["test/**/*.test.ts"]) runstest/unit/check-test-coverage-wiring-script.test.tson every PR, and after this PR the ui-kit suite itself isa required CI step — a failure in either is a red required check.
Every branch of the new checker needs both arms asserted in
test/unit/check-test-coverage-wiring-script.test.ts:the transitive
npm runwalk (a workspace reached through an intermediate script vs one not reached at all);both
--workspaceflag orders (npm --workspace X run testandnpm run test --workspace X) matched, and anon-
testscript name (npm --workspace X run build) NOT counted; theseen-set cycle guard entered and notentered; and a missing entry-script body producing a report rather than a throw.
Expected Outcome
@loopover/ui-kit's 12 test files actually execute on every UI-touching PR, so the design system'slogic-bearing exports are verified rather than merely written down — and a new checker makes it impossible for
the next workspace to declare a
testscript thattest:cinever reaches.Links & Resources
packages/loopover-ui-kit/package.json— the"test": "vitest run"script nothing callspackages/loopover-ui-kit/vitest.config.ts— the config whose header states "the acceptance signal is thatthis suite runs and passes"
package.jsonui:test/test:ci— the chains that omit it.github/workflows/ci.yml:892-897—UI tests (ui)/UI tests (ui-miner), the steps to mirrorscripts/check-typecheck-coverage.ts— the checker to mirrortest/unit/check-typecheck-coverage-script.test.ts— the test file to mirror