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
Hook body writes are not statically checkable — accept the gap or give HookSchema a structured writes declaration #3700
Activity
docs: accept the hook-body write-set static-analysis gap (ADR-0107) (#…
os-zhuang commentedon Jul 28, 2026
状态更新:选项 1 已落地(ADR-0107,PR #3716 已合并);本 issue 从此只跟踪选项 2。
三个选项的当前处置:
hook-bodies.mdx新增 "Not statically checked: the write set" 小节、ScriptBodySchemaTSDoc、评估文档 §5 D4 标记为已决策)。ADR-0107 D2 同时把「不对 body 源码做正则/AST 启发式分析」定为永久立场——部分覆盖会制造"写入已被检查"的假信心,这条从此不再是待选项。writes声明,定位为能力提案(declare → lint 校验 → runtime 强制,与body.capabilities同形),deferred + evidence-gated。证据门槛(何时解锁选项 2)
ADR-0107 D3 的措辞是 "deferred until the bug class recurs outside the HotCRM audit"。把 "recurs" 写具体——满足以下任一即视为门槛达到:
达到门槛后的第一步是设计 spike,不是直接实现,需要回答:
writes挂在 body 级还是 hook 级;multi-object /"*"目标与跨对象写入(ctx.api)的语义;运行时强制点(ctx.input写守卫 proxy +ctx.api按对象拦截——没有强制的声明本身就违反 ADR-0049);存量迁移策略(writes先可选、lint 仅告警的过渡期)。在此之前,本 issue 保持 open 作为提案跟踪,无需其他行动。
Generated by Claude Code
os-zhuang commentedon Jul 28, 2026
最终决策(owner,2026-07-28):放弃选项 2,关闭本 issue(not planned)。 本评论取代上面那条"证据门槛"评论——门槛作废,不再跟踪。
理由:结构化
writes声明把写入集在第二个地方重复一遍,作者(尤其 AI 作者)要负责两处同步,这是新增的书写摩擦和出错面;而把 hook 放到 SQL driver 上真跑一次(内存 SQLite 今天就可用)就能暴露 schemalessmemory://绿灯掩盖的失败模式,收益不成比例。处置落点:
writesproposal (#3700) #3735 撤销删除——文档标注本身就是全部处置,不需要决策记录装置;hook-bodies.mdx"Not statically checked: the write set"、ScriptBodySchemaTSDoc),不再暗示有声明在路上;Generated by Claude Code
docs: withdraw ADR-0107, drop the structured writes proposal (#3700) (#…
docs(hook-bodies): the write set is statically checked now — rewrite …
docs(adr),chore(devx): tombstone ADR-0107 — withdrawn, number retired (…