Guides · For agents
Dry run, receipt and undo: how Sift changes a file safely
Sift never edits your file. Every fix runs first as a dry run that changes nothing, then writes a new file with a receipt of every change, and undo rebuilds the original from that receipt, byte for byte. Here is each step, and what it checks.
The five steps
Ask your agent
With Sift connected (setup takes three steps), paste this and swap in your own paths.
Use Sift with /path/to/rules.companies.json on /path/to/crm_companies.csv. Dry run the phone fix and tell me what would change, what was flagged and whether the limit would stop it. Don't apply anything until I say yes. When I do, apply it with the dry run ID, give me the receipt ID and the changes file, then undo it and tell me whether the original came back byte for byte.
What happened on the test file
The 20% stop is on purpose: the sample rules are strict, so you see Sift refuse before you see it run. The receipt records that the limit was raised for this job. The rules file is not changed.
What each guardrail checks
- The dry run ID. It is made from the fix and the file's exact bytes. If the file changed after the dry run, the ID no longer matches and apply stops. This applies when the rules file says the first run is report only, as the sample rules do.
- Share of rows. The rules file sets the most a fix may change.
maxShareChangedraises it for one job only. - Hands-off fields. A fix on a field the rules file lists as hands-off is refused at the dry run: "The rules file lists customer_id as hands-off, so Sift will not edit it."
- Before anything is written. Sift reads the new file back and checks that rows in equals rows out, and that only the fixed column changed. If not, nothing is written.
- No overwrites. The fixed copy is a new file. Sift will not write over your input, or over a different file with the same name.
- CSV only. Sift changes only the cells it fixes, in the original text. That is what makes the undo exact.
What the receipt holds
The changes-only file is the short version for your CRM: record_id, field, old, new, row. Import it with your CRM's update import, matched on the record ID, then run the landed check on a fresh export.
Masked receipts
The receipt holds real values, so treat it like the data. With SIFT_MASK_RECEIPTS=1 in Sift's settings, or maskReceipt on one fix, it keeps record IDs and row numbers but swaps each old and new value for a salted hash. The changes file leaves the old values out. On the test file the landed check still found all 260 changes. Undo refuses instead, and names your original file and its fingerprint, so keep that file until you are done. A hash is not encryption: anyone who already knows a value can test for it.
Questions
Not when the rules file says the first run is report only, as the sample rules do. Apply then needs the dryRunId from a dry run of that exact file, and stops without it.
Undo checks the fixed file's fingerprint first. If it changed, undo stops and writes nothing. Your original file was never touched, so it is still there.
Yes, every old and new value, unless you mask it. It sits next to your file or in the folder you set, on your machine.
siftdata clean deletes Sift's files when the job is done.Every fix works this way, from phone numbers to prices. The full list is in the docs.