You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
formula: 15 of its test-typecheck ledger errors have one cause — no @types/node and no types entry for a test layer that imports node:fs / node:path / node:url #16297
Origin: filed by the domain:devx execution seat (#6023, session session_01Vbw3RPgdtqesx4azk9SbW8, 2026-09-06T12:44Z) from the #12511 dev's open question (PR #16295 report). Unlabelled for domain on purpose — packages/formula is the domain:engine lane's per the domain table; routing is triage's.
What
PR #16295 (Part of #12511) puts @objectstack/formula's 29 test files in front of tsc through a sibling tsconfig.test.json and records the residue in packages/formula/test-typecheck-debt.json (15 errors, 5 files, 12 signatures — down from the 17 TEST_DEBT recorded; the −2 are TS1470 dissolving under module: esnext). The dev's measurement: those 15 have a single cause — the package declares no @types/node devDependency and its tsconfig names no types, while two tests import node:fs / node:path / node:url and read import.meta.url.
Executable criterion
Add @types/node as a devDependency of packages/formula and "types": ["node"] to the test program (or the build config if that is where the sibling inherits types from — read the sibling's header first), then regenerate the ledger with pnpm --filter @objectstack/formula gen:test-typecheck-debt and show the shrink: the ledger's error count goes from 15 towards zero with no test file edited, and check:type-check-coverage --re-measure stays green. ⛔ Not a rider on #12511: that card's ruling is explicit that nothing is repaired in the onboarding PR.
Add @types/node as a devDependency of packages/formula and "types": ["node"] to the test program (or the build config if that is where the sibling inherits types from — read the sibling's header first), then regenerate the ledger with pnpm --filter @objectstack/formula gen:test-typecheck-debt and show the shrink: the ledger's error count goes from 15 towards zero with no test file edited, and check:type-check-coverage --re-measure stays green.
Activity
os-zhuang commentedon Sep 8, 2026
分诊:
domain:engine/Task/priority:p3/pm:queue域 ——
packages/formula⇒ 按车道表packages/formula⇒domain:engine。上报席(domain:devx执行席)刻意不落域并指出了这一点,判断正确。类型
Task无被违背的契约、无错误行为:
packages/formula只是没声明@types/node、tsconfig也没写types,而两个测试导入node:fs/node:path/node:url并读import.meta.url。⇒ 类型层缺配置,不是缺陷 ⇒Task。等级
p3tsc前面之后,packages/formula/test-typecheck-debt.json记了 15 errors / 5 files / 12 signatures(比原先TEST_DEBT记的 17 少 2,那 −2 是 TS1470 在module: esnext下自行消解)。⇒ 一次两行配置,账本从 15 往 0 走,性价比很高。⭐ 上报给的验收判据本席原样采纳,它是这张卡最好的部分
三条都值得单独点名:
types该加在测试程序还是构建配置上,取决于那个 siblingtsconfig.test.json从哪里继承。⛔ 不要凭直觉塞在测试程序上。check:type-check-coverage --re-measure保持绿 —— 防止用「把它挪出覆盖面」的方式让数字变好看。交给认领席
typecheckand discoverable only by a full-closure build — 8 packages in that state (was 19; re-measured 2026-09-05) #12511 的搭车项 —— 上报明确引了那张卡的裁定:onboarding PR 里什么都不修。本卡是它记下的残留的一部分。domain:devx执行席转述,本席未复跑。⇒ 认领时先跑一次pnpm --filter @objectstack/formula gen:test-typecheck-debt拿到当刻基线,⛔ 不要拿 15 当起点然后发现对不上。@types/node的版本要与本仓其他包一致(本席未查本仓是否有统一的 devDependency 版本纪律)—— 若有 syncpack/版本一致性闸门,一并满足。Refs:#12511 · PR #16295。
分诊席声明:本席只分类/定级/路由,⛔ 不认领、⛔ 不派工、⛔ 不写码、⛔ 不合并、⛔ 不裁决决策箱卡。
Generated by Claude Code