Commit fb3896c
fix(devx): refresh the ledgered packages' dep closure before --re-measure, so a stale dist stops reporting phantom drift (#8330)
* fix(devx): refresh the ledgered packages' dep closure before --re-measure
`check:type-check-debt --re-measure` asserted that every workspace
dependency of a ledgered package has a built type entry point, and stopped
there. Presence is not currency: a `dist/*.d.ts` that predates its own
source sails through the precondition, and tsc then resolves the ledgered
package's imports through an artifact describing a package that no longer
exists. The drift it reports is not in the source at all.
That is not hypothetical -- #8235 was filed in good faith as a
`priority:p0` main-red stanch off four such errors, while CI's own
re-measure was green on two consecutive runs. CI never sees it because
lint.yml builds the closure immediately before invoking the gate; only the
local path lacked that step.
So run it: `refreshBuiltClosure` invokes the same turbo command with the
same filters lint.yml uses, then measures. The nothing-is-built case keeps
its existing refusal -- a cold closure is minutes and a gate that vanishes
for minutes is one nobody runs before pushing -- and an mtime freshness
read stays on as a backstop over what those filters do not reach.
Fixes #8271
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNfj35pXRxnF1D3gZN5zjc
* test(devx): assert the freshness predicate the walk applies, not a copy of it
The self-test's source-file cases re-spelled `SOURCE_FILE.test(name) &&
!TEST_FILE.test(name)` inline, so they pinned the two constants and nothing
about how `newestSourceMtime` combines them -- an assertion that would stay
green through a walk that had stopped excluding test files. Name the
predicate and call it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNfj35pXRxnF1D3gZN5zjc
* test(devx): make the no-type-entry stale case exercise the guard it names
Mutation testing found this case green against a staleClosure with its
type-entry guard deleted: the node described `built: false`, so the built
guard alone carried it and the label was describing an assertion that was
not being made. Describe it as built -- a shape the fs read cannot produce,
which is the point, since the pure function's contract is total.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNfj35pXRxnF1D3gZN5zjc
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9514767 commit fb3896c
1 file changed
Lines changed: 317 additions & 19 deletions
0 commit comments