Skip to content

fix(plugin-hono-server): skip lib check so the workspace typecheck fits the CI heap - #26356

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-hv8mq6
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-hv8mq6

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #26288
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:plugin-hono-server 的 tsconfig 加一行 skipLibCheck: true(附一段注释)。它是仓里唯一一个没设这个开关的包配置。
  • 为什么改:它的类型检查要连带检查依赖的全部 .d.ts(大头是 spec 的产物),峰值内存 4.36 GB,已顶到 CI 的 4136 MB 堆上限,动 spec 的 PR 会在没有类型错误的情况下 OOM 变红。改后峰值 0.98 GB,耗时 93 s 降到 7 s。
  • 风险与回滚:只改不发布的配置文件,构建产物 dist/ 改前改后逐字节相同。回滚就是删掉这一行。
  • 先看:packages/plugins/plugin-hono-server/tsconfig.json。
  • 两分钟验证:NODE_OPTIONS=--max-old-space-size=4136 pnpm --filter @objectstack/plugin-hono-server typecheck,预期 0 错误、十几秒跑完。
  • 需要你做的:无,席位落地。

What changes

One option in packages/plugins/plugin-hono-server/tsconfig.json: "skipLibCheck": true, with a comment saying why. tsconfig.typecheck.json and tsconfig.test.json extend this file, so all three tsc programs in the package's typecheck script pick it up.

Why this option and not extends: "../../../tsconfig.base.json": both options were built and measured (see Verification).

  • skipLibCheck: true: dist/ stays byte-identical, with 0 type errors.
  • Extending the base config: this pulls in lib: ["ES2020"], which drops the DOM lib that this package's default target: ES2022 lib carries today. It also turns on noUnusedLocals / noUnusedParameters. The result is 73 errors: 58 × TS18046 and 10 × TS2571 (fetch Response.json() turns into unknown), 3 × TS6133, and 2 × TS2769. The tsup DTS build fails, so dist/ loses index.d.ts and index.d.mts. The sibling tsconfig.test.json header already records the same lib trap.

No published file changes: files is dist, README.md and CHANGELOG.md, and dist/ is byte-identical. So this PR carries skip-changeset.

Tests

  • pnpm --filter @objectstack/plugin-hono-server build: green.
  • pnpm --filter @objectstack/plugin-hono-server test: green, 35 test files and 448 tests passed.
  • pnpm --filter @objectstack/plugin-hono-server typecheck (all three programs plus check:test-typecheck) under NODE_OPTIONS=--max-old-space-size=4136: exit 0, 0 errors, on head 3db795be.
  • This is a config-only diff, so there is no ablation (os-dev: no ablation for config).

Acceptance notes

  • The lib check hid nothing in this package. With lib checking on, origin/main already had 0 errors in all three programs. So the flag hides no lib-check-only error class here.

  • Sweep of the other workspace tsconfigs that extend nothing. This was measure-only, with nothing edited. The card premise does not hold for them: every one already sets skipLibCheck: true. plugin-hono-server was the only one that did not. So instead of adding the flag, the sweep measured what turning it off (--skipLibCheck false) would expose. All runs used NODE_OPTIONS=--max-old-space-size=4136 and TypeScript 6.0.3, with the dependency closure built.

    config peak RSS as configured lib check on
    apps/docs (after fumadocs-mdx && next typegen) 455,844 KB exit 2, 1 error in a third-party .d.ts: fumadocs-mdx TS2307 @fumadocs/satteri/preset
    examples/app-crm 1,435,644 KB exit 134, heap OOM
    examples/app-multi-package 730,248 KB exit 0, 0 errors
    examples/app-showcase 1,900,860 KB exit 134, heap OOM
    examples/app-todo 1,386,968 KB exit 134, heap OOM
    packages/cli (tsconfig.json) 1,898,856 KB exit 2, 2 errors in third-party .d.ts: better-auth core TS2307 bun:sqlite, bundle-require TS7016 load-tsconfig
    packages/cli (tsconfig.build.json) 1,485,560 KB exit 2, the same 2 third-party errors
    packages/create-objectstack 251,384 KB exit 0, 0 errors
    packages/create-objectstack/src/templates/blank 645,888 KB, exit 2 exit 2, the same 4 errors as configured
    packages/qa/dogfood 2,622,840 KB exit 134, heap OOM
    packages/qa/downstream-contract 807,228 KB exit 0, 0 errors
    • None of them is over 3 GB as configured. The highest is packages/qa/dogfood at 2.6 GB.
    • Every error that the lib check alone reports is inside a third-party package under node_modules, so none of them is ours to fix.
    • Where the lib-check run went OOM, its error list was not measured.
    • The blank template's 4 errors are TS2307 for @objectstack/{verify,connector-rest,connector-openapi,connector-mcp}. They happen in both modes because the template is not a workspace package and has no installed deps, so they are not lib-check errors.
  • The heap limit was not raised.

  • No path under ui/, .github/** or the root ci.yml was touched.

Verification

Before and after, plugin-hono-server, NODE_OPTIONS=--max-old-space-size=4136, GNU time -v

Base origin/main 71580254. Closure built with turbo run build --filter='@objectstack/plugin-hono-server^...'. Wall times are from a shared box, so the ratios count more than the absolute values.

program before: peak RSS / wall after: peak RSS / wall
tsc --noEmit -p tsconfig.json 4,362,676 KB / 93.5 s 978,968 KB / 6.8 s
tsc --noEmit -p tsconfig.typecheck.json 585,696 KB / 6.4 s 233,144 KB / 1.3 s
tsc --noEmit -p tsconfig.test.json 3,058,352 KB / 46.9 s 732,384 KB / 5.4 s
pnpm run typecheck (whole script) 4,361,008 KB / 144.8 s 975,420 KB / 15.1 s
  • Every run exited 0 with 0 errors.
  • The 4136 MB heap is 4,235,264 KB. Before the change, the main program's peak RSS was already above that. After it, the peak is about 23% of the limit.
  • The program loads 527 files, about 31 MB of .d.ts. Of that, 98 files and 23.3 MB are @objectstack/spec's dist.
dist byte-identity
  • pnpm --filter @objectstack/plugin-hono-server build on origin/main was run twice, and diff -r showed the two outputs identical, so the build is deterministic.
  • After the change, the build was run again on 16661e1f and on the final head 3db795be. Both times diff -r against the origin/main copy printed nothing.
  • Files: index.{js,mjs,d.ts,d.mts,js.map,mjs.map}. sha256 of the sorted file sums is d464c12c….
  • Extending tsconfig.base.json instead fails the DTS build: index.d.ts and index.d.mts are missing from dist/.
Derived gate families on head 3db795b
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 47 commands: 19 pnpm and 28 direct node.
  • All 47 exited 0. Each exit code was captured before any pipe, with stdin from /dev/null. The packages build ran first, for check:dts-closure and check:dual-build-cjs-loads.
  • check-plugin-teardown-shape.mjs --self-test first exited 3 (PREREQUISITE NOT MET, a pinned fixture commit missing from the shallow clone). After git fetch --depth=1 origin 621a4876… it exited 0 with 48 cases passing.
  • --ran reconciliation: 47 derived, 47 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero).

Generated by Claude Code

…eck fits the CI heap

Claude-Session: https://claude.ai/code/session_01BVeRMDCTHZCcrUPPJm5cFJ
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 26, 2026
@github-actions github-actions Bot added size/xs tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/plugins/plugin-hono-server/tsconfig.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/plugins/plugin-hono-server/tsconfig.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 9 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 7e6fca0b0ba822847d4a99084eeb6ff90755019d → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · devx seat 2 · 2026-10-26T23:13Z

Seat domain:devx#2 (#20163) · session_01Q4MDXRbEJCNdPAP4SiXwp9 · reviewed head 3db795be · card #26288 (p1), claim 6428702658 (wave 7, delta V). PR carries Fixes #26288.

  • Scope: 1 file, +6/−0: packages/plugins/plugin-hono-server/tsconfig.json gains skipLibCheck: true with a comment saying why. It is inside the claim, not governed (check-governed-merges gives tier null), and skip-changeset is right because dist/ is unchanged.
  • The choice is measured: extending tsconfig.base.json was tried and gives 73 errors and a failing DTS build, so the flag is the smaller correct fix. The base config sets the same flag for every package that extends it, and other package tsconfigs already carry JSONC comments, so the comment is safe for the repo's readers.
  • The margin is real (dev report 6429531035): under the CI limit of 4136 MB, the main program's peak RSS goes from 4,362,676 KB to 978,968 KB and its time from 93.5 s to 6.8 s. The whole typecheck goes from 144.8 s to 15.1 s with 0 errors. dist/ is byte-identical before and after, and the double build was confirmed deterministic first. Build is green, tests pass 448/448, 47/47 derived families exit 0, and 0 are NOT-MEASURED. No heap limit was raised.
  • Sweep: the 11 other tsconfigs that extend nothing already set skipLibCheck, so the card's premise for them did not hold. Their highest peak is qa/dogfood at 2.62 GB, and none is over 3 GB, so nothing needs a follow-up card. With lib checks forced on, crm, showcase, todo and dogfood OOM, and the extra errors in cli and docs are all in third-party .d.ts. That confirms the flag hides no first-party error class.
  • Landing: below the human-merge threshold and not governed. Once every check on this head is green or skipped, the seat runs ready + auto-merge.

Generated by Claude Code

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

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants