From bb4f8277183cd676a130367361ea144e831f0b93 Mon Sep 17 00:00:00 2001 From: nzneit Date: Sat, 1 Aug 2026 14:39:13 -0400 Subject: [PATCH] chore(deps): take TypeScript 7 for the typecheck gate Raise the typescript devDependency from ^5.6.0 to ^7.0.2, the native (Go) port released 2026-07-08, discharging D-021's third deferred obligation. The typecheck script, tsconfig.json and CI step are unchanged; only the compiler behind `tsc --noEmit` moves. Recorded as D-022. Measured, not taken from the speed claim: - The full gate set exits 0 under 7.0.2: check-docs, lint, typecheck, demo-app:build, bun test (432 pass, 0 fail). - The gate is live, not silently narrowed. A planted error in each tsconfig include root exits 1 while the clean tree exits 0: a type mismatch in src/, a strictNullChecks violation in src/, a mismatch in test/, and a bad JSX element in demo-app/. This is the check that matters, since a fast pass and a skipped pass look identical from the exit code alone. - Both compilers agree on this tree: 5.9.3 and 7.0.2 each exit 0 on the unmodified working tree, so the bump is not bought with lost coverage. - Wall clock over 3 runs each: 5.9.3 = 1167/1138/1163 ms, 7.0.2 = 110/107/132 ms. - No cross-platform hazard: the 20 @typescript/typescript- packages are optionalDependencies carrying os/cpu constraints, and all 20 are recorded in bun.lock, so a darwin or win32 contributor resolves theirs from the same lockfile. TypeScript 7 ships tsc and nothing else: its lib/ has no tsserver.js and no programmatic typescript module API. Verified the repo is unaffected - nothing under src/, test/, scripts/, demo-app/ or bin/ imports typescript as a module, stryker.conf.json configures no checkers, and no editor tsdk is pinned in-repo. The consequence that does land is on editors set to "use workspace TypeScript version", which will fall back to their own bundled TypeScript; that is a per-developer setting, so AGENTS.md records it rather than working around it. --- AGENTS.md | 1 + DECISIONS.md | 16 ++++++++++++++++ bun.lock | 44 ++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 4 files changed, 60 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6c5f925..6354f4c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,5 +50,6 @@ All build tiers and v1 gates are `tested` (37 of 39 requirements): `model` → ` - **`bun test ` may exit 1 with zero failures** — the per-file coverage floor (bunfig.toml) judges partially-imported files. Exit 1 with 0 fails = coverage floor, not a test failure; gate on full `bun test` runs. - **Internal imports**: upward reaches (anything needing `../`) use `#src/…`/`#scripts/…` (package.json `imports`); same-directory and downward stay relative, explicit `.ts` extensions. Enforced by `test/import-style.test.ts` (D-013). - **Never run `biome migrate` unattended** (D-021). On this repo's v1 config it rewrites `"rules": { "recommended": true }` as `"rules": { "preset": "none" }`, which deletes the rule set instead of preserving it: `biome check .` then exits 0 on code containing `any`, `==` and unused vars, so the lint gate dies silently and CI stays green. The correct v2 spelling is `"preset": "recommended"`. After any biome config change, re-verify with a planted violation and check the **exit code**, not the printed summary. +- **TypeScript 7 ships `tsc` only** (D-022) — no `tsserver.js`, no programmatic `typescript` module API under `node_modules/typescript/lib`. Nothing in the repo imports it as a module, so gates and mutation runs are unaffected, but an editor set to "use workspace TypeScript version" finds no language server and silently falls back to its own bundled TypeScript. Expect the editor and the `typecheck` gate to be different compilers; when they disagree, `bun run typecheck` is the authority. - **Dependency bumps: refresh ≠ range change.** Taking a newer build of an already-declared range is routine; requiring a version you previously did not is a decision. `bun update` conflates them — it rewrites `package.json` floors even for packages whose version did not move — so refresh with `bun update`, then `git checkout package.json && bun install` to keep the change lockfile-only. Range changes get their own entry in `DECISIONS.md`, their own PR, and a measurement (D-020, D-021). - **CI (GitHub Actions)**: `.github/workflows/ci.yml` runs the gate set (`check-docs` → `lint` → `typecheck` → `demo-app:build` → full `bun test`) on PRs and main pushes; main pushes also upload `demo-app/dist/` + `coverage/` artifacts. Bun is pinned there (1.3.14) so the bunfig coverage-gate semantics stay as verified; bump the pin deliberately, in its own PR. A `main` ruleset requires the `gates` check (repo-admin bypass keeps direct pushes possible). Mutation testing stays out of CI (D-017). diff --git a/DECISIONS.md b/DECISIONS.md index 75dfdd3..28f6dc6 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -189,3 +189,19 @@ Append-only. Each decision has a stable never-reused `D-###` id, what was decide **Obligations**: three deferred, none blocking. **(1)** `aedes` 1.x stays deferred until R-006 (WS fidelity) and R-007 (capture the browser application's `connect()`) have run, because both spikes measure `broker/`'s **current** Aedes defaults and the ws stack underneath them; moving that floor first would invalidate the thing being measured, and `aedes-server-factory` — last published 2021-06-28, four years before this entry and nearly three years before aedes 1.0 — is not a maintained path to 1.x either. **(2)** `@biomejs/biome` 2.5.6 as its own PR, carrying the hand-corrected config and the ~34 code changes. **(3)** `typescript` 7.0.2 as its own PR: it is a three-week-old major of the compiler that gates CI, so it earns a deliberate decision rather than a quiet range change, and the ~10x speedup is a real reason to take it soon. **From**: a dependency review on 2026-08-01 covering all nine outdated packages; every behavioral claim above measured against the installed toolchain or the published tarballs, none taken from release notes. **Folds into**: bun.lock, AGENTS.md (working notes) + +### D-022: Take TypeScript 7 for the typecheck gate +**Date**: 2026-08-01 +**What**: Raise the `typescript` devDependency from `^5.6.0` to `^7.0.2` — the native (Go) port, released 2026-07-08. This discharges D-021's third deferred obligation. The `typecheck` script, `tsconfig.json` and CI step are unchanged; only the compiler behind `tsc --noEmit` moves. +**Why**: The gate gets roughly 10x faster for no source change and no configuration change, and the repo's `tsconfig.json` uses nothing the native port lacks. The reason D-021 deferred it rather than declining it was that a three-week-old major of the compiler that gates CI deserves a deliberate decision, not a quiet range change — this is that decision, taken on measurement rather than on the speed claim. +**Measured (2026-08-01, installed toolchain, Bun 1.3.14, linux-x64)**: +- **The full gate set exits 0 under 7.0.2**: `check-docs`, `lint`, `typecheck`, `demo-app:build`, `bun test` (432 pass, 0 fail). +- **The gate is live, not silently narrowed.** A planted error in each `include` root exits 1 while the clean tree exits 0: a type mismatch in `src/`, a `strictNullChecks` violation in `src/`, a mismatch in `test/`, and a bad JSX element in `demo-app/`. This is the check that matters, because a fast pass and a skipped pass look identical from the exit code alone. +- **Both compilers agree on this tree**: 5.9.3 and 7.0.2 each exit 0 on the unmodified working tree, so the bump is not being bought with lost coverage. +- **Wall clock over 3 runs each: 5.9.3 = 1167/1138/1163 ms; 7.0.2 = 110/107/132 ms.** +- **No cross-platform hazard.** The 20 `@typescript/typescript-` packages are `optionalDependencies` carrying `os`/`cpu` constraints, so each host installs only its own, and all 20 are recorded in `bun.lock` — a darwin or win32 contributor resolves theirs from the same lockfile. +**Mitigations / notes**: **TypeScript 7 ships `tsc` and nothing else.** Its `lib/` contains `tsc.js`, `getExePath` and `version` — there is no `tsserver.js` and no programmatic `typescript` module API. Verified that this repo is unaffected: nothing under `src/`, `test/`, `scripts/`, `demo-app/` or `bin/` imports `typescript` as a module; `stryker.conf.json` configures no `checkers`, so mutation runs never load it either; and no `.vscode`/`.zed` setting pins a workspace `tsdk`. The consequence that does land is on editors: anyone whose editor is set to "use the workspace TypeScript version" will not find a language server under `node_modules/typescript/lib` and will fall back to the editor's own bundled TypeScript, which means the editor and the gate can be running different compilers. That is a per-developer setting, not a repo one, so it is recorded rather than worked around. +**Consequences for earlier entries**: discharges obligation (3) of D-021. Obligation (1) (`aedes` 1.x, behind R-006/R-007) and obligation (2) (`@biomejs/biome` 2.x, with the `biome migrate` landmine that entry records) both remain open and unaffected. +**Obligations**: none deferred. +**From**: the dependency review of 2026-08-01 (D-021), which measured the bump as viable and deferred it to its own PR for the deliberate decision. +**Folds into**: package.json, bun.lock, AGENTS.md (working notes) diff --git a/bun.lock b/bun.lock index d0aa40c..8ff7cef 100644 --- a/bun.lock +++ b/bun.lock @@ -26,7 +26,7 @@ "mqtt": "^5.10.0", "react": "^19.1.0", "react-dom": "^19.1.0", - "typescript": "^5.6.0", + "typescript": "^7.0.2", }, }, }, @@ -231,6 +231,46 @@ "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="], + + "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="], + + "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="], + + "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="], + + "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="], + + "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="], + + "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="], + + "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="], + + "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="], + + "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="], + + "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="], + + "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="], + + "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="], + + "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="], + + "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="], + + "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="], + + "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="], + + "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="], + + "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="], + + "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="], + "abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="], "aedes": ["aedes@0.51.3", "", { "dependencies": { "aedes-packet": "^3.0.0", "aedes-persistence": "^9.1.2", "end-of-stream": "^1.4.4", "fastfall": "^1.5.1", "fastparallel": "^2.4.1", "fastseries": "^2.0.0", "hyperid": "^3.2.0", "mqemitter": "^6.0.0", "mqtt-packet": "^9.0.0", "retimer": "^4.0.0", "reusify": "^1.0.4", "uuid": "^10.0.0" } }, "sha512-aQfiI9w3RbqnowNCdcGMmCtxBFXN9bhJFcuZm24U5/NU06V3MCl42jWK2GUnu8rOypR2Ahi/aEcgq3w7CMcycg=="], @@ -717,7 +757,7 @@ "typedarray": ["typedarray@0.0.6", "", {}, "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="], - "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], "unbox-primitive": ["unbox-primitive@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "has-bigints": "^1.0.2", "has-symbols": "^1.1.0", "which-boxed-primitive": "^1.1.1" } }, "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw=="], diff --git a/package.json b/package.json index d93a156..63977a2 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,6 @@ "mqtt": "^5.10.0", "react": "^19.1.0", "react-dom": "^19.1.0", - "typescript": "^5.6.0" + "typescript": "^7.0.2" } }