PulseAugur
中
实时 03:36:26
English(EN) I asked AI for a Claude Code mod that enforces a rule. It only put the rule on screen

AI 插件未能强制执行保存审批,仅显示消息

为 Claude Code 生成的一个 AI 插件本应在保存草稿前强制执行用户审批步骤,但未能实现这一核心功能。相反,当保存操作启动时,该插件仅在屏幕上显示“approval: not yet”消息。该插件通过了所有验证和测试阶段,因为这些检查只确认插件执行了其声明的操作(修改 UI),而没有确认它是否满足了用户的实际请求(强制拒绝保存)。开发者演示了强制拒绝保存需要使用不同的钩子,特别是 `tool.call` 或 `tool.check`,它们在工具执行前运行,而不是 `ui.render`,后者仅修改视觉显示。 AI

影响 凸显了对 AI 生成代码进行更严格测试和验证的必要性,以确保满足功能性需求,而不仅仅是语法正确性。

排序理由 用户为 AI 产品开发的插件展示了 AI 开发中的一种常见故障模式,即验证检查不能保证功能的正确性。

在 dev.to — Claude Code tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

AI 插件未能强制执行保存审批,仅显示消息

报道来源 [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · uehara ·

    我让AI编写一个强制执行规则的Claude代码mod,它只把规则显示在屏幕上

    <p>The mod passed <code>claude plugin validate</code>, passed its test, and showed "approval: not yet" in Claude Code while Claude worked. It also had no code that could stop a save.</p> <p>We had asked one of the AI workers in our company's AI office for a mod that holds a save …