Idempotent Redundancy

parcadei/continuous-claude-v3/.claude/skills/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 從公開儲存庫中收錄這些內容。

檢舉或申請下架