Skip to content

v0.17.0

Choose a tag to compare

@magifd2 magifd2 released this 06 Jun 08:45
· 22 commits to main since this release

Two ADRs landing together to close the "long sessions re-anchor to early topics" symptom end-to-end.

Added

  • Memory entries gain a lifecycle (ADR-0031). Global Memory and Session Memory entries now carry a four-state machine — fresh/active/dormant/archived — driven by a per-user-turn relevance decay. Decay multiplier, fresh window, state thresholds, and touch / consolidation Jaccard thresholds are tunable under Memory.Lifecycle.* in the JSON config. Entries lexically referenced by the user turn (or named in the extractor's new touched| lines) reset to relevance 1.0; near-duplicate Add calls consolidate into the existing entry instead of appending. Eviction under cap pressure prefers archived → dormant → active → fresh. The sidebar Memory tab gains per-row state badges, a thin relevance bar, and a Show archived (N) disclosure. All state transitions log to app.log.

  • Context compaction v2 (ADR-0032). The conversation-tail summary is no longer a single block. contextbuild.Build now produces a two-tier summary (far ~5% of budget, near ~15%) plus a verbatim anchor block rendered between the summaries and the raw records. Anchors are detected by lexical Jaccard against decision / preference Global Memory facts. Records lexically matching a dormant / archived Session Memory fact (with a live-clause safety net) are dropped from the summary input entirely and surfaced as a [N dead-topic turns suppressed] elision marker. The summary cache key is content-hashed: stable across turn additions that don't change a tier's input, invalidates when the ADR-0031 lifecycle changes the drop set. The summarizer prompt drops "Preserve key facts, decisions, and context" — the load-bearing source of early-anchor reinforcement — in favour of a topic-bullet format. Tunable under ContextBudget.{FarSummaryShare, NearSummaryShare, AnchorJaccardThreshold, DeadTopicJaccardThreshold}.

Backward compatibility

  • Legacy global_memory.json / session_memory.json files load as active with relevance 1.0 and re-save with the new fields populated.
  • Legacy summaries.json cache files load without error; their range-keyed entries are skipped by the v2 cache lookup and FIFO-cleaned over time.

Docs

  • ADR-0031 (memory entry lifecycle)
  • ADR-0032 (context compaction v2)
  • docs/{en,ja}/reference/memory-model updated with §7 and §10 reflecting both ADRs