v0.12.1 — audit hardening sweep
Clears the remaining low-priority hardening notes from the v0.11.0 audit (docs/11 section C — now fully consumed). Regression suite 203 → 205.
Fixed
- Stop hooks now verify the
writeSyncreturn value when appending an event line; a short write (e.g. ENOSPC) is truncated back to the pre-write size and reported, so a fragment can never corrupt the next event line. latestAgentDoneEventno longer goes silently blind past 1 MB of events: it reads a bounded 64 KB tail (dropping the first partial line), keepingagent_event_seen/last_turn_idmetadata live on long sessions — and reading less than before for mid-size files.- Non-agent sessions skip the agent-metadata directory probe on every
pty_readvia a 2-second absence-only negative cache (read-suffix path only; invalidated onopenAgent/closeSession/killAll).