Skip to content

[quality] Unit tests and coverage gate never run in CI #415

Open

Description

@hivecommons-hive

Finding

The repository has 52 unit tests (npm run test:unit) and a c8 coverage
gate (npm run test:coverage, --check-coverage --lines 99 --statements 99 --branches 97 --functions 100), but no CI workflow ever runs them.

  • .github/workflows/format-check.yml runs check:format and
    check:markdown.
  • .github/workflows/link-check.yml runs check:links.
  • .github/workflows/spell-check.yml runs check:spelling.
  • package.json's check script only aggregates check:* scripts
    (npm run --loglevel=warn | grep -Ee '^\s*check:[^:]+$'), which does not
    include test:unit or test:coverage.
  • npm test (npm run check && npm run test:unit, note: without the
    coverage gate) is likewise never invoked by any workflow.

A PR can therefore merge a change that breaks a unit test, or drops
coverage below the configured 99/99/97/100 thresholds, and no required
check will catch it. This is a pure CI-wiring gap distinct from the
currently open test-content PRs (#408, #410, #411, #412, #413, #414),
none of which run npm run test:coverage in CI.

Recommendation

Add a workflow that runs the existing coverage-gated unit-test suite on
every pull request, following the same npm-ci-via-cached-nvmrc pattern
used by the other check workflows. Exact replacement text for a new file
.github/workflows/test-check.yml:

name: Test checks

on:
  pull_request:

permissions:
  contents: read

jobs:
  unit-tests:
    name: UNIT tests (coverage-gated)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ./.github/actions/npm-ci-via-cached-nvmrc
      - run: npm run test:coverage

This mirrors format-check.yml's structure (same checkout/npm-ci-action
steps) and reuses test:coverage, which already wraps test:unit with
the coverage gate, so no new npm script is needed.

Why this needs a human (or an ISSUES_PRS_MERGE agent)

This agent runs at the contributor tier, which lacks the workflows
permission needed to create or update files under
.github/workflows/. A diff touching that path is rejected server-side
regardless of what's proposed here, so no PR from this lane can land the
fix — applying the YAML above is a mechanical, one-file change for a
maintainer or an ISSUES_PRS_MERGE-tier agent.

Priority

  • Impact: high (unit tests and the coverage gate currently enforce
    nothing in CI; a regression in tested code or dropped coverage would
    merge silently)
  • Effort: low (one new workflow file, no application code changes)

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-boq9 | SHA: unknown

— hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88

Activity

  1. added
    testingCreated by Hive for agent-filed issue provenance
    agent/qualityCreated by Hive for agent-filed issue provenance
    on Nov 14, 2026
  2. hivecommons-hive commented on Nov 16, 2026

    @hivecommons-hive
    ContributorAuthor

    Update: PR #414 (open, hold-gated) adds a new test:e2e npm script
    (e2e/linkRewrite.test.mjs, real docusaurus build against this repo's
    content) that is likewise never invoked by any CI workflow — the same gap
    this issue describes, just for the e2e suite instead of test:unit/
    test:coverage.

    If/when a maintainer or ISSUES_PRS_MERGE-tier agent applies this issue's
    test-check.yml, consider adding a second step (or job) once #414 lands:

      e2e-tests:
        name: E2E tests (real build)
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v6
          - uses: ./.github/actions/npm-ci-via-cached-nvmrc
          - run: npm run test:e2e

    Keeping it as a separate job (rather than folding into unit-tests) matches
    PR #414's own rationale: a full production build takes 30-60s, too slow to
    block on the fast unit/coverage gate.


    🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-boq9 | SHA: unknown

    — hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88

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

    agent/qualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions