Uh oh!
There was an error while loading. Please reload this page.
build(trigger-record-change): graduate the package out of the TEST_DEBT ledger - #11489
Conversation
…BT ledger `check:type-check-debt --re-measure` reported TEST_DEBT 9 against a measured 0 for `@objectstack/trigger-record-change`. The 0 re-derived on current main (7f30b6b) and holds, so this is a graduation rather than a ceiling lowering. The gate's graduation message offers two remedies as interchangeable. Neither description fitted this package, and both halves were measured before choosing: * "add a `typecheck` script" — it already had one (`tsc --noEmit`). The hole was TESTS_COVERED (src checks, tests hidden by `**/*.test.ts` in the build tsconfig), not COVERED. * "drop the test exclusion" — resolves exactly the 10-file program the ledger scored at 0 (`tsc --showConfig`) and leaves `dist/` byte-identical, but the 7 re-admitted tests import @objectstack/driver-sql, /formula, /objectql and /service-automation, which the build config's program never held: `check:type-source-resolution` goes exit 0 -> exit 1 naming all four, against a shrink-only registry whose own message rules that widening the entry is not the fix. So it takes the sibling-config route the repo already uses for `packages/spec`, `client`, `metadata-core` and `metadata-fs`: a `tsconfig.test.json` named by the `typecheck` script, putting the same 10 files in front of tsc while the build config — the only one that gate reads — is untouched. The ledger entry is deleted in the same commit, as the gate's structural half requires. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. |
Uh oh!
There was an error while loading. Please reload this page.
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 32673631029 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#11204
check:type-check-debt --re-measurereported@objectstack/trigger-record-changeas a graduation candidate: TEST_DEBT records 9, tsc reports 0.
Premise re-derived on current
mainRe-run on
origin/main@7f30b6be(full closure built first — 70/70 turbo tasks —then
node scripts/check-type-check-coverage.mjs --re-measure, 273.9s):Still a graduation, not a ceiling lowering. No other package's entry is touched.
The
0is a reading, not a zero-hitA misconfigured invocation reports
0too, so the measurement was controlled twice.File census. The generated re-measure project puts 10 files from this package
in the program — 3 src + all 7 tests — out of 467 total (
tsc --listFiles).Planted error. A type error appended to
src/formula-context.test.ts(markergrepped on disk, blob hash compared before/after):
So the program really reads the test layer, and
0is its verdict about it.The gate's two remedies are NOT interchangeable here — measured
The graduation message offers "add a
typecheckscript"or"drop the testexclusion". Neither description fitted this package.
Remedy 1 was already done. The package has carried
"typecheck": "tsc --noEmit"all along. It was never in DEBT's hole ("src does not check"); it was in TEST_DEBT's
("src checks, tests are hidden" —
**/*.test.tsin the build tsconfig'sexclude).Remedy 2 turns
mainred. Dropping the exclusion is harmless in the two placesone would check, and fails in a third:
tsc --showConfigresolved filesdist/afterpnpm --filter … buildsrc/index.tsalone)check:type-source-resolutionThe failure:
The 7 re-admitted tests import four workspace packages the build config's program
never contained, and that registry is shrink-only with set equality — its own message
rules that widening the entry is not the remedy. The remedy it does ask for (
pathsrules onto those four dependencies' source) is a separate card by that gate's explicit
ruling: "Remediation is per-package and lands as its own card, because the switch is
not free."
What this PR does instead
The sibling-config route the repo already uses for
packages/spec,client,metadata-coreandmetadata-fs(the #5286 mechanism):packages/triggers/trigger-record-change/tsconfig.test.json— extends thebuild config, drops
**/*.test.tsfromexcludeand nothing else, assertsnoEmit.Module semantics,
rootDirand strictness are all left inherited on purpose: theledger's
0was measured under those settings (and reported TS6059 x0, so there is nomisconfiguration diagnostic to neutralise). A different
modulewould be a differentmeasurement.
typecheckbecomestsc --noEmit && tsc --noEmit -p tsconfig.test.json, so thesibling is named — a config no script invokes reads as coverage and delivers none.
requires. The prose above
TEST_DEBTrecords why both advertised remedies missed.tsconfig.json— the only configcheck:type-source-resolutionreads — is untouched,so that gate's declared population is unchanged.
Resulting program (
tsc --showConfig -p tsconfig.test.json): 10 files,modulenodenext,
rootDir./src,stricttrue — byte-for-byte the file set the0wasmeasured over.
Verification (all at
1a383fa3)Positive control on the wired script, not just the synthetic project — a planted error
in
src/record-change-trigger.test.tstakespnpm --filter … typecheckfrom exit 0 toexit 2 (
error TS2322), restored byte-identical:The 17-family floor from
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackall exit 0. The two that carry this change:
What moved,
origin/main@7f30b6be→ this branch @1a383fa3:The unchanged 1897 is the check that no other ceiling moved: a 0-error entry left the
ledger and nobody else's number did.
Changeset
Labelled
skip-changeset. The diff is a build-timetypecheckscript, a tsconfig thepackage does not publish (
filesisdist/ README / CHANGELOG), and a CI-internalgate script.
dist/was measured byte-identical, so this PR releases nothing.Filed separately, not addressed here
check:type-source-resolutionreads each package'stsconfig.jsonand only that one,so a sibling
tsconfig.test.json— this repo's own supported repair, now in fivepackages — puts a whole tsc program outside its declared population.
worked counterexample in both directions.
Generated by Claude Code