Commit ccc28ff
committed
ci(typecheck): the ratchet judges the test layer too — 27 "covered" packages were hiding their tests (#4311)
#4324 counted a package covered the moment it declared a `typecheck` script.
But `tsc --noEmit` reads the package's own tsconfig.json, and 27 of the 48
packages that gate waved through `exclude` `**/*.test.ts` from exactly that
file — so COVERED and REAL both passed while nothing read the test layer, which
is the source #4311 is actually about. Measured by lifting each exclusion and
re-running the package's own config: 568 test files, 1451 errors, behind a
green check. `spec` alone hid 902 across 272 files; `plugin-approvals` hid 467,
more than driver-sql's 241, with a clean src.
What changed:
1. New TESTS_COVERED invariant + TEST_DEBT ledger in
scripts/check-type-check-coverage.mjs. A package that excludes its own tests
must carry a measured entry; RECONCILED runs both ways, so dropping the
exclusion without deleting the entry fails, and so does the reverse. Test
files are counted under the tsconfig's `include` roots — `exclude` only
subtracts from what `include` selected, and several packages keep a sibling
`test/` tree that `include` never mentions. Six new self-test cases (18
total). The summary line now prints both layers: reporting only the src
figure is how 48/77 read as green over 568 unchecked files.
2. Nine packages that were already clean with tests included had the exclusion
deleted outright: sdui-parser, plugin-audit, plugin-email, plugin-hono-server,
plugin-pinyin-search, plugin-reports, trigger-api, trigger-schedule,
connector-slack.
3. 44 relative imports repaired to carry the `.js` extension NodeNext requires.
This was filed as config-tier noise and is not: an unresolved import degrades
every symbol it names to `any`, and the callbacks over those symbols then
report TS7006 "implicitly any". The 44 fixes closed 110 errors across eight
packages — and exposed 12 real defects in service-settings (manifest action
handlers called without `namespace`/`actionId`) that the broken imports had
been masking. Its ledger entry said "no code-tier finding"; it was wrong in
both directions, and now says so.
4. Nine packages graduate out of DEBT (types, create-objectstack, service-cache,
service-i18n, service-job, service-messaging, service-queue, service-realtime,
plugin-approvals). Three tsconfig repairs: `types:["node"]` for types (107
errors, one line), `exclude: src/templates` for create-objectstack (scaffolding
copied verbatim by tsup, whose imports resolve in the generated project, not
this one), `lib: ES2021` for plugin-approvals (String.replaceAll).
plugin-approvals graduates on src only and carries a TEST_DEBT entry — its 13
test files are still excluded.
Coverage: 48/77 -> 57/77 src-covered; DEBT 29 -> 20 entries (679 raw errors);
TEST_DEBT 21 entries (652 files, 2243 raw errors) newly visible.
No non-test source file changes. Verified: self-test 18/18, coverage gate,
`turbo run typecheck` 119/119, `pnpm test` 132/132, eslint, check:published-files.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011m13wbaZziPveBdtQthrXd1 parent b07d829 commit ccc28ff
52 files changed
Lines changed: 316 additions & 106 deletions
File tree
- .changeset
- packages
- connectors/connector-slack
- create-objectstack
- plugins
- plugin-approvals
- plugin-audit
- plugin-email
- plugin-hono-server
- plugin-pinyin-search
- plugin-reports
- sdui-parser
- services
- service-cache
- src
- service-i18n
- src
- service-job
- src
- service-messaging
- src
- service-queue
- src
- service-realtime
- src
- service-settings/src
- manifests
- translations
- triggers
- trigger-api
- trigger-schedule
- types
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
0 commit comments