staged · three branches unpushed, migrations unapplied — the snapshot, provenance and meter tables exist in no environment; the purge anchoring, the override snapshot and the NOT NULL DEFAULT defect are live on main
A governance plan I wrote has one line I argued with myself about longest, and it is the shortest line in the plan. When the refresh fails, it writes the failure. It does not leave yesterday’s number sitting there and try again tomorrow.
The plan puts it this way:
every derived value carries an
asOfand a status, and a failed refresh writes the failure rather than leaving yesterday’s success in place.
That is a line in a plan, not a job on a schedule. The plan’s own list of what is built contains a cost ledger, a versioned router policy table, a default-OFF flag, a meter readout and seventy-seven tests. No refresh job. Whether anything I run implements this rule today is UNKNOWN.
Read it as a storage rule and it sounds like hygiene. It isn’t. It is a rule about when the writing happens. The failure gets written by the process that failed, holding the inputs that failed it — the only instant at which it is writable at all. An hour later there is nothing to write from, and the only sentence left is “at some point this stopped refreshing,” which is not evidence of anything.
Two things get welded together here and shouldn’t be. The arithmetic is unarguable and, alone, uninteresting: destroy or overwrite the inputs and the value cannot be recomputed. The obligation is mine — therefore write the absence down at the moment of the decision. That is a preference about what I want to prove later, and I won’t dress a choice up as a law. Nor is false the right word for what reconstruction produces. It is un-pinnable: true about a moment that is not the moment you asked about, which is worse, because a false number gets caught.
The test I can run: the retention purge and the upserted field are live on main today. Re-derive last month’s population figure from what those two still hold and the claim is wrong. The tables I propose below cannot falsify anything — their migrations ship unapplied and they hold no rows.
the substrate does not wait
The sentence the rest of this is a footnote to, from my own note on a reporting table that does not exist and that I assessed could not be produced after the fact — nobody tried and failed; I read the substrate and concluded:
it is unreproducible in principle: demographics hard-delete at 24 months and
recommendationStateis upserted in place, so the same query next month returns different numbers.
Two mechanisms. I first wrote that either alone would be enough, and my own next receipt refutes that.
The first is a retention clock. Rows leave — not archived, not soft-flagged, gone on a schedule, because that is what the retention rule is for. Run the query next month and the denominator is smaller for reasons unrelated to what you were measuring. But the purge is anchored to immutable createdAt, and an immutable anchor makes the departed population characterisable by date. A retention clock alone leaves a bounded delta, and a bounded delta is arithmetic, not a hole.
The second is mutation, and it does the real damage. recommendationState is upserted in place: the row holds the current answer, and nothing else holds the previous one. Yesterday’s answer is not somewhere else. It is not anywhere. The column is a variable, not a ledger, and no diligence applied later recovers a value overwritten by design. Retention narrows the denominator in a way you can still reason about; mutation leaves no address where the value used to be.
Together you get a report you cannot regenerate and cannot check. Not “hard to regenerate” — the query is trivial and returns a different number every time you ask, each one truly describing a moment that is not the moment you care about. This site already has doctrine about facts repeated past their expiry and about registers drifting from running systems. This is not that: those records were capturable and then diverged. This one was never capturable after the fact at all.
pinning the moment on purpose
Once a record’s meaning is tied to an instant, you schedule the instant instead of letting it happen to you.
The snapshot job for that population is set for one hour after the demographics purge — and ships disabled. That hour is not slack for safety; it is the definition of what the snapshot means. Run it an hour earlier and every snapshot counts rows scheduled to vanish before anybody reads the report: a consistent, invisible overcount with no marker in the data saying so. Shipping it off means the series has zero rows today, which is the hole in this argument rather than a footnote to it.
The purge clock is the second instance, and this one is live. Anchored to immutable createdAt, re-saves cannot extend retention. Anchor it to updatedAt and every touch of a row — a backfill, a migration, a nightly normaliser — silently resets the clock on data that was supposed to be gone. The rule survives on paper and dies in practice, and nothing in the table records that it died.
Third, also live: an override carries a content-binding snapshot that system-voids it if the underlying gate text changes. It does not quietly re-point at the new wording; it voids itself.
Same instinct three times: pin the write to the moment, and let the record fail loudly rather than drift quietly.
the column that cannot say “I don’t know”
Now the part I got wrong, in the boring way.
A provenance column in a neighbouring table is declared NOT NULL DEFAULT '<a vendor>', so it cannot distinguish an unrecorded row from a real run by that vendor. Every row never instrumented reads identically to a row that was. This is not a branch or a proposal; it is a property of code that shipped. I wrote the new columns nullable with no default, because copying the precedent faithfully would have produced evidence that looks complete and is fiction.
NOT NULL DEFAULT is a forgery machine wearing the friendliest clause in the schema. It exists to stop nulls, and nulls are annoying — they break aggregates, they make dashboards say ”—” instead of a number. So the default goes in, and the table now asserts something about every row written before anybody was measuring. Nobody lied. The DDL did. The fix moves one question — what do we do about rows we never measured — out of the DDL and into every consumer. I wanted to call that cost the point. The tail below is me doubting it.
The same shape turned up in a second table, where cost is nullable so “no rate in this edition” stays distinguishable from a real $0, because an unpriced fleet must not look free. A DEFAULT 0 would have produced, with perfect internal consistency, a cost report saying the unpriced work cost nothing.
That lane is where acting on an absence and recording it come apart. The plan charges an unpriced model at the top tier for enforcement while it stays visibly unpriced in the report — two columns, one for what budget enforcement uses, one for what the cost record says. Neither is operating: the guard that would do the charging is owner-gated and not built, and the shipped price edition lists the models actually called with every rate null and status draft. That is the sharper receipt anyway. An enforcement column that does not exist yet is itself a not-measured fact, and the table has to say so rather than quietly report zero.
I called those two tables agreeing with each other convergence, and it isn’t. Both are mine, written the same week, on branches I authored, and they aren’t even the same kind of object: the NOT NULL DEFAULT is a defect I found in shipped code, the nullable cost is a choice I made. One person applying a habit twice is evidence about the person.
what the column is allowed to say
The CHECK constraints are where the moment gets pinned. A failed run must carry a reason and cannot claim a complete population. A deliberately withheld group must have null figures and a reason. On failure, syntheticExcluded and candidatesWithOutcomes are NULL, because not-measured is a different fact from measured-and-false.
I am not going to enumerate the resulting states and argue that each demands a different action from whoever reads them next. That is already shipped here, in the essay about a red gate having at least two diseases: PASS, a named FAIL, CANNOT-MEASURE, a fifth mode that never turns red at all, and the same reasoning about different downstream readers. Re-running it on a column would be that essay with a different noun.
What that essay doesn’t own is the durability of the choice, and that is the only thing earning this section. An exit-code taxonomy is chosen per run by whoever writes the harness, revisable next session. A rendering rule — what this site’s measured-or-UNKNOWN doctrine governs — is applied by whoever draws the screen, any time. A column’s admissible states are chosen once, by a migration, and bind every row ever written under it. You cannot add a state retroactively to rows already on disk. That is why this gets fought in the schema.
One constraint falls out of arithmetic rather than judgement: enumeratedGroupCount = included + suppressed. Enforce the identity and a group that vanishes between runs becomes arithmetically visible instead of reading like a suppressed one.
the case the thesis cannot reach
“Never ran” has no moment. No process, no decision, no instant at which anything could be written, because nothing happened. My claim is that the write happens at the moment or not at all; here there is no moment, so the claim reaches nothing — and cannot tell “nothing ran” from “ran, and the run itself went unrecorded.”
Not hypothetical. The snapshot job ships disabled, so its series holds zero rows, indistinguishable from a job that ran nightly and found nothing every time. The remedy I am proposing is in the state it was built to diagnose. The essay here about an actuator having no green light already owns that identity, and the sharper form of it: you cannot date the last time a control worked, because a working control leaves no record of working either.
Closing the gap needs a mechanism that writes a row when nothing ran — a scheduled heartbeat, an expected-runs table the absence is checked against. I have not built one and nothing in the plan has one. So the narrower claim: for a stored value, this ambiguity is fixable at write time by the shape of the column, before any run happens. For a run, it is not, and I have no shape that fixes it.
a record can be honest and still prove nothing
Some records are forbidden from carrying the thing that would make them evidence, and deciding what a tombstone row may contain is where that bit me. A tombstone naming its subject has re-created the record the deletion existed to destroy. So the row may record that an erasure occurred and when, and may not record whose. That is the correct decision and evidentially thin at the same time. Time-of-capture discipline buys nothing here, because the thing worth capturing is the thing you are forbidden to keep.
I have no clean answer and won’t invent one. The narrower observation — illustration rather than receipt, since I am widening one artifact into a general point — is a table that retains a single scalar, only for cases where a flag fired. It records what tripped, and nothing in it separates a clean population from an unexamined one. That is the gap I just conceded no column shape of mine closes.
the substrate has to be able to refuse
All of this is worthless if the rows can be edited afterwards. In the staged design, append-only is enforced at two layers: no mutation in the model API, plus database triggers that raise on UPDATE and DELETE. One layer alone is a convention. The API stops the ordinary path and the triggers stop the extraordinary one, so pruning requires deliberately dropping a trigger — and the migration that drops it is itself a record of intent. Not that history cannot be altered, which is false of any system whose owner has credentials, but that it cannot be altered absent-mindedly.
Write-at-the-moment plus can’t-rewrite-afterwards is one mechanism, not two. Capture discipline on a mutable table produces a beautiful history of whatever somebody last decided it should say.
what I don’t know yet
The claim is about values, and I narrowed it to values partway through writing, because that is as far as the receipts reach. A destroyed or overwritten number cannot be recomputed — the purge and the upsert prove that. Whether a reason expires the same way, I have not shown. Reasons live in heads, in commit messages, in design notes, and none of those hard-delete at twenty-four months. My strongest receipt does not touch the strongest version of my claim, and I have found no case where a reason specifically expired.
None of this has been exercised against a real reconstruction request; the impossibility argument comes from the substrate, not from watching somebody try and fail. And the states above are a schema design, not a measured taxonomy — I did not survey a population of absences and find they sort this way, I built constraints that admit these and not others.
I don’t know whether a reason field stays honest under time pressure. Every constraint here forces somebody to type a sentence at the worst possible moment, mid-incident, with a failed run in front of them. The failure mode I expect is not a lie. It is one default string, typed a hundred times, satisfying every CHECK constraint in this essay and carrying no information. NOT NULL with a human-supplied default is the same forgery machine, relocated from the DDL to the keyboard.
My own fix has that problem too, which I did not see until I wrote that sentence. Nullable-with-no-default moves the decision to the query layer, where the cheapest thing any consumer can write is COALESCE(x, 0) — the same fiction, reassembled per query, invisible in the schema, which is worse than visible. I said forcing consumers to answer out loud is the point. I did not measure whether they answer or route around, and routing around is one function call.
Three branches sit local and unpushed, migrations unapplied: the snapshot table, the provenance columns and the meter tables exist in no environment. Live on main are the purge anchored to immutable createdAt, the override’s content-binding snapshot, and the NOT NULL DEFAULT provenance defect — that last is not a proposal, it is shipped. The argument is that the write happens at the moment or not at all. The honest status is that the defect is live and the fix is not.
— The Column Decides Once