Data · Disputes
Why a scan is never edited
The PrefabTag team
The scan history is append-only: nothing in it is ever updated or deleted, including by us. Here is why that constraint is worth the inconvenience it occasionally causes.
Most software lets you fix a mistake by changing the record. Somebody marked the wrong spool as shipped, so you open it and set it back. The row now says the right thing, and the wrong thing never happened.
We do not do that, and the reason is worth explaining because it occasionally makes life slightly harder.
The log is the product
A tracking system's real output is not a status field. It is a defensible answer to questions asked weeks later by people with money at stake:
- When did this crate leave the shop?
- Who signed for it?
- Was this piece on site before the slab was poured?
- Did we deliver twice because the first delivery went missing?
Those questions are settled by a sequence of events, each with a time, a person and a place. Once any of those events can be quietly rewritten, the whole sequence is worth less — not just the row that changed, because nobody can tell which rows changed by looking.
So scan events are append-only. Nothing updates them and nothing deletes them. That is enforced in the database itself rather than in application code, because a rule that lives in application code is a rule that holds until the next feature is written in a hurry.
Corrections are new events
A mistake is fixed by recording the fix, not by hiding the error. If a piece was scanned as installed when it was not, the correction is a new event that says so, with its own time and its own author. The history then reads: scanned installed at 10:42 by one person, corrected at 14:15 by another.
That is more honest and, in practice, more useful. A pattern of corrections against one stage or one crew is information. It tells you a scanning point is in the wrong place, or a status name is ambiguous, or somebody needs ten minutes of training. Silent edits destroy exactly that signal.
The question is not whether mistakes happen. It is whether you can see them afterwards.
Then what is the status column for?
Every piece still carries a current status, because a report that had to replay eleven million events to draw a bar chart would be unusable. That column is a cache, not the truth. It is derived from the log, and it can be rebuilt from the log at any time.
This distinction matters when the two disagree. If the status says one thing and the events say another, the events win and the status is wrong — and it can be recomputed. If it were the other way around, a bug in a status update would be indistinguishable from reality and permanent.
What it costs
Being straightforward about the downsides:
- A test scan is permanent. Somebody learning the app on a real job leaves real events. The answer is a training job, not a delete button.
- Deleting a job is constrained. A job that has ever been scanned cannot be removed, because removing it would leave its history pointing at nothing. Such a job is closed instead, which takes it off the active lists and dashboards while keeping the record readable.
- Erasure requests have limits. A record of physical work — who scanned a crate onto a truck — is a business record, and a request to erase it may be refused. That is written into the privacy notice rather than discovered later.
Those are real costs. They are smaller than the cost of a delivery record that a lawyer can wave away because it was editable.
The test we hold ourselves to
If a customer is in a dispute, exports their scan history, and puts it in front of somebody hostile — does it hold up?
That question is the reason for the constraint. Everything else about the log is a consequence of it.