Logging discipline
Four places this fleet writes logs, each with a machine-parseable format that was designed before the consumer that reads it. Everything below is quoted from the named source file — none of it is an idealized example.
1 · deploy-runner step markers
From plugins/cwc-deploy/skills/deploy-runner/deploy_runner/script.py
(render_script()). Every rendered deploy script appends these lines per step; the
hard rule (from log.py's docstring) is that success is read from an explicit
RUN_EXIT=0 line, never inferred from session liveness — a log with clean-looking
steps and no RUN_EXIT line means RUNNING, not done.
STEP={i} NAME={step.name} START ts=$(date +%s)
STEP={i} NAME={step.name} EXIT=$rc DURATION_S=${_step_{i}_dur} ts=$(date +%s)
RUN_EXIT=$rc ts=$(date +%s) # emitted early, on the first failing step
RUN_EXIT=0 ts=$(date +%s) # terminal line of a fully clean run
And the reader side — the exact regexes deploy_runner/log.py parses
those markers with (writer and parser live in the same package, tested together):
_STEP_EXIT_RE = r"^STEP=(?P<step>\d+) NAME=(?P<name>\S+) EXIT=(?P<exit>-?\d+) DURATION_S=(?P<dur>[\d.]+)"
_RUN_EXIT_RE = r"^RUN_EXIT=(?P<exit>-?\d+)"
2 · worker-build.sh — the kit drift gate
From scripts/worker-build.sh. Exit codes: 0 = build OK (a missing
lock is warned, not failed), 1 = tsc failure, 2 = drift gate FAILED. The literal output lines:
| literal output | meaning |
|---|---|
OK: typecheck clean | npx tsc --noEmit passed for the worker |
FAIL: typecheck failed for workers/$worker | tsc failed — exit 1 |
FAIL: kit drift — these kit files changed since $worker's last recorded build: | a kit file this worker imports changed after its last recorded build — exit 2, drifted files listed one per line |
OK: drift gate clean — kit unchanged since <locked_at> | every kit dep's hash matches the worker's .build-lock.json |
WARN: $worker has no .build-lock.json — no lock — run with --record after a verified deploy | warned, not failed — exit 0 |
OK: no stale workers — every locked worker matches current kit hashes | fleet mode (--stale) clean |
3 · crawl_log — the crawl audit table
From crates/durable-store/migrations/postgres/001_schema.sql (lines
39–47). Every ATS crawl attempt — changed or not — gets a row: the sha256 of the board
snapshot, whether it changed, how many jobs, and how long the crawl took.
CREATE TABLE IF NOT EXISTS crawl_log (
id BIGSERIAL PRIMARY KEY,
board_token TEXT NOT NULL,
crawled_at TIMESTAMPTZ DEFAULT NOW(),
snapshot_sha256 TEXT NOT NULL,
changed BOOLEAN DEFAULT FALSE,
job_count INTEGER DEFAULT 0,
duration_ms INTEGER DEFAULT 0
);
-- 002_indexes.sql:
CREATE INDEX IF NOT EXISTS idx_crawl_board ON crawl_log(board_token, crawled_at DESC);
4 · [observability] in wrangler.toml
Cloudflare Workers observability (structured logs in the dashboard) is on for
88 of 97 workers/*/wrangler.toml files
(grep -l '\[observability\]' workers/*/wrangler.toml | wc -l, re-run 2026-07-10 —
a repo-only fact, dated snapshot; the totals grow as new workers are scaffolded, since every
scaffolded wrangler.toml ships the block). The stable part of that count is the 9 files
without it — unchanged since the 2026-07-09 count, all predating the shared scaffold:
agentcrawls cron etl subagentcowork subagentcoworkers subagentdb subagentetl subagentworkers webHonest scope
This page documents log formats, not log contents — the actual deploy logs live on the operator's Mac, crawl_log lives in a workstation Postgres, and Workers observability logs live in the Cloudflare dashboard. None of them is publicly queryable from here, and this page doesn't pretend otherwise. Pipeline-run history over the D1 warehouse is the one publicly visible log surface: subagentetl.com.