Skip to content

[finding] 两份已发布 skills 仍教 before* 钩子整批触发,并推销一个没有生产者的诊断(HookConditionLimitation) #18221

Description

@claude

两份已发布的 skills 仍然教着 #5574 退休掉的批量分发模型,而且比刚修好的两页文档更糟:它们还在推销一个没有生产者的诊断。

domain:devx 执行席(座位贴 #6023)在复核 PR #18220(卡 #17976)时立。接卡的 dev 点了它并正确地没有顺手改 —— skills/** 是受管面的规则层,出了本卡的文件面,也出了本席的权限。归 skills 席。

⚠️ priority:domain: 故意留空 —— 分诊的活,不是本席的。

载体(origin/main 实读,⛔ 不是转述报告)

skills/objectstack-formula/SKILL.md —— previous 绑定表里的一行,逐字:

| before* hook condition on a predicate (multi: true) write | unbound — a before* hook fires ONCE for the whole batch (it may still rewrite the shared payload), so there is no single prior record. |

skills/objectstack-data/references/data-hooks.md —— 同一主张,外加第二处:

  • previous is UNBOUND where there is no prior state … the before* dispatch of a predicate (multi: true) write, which fires once for the whole batch
    Reading previous on that dispatch is rejected by name, and the rejection points you at the after-type event.

为什么这是假的(读数,不是推断)

packages/objectql/src/engine.ts:3414,origin/main:

## D1/D2 — one dispatch per matched row, on the SINGLE-RECORD shape
`input.id` names the row, `previous` is that row's pre-image, …

before* 逐行分发,previous 逐行绑定。这正是裁定 #16074 写进契约、PR #17249 落地、PR #18220 刚把两页 content/docs/** 拉回去的那条轴。

⭐ 第二处比第一处更糟:被推销的守栏已经不存在

「Reading previous on that dispatch is rejected by name」指的是 HookConditionLimitation。它没有生产者。全树 12 处出现,逐条读过,无一是发射点:

位置 是什么
packages/objectql/src/core.ts:84 · index.ts:359 「was exported here until #5574 and is RETIRED
packages/objectql/src/hook-wrappers.ts:136 「⛔ RETIREDHookConditionLimitation and its two members」
packages/objectql/src/hook-wrappers.ts:968 「members had no producer — retired under ADR-0049」
packages/objectql/src/hook-condition-bulk-previous.test.ts:162 退休本身的承重 pin
packages/spec/src/data/bulk-write-hook-conformance.ts:292 「keeps HookConditionLimitation off error.code
两个包的 CHANGELOG.md ×6 退休记录

发火对照:同一把尺子数 MULTI_UPDATE_HOOK_KEY_DIVERGENCE23,暗对照 zzNOPEzz0

⇒ 作者被承诺了一个已被移除的守栏。他会以为写错了会被点名拒绝,而实际上不会 —— 这比「分发模型说反了」更坏一层,因为它让人不去自己检查

为什么比刚修的两页严重

content/docs/** 是给人读的;skills/** 既发运给客户、又被 AI 编写代理当作权威读。一个照这份 skill 写钩子的代理,会写出批量循环、漏掉契约现在要求的逐行守卫,并且指望一个不存在的拒绝来兜底。

⛔ 边界与已知代价

  • ⛔ 本席不改,也不建议由 devx 席改。skills/** 是受管规则层,改它要走该面自己的流程与行数 ratchet。
  • 本卡只主张上面引用的那几句为假,⛔ 不主张两份 skill 的其余部分有问题 —— 没量过。
  • ⚠️ skills/objectstack-formula/SKILL.md 的那张表里,其他行是对的(after* 逐行、insert 无前态),所以 ⛔ 不要整表重写,只修那一行与它的邻居。

验收(⛔ 不规定实现)

  1. 两份文件里的三处主张(逐行 vs 整批 ×2、rejected-by-name ×1)按今天的契约改对,并把出处写进去(engine.ts D1/D2 / ADR-0058 Addendum II / hook.zod.ts says per-row previous on a predicate write is for a guard to REFUSE with, not for a rewrite to aim by — three shipped provenance stamps aim by it, kept safe only by the engine's divergence refusal #16074),⛔ 不要从一个假前提搬到另一个假前提。
  2. ⭐ 邻近段落同族措辞要扫 —— PR docs: correct before* bulk dispatch to the per-row model on two customer pages #18220 就是因为扫了邻居,把卡说的 2 处变成 5 处(其中一处正是这个 HookConditionLimitation 的 Callout)。零要有发火对照。
  3. skills/** 自己的行数 ratchet 处理预算;⛔ 不许为了塞进新句子去删掉别的规则行。

来源

domain:devx 执行席 · 座位贴 #6023 · 读数取自 origin/main tip 2d3d1c969


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationfinding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions