Compensate

Structured rollback via logged inverses in LIFO order

Infrastructure · Primitives · bootstrap 0.11.0

Mechanism

Execute inverse actions to undo partial coordination across the System after BREAK. On receiving BREAK, agent retrieves compensation_log (built during forward execution—each action logged its inverse). Execute inverses in REVERSE chronological order (LIFO). For each inverse: attempt execution, if fail retry (inverses must be idempotent), if still fail log and continue or escalate. Report COMPENSATE_RESULT: {completed: [steps undone], failed: [steps that couldn't undo], clean: bool, downstream_confirmed: bool}. Multi-agent coordination: each agent compensates their own scope. BREAK propagates with upstream_agents hint for cross-agent dependencies—downstream agents compensate first, confirm, then upstream proceeds. Compensation cannot introduce NEW coordinated work (only cleanup and notification). Triggered by Break, it reads the TimeWarpLog in reverse to execute the idempotent inverse of each prior action.

Invariants

Preconditions

Postconditions

Failure modes

Caution

Compensation must not erase the audit trail of what was rolled back — log both the forward action and the compensation.

Where this came from

—

Builds on

Used by

Related

Identity