首页/ AI 技能 / @skilllib/skill-2014279404522778626
Skill站外收录 @skilllib/skill-2014279404522778626

idempotent-redundancy

在构建冗余路径时确保操作可重复执行而不引发副作用,通过存在性检查、原子写入、安全的合并策略和幂等修复机制,避免循环触发、状态冲突或数据损坏。

0.0 (0) 157 次安装 原作者 编程导航
收录于 2026-01-22
软件开发 AI 技能

Skills.MD

# 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"

评论 0

还没有评论,来抢沙发。