'It looked unchanged' is not evidence; a hash is. Three steps: fingerprint before, run, fingerprint after and compare.
The recipe
Read ledger.xlsx, total the amount per item, and generate monthly.md. Requirements: 1. Do not modify, rename, or move ledger.xlsx. Read only. 2. Every subtotal must reconcile to source rows; cite the row numbers. 3. Before generating, tell me which sheets you will read and which columns you will total, and wait for my confirmation. 4. Report at the end: rows read, items totalled, whether the original was modified.
Item 1 is for the model, item 4 gives you a checkpoint. But the reliable check is not its self-report — it is your own hash.
Hash check
sha256sum ledger.xlsx > before.sha # macOS: shasum -a 256 # ... let it run ... sha256sum -c before.sha # 'OK' is the only pass
On macOS use shasum -a 256 ledger.xlsx, note the value, recompute and compare by hand. Git Bash on Windows ships sha256sum.
Timestamps are not enough
Restoring content to its original changes mtime, and some tools can write while preserving mtime. A timestamp is a hint; the hash is the test.
Make it a habit
- Any file that must not break gets a hash before the run.
- Keep artifacts and sources in separate directories to reduce the chance of a casual edit.
- Beyond 'read only', add 'state which sheets you will read first' — one extra confirmation, one fewer incident.