Compute coverage on a single CI leg instead of every leg
Summary
Coverage instrumentation is enabled unconditionally in every package's Vitest config, so it is computed on all four matrix legs while only one set of coverage artifacts is consumed.
Evidence
coverage: { enabled: true } appears in 11 package configs:
agents, auth, cli, core, ide-integration, mcp,
providers, settings, storage, telemetry, tools
The CI test job uploads a coverage artifact per matrix leg:
coverage-reports-24.x-ubuntu-latest-keyring
coverage-reports-24.x-ubuntu-latest-fallback
coverage-reports-24.x-macos-latest-keyring
coverage-reports-24.x-macos-latest-fallback
post_coverage_comment consumes coverage from a single leg.
Measured instrumentation cost on packages/cli:
baseline (coverage on) 138s
coverage off 119s
Approximately 19s for one package on one leg, repeated across packages and legs.
Proposed work
- Make coverage instrumentation conditional, enabled on one designated CI leg and disabled elsewhere.
- Keep coverage on by default for local runs, or provide an obvious opt-in, so developers do not lose the signal.
- Remove the now-redundant per-leg coverage artifact uploads.
Constraint
Coverage gates and the coverage comment must keep working. This issue reduces redundant computation; it must not reduce coverage visibility or drop an enforced threshold.
Acceptance criteria
Note
The matrix-leg count is itself being reduced by the sibling issue that removes the dead secure-store-mode dimension. These compose: fewer legs and coverage on one leg.
Implementation plan
Files to edit
13 coverage.enabled: true sites across 11 packages:
packages/agents/vitest.config.ts:270
packages/auth/vitest.config.ts:53
packages/cli/vitest.config.ts:347
packages/core/vitest.config.ts:224, 231
packages/ide-integration/vitest.config.ts:48
packages/mcp/vitest.config.ts:111, 124
packages/providers/vitest.config.ts:230
packages/settings/vitest.config.ts:113
packages/storage/vitest.config.ts:48
packages/telemetry/vitest.config.ts:113
packages/tools/vitest.config.ts:113, 120
Plus .github/workflows/ci.yml lines 845-849 (artifact upload) and 876 (consumer).
Note core, mcp, and tools each have two enabled: true sites — the second is inside the typecheck block. Check both.
Steps
- Introduce one shared switch, e.g.
enabled: process.env.LLXPRT_COVERAGE !== 'false', defaulting to on so local runs are unaffected. Prefer a single shared helper over 13 independent copies — a divergent 14th will otherwise appear.
- Set the disabling env var on all but one designated CI leg.
- Remove the redundant per-leg coverage artifact uploads (849), keeping the designated leg's.
- Confirm
post_coverage_comment (876) still finds its artifact.
Verification
cd packages/cli && npx vitest run --coverage.enabled=false --reporter=dot
# confirm test count unchanged, duration reduced
On the PR: confirm the coverage comment still posts and any coverage gate still evaluates.
Constraint
Do not drop an enforced coverage threshold. This removes redundant computation, not coverage visibility.
Sequencing
Compose with the dead-matrix removal: fewer legs first, then coverage on one of the survivors.
Compute coverage on a single CI leg instead of every leg
Summary
Coverage instrumentation is enabled unconditionally in every package's Vitest config, so it is computed on all four matrix legs while only one set of coverage artifacts is consumed.
Evidence
coverage: { enabled: true }appears in 11 package configs:The CI test job uploads a coverage artifact per matrix leg:
post_coverage_commentconsumes coverage from a single leg.Measured instrumentation cost on
packages/cli:Approximately 19s for one package on one leg, repeated across packages and legs.
Proposed work
Constraint
Coverage gates and the coverage comment must keep working. This issue reduces redundant computation; it must not reduce coverage visibility or drop an enforced threshold.
Acceptance criteria
Note
The matrix-leg count is itself being reduced by the sibling issue that removes the dead
secure-store-modedimension. These compose: fewer legs and coverage on one leg.Implementation plan
Files to edit
13
coverage.enabled: truesites across 11 packages:Plus
.github/workflows/ci.ymllines 845-849 (artifact upload) and 876 (consumer).Note
core,mcp, andtoolseach have twoenabled: truesites — the second is inside thetypecheckblock. Check both.Steps
enabled: process.env.LLXPRT_COVERAGE !== 'false', defaulting to on so local runs are unaffected. Prefer a single shared helper over 13 independent copies — a divergent 14th will otherwise appear.post_coverage_comment(876) still finds its artifact.Verification
On the PR: confirm the coverage comment still posts and any coverage gate still evaluates.
Constraint
Do not drop an enforced coverage threshold. This removes redundant computation, not coverage visibility.
Sequencing
Compose with the dead-matrix removal: fewer legs first, then coverage on one of the survivors.