Skip to content

type-check coverage: graduate the last three DEBT packages (cloud-connection, hono, observability) — the remainder of #4311 #20800

Closed

Description

@objectstack-fleet

Filed by the triage seat (objectstack-wide, seat post #6015, session_01AavokzJ5DndAwitDXvKy4U) as the one carrier the maintainer's 「4311 关」 creates. ⛔ Not a claim, ⛔ not a dispatch. Graded here: tooling · priority:p3 · domain:cli · area:devpath · pm:queue.

Where #4311 ended

#4311 (July) measured 66 of 77 packages building with tsup and no tsc reading them, with 380 code-tier errors across 18 packages. Its three proposals have all landed on main (read at 41dcf11884):

  1. The coverage ratchet. pnpm check:type-check-coverage fails any package that neither declares typecheck nor carries a measured DEBT/EXEMPT ledger entry; check:type-check-debt re-measures each ledger number. 70 of 74 workspace packages under packages/ now declare typecheck (2 in July).
  2. The test-layer template. Per-package tsconfig.test.json files named by the typecheck script; 20 packages hold a per-file test-typecheck-debt.json.
  3. The code-tier burn-down. driver-sql (241 of the 380) and the other big entries graduated.

What is left (this card)

Three packages still have no typecheck script and sit in the DEBT ledger of scripts/check-type-check-coverage.mjs. All three are domain:cli surfaces:

package ledgered ledger note
@objectstack/cloud-connection 13 code-tier 11 (TS2493 tuple indexing) + 2 config-tier
@objectstack/observability 11 all code-tier (TS2554 wrong arity ×10, TS2552)
@objectstack/hono (packages/adapters/hono) 3 all code-tier (TS2769 / TS18046)

Direction, per package (the road #15048 / #15050 took):

  • Add a tsconfig.test.json over the test layer and a typecheck script that names it.
  • Re-measure first and say both readings (the build config vs the test config), so config-tier and code-tier are separated before anything is fixed.
  • Fix each code-tier error at its cause: a mock typed to the call site it stubs, the call's real arity. ⛔ No cast, ⛔ no @ts-expect-error, ⛔ no widened source signature to make a test compile.
  • Delete the DEBT entry, don't lower it. The gate's RECONCILED direction then holds the package.

A package whose errors turn out to be a real source defect (not a test shape) is split to its own card instead of being fixed under this one.

Not here:

  • @objectstack/console is EXEMPT (a published objectui build artifact with no TypeScript sources). That is correct and stays.
  • The spec-monorepo root entry (26, almost all one missing types:["node"] on the root program). It is not a package and moves with scripts/; it is not this card's.

Why p3. Each package is covered by the ratchet, so nothing can regress silently; what remains is 27 ledgered errors in three small packages, and no user is measured waiting on them.

Activity

  1. objectstack-fleet commented on Oct 1, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1 of the domain:cli seat's session session_01VvcEokUG1tvVxkceYfR5XB (batch 3): priority:p3 tooling (the type-check coverage of three published domain:cli packages), triage's direction on the card body, filling a free slot under the maintainer's instruction 「任务很多,并发保持3」
    Session: session_01VvcEokUG1tvVxkceYfR5XB
    Account: huangyiirene
    Branch: claude/issue-20800-typecheck-graduation
    Worktree: objectstack-issue-20800
    Domain: domain:cli
    Seat: domain:cli#1
    File surface:

    • packages/cloud-connection/, packages/observability/, packages/adapters/hono/, the test layer only:
      • in each package, a new tsconfig.test.json over the test layer and a typecheck script in package.json that names it;
      • each code-tier error fixed at its cause in the test file: a mock typed to the call site it stubs, or the call's real arity.
      • ⛔ No cast, ⛔ no @ts-expect-error, ⛔ no widened source signature.
    • scripts/check-type-check-coverage.mjs: delete the three DEBT entries (about :809–:819 on f8178ffece), and do not lower them. This is a declared cross-lane surface, a gate's ledger rows: no gate logic moves.
    • A changeset only if a published file changes. Otherwise none, and the seat applies skip-changeset.
    • ⛔ Not here:
      • @objectstack/console (EXEMPT, correct);
      • the spec-monorepo root entry;
      • any source change in src/** of the three packages. A package whose errors turn out to be a real source defect, not a test shape, is reported for its own card, per the direction.
        (stop on a breach outside these; explain in the report)
        Container & model: M, mode:subagent, model: sonnet (dispatch-gates --tier: no path-derived mandate, floor sonnet · default opus · ceiling fable). This is mechanical test-layer typing against a direction that names the remedy shape, with build(http-conformance): give the last of the eight packages a test-layer type-check program #18692 as precedent.
        Clause-②: no
        Thread-read: none
        Serial constraints cleared: No open PR touches the three packages or scripts/check-type-check-coverage.mjs (the file lists of all 21 open PRs were read in this act, main f8178ffece). In flight on this seat: #20620 (packages/cli migrate printer) and PR #21003 (#20825: packages/cli compile / validate / utils, packages/lint), both disjoint. area:devpath: #20620 is in flight, and its file surface is disjoint from this one.

    Taken 2026-10-01, main f8178ffece.

    • The premise, re-read on main: the DEBT ledger holds @objectstack/cloud-connection (13), @objectstack/hono (3) and @objectstack/observability (11), and none of the three packages declares a typecheck script.
    • The PR closes the card with Fixes #20800.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 1, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 20800,
    "status": "done",
    "branch": "claude/issue-20800-typecheck-graduation",
    "pr": "#21038",
    "session": "session_01VvcEokUG1tvVxkceYfR5XB",
    "premise_still_valid": true,
    "summary": "The last three DEBT packages (cloud-connection, observability, hono) now have a sibling tsconfig.test.json named by a new typecheck script (tsc --noEmit && tsc --noEmit -p tsconfig.test.json, zero-residue shape, no ledger, no new dependency), every code-tier error is repaired at its cause in the test layer (mocks typed to the call they stub, Noop instances declared as their contract, the Hono test app declaring its context variable; no cast, no ts-expect-error, no src signature widened), and the three DEBT entries are deleted so DEBT now holds spec-monorepo alone. Premise held: the build-config readings reproduced the ledger exactly (13 / 11 / 3). One reading beyond the ledger: hono carried 4 more TS2883 declaration-emit diagnostics in src/mocks/runtime.ts that tsc withholds while semantic errors stand; repaired the same way. No changeset written (no shipped file changed, grep-proved); the seat applies skip-changeset.",
    "tests": "Baseline readings at f8178ff, closure built (turbo run build --filter PKG^...), tsc --noEmit --pretty false --listFiles per config: cloud-connection build 13 (TS2493 x11, TS2550 x2) / test 11 (TS2493 x11); observability build 11 (TS2554 x10, TS2552) / test 11; hono build 3 (TS2769 x2, TS18046) / test 3, then +4 TS2883 once those cleared. | At head 5f4aa15: pnpm --filter PKG run typecheck exit 0 for @objectstack/cloud-connection, @objectstack/observability, @objectstack/hono (VERDICT command-exit 0 each; the script name is echoed). | pnpm check:type-check-coverage exit 0 ("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 exit 0 ("1 ledger entr(ies) re-measured in 278.3s, 26 raw tsc error(s) total, none above its recorded number"; surplus none), both also green inside the derived-gate run at 5f4aa15. | vitest run --maxWorkers=2 at 5f4aa15: cloud-connection 30 files / 397 tests, observability 7 / 85, hono 5 / 122, all passed; the diff touches no it/test/describe line (git diff f8178ff -- test files, grep count 0). | Plant (ablation-replace.mjs, WRAP mode, anchor hit x1, blob change proven, restore proven blob == HEAD and git diff HEAD empty) of a number-typed string assignment on the copyright line of marketplace-public-url.test.ts, perf-timing.test.ts, hono-wildcard-fallthrough.test.ts: each package typecheck exit 2 naming that file (TS2322, TS6133). Direction: turns red as expected. The subject is test source read by tsc directly, so no dist rebuild applies to this ablation. | node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands derived 82 families on a non-stale tree; all 82 run one by one, exit codes captured before any pipe, --ran reconciles: "82 derived, 82 run, 0 NOT-MEASURED, 0 UNRUN". check:pm-dispatch-gates took 1009s and was run detached (its own header prescribes it) after two foreground attempts were cut by my own 540s/585s timeouts (exit 124, replaced in ran.list by the detached run exit 0). | pnpm lint exit 0 over the whole repo at 5f4aa15 (152s); narrowed eslint over the three packages plus the gate script before that: 71 files, 0 errors. | Published-surface proof: built the three packages, grep of their dist for every symbol introduced by this PR (KernelEnv, lastCall, type Mock, PLANTED_TYPE_ERROR) found none, positive controls CloudConnectionPlugin, InMemoryErrorReporter, createHonoApp hit in each; files[] is dist, README.md, CHANGELOG.md and none of README/CHANGELOG changed.",
    "mcp_calls": "0 - no MCP GitHub tool was called; issue, comments and PR were read with single-card REST GETs (curl with the container token).",
    "api_writes": "3 relay strokes (fleet-write, objectstack-fleet[bot]): (1) pr_create draft, POST /repos/objectstack-ai/objectstack/pulls -> PR 21038 (run 36809090342, body read back byte-identical, 8532 bytes); (2) label-write --issue 21038 --assign huangyiirene, assignees POST (run 36809156100, read-back matches); (3) this os-dev-report comment, POST /repos//issues/20800/comments. Plus 4 git pushes (empty branch marker, then e59eda3, 773f655, merge 5f4aa15), which are not REST writes.",
    "open_questions": [],
    "out_of_scope_findings": [
    "carrier: none (承接者:无) - noted, not filed. Observation: a DEBT entry measured under one tsc program can undercount a pile that only appears under another once semantic errors clear, because tsc withholds declaration-emit diagnostics (TS2883) while any semantic error stands; hono read 3 under both configs and 7 in total under its test config. It is in the PR Acceptance text and the hono tsconfig.test.json header. The only remaining ledger row (spec-monorepo) is the card-excluded root entry and was not touched."
    ],
    "gates": {
    "ran_at_head": "5f4aa15801",
    "typecheck": {
    "cloud-connection": 0,
    "observability": 0,
    "hono": 0
    },
    "check:type-check-coverage": 0,
    "check:type-check-debt": 0,
    "vitest": {
    "cloud-connection": "30 files / 397 tests pass",
    "observability": "7 / 85 pass",
    "hono": "5 / 122 pass"
    },
    "dispatch-gates --ran": "82 derived, 82 run, 0 NOT-MEASURED, 0 UNRUN",
    "pnpm lint": 0,
    "plant_ablation_red": {
    "cloud-connection": 2,
    "observability": 2,
    "hono": 2
    },
    "not_run_locally (CI-owned)": "whole-repo pnpm test, full dogfood set, merge-queue required set"
    },
    "deviations": [
    "Merged origin/main (9b0de7d) into the branch mid-task (merge commit 5f4aa15) because the first dispatch-gates derivation reported a STALE TREE; closure rebuilt and every gate in the final list run after the merge.",
    "src/mocks/runtime.ts in hono is edited (four fields annotated Mock). It sits under src/ but is a vitest alias target, never built or published (entry is src/index.ts), so it is read as test layer, not as source; flagged because the file surface said no src/** source change.",
    "typecheck script uses the zero-residue bare form (tsc --noEmit && tsc --noEmit -p tsconfig.test.json) instead of check:test-typecheck: residue is 0, so no test-typecheck-debt.json and no tsx devDependency or lockfile change was needed (precedent: metadata-fs, trigger-record-change).",
    "cloud-connection: two Array#at reads were rewritten to vitest mock.lastCall because the first leg of typecheck reads the tests under the build config lib ES2020; the build config was not widened (precedent: service-storage graduation).",
    "No changeset. The only manifest delta is the scripts block of three package.json files; the pm path labeler already added dependencies, tests, size/m on the PR; skip-changeset is left to the seat as instructed. If the seat reads a package.json scripts delta as a published change, a patch changeset would be the alternative.",
    "Commit trailers are the model-free pair (Claude-Session and Co-authored-by: Claude) per AGENTS.md and the dispatch, not the harness attribution reminder with a model name.",
    "Cleanup after the report: node_modules removed and worktree removed."
    ],
    "files_changed": [
    "packages/cloud-connection/tsconfig.test.json (new)",
    "packages/cloud-connection/package.json (typecheck script)",
    "packages/cloud-connection/src/cloud-connection-plugin.test.ts",
    "packages/cloud-connection/src/connection-credential-store.test.ts",
    "packages/cloud-connection/src/marketplace-install-local-bundle.test.ts",
    "packages/observability/tsconfig.test.json (new)",
    "packages/observability/package.json (typecheck script)",
    "packages/observability/src/tests/error-exporters.test.ts",
    "packages/observability/src/tests/loggers.test.ts",
    "packages/observability/src/tests/metrics-exporters.test.ts",
    "packages/observability/src/tests/otlp-http.test.ts",
    "packages/adapters/hono/tsconfig.test.json (new)",
    "packages/adapters/hono/package.json (typecheck script)",
    "packages/adapters/hono/src/hono.test.ts",
    "packages/adapters/hono/src/mocks/runtime.ts",
    "scripts/check-type-check-coverage.mjs (three DEBT entries deleted, one graduation paragraph, no gate logic)"
    ],
    "readings": {
    "tree": "objectstack-ai/objectstack at f8178ff (origin/main at dispatch), workspace closure built first",
    "before": {
    "@objectstack/cloud-connection": {
    "ledger": 13,
    "build_config": "13 = TS2493 x11 + TS2550 x2",
    "test_config": "11 = TS2493 x11",
    "config_tier": 2,
    "code_tier": 11,
    "program_files": 923,
    "own_test_files_in_program": 30
    },
    "@objectstack/observability": {
    "ledger": 11,
    "build_config": "11 = TS2554 x10 + TS2552 x1",
    "test_config": "11 = TS2554 x10 + TS2552 x1",
    "config_tier": 0,
    "code_tier": 11,
    "program_files": 401,
    "own_test_files_in_program": 7
    },
    "@objectstack/hono": {
    "ledger": 3,
    "build_config": "3 = TS2769 x2 + TS18046 x1",
    "test_config": "3 = TS2769 x2 + TS18046 x1 (plus 4 TS2883 revealed after those 3 were repaired, test config only)",
    "config_tier": 0,
    "code_tier": "3 (+4 latent)",
    "program_files": 858,
    "own_test_files_in_program": 5
    }
    },
    "after": {
    "@objectstack/cloud-connection": {
    "build_config": 0,
    "test_config": 0
    },
    "@objectstack/observability": {
    "build_config": 0,
    "test_config": 0
    },
    "@objectstack/hono": {
    "build_config": 0,
    "test_config": 0
    }
    },
    "ledger_after": "DEBT holds @objectstack/spec-monorepo only (26, untouched); console EXEMPT untouched; TEST_DEBT empty"
    }
    }

  3. objectstack-fleet commented on Oct 1, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT: PR #21038 at 5f4aa158 (the last three DEBT packages type-check their own tests). State change: pm:dispatched → pm:blocked, because the queue waits on an inherited red

    domain:cli seat · session_01VvcEokUG1tvVxkceYfR5XB · 2026-10-01T03:45Z · the claim 5922890409 stands; the assignee stays; this card is followed to MERGED

    Blocked-by: #21055

    • Contract review of record: 5924290755 on the PR, CONTRACT_REVIEW_TIER, head 5f4aa158, PASS.
      • Each package gains a tsconfig.test.json that inherits its strictness, and a typecheck script that names it.
        • The bare two-program form is the gate parser's own pinned shape, and the gate's prose prescribes it at zero residue (the metadata-core / metadata-fs / trigger-record-change precedent).
        • CI's Type Check · source gates, debt ledger and workspace are green.
      • Every repair is at its cause:
        • fetch spies typed to the (url, init) call they stub;
        • the Noop instances declared as their contract;
        • the Hono test app declaring its context variable.
        • Banned forms on added code lines: 0 casts, 0 @ts-expect-error / @ts-ignore directives, 0 any.
      • The DEBT ledger: exactly three entries are deleted, not lowered. No gate logic moves, and spec-monorepo is byte-identical.
      • The two deviations are accepted:
        • hono's src/__mocks__/runtime.ts is a vitest-alias target. dist is the bundle of src/index.ts and cannot contain it, so it is test layer.
        • calls.at(-1) → mock.lastCall has identical meaning.
      • skip-changeset is right: only scripts keys move, with no dependency, lockfile or files[] change. That is the verify / seven-package precedent (45a72b0cc1, 8cf806f690). Check Changeset is skipped on the label re-run.
    • Seat verification on adoption: a local git merge-tree against the current origin/main is clean.
    • Checklist:
      • Draft, base main, first line Fixes #20800, Clause-②: no.
      • 16 files, +273 / −36: the three packages' test layers, their manifests' scripts, and the gate's ledger rows. That is inside the claim, with the __mocks__ file accepted as test layer. NOT governed.
      • All seven required contexts are green.
    • Why the card is blocked: one non-required check is red on the head, Validate Package Dependencies.
    • On unlock: when [finding] main's lockfile carries two new OSV advisories (next 16.3.3 GHSA-vcvr-r3jv-pc5j, critical; dompurify 3.4.13): the scheduled scan is red, and Validate Package Dependencies goes red on every PR touching a package.json #21055 lands, the seat re-reads the check on this PR (re-run on the merge ref, or main merged in), then readies and queues it. At its merge, the Fixes closes this card.
    • Out-of-scope note:
      • A DEBT count is a floor, not a census: tsc withholds declaration-emit diagnostics (TS2883) while semantic errors stand, and hono showed 4 more once its 3 cleared.
      • That note now lives in the DEBT doc-block and in hono's sibling header. "Carrier: none" is right.

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 1, 2026

    @objectstack-fleet
    ContributorAuthor

    Unlock: #21055 is closed (b10f6e46d4 takes the fixes for both OSV advisories). State change: pm:blocked → pm:dispatched under the standing claim 5922890409

    domain:cli seat · session_01VvcEokUG1tvVxkceYfR5XB · 2026-10-01T06:42Z · the assignee stays; this card is followed to MERGED


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 1, 2026

    @objectstack-fleet
    ContributorAuthor

    Queue window: PR #21038 at a40cc4ef (a merge of main on top of the reviewed 5f4aa158), now green on every check, ready and armed

    domain:cli seat · session_01VvcEokUG1tvVxkceYfR5XB · 2026-10-01T07:54Z · follows the ACCEPT 5924304440 and the unlock 5926159356


    Generated by Claude Code

  6. objectstack-fleet commented on Oct 1, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed: PR #21038 → 3c3a05cd45 (cloud-connection, observability and hono graduate from the type-check DEBT ledger). The card is closed by the Fixes, and the seat removes pm:dispatched

    domain:cli seat · session_01VvcEokUG1tvVxkceYfR5XB · 2026-10-01T08:30Z

    • Landing reading: 3c3a05cd45 is on origin/main as a single-parent squash. Its diff is byte-identical (cmp) to the PR's net diff at head a40cc4ef44: 16 files, +273 / −36.
    • Content check, parent against squash:
      • The @objectstack/cloud-connection DEBT entry in scripts/check-type-check-coverage.mjs appears on 1 line at the parent and 0 at the squash.
      • packages/observability/tsconfig.test.json is absent at the parent and present at the squash.
    • State: the merge closed this card as completed. pm:dispatched is removed in the same act as this note. domain:cli, area:devpath, tooling and priority:p3 stay.
    • Remainder of [P2] framework: 66 个包用 tsup 构建、无人做类型检查 —— 实测 18 个包共 380 处 code-tier 错误(#4118 的 framework 侧对应) #4311: DEBT now holds @objectstack/spec-monorepo alone, as the card scoped. @objectstack/console stays EXEMPT.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions