Skip to content

test: fix broken typecheck script and add regression test - #405

Merged
nate-double-u merged 1 commit into
mainfrom
quality/fix-typecheck-baseurl
Nov 13, 2026
Merged

nate-double-u merged 1 commit into
mainfrom
quality/fix-typecheck-baseurl

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

npm run typecheck (tsc) has been failing immediately with:

tsconfig.json(4,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.

tsconfig.json extends @docusaurus/tsconfig, which still sets
baseUrl: "."; this repo's devDependency typescript is pinned to
~7.0.2, which removed that option outright, so the inherited value
hard-errors. The script was never invoked anywhere (local or CI), so this
had zero signal.

This PR overrides the inherited baseUrl to null in our own
compilerOptions (TS merges extends configs, and null strips the
inherited key), which makes npm run typecheck exit 0 cleanly again. It
also adds scripts/typecheck.test.mjs, a regression test that shells out
to npx tsc --noEmit and asserts a zero exit code — verified to fail
against the pre-fix tsconfig.json and pass against the fix. It's picked
up automatically by the existing scripts/**/*.test.mjs glob in
test:unit, so no .github/workflows/ change is needed for this part.

npm run test:coverage still reports 100% stmts/branch/funcs/lines across
all included files.

Related Issue

Part of #390 (the hive consolidated a new issue for this finding into the
existing #390 tracker as the same format-check.yml-related component; this
PR only fixes the local typecheck-script bug and adds a regression test —
wiring npm run typecheck into actual CI still needs a
.github/workflows/ change this lane's contributor-tier token cannot
push, same as the rest of #390)


Filed by quality agent (hold-gated mode). Human review required.

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

tsconfig.json extends @docusaurus/tsconfig, which still sets baseUrl.
typescript ~7.0.2 removed that option entirely (TS5102), so npm run
typecheck has been failing immediately with zero signal anywhere.

Override the inherited baseUrl to null in our own compilerOptions to
strip it from the merged config tsc evaluates. Add
scripts/typecheck.test.mjs, which shells out to npx tsc --noEmit and
asserts a zero exit code, so this is covered by the existing
scripts/**/*.test.mjs glob in test:unit with no CI workflow change
needed.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cncf-techdocs ready!

Name Link
🔨 Latest commit 3fe6725
🔍 Latest deploy log https://app.netlify.com/projects/cncf-techdocs/deploys/6af6cd6e29db26e9ce8690d8
😎 Deploy Preview https://deploy-preview-405--cncf-techdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified end-to-end; this looks correct to me.

  • Reproduced the bug: with origin/main's tsconfig.json, npx tsc --noEmit fails with TS5102: Option 'baseUrl' has been removed at tsconfig.json:4 (inherited from @docusaurus/[email protected], which sets baseUrl: ".", under the repo's typescript ~7.0.2 pin).
  • With this PR's tsconfig.json ("baseUrl": null override, tsconfig.json:10), npx tsc --noEmit exits 0 — the null override does strip the inherited key from the merged config, as the body claims.
  • scripts/typecheck.test.mjs passes under the same flags test:unit uses (node --experimental-strip-types --experimental-test-module-mocks --test), and the existing scripts/**/*.test.mjs glob in package.json:40 picks it up with no workflow change.

One note, not a defect: the regression test shells out to npx tsc --noEmit against the whole repo, so test:unit duration now includes a full typecheck (~a few seconds locally). Seems a fair trade for making a previously-dead script load-bearing.

Scope matches the body: fixes the local script + adds the test; CI wiring correctly deferred to #390. No trust surfaces touched.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

@nate-double-u
nate-double-u enabled auto-merge (squash) November 13, 2026 15:49
@nate-double-u
nate-double-u merged commit 3e36a51 into main Nov 13, 2026
9 checks passed
@nate-double-u
nate-double-u deleted the quality/fix-typecheck-baseurl branch November 13, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant