Skip to content

Commit eb41bcd

Browse files
committed
fix(service-cluster): re-baseline the type-source-resolution registry for the onboarded test program
Onboarding a `tsconfig.test.json` moves this package's tsc PROGRAM SET, which `check:type-source-resolution` judges per program. `service-cluster` had NO `typecheck` script before, so it ran zero counted programs; both deps the gate now reports are reached only through the program this change added. Taken on the onboarding limb the registry's own doc-block opens, on its three stated terms. Provenance measured four ways by varying only what `typecheck` names: absent with no script, absent naming `tsconfig.json` alone, PRESENT naming `tsconfig.test.json`. The build program carries no dist-resolved workspace type import at all, so the exposure is only reachable through the onboarded program rather than merely first seen there. `--list` before 57/78 packages, 118 programs, 288 pairs; after 58/78, 119, 290. +1 package, +1 program, +2 pairs -- this entry and nothing else. `paths` was measured rather than argued and is the wrong tool here: redirecting the two deps to source takes the test layer from 0 errors to 435, all TS6059 and all in `packages/spec/src` and `packages/core/src` -- another package's diagnostics billed to one that cannot pay them down (PR #12570, #8021). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
1 parent 0dfedeb commit eb41bcd

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

scripts/check-type-source-resolution.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,49 @@ const KNOWN_DIST_RESOLVED_TYPE_IMPORTS = {
586586
'@objectstack/lint', '@objectstack/mcp', '@objectstack/platform-objects',
587587
'@objectstack/plugin-auth', '@objectstack/spec', '@objectstack/types',
588588
],
589+
// #14181 re-baseline (the onboarding limb above): a NEW entry, reached ONLY
590+
// through `tsconfig.test.json` -- a program this card ADDED. This is the
591+
// limb's cleanest case rather than a borderline one: `service-cluster` had NO
592+
// `typecheck` script AT ALL before (its scripts were `build` and `test`), so
593+
// it ran ZERO counted programs and there is no pre-existing program for a dep
594+
// to be laundered through. Both deps here are annotated `via
595+
// tsconfig.test.json` by this gate's own failure text.
596+
//
597+
// Provenance measured four ways on one checkout, by varying only what the
598+
// `typecheck` script NAMES (`--list`, totals as printed):
599+
//
600+
// no `typecheck` script (origin/main) absent 118 programs / 288 pairs
601+
// names `tsconfig.json` only absent 118 programs / 288 pairs
602+
// names `tsconfig.test.json` only PRESENT 119 programs / 290 pairs
603+
// names both (this card) PRESENT 119 programs / 290 pairs
604+
//
605+
// Row 2 is the load-bearing one: the BUILD program carries no dist-resolved
606+
// workspace type import at all, so the exposure is not merely first SEEN
607+
// through the onboarded program, it is only REACHABLE through it. (The two
608+
// programs put the same files in -- this package's `tsconfig.json` has never
609+
// excluded tests -- so module semantics, NodeNext vs bundler, is the only
610+
// axis that differs.)
611+
//
612+
// Numbers, `--list` before/after on the same checkout (before at 44ffa2103,
613+
// after with this card applied):
614+
//
615+
// before 57 of 78 packages, 118 programs, 288 pairs, 21 clean
616+
// after 58 of 78 packages, 119 programs, 290 pairs, 20 clean
617+
//
618+
// so +1 package, +1 program, +2 pairs -- this entry and nothing else.
619+
//
620+
// Why the entry and not `paths`, which is what this gate's failure text asks
621+
// for: MEASURED both ways on the same checkout, and `paths` is decisively the
622+
// wrong tool here. Redirecting these two deps to source takes this package's
623+
// test layer from 0 errors to 435, ALL of them TS6059 (`not under rootDir`)
624+
// and every one of them in ANOTHER package's source -- `packages/spec/src/**`
625+
// and `packages/core/src/**` -- billed to a package that cannot pay them down.
626+
// That is the PR #12570 finding (+5 TS6133 for `rest`) and the #8021 one (247
627+
// TS6059) reproduced at a much larger scale, on a package whose entire point
628+
// in this card was to reach ZERO test-layer errors. Note the direction: the
629+
// #5286 route it took makes its OWN test files compile clean, and `paths`
630+
// would immediately re-bury that result under other packages' diagnostics.
631+
'@objectstack/service-cluster': ['@objectstack/core', '@objectstack/spec'],
589632
// #14386 re-baseline (the onboarding limb above): a NEW entry, reached ONLY
590633
// through `tsconfig.typecheck.json` -- a program that card ADDED (this
591634
// package's `typecheck` was a bare `tsc --noEmit` before it, with no sibling

0 commit comments

Comments
 (0)