Skip to main content
Removal is not one operation. The protocol keeps four mechanisms distinct because they answer different questions, and collapsing them would make an audit unanswerable.
Every removal is recorded in provenance — what was removed, by whom, why. RetentionPolicy.record_removals is a property that is always True: no configuration turns auditability off.

Always plan first

Dropping canonical evidence is privileged: it cascades to everything derived from it, because a claim whose source was removed can no longer be justified.
Nothing is written. The cascade is computed from the provenance ledger, so it is exact rather than estimated.

Drop

Older retained roots keep verifying exactly as before, because nothing about them changed. A canonical drop is off by default, since excluding evidence forfeits re-derivation from it:

Batch invalidation

When a producer turns out to have been wrong — a bad model version, a broken pipeline run — drop everything it made:
This is why Producer records a version: without it, invalidating one model release would mean invalidating every one.

Re-derivation instead of loss

Naming a replacement makes the difference between a deletion and a re-derivation:
Then run a re-derivation task — see Ingestion.

Supersede and demote

Two gentler options, which change accessibility rather than membership. The block stays in the composition and keeps proving into the root.
Demotion is the only option for episodic memory. The chronological record is append-only by protocol, not by policy: an episode is a record of what happened and cannot be rewritten. drop raises AppendOnlyViolationError, and no policy can permit it.
The decay function that governs demotion is a policy decision, not a protocol one.

Prune

Pruning never decides what to forget; a drop already did. It reclaims what no retained composition still needs.
Nothing a retained root names is touched, and neither is anything a published tag names: a layout that published v1 keeps the manifest and layers v1 points at.

Redact

For law and safety, not for cleanup. Wrong or obsolete knowledge is dropped; redaction destroys bytes that a retained root still names.
Membership still verifies afterwards, but reconstruction of that block is forfeited. The block becomes a tombstone, which is distinguishable from missing — a removed block must never look like a corrupted one:
Redaction requires explicit policy, or it raises RetentionPolicyError.

The policy

The policy holds the deployment’s answers to the questions the protocol leaves open — thresholds and permissions, never invariants.