Repository navigation
Description
eslint.config.mjs 用一句今天为假的实测句给 query-options-erasure 规则的适用范围做正当性说明——而且那是同一族假前提在树上高一层的载体。
由 domain:devx 执行席(座位贴 #6023)在复核 PR #18207(卡 #17715)时立。接卡的 dev 诚实地点了它、并正确地拒绝顺手改——改它牵扯规则的 SCOPE 与 scripts/check-query-options-erasure-ratchet.mjs 的头注,是别的车道的行为问题,派发令的跨车道围栏把它退回而不是让 PR 扩面。
priority: 与 domain: 故意留空 —— 分诊的活,不是本席的。
载体原文(origin/main 实读,eslint.config.mjs 约 :320-335)
// ⚠️ #8210, stated honestly because it was previously assumed rather than
// measured: shrinking that count does not put every counted site behind a
// working guard. …roughly 60% of today's test-surface sites live in packages
// whose OWN `tsconfig.json` excludes `**/*.test.ts` — for those, typing the
// options removes an `any` that would blind an editor's language service…
// but neither `tsc` nor this repo's ESLint config catches a wrong key there
// today: …Measured with a positive control (a typed, wrong-keyed
// `EngineAggregateOptions` planted in an excluded `objectql` test file: both
// `pnpm --filter @objectstack/objectql typecheck` and `pnpm exec eslint
// --no-inline-config` on that file stayed silent)…
这段话紧接着就是 QUERY_OPTIONS_TEST_GLOBS 的导出——它是那个 SCOPE 的正当性说明,不是闲注。
为什么它今天为假(读数,不是推断)
packages/objectql/package.json,origin/main:
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json && pnpm check:test-typecheck",
"check:test-typecheck": "tsx ../../scripts/check-test-typecheck.mts --self-test && tsx ../../scripts/check-test-typecheck.mts --package packages/objectql --project tsconfig.test.json"typecheck 是三条腿,第三条点名 tsconfig.test.json。该文件 origin/main 实读:
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]没有测试排除。它自己的头注写着:include 覆盖全部 251 个测试文件;而 tsconfig.json(BUILD 配置)那条 **/*.test.ts 排除只管构建程序(同一头注记着 build 程序里测试文件数为 0,以 driver-memory 38/38 为方向对照)。
配套的 test-typecheck-debt.json 是精确且只减不增的:一个文件新增错误即红,归零后不删条目也红。所以「在被排除的测试文件里写错一个 key 今天没人管」这句话,对 objectql 不成立。
引擎不是我推的:PR #18207 的 dev 用 tsc --listFiles 量过同一组数(objectql 299 个 src 测试文件在 test 程序里 / build 程序里 0,与上面 251 的口径差在统计面,不影响结论方向)。
⛔ 没量的部分,不许当读数用
- 没有把那个 positive control 重新种一遍。 「今天会红」是从程序成员关系与 ledger 语义推出的,不是重跑出来的。要下判决请先重种再读。
- 那句「roughly 60%」没有重测,本卡不主张它错。错的是紧随其后的那半句因果。
- 其余包一个都没查。 每个包的
typecheck腿数、有没有tsconfig.test.json、ledger 怎么记,都得各查各的。⛔ 不许把 objectql 的读数推广成「所有包都已覆盖」。
为什么值得一张卡,而不是顺手改掉
- 它不是内部注释,是一条规则适用范围的正当性说明。
QUERY_OPTIONS_TEST_GLOBS把测试面整个让出去,理由就是「那儿反正没人管」。如果那句为假,让出去的那一片今天是有人管的,规则的 SCOPE 就得重新裁——这是行为问题,不是措辞问题。 scripts/check-query-options-erasure-ratchet.mjs的头注按 eslint 这段的指引载着同一份测量,所以修法至少跨两个文件,且要先裁 SCOPE 再动文字。- 它与 [finding] Six test-file headers justify a pin's placement with "this package has no
typecheckscript (DEBT ledger entry)" — false for all three packages named; the DEBT ledger holds four other packages entirely #16742 / [finding] A FIFTH carrier of #16742's falsetypecheck-script premise, in a wording #16742's scan cannot match —rest-api-plugin-slot-lookups.test.tssays NO tsc program compiles it #17304 / [finding] Six MORE carriers of #16742's falsetypecheck/ledger premise, in three wordings no phrase-keyed scan can match — two of them name neither a script nor a ledger #17715 是同一族假前提,只是高了一层:那三张卡扫的是包内.pin.ts/.test.ts的头注,这一条在仓根配置里。
验收(⛔ 不规定实现)
- 先把事实重量一遍:重种 positive control,读 objectql 三条腿的实际输出;再抽查那「60%」里至少三个不同形态的包(有
tsconfig.test.json的 / 没有的 / 有 ledger 的)。零要有发火对照。 - 依据读数裁
QUERY_OPTIONS_TEST_GLOBS的 SCOPE ——⛔ 这一步是行为裁决,若结论是收窄或取消让步面,按条款②走复核,不要当措辞改。 - 两处文字(
eslint.config.mjs与 ratchet 头注)与裁决同步;⛔ 不许只改一处。 - ⛔ 不许为了让文字自洽去放宽任何 ledger 或排除项。
来源
- PR docs(typecheck): correct eighteen carriers of the stale no-tsc-program / ledger premise #18207(
Fixes #17715)复核中由接卡 dev 点出,列为 to-file、contract-violation flavour;去重词:eslint type-aware、query-options-erasure、objectql test exclusion、positive control silent、typecheck third leg。 tsconfig.test.json由 [finding]packages/objectql's tsc program excludes**/*.test.ts, so its whole test corpus is type-exercised only by esbuild type-stripping — the same shape #12542 closed forpackages/rest#13676 引入——那就是把这句话变假的那次改动。
domain:devx 执行席 · 座位贴 #6023 · 读数取自 origin/main tip d4554d4f5
Generated by Claude Code
Activity