v2.0.2 - the v2.0 line: budget guardrail retired, journal hardened
The v2.0 major line — the dead budget guardrail retired, the journal hardened against five data-loss holes, CI green on every platform.
⚠️ BREAKING (v2.0.0)
- The advisory budget guardrail is removed —
BudgetTracker, thebudgets.maxTokens/budgets.warningTokenPercentageconfig group, the PostToolUse "prefer inline" nudge, and the never-writtenlimit_reachedstatus are all gone. It never fired under any realistic config: a fresh tracker per PostToolUse fed a single payload, so nothing accumulated across a session (tripping the 2M default needed one >6.8 MB tool payload). A gauge that only sees the hook's payload slice cannot be a budget safety device, and a config knob that does nothing is a false promise. A.coalhearth.jsonstill carrying abudgetsblock is now ignored at runtime and flagged as an unknown group. The recovery core (journal + warm-resume) is untouched.
Fixed — five journal data-loss holes (v2.0.0)
- Concurrency: N concurrent PostToolUse hooks no longer lose each other's journal — the load→merge→save is serialized under a per-workspace
O_EXCLlock (lossless to 30 simultaneous writers; a 30-way race dropped all 30 before). - A transient-corrupt journal is quarantined, not overwritten (bytes preserved to
session_handoff.corrupt.json). - A second session in the same workspace no longer discards the first's journal (keyed on the payload
session_id). - A wrong-typed journal field no longer eats the recovery block (array-coerce every field; mark-resumed moved after a successful prompt build).
- A file blocking
.claude/coalhearthnow signals on the sanctioned channel instead of leaving warm-resume silently off.
Changed (v2.0.0)
- All journal writes are atomic (per-pid temp + rename) — a crash mid-write can't leave a torn journal.
CI-green fix-forwards (v2.0.1 + v2.0.2)
- v2.0.1 — the read-only-journal regression test now simulates a true read-only fs on every platform (chmod the containing dir
0o555, not just the file0o444: POSIXrename(2)replaces a destination needing only directory write, so a file-only chmod let the atomic write succeed and the honesty note never fired — green on Windows, red on macOS/Linux). - v2.0.2 — the
sandbox()test helper realpath's its tmpdir dirs so ROOT2/H3 passes on macOS (os.tmpdir()is/var→/private/var, a symlink; a spawned hook'sprocess.cwd()is physical, sopath.relativeyielded absolute paths where the test asserts relative). Test-only; the production hot-path stays lexical, matching the other six sandbox helpers in the repo.
Zero-dependency, offline, no API keys. Full detail: CHANGELOG.