Skip to content

coverage: a new src/scripts tool always drops integration coverage (nyc all:true) #1298

Backlog

Description

@chappie-daemon

Measured on PR #1297 (job 044): src/scripts/bench-gate.ts is fully exercised by the unit suite — 37 in-process cases plus 33 spawn cases — and Coveralls records unit coverage +0.3% to 75.356%. The integration job drops 0.6% because .nycrc.json sets "all": true over src/**/*.ts, so every new file under src/ counts against integration coverage even when nothing in the integration suite can reach it.

Both required check jobs pass (Unit Tests And Coverage, Integration Tests and Coverage); only Coveralls' integration status is red, and it is not a required context. So the row merged with a red, unrequired status rather than an unmeasured file.

The decision this needs

Two honest options, and it should be one repo-wide rule rather than a per-job judgement:

  1. Exclude the tool scripts (src/scripts/**) from nyc's include set, so the metric measures the service the tests exercise. Cost: export-events.ts is covered by an integration feature (test/integration/features/compression/compression-roundtrip.feature.ts:160 runs it through a local runCliScript), so excluding the directory drops real coverage of that file too.
  2. Give each tool an integration case, following that precedent. Cost: the helper is local to one feature file and integration tests are cucumber features, so a plain integration spec would need a shared helper first.

Acceptance

  • The rule is written where a maintainer changing .nycrc.json will read it, and applies to both suites.
  • Whichever way it goes, the next tool added under src/scripts/ does not need this discussion again.

Activity

  1. added
    test
    rewrite
    factory
    post-v4
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    factorypost-v4rewritetest

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions