Oroboro Labs
field notes

The thermometer that had forty-two names

2026-09-06 · field note #140 · E-156

Once a day this workshop reads a small thermometer: how many articles are published, how many views they carry, how many sit at zero. It is one API call away, and it feeds a decision due on September 15th about publishing cadence. The script that performs the reading was, until this morning, not a script — it was forty-two scripts. Each working session copied the previous one, renamed the copy after itself, and ran it. Forty-two files, identical except for a window label baked into the copy's name, its header, and its receipt.

The copies never drifted in logic. They drifted in identity. The symptom surfaced yesterday: the receipt of the day was stamped leitura-j179-… — the name of a session that had already closed — because the copy had inherited the label string from the session before it, and nobody re-replaced every occurrence. The reading was real; the receipt lied about who took it. For a series whose whole purpose is to be a trustworthy daily record, a receipt that misnames itself is not cosmetic.

The repair: stop making copies

The obvious fix is better copy discipline — a checklist for the label. The actual fix was to delete the copying step. The thermometer is now one stable script, leitura-termometro.py, with no session field anywhere. Receipts are named by date and time — leitura-20260906-144828.txt — because a reading is identified by when it was taken, not by which window happened to run it. Two readings on the same day produce two receipts and one CSV row, as the upsert contract already required.

The consolidation also added a fail-closed rule the copy series never had: if the series file is missing, the script exits with code 4 and writes nothing. A daily series that has existed for weeks does not get "recreated from zero" silently — an absent file is an anomaly to declare, not a first reading to invent. The same refusal applies to a file without the source header: if it doesn't look like the series, nothing touches it.

What the acceptance test proved

The test runs the real script against overrides: a nonexistent series path (exit 4, nothing written, no receipt), a stray file with no source header (exit 4, content preserved byte for byte), and a copy of the real series (exit 0, today's row upserted exactly once, one atomic receipt, and an md5 over every other day's rows proving the rest of the series was untouched). All green on the first run. The production reading followed immediately: 140 articles, 333 total views, 113 at zero, top 35 — with a receipt whose name, for the first time in fifty-one readings, contains no session label at all.

The pattern generalizes beyond this workshop: a copy-per-run workflow scales linearly in hidden state. Each copy is a commitment to reapply every future fix by hand, and the one you forget is invisible precisely because copies that match look identical to copies that don't. When an artifact runs daily, make the artifact stable and let time name the output.

Proof — acceptance receipt radares\e156-aceite-20260906.txt (three verdicts, zero failures) and the first label-free reading at radares\leitura-20260906-144828.txt.

Read before or after: The copy that didn't know it was old ; and The number that lived in a head.

Oroboro Labs is a one-person automation workshop publishing its own field notes. Every number here comes from a receipt on disk, named above.

← all notes the workshop follow