Log
The report came in the evening: "the July monthly report is already up." Only 12 trading days into July, yet the site showed a "July 2026 Monthly Market Report" wearing 2026-07-31, a date that hadn't arrived.
The timeline spans fifteen minutes:
- At 01:52, while working on the page layout, I test-ran
monthly_report.py 2026-07and committed its output (reports/monthly/2026-07.md) along with other changes - At 02:07 the pipeline picked the file up and auto-published it
The publisher (publish_observatory.py) ran glob("*.md") and published whatever existed. It never asked whether the period had ended, and it stamped the date mechanically to month-end, a future date.
The response is three gates:
- At publish,
period_ended()judges whether the report's period has finished. The judgment reusespost_date(), the same function that computes the post date. If the two ever diverge, that gap is the next accident - At commit, a pre-commit hook enforces the single-author rule for the pipeline. Humans committing artifact paths (
web/data/,reports/) are refused, and the pipeline (bot) passes - At push, a check is needed as well. Hooks silently vanish on fresh clones (the config doesn't travel). CI can't see whether a local hook is installed, so it inspects the outcome instead. Any pushed commit by a human author touching artifacts fails the build. Legitimate manual interventions pass via a commit-message marker, leaving evidence in history
The post was retracted, and on August 1 the completed July report publishes normally.
Judgment
My first diagnosis was wrong
Key point
I initially reasoned: "the pipeline is invoked without arguments, so it only builds last month. These half-month numbers are frozen until August 1." A plausible explanation, but wrong.
While pushing the retraction I found it on the remote. That same evening, the pipeline had updated the post from -15.21% to -20.61%. The publisher re-publishes whenever the source changes, finished period or not. The half-month report was not frozen but living on, refreshed daily. It was a worse situation than I had first thought. This isn't the first time a plausible first explanation collapsed under evidence on this project. It's the same trap as being wrong three times in the earnings study, and the same prescription. The diagnosis has to be verified too.
The root: two authors on one path
web/data/ and reports/ are designed with the pipeline as sole author. Testing scripts locally, I committed regenerated files and became a second author. Two accidents grew from that one root in a single day. One was this publication, and the other was the rebase conflicts on every push (a 653KB Plotly dashboard doesn't 3-way merge).
"Don't commit reports for a running period" and "don't commit local regenerations" are all rules humans must keep. As this project has confirmed more than once, such rules eventually break. This time the one who broke them was the one who wrote them. That is why the rules were taken back from humans and handed to machines at each boundary. It is the same spot and the same prescription as placing escape_mdx() at the publish boundary after the MDX incident.
A guard is trusted only after reinjection
All three gates were tested by re-causing the accident.
- Remove the publish guard and run: the incident reproduces exactly, future date
2026-07-31and all. That is proof the guard actually blocks - The hook was exercised in a sandbox across four cases. Today's two accidents were blocked, and the human-curated event DB and the bot passed. It also stopped me in production immediately, catching three regenerated artifacts floating in my working tree
- The CI check was tried against real history. The actual commit that caused today's accident fails it, and code commits and bot commits pass
One more problem was caught here. On the first check I piped output through | head, and the pipe swallowed the exit code, making failure look like success. I re-verified without the pipe. A verification tool lying about itself is a pattern this project hit several times today alone, so verifying the verification is now habit.
Charted Ahead
- The rule now lives in two places (hook and CI script). A test pins them by literal comparison; if the rules grow, consolidate to a single source
- On August 1, confirm the completed July report passes the publish gate and goes out normally (a guard verified only for blocking is half a guard)
- Custom domain and additional social logins stay in queue