v0.7.0: resilient create pipeline (resume, cache, symbol verification)
Highlights
copperhead create now survives a long run: it resumes where it stopped, replays work you already paid for, and tells you what it is spending.
Driving create to completion on a real brief surfaced a batch of blockers and token sinks: a correct schematic could not clear the finish gate, a stalled provider turn hung the run indefinitely, and any interruption meant paying for every turn again from the top. This release fixes that class of failure:
npm install -g copperhead
copperhead create --brief brief.md --model claude-code
# stops on a usage limit? re-run the printed command:
# completed stages are detected from repo state and skipped,
# and completed turns replay from the cache at ~0 tokens.The safety rails are unchanged: edits stay spec-gated (the edit tools are absent from the model's tool list until an OpenSpec proposal validates), commits stay verification-gated behind ERC/DRC, and a failed run still rolls back to its git snapshot.
Details
- Resume anywhere. Any stop prints the exact command to resume and which stage it resumes at. A session or usage limit is reported as a schedulable pause with its reset time, not an opaque provider error.
- Response cache. Every completed turn is cached on disk, so a retried or restarted stage replays what it already paid for instead of re-calling the model. Repo-scoped and gitignored. Disable with
llmCache: false. - Turn watchdog and auto-retry. A provider turn that blows past
turnTimeoutMs(default 10 min) is aborted, its subprocess torn down, and the turn retried. A stage that fails or misses its completion contract gets a bounded LLM diagnosis that decides retry versus stop for a human (maxStageRetries, default 2). verify_symbols, a new read-only tool. Cross-checks everylib_symbolsentry in the schematic against the KiCad symbol libraries installed on your machine, reporting pins that diverge from the real part andlib_ids that do not exist in your KiCad version, with the closest real names. ERC cannot catch these: a symbol claiming to beDevice:Rwith invented pins passes ERC while being wrong.- Drift gate correctness. BOM and PINOUT comparisons no longer report false drift on supporting tables, reordered or optional columns, or encoding-only differences.
Ihold>=3AandIhold≥3A,4.7kohmand4.7kΩ,0.1inand0.1"now compare equal. Footprint comparison deliberately stays case-sensitive, since a footprint is a library id. - KiCad and git resilience. KiCad's git-backed
.history/directory no longer aborts the commit at the end of a KiCad-touching stage, leaked scratch directories are reclaimed on startup, and a disk-space preflight fails fast instead of dying on an opaqueENOSPCmid-stage (COPPERHEAD_MIN_FREE_MBto tune). - Observability. A liveness heartbeat distinguishes a slow turn from a hung one, and a per-stage cost table with a TOTAL row shows where the tokens went.
Also in this release
- New config knobs:
turnTimeoutMs,heartbeatMs,maxStageRetries,llmCache. - Groundwork for a SPICE verification gate: a parser for simulation blocks and assertions, with tests. Not yet wired into a command or gate.
- The deterministic
check/verifycommand remains LLM-free and network-free, and the KiCad s-expression reader remains read-only.
npm: https://www.npmjs.com/package/copperhead/v/0.7.0
Full changelog: v0.6.0...v0.7.0