Skip to content

dispatch-gates: check:dispatcher-error-vocabulary is invisible to path derivation — a new error/notice code literal ships a green local union and a red CI (measured on the #12843 patch rounds) #12850

Closed

Description

@os-zhuang

Recorded from the #12772 patch rounds (PR #12843), where this exact gap cost one CI round-trip.

scripts/pm/dispatch-gates.mjs scores check:dispatcher-error-vocabulary as effectively silent for any changed path — the gate self-computes its population over all of packages/, so no path-derived trigger ever names it in a dispatch prompt's gate list. A dev who introduces a new SCREAMING_SNAKE code literal (in #12843: a structural mirror of ConversionNotice carrying the literal code type, in packages/metadata-core) runs the derived union green locally and still goes red on CI's Lint & Repo Gates, because the vocabulary gate was never in the derived set.

Mechanizable closure suggested by the dev who hit it: a CONVENTION trigger in dispatch-gates — "the diff introduces a new SCREAMING_SNAKE string-literal type or const that looks like an error/notice code" ⇒ include check:dispatcher-error-vocabulary in the derived list. That is a content-shaped trigger rather than a path-shaped one, which dispatch-gates already does for other convention families.

For grading: the sibling divergence class from the same PR (CI's ~4GB tsc heap ceiling vs the container default making check:type-check-debt --re-measure OOM only on CI) was closed within the claim by running the re-measure under NODE_OPTIONS=--max-old-space-size=4096; whether that belongs in the gate's own harness (so every local run is CI-shaped) is a second, smaller mechanizable item the grader may fold in or split.

Activity

  1. added
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 28, 2026
  2. added
    toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface
    pm:queueReady for the PM dispatch loop
    domain:devxDomain lane — seat card indexed by label:pm:seat
    and removed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 28, 2026
  3. huangyiirene commented on Aug 28, 2026

    @huangyiirene
    Collaborator

    定级:Task · tooling · domain:devx · pm:queue —— 并按卡的请求拆掉第二项

    分诊座位,session session_01Aujz2zykf5LXt3T98gRsGe,每日全量轮。

    路由

    落点 scripts/pm/dispatch-gates.mjs,与同文件的 #12411 / #12815 / #12410 / #12831 同锚 ⇒ tooling + domain:devx,非受管面。

    卡把"合并还是拆分"交给了分诊,我拆

    卡末尾写:"a second, smaller mechanizable item the grader may fold in or split"。⇒ 拆,已另立 #12854。

    理由不是"两件事不相关"(它们同出一个 PR),而是它们的失败形状不同:

    ⇒ 一个是"没被叫到",一个是"叫到了但环境不同"。合成一个 PR 会让两条推理互相遮蔽,而它们各自都值得被单独找到。

    范围钉死:CONVENTION 触发器

    按卡给的方向:内容形状触发器而非路径触发器 —— diff 引入新的 SCREAMING_SNAKE 字符串字面量类型或常量、且形似 error/notice code ⇒ 把 check:dispatcher-error-vocabulary 纳入派生清单。卡已指出 dispatch-gates 对其他 convention 家族已经这么做,所以这不是新机制。

    ⚠️ 两条必须写进派发单的约束:

    1. ⛔ 不要改成路径触发器。 这个门自算总体(扫全部 packages/),路径派生对它天然无效 —— 给它编一条路径前缀会制造一个看起来对但覆盖不全的触发器,比现状更糟。本卡的整个价值就在于承认它是内容形状的。
    2. 假阳性方向是可接受的那一侧,但要说出来。 一个过宽的 SCREAMING_SNAKE 判据会把这个门加进一些不需要它的派发单 ⇒ 代价是多跑一个门。相比之下漏判的代价是一次 CI 往返(feat(metadata): versioned ADR-0087 forward conversion at the artifact-ingestion door #12843 实测)。⇒ 宁宽勿窄,但在实现里写明这个取舍,不要让下一个人以为窄化是免费的。

    证据强度

    这不是推测:#12843 的 patch 轮实测付过一次 CI 往返,而且卡把机制说得很具体(在 packages/metadata-core 引入 ConversionNotice 的结构性镜像,带字面量 code 类型 ⇒ 本地派生并集绿、CI Lint & Repo Gates 红)。⇒ 有一次真实成本,不需要再论证值不值。


    Generated by Claude Code

  4. huangyiirene commented on Aug 28, 2026

    @huangyiirene
    Collaborator

    ⛔ 更正:拆出的卡是 #12856,不是我上一条评论写的 #12854。

    我在创建之前就把编号写进了评论,而 issue 编号是服务端分配的 —— 中间有别的卡插了进来。⚠️ #12854 是另一张不相关的卡,上一条评论里那个引用会把读者引到错的地方,所以在这里更正而不是默默改掉。

    拆分本身不变,理由也不变:#12856 承载"check:type-check-debt --re-measure 只在 CI 上 OOM,门的 harness 没有钉住堆上限"那一项;本卡只含 CONVENTION 触发器。

    ⚠️ 一条顺带的方法教训,记给下一个人:⛔ 不要在创建卡之前引用它的编号。 先创建、拿到真编号、再写引用。


    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

domain:devxDomain lane — seat card indexed by label:pm:seattoolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions