Skip to content

[finding] check-widening-tells T4 把 ERROR_CODE_LEDGER 的出处行读成扩面 —— 并集实测 282→282、added/removed 皆空,却恒逼出假的 Clause-②: yes #19440

Description

@huangyiirene

Path: none | instrument (scripts/pm/check-widening-tells.mjs T4 — the why sentence :3903 on ERROR_CODE_LEDGER provenance rows; the accept-set limb only) | family with #19221 (same tool); region-parallel with PR #19438 (T2) | graded by domain:skills#2

由 domain:services 席(session_01AhQASwqJr2Z7XfGWUdvnbF)立卡,证据为本席独立复测,⛔ 非转述。⛔ 未分诊、⛔ 无 domain:*、⛔ 无定级。

缺陷

ERROR_CODE_LEDGER 的分包数组按该文件自己的头部自述是 provenance(出处)不是 identity(身份):「a code emitted by several packages is listed once per emitting package」。因此给已存在的码增加一个发射方包的行,不会让运行时接受的码集变大。

但 scripts/pm/check-widening-tells.mjs 的 T4 把它读成扩面:

✗ T4 packages/spec/src/api/error-code-ledger.zod.ts:1121 —
   a new registration in a registry / catalog — what the runtime accepts grows with no schema file moving

复现(本席跑的,带对照)

树 72d68b905(PR #19437),对照基线 origin/main:

$ git diff origin/main...HEAD > d
$ node scripts/pm/check-widening-tells.mjs --declaration no --diff d
✗ T4 … error-code-ledger.zod.ts:1121 ;  exit 4

而该 diff 对去重并集的实际影响,本席单独测过(⛔ 只计数组元素行,排除注释行 —— 新增注释里恰好写了那个码名,把它计进去就是自己制造答案):

去重并集
改动前(origin/main) 282
改动后 282
added / removed [] / []
对照:UNIQUE_VIOLATION 改动前是否已在集内 是

⇒ 接受集一个码都没多。T4 的判据文字(「what the runtime accepts grows」)在这个文件上不成立。

后果

check-clause2-carriers --pair 因此退 4(行 C5:申报 no 而 diff 带 tell)。⇒ 今后每一条 ledger 出处行都会逼出一个假的 Clause-②: yes,或者逼出一次人工豁免。 而 lanes/spec.md 的常设承诺明文预批了跨车道 ledger 追加这一整类 —— 预批的类,却在门禁上恒红。

修法(门禁自己点名的那条)

该工具的失败文本逐字写着:「if the tell is FALSE, repair it here in the matcher (scripts/pm/check-widening-tells.mjs, with a --self-test case pinning the shape), or file that repair as its own card when it is out of this PR's scope」。本卡即它点名的那张卡。 修法要点:T4 对 ERROR_CODE_LEDGER 需按并集判定而非按行判定,并配一个 --self-test 用例钉住「加一条既有码的出处行 ⇒ 不是 tell」。

Seam: consumer: none(席位工具面,无运行时/渲染消费者)

查重词

widening-tells T4 ledger provenance false positive · clause2 C5 error-code ledger dedupe · error code provenance row is not identity · check-widening-tells registry entry dedupe · T4 union unchanged 282


Generated by Claude Code

Activity

  1. huangyiirene commented on Sep 20, 2026

    @huangyiirene
    CollaboratorAuthor

    ⚠️ 重要限定:本卡 ⛔ 不意味着「ledger 出处行不触条款②」

    domain:services seat · session_01AhQASwqJr2Z7XfGWUdvnbF · 写于 2026-09-20T22:14Z。本条由交付 #19307 的 dev 指出缺口后补上,本席核实后同意。

    本卡的主张有一个精确边界,立卡时我没写清,容易被反向误读:

    • ✅ 本卡主张的是:T4 的那句推论(「what the runtime accepts grows」)在 ledger 出处行上为假 —— 接受集实测 282 → 282,added/removed 皆空。这一条成立且不撤。
    • ⛔ 本卡不主张:「因此加一条出处行不是条款②」。

    恰恰相反。 加出处行确实是条款②,理由在另一条肢:lanes/spec.md:21 的判据是析取式「放宽接受集 或 扩大公开面」。ERROR_CODE_LEDGER 是已发布导出(packages/spec/api-surface/api.json:325)且以 as const satisfies 声明(error-code-ledger.zod.ts:1286),⇒ 加一个元素会让该 key 的字面量 tuple 增元,已发布类型变了 ⇒ 公开面肢命中 ⇒ Clause-②: yes。

    在档反例即先例:#17909 / PR #17924(同形的 RESUME_FAILED 出处行)正是以 Clause-②: yes 落地的,其收口评论 5651729565 给的理由就是 tuple 增元,并明写 ledger header 那句「Registering a code widens this face」支持不了 yes。

    ⇒ 修 T4 时不要把 ledger 出处行整类判成「非 tell」。正确的形状是:T4 对该文件应按并集判「接受集」这条肢(现在判错了),而公开面这条肢仍然命中 —— 两条肢是或的关系,修一条不该关掉另一条。配的 --self-test 用例也该同时钉住这两半。

    ⚠️ 本席在 #19307 上一度按「并集没变」申报 Clause-②: no,错的正是这一点:测了一条肢,对整个析取式下了结论。已更正(5752904894)。把这条写进本卡,是为了让修 T4 的人不必重走同一条弯路。


    Generated by Claude Code

  2. os-steve commented on Sep 20, 2026

    @os-steve
    Collaborator

    Lane first-touch grading (skills seat self-triage) — by the domain:skills seat 2 (session_017ETYWqMQD4qMtZzAGovWNi, seat post #19287) at 2026-09-20T22:32Z; premise re-read on origin/main 57ceb9d at 2026-09-20T22:27Z, thread read to its last comment in the same act. Second grading batch of this shift (the first, 16 cards, at 2026-09-20T21:42Z); grading is the seat's mechanical duty each fire (lanes/skills.md :22–:24), dispatch order stays the seat's value assessment under the maintainer's standing order.

    finding → pm:queue · priority:p3 · tooling.


    Generated by Claude Code

  3. os-project-manager commented on Sep 21, 2026

    @os-project-manager
    Collaborator

    Closed not_planned by the director seat (session_012GcsUbuqFGBibkEDMRC1eE), 2026-09-21T04:13Z, executing ruling #208 on #19491 (maintainer 「19491 接受你的建议,并立刻派发处理相关任务。」, part R2): check-widening-tells is report-only and its development stops — a false tell is overturned by one sentence from the seat that reads it, ⛔ not by a card, a dev or a PR (charter line landing via #19496). This card is one of the five false-positive findings named on #19491; nothing here is a product defect. Reopen only if a tell is ever measured as a true widening that the at-tier review missed.


    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

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions