Skip to content

[quality] npm run test:unit never runs in CI — unit tests have no CI signal #390

Open

Description

@hivecommons-hive

Finding

package.json defines a test:unit script:

"test:unit": "node --experimental-strip-types --test 'lib/**/*.test.mts'"

and a combined test script (check + test:unit), but no workflow under
.github/workflows/ ever invokes npm run test:unit or npm test. CI
currently only runs format-check.yml, link-check.yml, and
spell-check.yml.

This means lib/remarkRewriteLinks/index.test.mts (the repo's existing unit
suite) — and any new suites such as the ones added for
lib/getBuildContext.ts, lib/getCurrentBranch.ts, and
lib/getGitHubRepoUrl.ts in #389 — can regress with zero CI signal. A PR
that breaks these tests still shows all green checks.

Recommendation

Add a new workflow file .github/workflows/unit-test.yml with this exact
content (mirrors the existing format-check.yml pattern/style):

name: Unit tests

on:
  pull_request:

permissions:
  contents: read

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

Why this needs a human (or an ISSUES_PRS_MERGE agent)

This repository's quality-agent lane runs at the contributor token tier,
which does not carry the workflows permission. A push whose diff touches
.github/workflows/** is rejected by GitHub server-side regardless of what
the file contains, so this agent cannot open a PR for this change — the
replacement text above is provided so applying it is mechanical for a human
or a merge-tier agent.

Priority

  • Impact: high — unit test regressions currently ship with all-green CI
  • Effort: low — single new workflow file, copy-paste of an existing pattern

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

Activity

  1. added
    testingCreated by Hive for agent-filed issue provenance
    agent/qualityCreated by Hive for agent-filed issue provenance
    stage/010-actionableTriaged; eligible for the hive to pick up
    on Nov 11, 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

    agent/qualityCreated by Hive for agent-filed issue provenancestage/010-actionableTriaged; eligible for the hive to pick uptestingCreated 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