You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check:type-check-debt --re-measure trusts stale dist/: phantom upward drift for ledgered packages whose deps resolve to build artifacts, unless the caller builds the closure first #8271
Split out of #8235 (closed: its "red on main" premise measured false) per the services seat's referral (comment 5274624869 on #6015). The measurement establishing the mechanism is the services seat's stale-premise check, comment 5274598357 on #8235 — read it before re-deriving anything here.
The defect
KNOWN_UNALIASED_TEST_IMPORTS packages (e.g. @objectstack/service-analytics, listed at scripts/check-test-source-alias.mjs:279) resolve workspace deps through exports → dist/ — no vitest.config.ts, no paths in tsconfig.json.
In CI (lint.yml), step 31 "Build the ledgered packages' dependencies" runs immediately before step 32's re-measure, so tsc always sees a dist/ matching current source.
Locally, pnpm check:type-check-debt --re-measure performs no closure build. Against a dist/ predating a sibling package's change, it reports upward ledger drift that does not exist in source.
Measured consequence: #8235 was filed in good faith as a priority:p0 "main-red stanch" off exactly this — four phantom errors (TS2614/TS2339/TS7006 against pre-#8198@objectstack/driver-sql artifacts) while main CI's step 32 was green on two consecutive runs.
Why it matters
The gate lies in the direction that manufactures false alarms: a careful reporter following the gate's own output escalates a queue-jumping p0 against a green gate. The mirror direction also holds — a stale dist/ can hide real drift locally until CI catches it, which defeats the point of running the gate before pushing.
Suggested directions (not prescriptive)
Make --re-measure build the ledgered packages' dep closure first (what CI step 31 does), or
Staleness detection: warn/refuse loudly when a resolved dep's dist/ is older than its src/, naming the un-built packages, or
A local --re-measure against a deliberately stale dist/ must either build the closure or name the staleness — it must not report phantom ledger drift. A regression fixture can stage this deterministically (touch a src/ file in a dep of any ledgered package, skip the build, run the gate).
Split out of #8235 (closed: its "red on
main" premise measured false) per the services seat's referral (comment 5274624869 on #6015). The measurement establishing the mechanism is the services seat's stale-premise check, comment 5274598357 on #8235 — read it before re-deriving anything here.The defect
KNOWN_UNALIASED_TEST_IMPORTSpackages (e.g.@objectstack/service-analytics, listed atscripts/check-test-source-alias.mjs:279) resolve workspace deps throughexports→dist/— novitest.config.ts, nopathsintsconfig.json.lint.yml), step 31 "Build the ledgered packages' dependencies" runs immediately before step 32's re-measure, so tsc always sees adist/matching current source.pnpm check:type-check-debt --re-measureperforms no closure build. Against adist/predating a sibling package's change, it reports upward ledger drift that does not exist in source.Measured consequence: #8235 was filed in good faith as a
priority:p0"main-red stanch" off exactly this — four phantom errors (TS2614/TS2339/TS7006against pre-#8198@objectstack/driver-sqlartifacts) whilemainCI's step 32 was green on two consecutive runs.Why it matters
The gate lies in the direction that manufactures false alarms: a careful reporter following the gate's own output escalates a queue-jumping p0 against a green gate. The mirror direction also holds — a stale
dist/can hide real drift locally until CI catches it, which defeats the point of running the gate before pushing.Suggested directions (not prescriptive)
--re-measurebuild the ledgered packages' dep closure first (what CI step 31 does), ordist/is older than itssrc/, naming the un-built packages, orAcceptance shape
A local
--re-measureagainst a deliberately staledist/must either build the closure or name the staleness — it must not report phantom ledger drift. A regression fixture can stage this deterministically (touch asrc/file in a dep of any ledgered package, skip the build, run the gate).Related (checked for duplicates before filing)
check-test-source-aliasremediation-hint defect; different gate.check:type-check-debt的 ledger 余量会让新写的 pin 变哑:mongodb 曾有 33 条余量吞掉一次真实回退,另有 5 条目前带 4–19 余量 #6376 — ledger-slack blindness; different failure mode of the same gate.