Skip to content

docs(readme): show measured coverage on the badge - #1583

Merged
Atakan Solak (mapleleafu) merged 2 commits into
mainfrom
atakan/coverage-badge
Oct 6, 2026
Merged

Atakan Solak (mapleleafu) merged 2 commits into
mainfrom
atakan/coverage-badge

Conversation

@mapleleafu

@mapleleafu Atakan Solak (mapleleafu) commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

The README coverage badge always showed n/a. That is the placeholder the fleet template seeds. It was never generated from a coverage run in this repo.

This PR runs pnpm run cover and regenerates the badge with scripts/fleet/gen/coverage-badge.mts. Measured line coverage is 93% (statements 93.22%, branches 86.24%, functions 94.75%, lines 93.28%).

Three constant tests still expected the old @socketsecurity/cli package name. The package is now published as socket, so these tests failed on every run. They now expect socket.

Before / after

Before (main) After (this branch)
before after

The README loads the badge from HEAD, so the rendered README shows 93% only after merge. The images above are pinned to each commit.

Notes

  • Some integration and test/repo tests failed in the local run because of environment differences (pnpm on PATH, fleet bundle version). Their failures can only lower the measured number.

Note

Low Risk
Documentation and test expectation updates only; no runtime or API behavior changes.

Overview
Replaces the README coverage badge placeholder (n/a) with a 93% badge generated from a real pnpm run cover run, and bumps the README image cache-buster query param so HEAD picks up the new assets/repo/coverage.svg.

Aligns three unit tests (constants-barrel, constants-root-barrel, constants/packages) so SOCKET_CLI_PACKAGE_NAME is expected to be socket instead of the obsolete @socketsecurity/cli, matching the published package name and unblocking coverage runs that execute the full test suite.

Reviewed by Cursor Bugbot for commit 9d98324. Configure here.

The CLI package is published as socket, but three constant tests still
expected the old @socketsecurity/cli name and failed on every run.
The README coverage badge still showed the n/a placeholder because it
was never generated from a coverage run. Regenerate it from a full
pnpm run cover pass: 93% line coverage.
@mapleleafu
Atakan Solak (mapleleafu) marked this pull request as draft October 6, 2026 19:26
@mapleleafu
Atakan Solak (mapleleafu) marked this pull request as ready for review October 6, 2026 19:31
@mapleleafu
Atakan Solak (mapleleafu) enabled auto-merge (squash) October 6, 2026 19:32
@mapleleafu
Atakan Solak (mapleleafu) merged commit cff7743 into main Oct 6, 2026
11 checks passed
@mapleleafu
Atakan Solak (mapleleafu) deleted the atakan/coverage-badge branch October 6, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants