Skip to content

feat: Node CI scaffold picks the coverage step by test runner (bun:test, node:test) #466

Backlog

Description

@jflowers

Problem

gaze init --ci writes one Node test step, npm test -- --coverage
(internal/scaffold/assets/ci/gaze-ai-report-node.yml). That works only for
vitest or jest. Most TypeScript repos we want to report on use bun:test or
node:test, and neither writes coverage from npm test -- --coverage.

The jflowers/opencode-* plugins show the spread: 5 of 7 use bun:test, one uses
node:test, and one uses vitest.

Proposal

Pick the test step by runner when scaffolding:

Runner (detected by) Test step
Bun (bun.lock / bunfig.toml, or bun test in scripts.test) oven-sh/setup-bun, bun install --frozen-lockfile, bun test --coverage --coverage-reporter=lcov
node:test (node --test in scripts.test) node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=coverage/lcov.info
vitest / jest unchanged

Both lcov variants write coverage/lcov.info. Bun's file has root-relative SF
paths and DA line hits but no FN/FNDA records. node:test's has both. The
report job stays the same: it needs Node only for the analyzer.

Dependency

The analyzer has to read lcov. reading-stone reads only Istanbul
coverage/coverage-final.json today; lcov input is being specified in
zero-dot-force/reading-stone. Until that ships, the Bun and node:test variants
would produce an empty coverage report, so this should land after it, or behind
a check.

Related: #425 (lockfile-aware package-manager detection) covers the install step
that this issue builds on.

Evidence

Trial on jflowers/opencode-session-search (bun:test, 44 tests): bun test --coverage --coverage-reporter=lcov wrote coverage/lcov.info, and gaze quality ./src/... --analyzer gaze-analyzer-typescript mapped all 44 tests
(average contract coverage 30%).

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    ci
    on Dec 3, 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

    cienhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions