build(typecheck): graduate cloud-connection, observability and hono from the DEBT ledger (#20800) - #21038
Conversation
…nection, observability, hono WIP: sibling tsconfig.test.json files, the typecheck wiring and the test-layer repairs. The hono header, the DEBT entry deletions and the re-measured numbers follow. Claude-Session: https://claude.ai/code/session_01VvcEokUG1tvVxkceYfR5XB Co-authored-by: Claude <noreply@anthropic.com>
…rom the DEBT ledger The hono test-config header, the three DEBT entry deletions and the graduation record in check-type-check-coverage.mjs. Claude-Session: https://claude.ai/code/session_01VvcEokUG1tvVxkceYfR5XB Co-authored-by: Claude <noreply@anthropic.com>
…pecheck-graduation
📓 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. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contract reviewServed-tier: ① Derived judgmentsInputs: card #20800 body, claim (a) Per package.
(b) Code-tier repairs, file by file. Banned-form grep over the diff's ADDED lines:
(c) Deviation — (d) Deviation — (e) (f) Test lines. Changed lines matching ② Semver level
③ Boundary flagsDeviations, each judged:
Out-of-scope observation (TS2883 withheld while semantic errors stand). The DEBT doc-block says every entry "was measured by running the package's own Check-runs on the head, collapsed latest per name, converged (35 names, 0 pending at the final read): required seven all Implemented-by: VERDICT: PASS Generated by Claude Code |
Queue hold:
|
…pecheck-graduation Claude-Session: https://claude.ai/code/session_01VvcEokUG1tvVxkceYfR5XB Co-authored-by: Claude <noreply@anthropic.com>
Fixes #20800
Clause-②: no
The last three packages of the #4311 type-check ledger,
@objectstack/cloud-connection,@objectstack/observabilityand@objectstack/hono, now type-check their own test layer. Each gets a siblingtsconfig.test.jsonnamed by a newtypecheckscript, every code-tier error is repaired at its cause inside the test layer, and the threeDEBTentries are deleted rather than lowered.DEBTinscripts/check-type-check-coverage.mjsnow holds@objectstack/spec-monorepoalone;@objectstack/consolestaysEXEMPT, as the card says.What changed
packages/{cloud-connection,observability,adapters/hono}/tsconfig.test.jsonnoEmit,module: esnext/moduleResolution: bundler,libES2022 (hono keeps itsDOMlibs). Strictness,paths,rootDirandtypesare inherited and not re-declared. Each header carries its own measured readings.packages/{cloud-connection,observability,adapters/hono}/package.jsontypecheck=tsc --noEmit && tsc --noEmit -p tsconfig.test.json, the zero-residue shapemetadata-fsandtrigger-record-changeuse: no per-package ledger, no new dependency, no lockfile change.@ts-expect-error, nosrcsignature widened.scripts/check-type-check-coverage.mjsDEBTentries deleted, plus one graduation paragraph in the same style as the ones above it. No gate logic moved.Both readings, before any fix
Taken at
f8178ffece(origin/main) with the workspace closure built first, once per config:tsc --noEmit --pretty false --listFiles -p tsconfig.json(the build config) and the same with the newtsconfig.test.json.@objectstack/cloud-connection@objectstack/observability@objectstack/honoThe build-config column reproduces the ledger exactly (13 / 11 / 3). All three build configs already included the tests and never excluded them, so the program that reads them always existed; no script ever ran it. That is the
service-automationshape, not an exclude-and-compensate one.After: every config of every package reads 0, and
typecheckexits 0 for all three.Each error repaired at its cause
cloud-connection-plugin.test.tsx3,connection-credential-store.test.tsx4 (7 declarations)vi.fn(async () => new Response(...))declared with no parameters, so vitest typesmock.callsas empty tuples, and the test indexescalls[0][0]/[1]vi.fn(async (_url: string, _init?: RequestInit) => ...), the shapefetch(url, init)is always called with in the pluginmarketplace-install-local-bundle.test.tsx2Array#atunder the build config'slibES2020mock.lastCall, not a widening of the shared build config (theservice-storagecall recorded in the ledger prose). The test config also carries ES2022, but the first leg oftypecheckreads these files under ES2020 too, so the file itself had to compile under botherror-exporters.test.ts,loggers.test.ts,metrics-exporters.test.tsErrorReporter,Logger,MetricsRegistry). The source signatures were not widenedotlp-http.test.tsfetchparameter namedRequestInfo, a DOM-lib name this program does not havehono.test.tsnew Hono()declares noVariables, soc.get('objectStack')takesneverand returnsunknownKernelEnvtype argument declaringobjectStack(the middleware doesc.set('objectStack', kernel))src/__mocks__/runtime.tsvi.fn()fields are annotatedMockA finding for the reviewer: hono's "3" was not its whole pile
With the three semantic errors repaired, the hono test config reported four more: TS2883 on the four
vi.fn()class fields ofsrc/__mocks__/runtime.ts(the inferred type cannot be named without a reference toProcedureinside the pnpm store). tsc withholds declaration-emit diagnostics while any semantic error stands, so the first reading could not show them, and the build config never shows them at all (it exits 0 on that file; only thebundlerresolution reports it). Observed in two states: state A (original files) reads 3 errors and no TS2883; state B (hono.test.tsrepaired, mock not yet) reads exactly 4 TS2883 and nothing else. The repair is a test-support annotation; the file is a vitest alias target (vitest.config.ts), never built or published.Nothing was hiding behind the other two: for cloud-connection and observability both configs read 0 once the listed errors were repaired.
Acceptance, measured
All at head
5f4aa15801unless stated (the branch is two commits plus a merge oforigin/mainat9b0de7de73, taken so the derived gate list was not read from a stale tree; closure rebuilt after the merge).pnpm --filter PKG run typecheckexits 0 for all three; each run echoes thetypecheckscript name.pnpm check:type-check-coverage: OK, "79/80 workspace packages type-checked (plus the root), 1 in the DEBT ledger (26 frozen raw errors), 1 exempt".pnpm check:type-check-debt: OK, "1 ledger entr(ies) re-measured ... none above its recorded number", surplus none.it(,test(ordescribe(line.scripts/ablation-replace.mjs(anchor must hit once, blob change proven, restore proven) in one test file per package that this PR does not otherwise edit: the copyright line ofmarketplace-public-url.test.ts,perf-timing.test.tsandhono-wildcard-fallthrough.test.tsreplaced by a line assigning a string to anumber. Eachtypecheckexited 2, naming that file (TS2322 and TS6133), and each restore left the blob equal to HEAD withgit diff HEADempty. Direction observed: turns red, as expected.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsderived 82 families; all 82 were run one by one with the exit code captured before any pipe, and--ranreconciles "82 derived, 82 run, 0 NOT-MEASURED, 0 UNRUN".check:pm-dispatch-gatesneeded the detached form its own header prescribes (about 17 minutes on this shared box; its first two foreground attempts were cut by my own timeout and are not counted).pnpm lintexits 0 over the whole repo at5f4aa15801.Changeset
None written. The diff changes no file the three packages ship:
files[]isdist,README.mdandCHANGELOG.md; thedistbuild is fromsrc/index.tsand reaches no test file or__mocks__; and after building the three packages, a grep of theirdistfor every symbol this PR introduced (KernelEnv,lastCall, the_initparameter,type Mock) found nothing, while a positive control (CloudConnectionPlugin,InMemoryErrorReporter,createHonoApp) hit in each. The only shipped-manifest change is thescriptsblock of eachpackage.json. The seat appliesskip-changeset.Acceptance notes
@objectstack/spec-monorepo(root entry, 26) is untouched, as the card says. ItscompositionAtstaleness notice is the same onemainprints.pnpm testfor the whole repo, the full dogfood set); they are CI's.Generated by Claude Code