[E00-S01-T10] Strict base tsconfig committed #377

Merged
kpcto merged 1 commits from feature/163 into main 2026-08-28 22:36:30 +00:00
Member

What changed

Makes both acceptance criteria for [E00-S01-T10] Strict base tsconfig committed (#163) enforceable rather than incidental. The strict tsconfig.base.json (ES2023 / NodeNext / strict family) and the per-package extends were introduced in E00-S01-T02; this change locks that state in with a regression suite:

  • tests/strict-tsconfig.test.mjs (new) — a node:test suite (zero dependencies, pnpm-lock.yaml untouched) that fails if the committed base config or any package's compilation under it ever drifts:
    • asserts the root tsconfig.base.json is committed and carries the strict family (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, useUnknownInCatchVariables, verbatimModuleSyntax) plus NodeNext module/moduleResolution and ES2023 target;
    • asserts every workspace package (apps/server, packages/core, extensions/example) commits a tsconfig.json that extends the root base config (../../tsconfig.base.json);
    • asserts every workspace package compiles under the strict base config: tsc -p <pkg>/tsconfig.json --noEmit with the workspace-resolved TypeScript (exact 6.0.3, E00-S01-T09) exits 0 for all three packages;
    • runs a non-vacuous strictness probe: a scratch file violating the strict family fails to compile under the committed base config with the expected error codes (TS7006, TS2532, TS2375, TS4114, TS18046), proving the flags are enforced, not merely declared.

Explicitly out of scope per the brief (not touched): TypeScript exact dependency (E00-S01-T09), apps/packages/extensions separation (E00-S01-T11), root build/test/typecheck commands (E00-S01-T12). No CI workflow changes — test-suite wiring in CI is E00-S05 by design (same as T05–T09); the existing CI job (frozen install + pnpm -r list on Node 24) stays green.

Criterion → test table

Acceptance criterion Test (fails without the committed config)
strict base tsconfig is committed tests/strict-tsconfig.test.mjs: "tsconfig.base.json is committed with the strict family enabled" — asserts compilerOptions.strict === true plus noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, useUnknownInCatchVariables, verbatimModuleSyntax, module/moduleResolution: NodeNext, target: ES2023. Mutation-probed: removing strict/a strict-family flag fails this test
strict base tsconfig is committed (all packages extend it) tests/strict-tsconfig.test.mjs: "every workspace package tsconfig.json extends the committed base config" — asserts apps/server, packages/core, extensions/example each extend ../../tsconfig.base.json. Mutation-probed: a package extending its own config instead fails this test
all packages compile under the strict base config tests/strict-tsconfig.test.mjs: "every workspace package compiles under the strict base config (tsc --noEmit)" — runs tsc -p <pkg>/tsconfig.json --noEmit (workspace-resolved TS 6.0.3) in each package and asserts exit 0
strictness is enforced (non-vacuous) tests/strict-tsconfig.test.mjs: "the committed base config enforces the strict family (non-vacuous probe)" — a scratch file violating the strict family must fail under the committed base config with TS7006 / TS2532 / TS2375 / TS4114 / TS18046

Test plan executed

  • Clean-state install from the branch (no node_modules), Node 24 (v24.20.0): pnpm install --frozen-lockfile → success, using pnpm v11.23.0, lockfile unchanged ✓
  • pnpm -r list --depth -1 (second CI step), Node 24 → lists all four workspace projects, exit 0 ✓
  • pnpm typecheck → all three packages pass tsc -p tsconfig.json --noEmit under the pinned 6.0.3 ✓
  • pnpm -r run build → all three packages emit under the strict base config ✓
  • node --test tests/strict-tsconfig.test.mjs → 4/4 pass ✓
  • Full suite node --test "tests/**/*.test.mjs" on Node 24 (v24.20.0) → 28/28 pass (10 architecture-import + 6 workspace-config + 5 node-engine + 3 typescript-pin + 4 strict-tsconfig), exit 0 ✓

Risks / notes

  • The suite asserts the exact strict-family flag set and the exact extends path; a deliberate tsconfig change must update the base config and this suite in the same change.
  • The compile/typecheck steps run the workspace-resolved TypeScript (exact 6.0.3) via node node_modules/typescript/bin/tsc, so they are deterministic regardless of cwd and need no network.
  • Pure config/regression change; rollback is a revert of this single commit.

Refs #163

## What changed Makes both acceptance criteria for [E00-S01-T10] Strict base tsconfig committed (#163) **enforceable** rather than incidental. The strict `tsconfig.base.json` (ES2023 / NodeNext / strict family) and the per-package `extends` were introduced in E00-S01-T02; this change locks that state in with a regression suite: - **`tests/strict-tsconfig.test.mjs`** (new) — a `node:test` suite (zero dependencies, `pnpm-lock.yaml` untouched) that fails if the committed base config or any package's compilation under it ever drifts: - asserts the root `tsconfig.base.json` is committed and carries the strict family (`strict`, `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`, `noImplicitOverride`, `useUnknownInCatchVariables`, `verbatimModuleSyntax`) plus NodeNext module/moduleResolution and ES2023 target; - asserts every workspace package (`apps/server`, `packages/core`, `extensions/example`) commits a `tsconfig.json` that extends the root base config (`../../tsconfig.base.json`); - asserts every workspace package compiles under the strict base config: `tsc -p <pkg>/tsconfig.json --noEmit` with the workspace-resolved TypeScript (exact 6.0.3, E00-S01-T09) exits 0 for all three packages; - runs a non-vacuous strictness probe: a scratch file violating the strict family fails to compile under the committed base config with the expected error codes (TS7006, TS2532, TS2375, TS4114, TS18046), proving the flags are enforced, not merely declared. Explicitly out of scope per the brief (not touched): TypeScript exact dependency (E00-S01-T09), apps/packages/extensions separation (E00-S01-T11), root build/test/typecheck commands (E00-S01-T12). No CI workflow changes — test-suite wiring in CI is E00-S05 by design (same as T05–T09); the existing CI job (frozen install + `pnpm -r list` on Node 24) stays green. ## Criterion → test table | Acceptance criterion | Test (fails without the committed config) | | --- | --- | | strict base tsconfig is committed | `tests/strict-tsconfig.test.mjs`: "tsconfig.base.json is committed with the strict family enabled" — asserts `compilerOptions.strict === true` plus `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`, `noImplicitOverride`, `useUnknownInCatchVariables`, `verbatimModuleSyntax`, `module`/`moduleResolution: NodeNext`, `target: ES2023`. Mutation-probed: removing `strict`/a strict-family flag fails this test | | strict base tsconfig is committed (all packages extend it) | `tests/strict-tsconfig.test.mjs`: "every workspace package tsconfig.json extends the committed base config" — asserts `apps/server`, `packages/core`, `extensions/example` each extend `../../tsconfig.base.json`. Mutation-probed: a package extending its own config instead fails this test | | all packages compile under the strict base config | `tests/strict-tsconfig.test.mjs`: "every workspace package compiles under the strict base config (tsc --noEmit)" — runs `tsc -p <pkg>/tsconfig.json --noEmit` (workspace-resolved TS 6.0.3) in each package and asserts exit 0 | | strictness is enforced (non-vacuous) | `tests/strict-tsconfig.test.mjs`: "the committed base config enforces the strict family (non-vacuous probe)" — a scratch file violating the strict family must fail under the committed base config with TS7006 / TS2532 / TS2375 / TS4114 / TS18046 | ## Test plan executed - Clean-state install from the branch (no `node_modules`), Node 24 (v24.20.0): `pnpm install --frozen-lockfile` → success, `using pnpm v11.23.0`, lockfile **unchanged** ✓ - `pnpm -r list --depth -1` (second CI step), Node 24 → lists all four workspace projects, exit 0 ✓ - `pnpm typecheck` → all three packages pass `tsc -p tsconfig.json --noEmit` under the pinned 6.0.3 ✓ - `pnpm -r run build` → all three packages emit under the strict base config ✓ - `node --test tests/strict-tsconfig.test.mjs` → **4/4 pass** ✓ - Full suite `node --test "tests/**/*.test.mjs"` on Node 24 (v24.20.0) → **28/28 pass** (10 architecture-import + 6 workspace-config + 5 node-engine + 3 typescript-pin + 4 strict-tsconfig), exit 0 ✓ ## Risks / notes - The suite asserts the exact strict-family flag set and the exact `extends` path; a deliberate tsconfig change must update the base config and this suite in the same change. - The compile/typecheck steps run the workspace-resolved TypeScript (exact 6.0.3) via `node node_modules/typescript/bin/tsc`, so they are deterministic regardless of cwd and need no network. - Pure config/regression change; rollback is a revert of this single commit. Refs #163
bot-implementer added 1 commit 2026-08-28 21:47:12 +00:00
test: lock in strict base tsconfig for all packages (E00-S01-T10)
CI / Frozen lockfile install (pull_request) Successful in 45s
4b5519465f
Member
role: tester
action: probe-start
issue: 163
pr: 377
branch: feature/163
head_sha: 4b5519465f66dc4e815ffcc83428bba063099678
base_sha: 9c76a64bee6b818ea86e2a91bde30e97939a453c
objective: independently verify acceptance criteria for #163
acceptance:
  - strict base tsconfig is committed
  - all packages compile under the strict base config
constraints:
  - never edit the implementer's tests in the same PR
method:
  - inspect tsconfig.base.json and per-package tsconfig.json
  - frozen-lockfile install on Node 24.20.0 + pnpm 11.23.0 (TS 6.0.3)
  - compile every workspace package: tsc -p <pkg>/tsconfig.json --noEmit
  - run full node --test suite incl. tests/strict-tsconfig.test.mjs
  - independent strictness probe (own scratch files under /tmp, not the implementer's test)
  - collect CI run links
status: started
```yaml role: tester action: probe-start issue: 163 pr: 377 branch: feature/163 head_sha: 4b5519465f66dc4e815ffcc83428bba063099678 base_sha: 9c76a64bee6b818ea86e2a91bde30e97939a453c objective: independently verify acceptance criteria for #163 acceptance: - strict base tsconfig is committed - all packages compile under the strict base config constraints: - never edit the implementer's tests in the same PR method: - inspect tsconfig.base.json and per-package tsconfig.json - frozen-lockfile install on Node 24.20.0 + pnpm 11.23.0 (TS 6.0.3) - compile every workspace package: tsc -p <pkg>/tsconfig.json --noEmit - run full node --test suite incl. tests/strict-tsconfig.test.mjs - independent strictness probe (own scratch files under /tmp, not the implementer's test) - collect CI run links status: started ```
Member
role: tester
action: probe-end
issue: 163
pr: 377
branch: feature/163
head_sha: 4b5519465f66dc4e815ffcc83428bba063099678
base_sha: 9c76a64bee6b818ea86e2a91bde30e97939a453c
verdict: PASS
status: complete

acceptance:
  - criterion: strict base tsconfig is committed
    result: PASS
    evidence: |
      tsconfig.base.json is committed at the workspace root and enables the
      strict family: strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes,
      noImplicitOverride, useUnknownInCatchVariables, verbatimModuleSyntax
      (plus isolatedModules, module/moduleResolution NodeNext, target ES2023).
      Every workspace package tsconfig.json extends ../../tsconfig.base.json.
  - criterion: all packages compile under the strict base config
    result: PASS
    evidence: |
      apps/server, packages/core, extensions/example each pass
      tsc -p <pkg>/tsconfig.json --noEmit with the workspace-resolved TypeScript
      6.0.3 (exit 0). pnpm typecheck exit 0; pnpm build exit 0.

reproduction:
  node: v24.20.0
  pnpm: 11.23.0
  typescript: 6.0.3
  install: pnpm install --frozen-lockfile -> exit 0, lockfile unchanged
  workspace_list: pnpm -r list --depth -1 -> 4 projects, exit 0
  typecheck: pnpm typecheck -> exit 0
  build: pnpm build -> exit 0
  tests: node --test "tests/**/*.test.mjs" -> 28/28 pass (incl. 4/4 strict-tsconfig)

independent_probe:
  note: own scratch files under /tmp; implementer's tests not modified
  violation_against_committed_base: |
    failing codes observed: TS7006, TS2532, TS2375, TS4114, TS18046 (exit 2)
  relaxed_copy_compile: exit 0
  conclusion: strict family is genuinely enforced, not merely declared

constraints_respected:
  - did not edit the implementer's tests
  - no files modified in the PR branch (local checkout only)

ci:
  - name: Frozen lockfile install
    run: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/51
    job: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/51/jobs/63
    conclusion: success
    note: CI wiring covers frozen install + workspace list only; test/typecheck
      wiring is E00-S05 by design, so compile/tests were verified locally above.

notes:
  - PR #377 net diff is test-only (adds tests/strict-tsconfig.test.mjs). The strict
    base tsconfig and per-package extends were already committed on main via the
    merged E00-S01-T02 (#369); this PR locks the state in with a regression suite.
  - Rollback: revert commit 4b55194.
```yaml role: tester action: probe-end issue: 163 pr: 377 branch: feature/163 head_sha: 4b5519465f66dc4e815ffcc83428bba063099678 base_sha: 9c76a64bee6b818ea86e2a91bde30e97939a453c verdict: PASS status: complete acceptance: - criterion: strict base tsconfig is committed result: PASS evidence: | tsconfig.base.json is committed at the workspace root and enables the strict family: strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, useUnknownInCatchVariables, verbatimModuleSyntax (plus isolatedModules, module/moduleResolution NodeNext, target ES2023). Every workspace package tsconfig.json extends ../../tsconfig.base.json. - criterion: all packages compile under the strict base config result: PASS evidence: | apps/server, packages/core, extensions/example each pass tsc -p <pkg>/tsconfig.json --noEmit with the workspace-resolved TypeScript 6.0.3 (exit 0). pnpm typecheck exit 0; pnpm build exit 0. reproduction: node: v24.20.0 pnpm: 11.23.0 typescript: 6.0.3 install: pnpm install --frozen-lockfile -> exit 0, lockfile unchanged workspace_list: pnpm -r list --depth -1 -> 4 projects, exit 0 typecheck: pnpm typecheck -> exit 0 build: pnpm build -> exit 0 tests: node --test "tests/**/*.test.mjs" -> 28/28 pass (incl. 4/4 strict-tsconfig) independent_probe: note: own scratch files under /tmp; implementer's tests not modified violation_against_committed_base: | failing codes observed: TS7006, TS2532, TS2375, TS4114, TS18046 (exit 2) relaxed_copy_compile: exit 0 conclusion: strict family is genuinely enforced, not merely declared constraints_respected: - did not edit the implementer's tests - no files modified in the PR branch (local checkout only) ci: - name: Frozen lockfile install run: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/51 job: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/51/jobs/63 conclusion: success note: CI wiring covers frozen install + workspace list only; test/typecheck wiring is E00-S05 by design, so compile/tests were verified locally above. notes: - PR #377 net diff is test-only (adds tests/strict-tsconfig.test.mjs). The strict base tsconfig and per-package extends were already committed on main via the merged E00-S01-T02 (#369); this PR locks the state in with a regression suite. - Rollback: revert commit 4b55194. ```
kpcto merged commit 24d1c1c9fc into main 2026-08-28 22:36:30 +00:00
kpcto deleted branch feature/163 2026-08-28 22:36:30 +00:00
Sign in to join this conversation.