CI tsc step still a no-op after #57 fix: solution-style tsconfig makes npx tsc --noEmit typecheck 0 files #58

Closed
opened 2026-08-14 06:33:17 +00:00 by Mark · 0 comments
Owner

Kanban card: t_d3611bde (post-deploy probe)

Summary

Issue #57 ("CI tsc step swallows type errors with '|| true'") was closed and the fix commit 265ebb6 removed the || true from .forgejo/workflows/ci.yml. However, the tsc step is still dead code: it never fails, because the repository's root tsconfig.json is solution-style ("files": [] + references to tsconfig.app.json / tsconfig.node.json), so npx tsc --noEmit without -p typechecks an empty program.

The issue's stated goal — remove || true so the step actually enforces types — is not met. Type errors are still only caught downstream by npm run build → tsc -b, exactly as before. The false-sense-of-coverage problem the issue complains about persists.

Current state (verified on main, HEAD df2c1b3)

.forgejo/workflows/ci.yml build job:

- run: npm ci
- run: npx tsc --noEmit
- run: npm run build --if-present

Root tsconfig.json:

{
  "files": [],
  "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
}

npx tsc --showConfig -p tsconfig.json resolves 0 files.

Reproduction steps

  1. Clone Mark/chainbound, checkout main (HEAD df2c1b3).
  2. Inject a type error: echo 'const x: number = "string";' > src/engine/__probe_type_err.ts
  3. Run the exact CI command: npx tsc --noEmit
  4. Observe exit code.
Command Exit code Catches error?
npx tsc --noEmit (exact CI step) 0 NO
npx tsc --noEmit -p tsconfig.app.json 2 YES
npx tsc -b 2 YES
  1. Remove the probe file.

Actual behavior

The CI step npx tsc --noEmit exits 0 even with a type error in src/, so CI passes while type errors are silently ignored. || true was removed but the step is still a no-op.

Expected behavior

The CI tsc step should fail (non-zero exit) when type errors exist in the project, so CI actually enforces types.

Suggested fix

Change the CI step to npx tsc -b (or npx tsc --noEmit -p tsconfig.app.json), or drop the step entirely since build already runs tsc -b.

Regression note

No successful CI run exists on fix-era commits — post-fix runs on c87b880/31262e9/3f79dd4 were cancelled (superseded); runs on current HEAD were waiting at probe time. Runner forgejo-runner-nodedesk is up and executing, so queued runs should pick up. No green-CI confirmation on the fixed config yet.

**Kanban card:** t_d3611bde (post-deploy probe) ## Summary Issue #57 ("CI tsc step swallows type errors with '|| true'") was closed and the fix commit `265ebb6` removed the `|| true` from `.forgejo/workflows/ci.yml`. However, the tsc step is **still dead code**: it never fails, because the repository's root `tsconfig.json` is solution-style (`"files": []` + `references` to `tsconfig.app.json` / `tsconfig.node.json`), so `npx tsc --noEmit` without `-p` typechecks an empty program. The issue's stated goal — remove `|| true` so the step actually enforces types — is **not met**. Type errors are still only caught downstream by `npm run build` → `tsc -b`, exactly as before. The false-sense-of-coverage problem the issue complains about persists. ## Current state (verified on main, HEAD df2c1b3) `.forgejo/workflows/ci.yml` build job: ```yaml - run: npm ci - run: npx tsc --noEmit - run: npm run build --if-present ``` Root `tsconfig.json`: ```json { "files": [], "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }] } ``` `npx tsc --showConfig -p tsconfig.json` resolves **0 files**. ## Reproduction steps 1. Clone `Mark/chainbound`, checkout `main` (HEAD df2c1b3). 2. Inject a type error: `echo 'const x: number = "string";' > src/engine/__probe_type_err.ts` 3. Run the exact CI command: `npx tsc --noEmit` 4. Observe exit code. | Command | Exit code | Catches error? | |---|---|---| | `npx tsc --noEmit` (exact CI step) | 0 | **NO** | | `npx tsc --noEmit -p tsconfig.app.json` | 2 | YES | | `npx tsc -b` | 2 | YES | 5. Remove the probe file. ## Actual behavior The CI step `npx tsc --noEmit` exits 0 even with a type error in `src/`, so CI passes while type errors are silently ignored. `|| true` was removed but the step is still a no-op. ## Expected behavior The CI tsc step should fail (non-zero exit) when type errors exist in the project, so CI actually enforces types. ## Suggested fix Change the CI step to `npx tsc -b` (or `npx tsc --noEmit -p tsconfig.app.json`), or drop the step entirely since `build` already runs `tsc -b`. ## Regression note No successful CI run exists on fix-era commits — post-fix runs on c87b880/31262e9/3f79dd4 were cancelled (superseded); runs on current HEAD were `waiting` at probe time. Runner `forgejo-runner-nodedesk` is up and executing, so queued runs should pick up. No green-CI confirmation on the fixed config yet.
Mark 2026-08-14 06:33:17 +00:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No description provided.