test(web): gate src/lib/** under the vitest coverage include globs#1599
Merged
Conversation
…1594) Broaden the web vitest `coverage.include` from the single-file `src/lib/sandbox-csp.{ts,tsx}` entry to `src/lib/**/*.{ts,tsx}` so the per-file >=90 four-dimension gate applies to every library module under `src/lib`, not just sandbox-csp. - Add unit tests for the previously-ungated `environmentFactory.ts` (createWebEnvironment) and `types/customHeaders.ts` value helpers, bringing both to 100% on all four dimensions. - Annotate downloadFile.ts's provably-dead `?? ""` fallback (String.split always returns a non-empty array so .pop() is never undefined) with a justified `v8 ignore`, closing its last uncovered branch (92.3 -> 100). All five src/lib files now report 100/100/100/100. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
Member
Author
|
@claude review |
Contributor
|
Claude finished @cliffhall's task in 8m 9s —— View job Review: gate
|
This was referenced Jul 2, 2026
Member
Author
|
📋 Smoke test & AGENTS.md audit for this PR: #1594 (comment) (posted on the linked issue #1594). |
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.
Closes #1594
Broadens the web vitest
coverage.includeso the per-file ≥90 four-dimension gate (npm run test:coverage) applies to every module underclients/web/src/lib, not justsandbox-csp.ts.Change
clients/web/vite.config.ts: replace the single-filesrc/lib/sandbox-csp.{ts,tsx}include entry (added by feat(web): add sandbox CSP builder library (closes #1558) #1588 as a targeted workaround) with the globsrc/lib/**/*.{ts,tsx}, matching the form of the existingsrc/components/**/src/utils/**entries.clients/web/src/lib/downloadFile.ts: annotate the provably-dead?? ""fallback infileNameFromUriwith a justified/* v8 ignore next */—String.prototype.splitalways returns a non-empty array, so.pop()is neverundefined.src/lib/environmentFactory.test.ts(coverscreateWebEnvironment, including the internalfetchFnwrapper) andsrc/lib/types/customHeaders.test.ts(covers the header value helpers, previously imported by nothing).Newly-gated
src/libcoverage (lines / branches / functions / statements)downloadFile.tsenvironmentFactory.tsremoteOAuthStorage.tssandbox-csp.tstypes/customHeaders.tsdownloadFile.tsbranch coverage rose from 92.3 → 100 via thev8 ignore.Verification
cd clients/web && npm run validate✅ (197 files, 2557 tests)npm run test:coverage(web) ✅ passes with the broadened includenpm run test:integration✅ (39 files, 809 tests)🤖 Generated with Claude Code
https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX