Idempotent Redundancy

作者 parcadeid07ff4b06b62无许可证3.9K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库8个月前更新

Idempotent Redundancy

AI 生成的概览

指导如何让冗余的备用路径具备幂等性,以避免循环、反复变更或数据损坏。

功能
该技能提供一组简短说明,讲述如何设计备用路径、双保险机制等冗余路径,使其具备幂等性。它列出了推荐做法,包括条件写入、原子写入或重命名操作,以及可安全重复执行的对账步骤,同时也列出了应避免的做法。它只产出指导内容,不附带任何脚本或资源。
适用场景
在为系统添加备用或冗余逻辑,并希望避免重复写入、修复循环或写入方互相覆盖时使用。它也适用于审查可能多次执行的对账或修复步骤。
运行要求
除智能体本身外无需其他条件;仅为说明性内容,不附带脚本。

Idempotent Redundancy

When adding redundant paths (fallbacks, belt-and-suspenders), make them idempotent.

Pattern

Redundancy without idempotency causes loops, churn, or data corruption.

DO

  • Use _is_merge: true for Braintrust updates
  • Check if value exists before writing (fallback only if missing)
  • Use atomic write/rename for file operations
  • Make reconciliation steps safe to run repeatedly

DON'T

  • Write unconditionally in fallback paths
  • Allow multiple writers to overwrite each other
  • Fire "repair" actions that can trigger more repairs

Source Sessions

  • a541f08a: "Redundancy is good only if idempotent"
  • 1c21e6c8: "Belt-and-suspenders, but make it idempotent"
  • 6a9f2d7a: "Idempotent repair hooks"

来源与署名

来源:parcadei/continuous-claude-v3位于.claude/skills/idempotent-redundancy提交d07ff4b

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架