Skip to content

v0.12.0 — durable-memory flush (write-at-realization)

Choose a tag to compare

@Redtropig Redtropig released this 14 Jul 19:26
· 86 commits to main since this release
a49587d

Durable memory — golden rules, decisions, milestones — used to be harvested at session end, exactly when compaction and attention dilution have already distorted the details or displaced the intent. v0.12.0 moves the write to the turn the signal appears (rough stubs with pasted evidence are legitimate; polishing is idempotent, loss is not) and backs the contract with three warn-only sentinels at the danger moments: context filling, just-compacted, and stopping. A full-plan sandbox rehearsal before execution also surfaced two hook-robustness hazards, fixed here: unbounded stdin capture could hang hooks for callers that hold stdin open, and post-tool-use's TERM watchdog cost every consumer ~5s while never actually killing a runaway main.

Added

  • Write-at-realization contract for durable memory: capturing-golden-rules now mandates
    capture in the turn the signal appears, with a legitimate rough-stub form (origin = pasted
    evidence at hand; Check defaults manual review → /gc's [MANUAL] tier); template note synced.
  • hooks/post-tool-use Check 1d — context-fill flush reminder: transcript-size threshold
    (6 MiB const), warn-once per session via a .harness-anchor/flush-warned-<session_id> marker;
    X-vs-Y blind spots documented in the check header.
  • hooks/session-startcompact caution line: fired with stdin source=="compact", the
    banner warns that memory-from-recall is unreliable and points at on-disk evidence; stdin read
    is -t 0-guarded (non-blocking), regular startups zero-increment.
  • Contract tests: post-tool-use-flush-sentinel.sh, session-start-compact-caution.sh.

Changed

  • hooks/stop — the stale-progress nudge now also reminds to flush chat-only durable memory;
    observation-point header documents the mtime-proxy blind spot (cannot see chat content).
  • hooks/post-tool-use — stdin capture bounded (1s read -t; callers holding stdin open no
    longer hang the hook) and watchdog hardened to the SIGKILL/stdio-detached idiom
    (session-start's v0.10.0 lesson): the TERM version added ~5s wall to every
    command-substitution consumer and could not actually kill a runaway main.
  • Same-turn flush cross-links: self-correction-loop (capture hop after a recurrent fix),
    context-budget-discipline (flush-before-compress ritual + rebuild-from-disk after
    compaction), feature-state-keeper (mid-session milestone progress.md prepends),
    /session-end step 7 reframed as the safety net rather than the capture moment.