Repository navigation
Description
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:unitWhy 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
hivecommons-hive commentedon Nov 12, 2026
Folded finding. This was filed as a separate issue, but 2 open agent-filed issues (plus 1 closed as completed in the last 14 days) already cite
format-check.yml, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] getBuildContext/getCurrentBranch branch coverage is non-deterministic (depends on ambient git state)
Finding
lib/getBuildContext.test.mtsandlib/getCurrentBranch.test.mts(added in #389)have one test each that exercises the deploy-preview / git-plumbing fallback
paths by calling
getCurrentBranch()/getGitHubRepoUrl()with no env varsset, relying on the ambient git checkout's real state to sometimes produce a
falsy result. Locally that is non-deterministic:
lib/getBuildContext.tslines 17-18 — theisDeployPreview ? getCurrentBranch() || 'main' : 'main'and... || repofallback branches only execute whengetCurrentBranch()/getGitHubRepoUrl()return falsy, which the existing test doesn't force.lib/getCurrentBranch.tsline 18 —return branch || undefined;only exercises the|| undefinedarm in detached-HEAD state (git branch --show-currentexits 0 with empty stdout), which the existing test doesn't force either.lib/getCurrentBranch.tslines 20-21 (thecatcharoundexecSync) had no test at all.Unit evidence:
npm run test:coverage(c8 +node --test, local run againstHEAD
cbee404) showedlibat 97.61% branch / 87.5% function... branchcoverage before this fix, with
getBuildContext.tsat 80% branch andgetCurrentBranch.tsat 80% branch, 90.9% line. End-to-end evidence: thisrepo has no e2e/integration suite (CI only runs
format-check.yml,link-check.yml,spell-check.yml), so these branches were covered byneither unit nor end-to-end tests — Priority 1.
Recommendation
Make the existing tests deterministic instead of relying on ambient state:
getCurrentBranch()/getGitHubRepoUrl()toundefined).getCurrentBranch()'s empty-string case.execSynccatch block.A PR with this fix is attached. After it,
lib/is 100% statements/branches/functions locally.Priority
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
Folded finding. This was filed as a separate issue, but 2 open agent-filed issues (plus 1 closed as completed in the last 14 days) already cite
format-check.yml, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] test:coverage has no --check-coverage regression gate
Finding
package.json'stest:coveragescript (c8 --reporter=text --reporter=lcov npm run test:unit, added in #397) reports coverage text/lcov output but never fails on regression: c8's defaults are 0% for branches/functions/statements and 90% for lines, so a coverage drop is invisible unless someone reads the printed table.#396 (closed, merged via #397) explicitly deferred adding
--check-coveragethresholds until the in-flight coverage PRs merged, to avoid landing the gate red. With #389/#392/#394/#401 merged,lib/is now 100% statements/branches/functions/lines, leaving onlyscripts/add-frontmatter.mjsat 97%/90.9% branch (tracked by #402, currently open).Unit evidence:
npm run test:coverageon HEAD (2484f9a) reports 99.09% statements, 97.77% branches, 100% functions, 99.09% lines overall. End-to-end evidence: this repo has no e2e/integration suite (CI only runsformat-check.yml,link-check.yml,spell-check.yml), so this is local/test-infrastructure only, not a coverage-gap finding.Recommendation
Add
--check-coveragewith thresholds set at (or just below) the currently achieved levels, sonpm run test:coverageexits non-zero the moment coverage regresses below what's already been earned — without requiring #390's CI wiring first, and without forcing 100% today while #402 is still open:"test:coverage": "c8 --reporter=text --reporter=lcov --check-coverage --lines 99 --statements 99 --branches 97 --functions 100 npm run test:unit"Once #402 merges this can be tightened to
--100(c8's shortcut for 100% on all four metrics) in a follow-up.Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-boq9| SHA:2484f9a— hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88
Folded finding. This was filed as a separate issue, but 2 open agent-filed issues (plus 1 closed as completed in the last 14 days) already cite
format-check.yml, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] typecheck script is broken (tsc TS5102 on removed baseUrl) and never run in check/test/CI
Finding
package.jsondefines atypecheckscript:Running it currently fails immediately, before checking a single file:
The repo's own
tsconfig.jsondoesn't setbaseUrlitself — itextends@docusaurus/tsconfig(pinned via@docusaurus/core/@docusaurus/tsconfig3.10.2), and that base config still sets"baseUrl": ".". This repo'sdevDependencies.typescriptis~7.0.2, and TypeScript 7 removedbaseUrlentirely (it's not just deprecated), so the merged config fails to parse.
Independently of that breakage,
typecheckis not wired into anything:npm run check(the combined check script) doesn't call it.npm test(check+test:unit) doesn't call it either..github/workflows/callsnpm run typecheck,npm run check, ornpm testdirectly —format-check.yml,link-check.yml, andspell-check.ymleach call their own narrowercheck:*script.So type errors in
lib/*.tsanddocusaurus.config.tscurrently have zerosignal anywhere — not locally via
npm test, and not in CI — independent ofwhether
tscitself is runnable.tsconfig.jsoncarries this comment, which suggests the gap may be at leastpartly intentional:
Filing this as an issue rather than a PR because a real fix likely needs a
dependency-version decision (bump
typescript's range to one compatible with@docusaurus/tsconfig'sbaseUrlusage, or bump@docusaurus/core/@docusaurus/tsconfigto a release that dropsbaseUrl) — that's aproduction-dependency change, outside the quality agent's testing-only PR
scope.
Recommendation
typecheckis meant to be a real, runnable gate or justeditor-experience config per the comment above. If the former:
typescript/@docusaurus/tsconfigversion mismatch sotsc --noEmitruns cleanly (e.g. pintypescriptto a~7.xrange thatstill supports
baseUrl, or wait for/upgrade to a Docusaurus tsconfigrelease without
baseUrl).typecheckintonpm run check(ornpm test) so type errors havelocal signal.
.github/workflows/**change,which this lane's
contributor-tier token cannot push (same ceiling as[quality] npm run test:unit never runs in CI — unit tests have no CI signal #390) — leave that step for a human/merge-tier agent once 1–3 land.
Priority
.tstype errors inlib/anddocusaurus.config.tscurrently ship with zero signal, local or CIFiled 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
Folded finding. This was filed as a separate issue, but 2 open agent-filed issues (plus 1 closed as completed in the last 14 days) already cite
format-check.yml, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] typecheck script fails with TS5102 and has no regression test
Finding
package.jsondefines atypecheckscript (tsc), but runningnpm run typecheckcurrently fails immediately:tsconfig.jsonextends@docusaurus/tsconfig, which still setsbaseUrl: ".". This repo's devDependencytypescriptis pinned to~7.0.2, which removed thebaseUrloption entirely, so the inheritedvalue now hard-errors instead of merely warning. The
typecheckscript wasnever invoked by
npm run check,npm test, or any.github/workflows/*.yml, so this has had zero local or CI signal.tsconfig.json's own comment ("This file is not used in compilation. It ishere just for a nice editor experience.") only refers to the build pipeline
(Docusaurus/webpack doesn't run
tsc); it does not mean thetypechecknpmscript itself is meant to be broken, so this PR fixes the script rather than
parking the question.
Fix (already implemented, see linked PR)
Override the inherited
baseUrltonullintsconfig.json's owncompilerOptions, which strips it from the merged config TS evaluates:{ "compilerOptions": { "baseUrl": null } }npm run typecheckthen exits 0 cleanly. A newscripts/typecheck.test.mjsregression test shells out tonpx tsc --noEmitand asserts a zero exit code, so this can't silentlyregress again; it's picked up automatically by the existing
scripts/**/*.test.mjsglob intest:unit(no CI workflow changerequired).
Remaining gap (needs a human / ISSUES_PRS_MERGE agent)
Wiring
npm run typecheckinto actual CI (e.g. a new.github/workflows/type-check.yml, mirroringformat-check.yml) stillrequires a
.github/workflows/**change this lane's contributor-tier tokencannot push. The regression test added here catches local/dev regressions,
but CI still has zero signal that
.tsfiles inlib/anddocusaurus.config.tstype-check.Priority
lib/*.ts/docusaurus.config.tshave nosignal anywhere right now; the broken script itself is also confusing for
contributors who try to run it
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
hivecommons-hive commentedon Nov 12, 2026
PR #401 covers this issue: #401
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.hivecommons-hive commentedon Nov 12, 2026
A merged PR addressed only part of this issue (
hive/partially-addressed); it stays open and actionable. Carrying the remainder back here so the next run targets what is still open.Not yet touched:
.github/workflows/,format-check.yml,link-check.yml,spell-check.yml,lib/getBuildContext.ts,lib/getCurrentBranch.ts,lib/getGitHubRepoUrl.ts,.github/workflows/unit-test.ymlRemainder from the PR body:
(folded tracker for format-check.yml-related findings; this PR
Remainder from the PR body:
#390's task-list sweep lists
package.jsonamong the not-yet-touched items; this PR addresses only that local-tooling portion. The remainder of #390 (adding.github/workflows/unit-test.ymlso the unit suite actually runs in CI) still needs a human or an ISSUES_PRS_MERGE agent, since this lane's contributor-tier token cannot push workflow-file changes.This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.
hivecommons-hive commentedon Nov 12, 2026
Verified: PR #401 (merged) addressed only the
getBuildContext/getCurrentBranchbranch-coverage portion that had been folded into this tracker ("Part of #390"). The original finding —npm run test:unitnever runs in CI, requiring a new.github/workflows/unit-test.yml— is unaddressed and still needs a human or ISSUES_PRS_MERGE agent, since this lane'scontributor-tier token cannot push workflow-file changes. Exact replacement text remains in the issue body above, unchanged.🐝 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
hivecommons-hive commentedon Nov 13, 2026
PR #403 covers this issue: #403
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.hivecommons-hive commentedon Nov 13, 2026
PR #405 covers this issue: #405
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.