chore(workspace): add test:coverage scripts and vitest coverage thresholds - #3334
Draft
ascariandrea wants to merge 5 commits into
Draft
chore(workspace): add test:coverage scripts and vitest coverage thresholds#3334ascariandrea wants to merge 5 commits into
ascariandrea wants to merge 5 commits into
Conversation
This was referenced Mar 7, 2026
ascariandrea
marked this pull request as draft
March 7, 2026 17:30
ascariandrea
force-pushed
the
feat/agent-test-coverage
branch
from
March 7, 2026 17:52
d3242a8 to
9e5d138
Compare
This was referenced Mar 7, 2026
ascariandrea
force-pushed
the
feat/agent-test-coverage
branch
3 times, most recently
from
March 14, 2026 18:47
0303907 to
d532c4f
Compare
…d use in CI matrix
…nd services Set coverage thresholds at current measured coverage (floored to nearest 5%) to act as a ratchet - CI passes today and thresholds prevent regressions. - Lower @liexp/shared thresholds to actual (stmts:60, branch:55, fns:55, lines:60) - Lower @liexp/io thresholds to actual (stmts:55, branch:95, fns:35, lines:65) - Lower @liexp/backend thresholds to actual (~20%) with TODO to increase over time - Set @liexp/agent thresholds at actual (stmts:85, branch:70, fns:95, lines:85) - Add coverage.include + zero thresholds to web (static code-inspection test only) - Create services/admin/vitest.config.spec.ts to pick up the one unit spec file - Update admin vitest.config.ts projects list and test:coverage script - Add TODO comments to api and worker configs (require live DB, skip thresholds)
All packages/services target 80% coverage (stmts/branches/fns/lines). admin and web start at 0% with TODO comments — they have no meaningful unit tests yet. api and worker thresholds are deferred (require live DB).
…n fetch mock
- Lower @liexp/shared vitest thresholds to match actual measured coverage
(lines/stmts 60%, branches 55%, functions 55%) instead of aspirational 80%
- Fix useStreamingChat.spec.ts: replace broken vi.mock('fetch') with
global.fetch assignment in beforeEach so mockFetch actually intercepts
fetch calls in jsdom environment
ascariandrea
force-pushed
the
feat/agent-test-coverage
branch
from
March 28, 2026 09:07
d532c4f to
e533253
Compare
ascariandrea-zeroclaw
left a comment
Collaborator
There was a problem hiding this comment.
Adds test:coverage scripts and coverage thresholds (80% for most packages, lower for shared/web/worker/api where tests need DB or have no unit tests yet). CI matrix updated to run test:coverage instead of plain test. Clean, well-documented thresholds with TODOs explaining why some services have lower thresholds. No correctness bugs or security issues found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Coverage thresholds set