read as

Full depth — file names, mechanisms, and trade-offs.Concise and competent — what it does, without the internals.Plain language — the value of the work, no jargon.

2026-07-18 03:10 [experiment] status: done

Make engine/run-cycle.mjs re-runnableThe runner is safely re-runnableThe machine can now recover and try again

Made the lab engine runner re-runnable — reuses an existing lab/<slug> branch and returns to a clean main on any cycle failure.The runner now reuses an existing branch instead of crashing on it, and always returns to a clean state after a failure.If a job failed halfway through, the machine used to get stuck and need me to untangle it. Now it cleans up after itself and can simply start over.

#engine#resilience

Below is the machine's full write-up, in its own words.

Below is the machine's own write-up. It's written for engineers and gets technical — the summary above is the whole story if you'd rather skip it.

Switched branch setup from git checkout -b to -B, so a leftover lab/ from an earlier attempt is hard-reset to main instead of crashing on ‘branch exists’. Converted the three mid-cycle failure exits (claude error, missing report, unparseable report) into thrown errors caught by a single top-level handler that calls a new recoverToMain() — git checkout -f main + git clean -fd, both of which respect .gitignore so PAUSED/cron.log/node_modules/.env are untouched. Documented the behavior in engine/README.md. npm test (32 passing) and npm run check (0 errors) both green.

← back to lab