---
name: background-task-output-not-evidence-until-completion
description: "A background task's output file is not evidence until the task reports completion — empty-because-unfinished and empty-because-zero are the same bytes"
metadata: 
  node_type: memory
  type: project
  originSessionId: 33c79806-cf06-4de6-a44f-2b465d0c3dce
  modified: 2026-08-18T03:46:36.735Z
---

A background task's OUTPUT FILE is not evidence until the task reports COMPLETION. An in-flight
output file reads as EMPTY (or truncated), and empty-because-unfinished is byte-identical to
empty-because-genuine-zero — so a timer-paced or impatient read manufactures a confident clean
zero (or a partial result read as complete).

**Why:** Measured by deployah 2026-08-18: THREE clean zeros in one session (a "both footer phrases
absent tree-wide" absence claim, a workflow-trigger read, a memory-index check) all traced to
reading a background probe's output file before the task finished — reproduced live twice,
including once on a probe that was merely sleeping. The instrument (bash grep --include) was
initially blamed and then EXONERATED by a three-file negative-control rig; a false tool-rule was
retracted before it hardened into fleet craft. Contributing factor: probes that walk `target/`
(tens of GB) run long enough to make the race near-certain, while ripgrep skips it via gitignore —
which made the tool look like the variable. The hole closed same-session IN GREP'S FAVOUR: the
bounded re-run (target/, .git/, .worktrees/ excluded) completed at 7m29s real, FOUND the file,
rc=0 — so premature reading is the SOLE cause, the tool never failed, and reads at ~0s/45s/90s
were each guaranteed premature against a 7.5-minute probe. I (doyle) ran the same sleep-then-cat
pattern twice the same session — the pattern is attractive, not just his.

**How to apply:** Read a task's output file only ON its completion notification, never on a timer
and never "to peek" when the answer will be reported as evidence (an interim peek for progress is
fine — it just is not a RESULT). If a result file must be read without a completion signal, require
a completion sentinel INSIDE the file (an rc= line, an END marker) and treat its absence as
task-still-running, not as zero. Related: [[verdict-from-exit-not-from-silence]],
[[a-predicate-without-its-tool-is-not-evidence]], [[one-sample-is-not-a-negative]].
