Skip to main content

Green automation is not a healthy system — six success-path failures

Every scheduled job in my second brain exited 0 while the system stopped working. Following one signal through six pipeline stages shows where green automation hides a lost signal — and the six questions I now ask of any green dashboard.

Updated 10 min readMarkdown

Green automation is not a healthy system — six success-path failures

Deterministic code can verify its own execution. It cannot verify its own usefulness.

In August I argued that shell scripts are the highest-ROI layer under an AI agent system. Scripts gather and mutate; the model judges and synthesises; cron decides when. I'd still build it that way.

A few months after that post, I audited that system end to end. Every scheduled job was green — exit 0, valid JSON, clean logs, for weeks. And the system had stopped doing its job: no tasks closed, no notes added, a backlog climbing.

So the question became: how does a system where nothing fails stop working? The answer was six places where a signal entered the pipeline correctly and never arrived anywhere useful. Following one signal through those six stages is the clearest way I've found to show it.

The pipeline a signal travels

Every piece of automation I run moves a signal the same way:

  1. A job writes state — "I ran, here's the result."
  2. A scanner filters state — "which of these need attention?"
  3. A script mutates state — "this is handled, move it on."
  4. A detector measures — "how big is the problem?"
  5. A dashboard derives a number — "here's the summary."
  6. A human or model consumes it — and acts.

Each stage below is a real failure from my system, a familiar version of it from production engineering, and the rule I took from it. The stages are in signal order — the story is the signal getting lost a little more at each step.

Stage 1 — Write: the failure that leaves the last success standing

A sync job failed on authentication. It logged the error and exited:

if ! auth_check; then
  echo "ERROR: auth failed — aborting" >&2
  exit 1
fi

Reasonable code. But the state file recording last_run_status is written after that block. So the JSON still said "last_run_status": "ok" — yesterday's success. The morning brief read it and reported the pipeline healthy. A 36-hour staleness check catches this eventually; until it trips, the system asserts the opposite of the truth.

The familiar version: a status page that updates only when a health check passes. When the checker itself dies, the page keeps showing the last green it ever saw.

The rule: an error path that exits before writing state doesn't produce a missing value — it produces a stale one. Missing is loud; stale is invisible. The failure write is the first line of the error branch, not the last line of the happy path.

So the signal can start life already lying. Even when it's written honestly, the next stage can hide it.

Stage 2 — Filter: the skip condition that hides the work

A scanner finds recurring work whose next date has arrived. It reads project frontmatter and emits anything with planned <= today, skipping status: done so finished projects don't nag.

One recurring project was marked status: done after its first cycle while still carrying recurring: true and recurrence: quarterly. The scanner skipped it on every run. A quarterly review went sixty-four days past due without appearing in a single morning brief.

The scanner worked exactly as written. The defect is that two fields described mutually exclusive states and nothing validated the combination.

The familiar version: an alert rule that excludes env=staging, and a production host that was provisioned with the staging label. The alert is correct. The host is invisible.

The rule: every skip condition is a place where work can disappear quietly. Wherever a filter excludes rows, something should check that the exclusion is legitimate — and fail loudly when two fields contradict each other.

The filter hides work by ignoring it. The next stage does worse: it rewrites the evidence.

Stage 3 — Mutate: the roll that erases the debt

A small script rolls a recurring project's planned date forward one interval when its cycle completes. Four lines of date maths.

During a recovery pass, it ran against a cycle that had not completed — a content cadence at zero of two posts. The date moved anyway. The scanner stopped flagging it, and the iteration sat at 0/2 for weeks. The one signal that said work is owed here had been overwritten by a successful script doing exactly what it was told.

The familiar version: a scheduler that, after downtime, skips the runs it missed instead of catching them up. Nothing failed. The missed runs simply never happened, and no log says so.

The rule: a mutation that moves a deadline must verify the precondition that justifies moving it. Rolling on completion is correct. Rolling because something asked for a roll is how debt disappears.

By now the signal has been faked, hidden or erased. Sometimes it survives all three — and is measured perfectly by something that can't act on it.

Stage 4 — Measure: the detector with no actor

A job runs at 08:00, counts unprocessed meeting transcripts older than two days, and writes:

{ "total_aged": 37, "threshold": 10, "breached": true }

Accurate, and it fired daily — 29, then 32, 35, 37.

The actor meant to consume that signal — classify each transcript and route it — was designed, written into the plan, and never built. So the detector faithfully measured a backlog nothing was draining. The backlog itself took ninety minutes to clear once handled.

The familiar version: a dead-letter queue with a size metric and no consumer. The graph is beautiful. The messages are still dead.

The rule: a detector without an actor isn't monitoring — it's a reliable way to feel informed. Building the measurement first is often right, but give it an expiry: either the actor ships within a cycle, or the detector starts interrupting someone.

Stage 5 — Derive: the number that stops moving

My atomic-notes store sat at 86 notes, with no additions for over two months.

That count is downstream of a monthly synthesis pass, and the last addition fell on the same day that pass last ran. Synthesis feeds extraction; when one stopped, the other did, and the count flatlined. Nothing errored. A number that stops moving generates no events — it looks exactly like a quiet period.

I confirmed it from two independent sources, frontmatter created: dates and filesystem mtimes. With only one, I'd have suspected a metadata artifact.

The familiar version: a "daily active users" tile fed by an ETL job that quietly stopped loading. The tile still shows a plausible number. It's last month's.

The rule: derived metrics need a freshness contract, not just a value. "86 notes" isn't worth displaying. "86 notes, last changed 73 days ago" is.

Stage 6 — Consume: the signal that arrives and nobody acts

Here's where the signal finally reaches the end of the pipeline.

My morning and evening jobs are deliberately prep-only. They assemble state — today's picks, completion counts, validator output — into a bundle for the judgment layer. They don't tick checkboxes or close the day themselves, and that restraint is correct: I don't want a cron inventing a narrative about work that didn't happen.

The nightly backup log ends with an auto-generated reminder, in substance:

Next: run the evening close to reconcile completions and mark the day complete.

It printed that reminder every night for three weeks. Nothing consumed it.

The familiar version: a weekly report job that emails an alias nobody reads. The report is correct, on time, and unread.

The rule: a healthy prep layer is evidence that the prep layer is healthy, not that the system is. The only real health signal at this stage is whether the action happened.

What the six have in common

Put the stages together and the shape is clear. The signal was faked at write, hidden at filter, erased at mutate, measured but not acted on, frozen at derive, and ignored at consume. Every job reported success at every stage.

That's the boundary the original split doesn't cover. Deterministic code attests to its own execution with perfect fidelity and to the system's usefulness with none. Usefulness is a judgment, and it has to be checked by the layer that makes judgments.

The obvious attack: this is one personal system, n=1, and production stacks have SLOs and on-call. Fair — I'm not claiming these six are common. The claim I'd defend is narrower: a dashboard of job outcomes can't see any of them, by construction, because every job outcome was success. The familiar versions above are what that looks like at work.

Six questions I now ask of any green dashboard

This is what I took away — one question per stage, and the change I'm making for each:

Stage Question What I'm changing
Write If this job fails, what does its state file say? Failure is recorded as the first line of the error branch
Filter What does each skip condition exclude, and who checks it's legitimate? Contradicting fields (recurring + done) fail loudly
Mutate What precondition must hold before this moves a date? Rolls verify completion, never just the request
Measure Who acts when this detector fires — and by when? Detectors without an actor escalate after one cycle
Derive When did this number last change? Every displayed count carries a last-changed date
Consume Did the action this output exists for happen? The brief reports actions taken, not jobs run

None of these make a script judge usefulness. They make staleness, contradiction and missing action visible, so the judgment layer can't misread green as healthy.

What I deliberately didn't build is a watchdog that escalates when the judgment layer stops running. Its alerts would land where the backup log's reminder did. The fix for an absent consumer isn't a louder producer.

The rule I'd keep

Let deterministic code do deterministic work. I'd write that layer the same way again.

But don't read its green status as system health. If your scripts feed a human or a model that has to act, the only real health metric is whether that action happened — and measuring that is a judgment call you can't push down into bash.


Footnote: all six surfaced together during a multi-week stretch when the judgment layer — the daily close and weekly review — wasn't being run, while every scheduled job kept reporting success. That gap is what made the boundary visible; the mechanisms above are what it exposed.

Part of an ongoing series on the architecture of my second brain. The prequel — why shell scripts are the highest-ROI layer — covers the split itself.

About the author

  • Technical Architect · 20 years in software · Writing about AI architecture, system design, and real decisions at scale

The stage 1 point about a stale value being worse than a missing one is the one I'd steal first. We had a nightly export that failed on auth and the status file kept saying ok for two days, and nobody looked because the dashboard was green. Moving the failure write to the first line of the error branch is such a small change for what it prevents.

OOlivia2d ago

Exit 0 while nothing actually works is such a familiar failure — the checks were green, the system just quietly stopped doing the job. The signal-age check is a neat, cheap guard I'll borrow.

MMacro8n3d ago

The signal-age check is useful. In GUI automation, a run can exit successfully even when a UI change prevented the intended action; an independent postcondition (expected screen or state) is what catches that gap. Do you surface signal age alongside the last successful run in the dashboard?

MMacro8n3d ago

The distinction between process success and business outcome is key. Tracking the last meaningful state change alongside the exit code seems like a practical alarm. How do you handle jobs where a quiet run is legitimately expected?

The Stage 1 example is the one that stings, because the code looks responsible — it logs the error and exits 1 — yet the dashboard still inherits yesterday's success. I have started treating "when did this number last change?" as the first question for any metric I display, which is basically your Stage 5 rule. The detector-with-no-actor point is the other keeper: a breach flag that nobody owns is just a more precise way of feeling informed. Thanks for laying the six out as a pipeline; it makes the failure modes much easier to audit for.