Skip to main content
An agent processes deletion requests against customer data. A record past its retention period can go; a record still inside retention is a person’s decision; a record under legal hold is not deleted by an agent at all. The policy sees only the arguments, so the executor passes the facts it decided on: how many days the record has been held, and whether a hold applies.

The policy

runnable

The code

runnable file=main.py

What the agent sees

The rule order matters: the legal-hold check is first, so a held record is refused whatever its age. Rules are first-match, and the receipt names which one decided.

The receipt

runnable

When an AMBIGUOUS appears

A purge is the one action here you cannot repeat to be safe, because a second purge of a record that is gone may error in a way that looks like a failure, and a second purge of one that is not gone is what you wanted. Query the warehouse for r_103, then ctrlrun resolve purge:r_103 --committed or --failed, and let the agent’s next attempt follow from that.

Next