# Idempotent Redundancy

> Ensure fallback and redundancy paths are idempotent to prevent loops, churn, or data corruption. Use when adding belt-and-suspenders patterns. Trigger phrases: "make fallback safe", "idempotent retry", "safe redundancy pattern".

- Skill: `dojogenesis/idempotent-redundancy` (Agent Skill)
- Install (CLI): `npx skillmds@latest add dojogenesis/idempotent-redundancy`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dojogenesis/idempotent-redundancy/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: DojoGenesis (https://skillmd.com/u/dojogenesis)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dojogenesis/idempotent-redundancy

---


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

