Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

My Test for a Safety Guard Deleted the Real Revenue Ledger

Description and use

Mutation testing on a Windows PC caused unintended deletion of the real revenue ledger. After three incidents, path blocking, tests on non‑existent files, and folder snapshots were added to prevent further data loss.

Problem

Mutation testing on a Windows PC caused unintended deletion of real revenue ledger files, creating data loss.

Outcome

Implemented path‑blocking guard and test adjustments prevented further ledger deletions and ensured mutation testing does not affect production data.

Workflow

  • Run mutation testing on temporary code copy
  • Execute tests that call real browser script and ledger writer
  • Detect unintended writes/deletions to real data folder
  • Implement guard to refuse writes/deletes under real data folder
  • Adjust tests to target non‑existent paths
  • Snapshot data folder before/after each mutant
  • Rebuild ledger from runner logs if deletion occurs

Evidence

The edits happen in a temporary copy of the code. That felt safe. It wasn't, because the copy was only a copy of the code.

Source

Later that day a mutation slipped past a test's fake recording function. The real one ran and wrote test values into the real daily revenue ledger.

Source

The mutant without the delete check ran os.unlink on the real ledger at 16:34.

Source

  • Record date: 2026-10-03T05:55:43.162Z