Skip to content

ha 0.9.7

Choose a tag to compare

@DEVfancybear DEVfancybear released this 12 Nov 09:58
· 149 commits to master since this release

Fixes from a bug report of a long goal session, a bug report that is easier to trace, and a prompt cache that is not rewritten in the middle of a turn.

From bug report 20261112

  • A summary the user stopped with Ctrl-C is recorded as canceled (compaction.earlier_summary_canceled, turn_summary_canceled), not as an error, and raises no notice.
  • A memory review is told what a [Host]: block is: a turn the host started, never the user's words. Reviews quoted the goal's continuation as a correction's evidence and had every edit refused.
  • A checkpoint of the whole conversation starts from the summary the turns kept and summarises only what came after it. It wrote the conversation again from its first message, four minutes before a turn.
  • A request the provider refused as over its window is tried again on a run that is still open. The run read failed while the second try worked.
  • A background command's end says which command ended and with what exit code.
  • The eight fixes of the first pass over the same report (commit 70abf55).

The bug report

  • review.applied carries why a review's edits were refused, and SUMMARY counts the reasons.
  • SUMMARY names what the host sent into running turns by kind, the checkpoints written before a turn and how long they took, the summaries the user canceled, and a run or a command a step left open.
  • It counts the requests that rewrote what was already sent, and the tool results dropped.

Prompt cache

After AKV (arXiv 2610.28577, thu-nics/AKV). AKV drops and repositions KV states inside the serving engine; a hosted provider caches a request by its start, so its rules are kept in the text ha sends.

  • A turn of a compacted conversation sends its first packet at every step. Every step built it again.
  • A tool result sent shortened is sent as that same text by every later step and every later turn, so it is rewritten once.
  • A request that rewrote what the one before sent is recorded as cache.prefix_rewritten, with what it rewrote.
  • HA_CONTEXT_DROP=keep[:n] keeps a turn's newest n tool results (12 by default) and drops older ones a batch at a time. tool gives the model drop_context. Both are off by default: a drop costs one re-read of the cache. Reasoning and the model's own messages are never dropped.
  • Each model call records the tokens written to the cache.
  • Not possible on a hosted API, so not done: KV-level drop and reposition, the radix tree, drop-aware eviction.

Other

  • The fixture host gets ha's 8 MiB main stack; a debug build's turn overflowed the default one.
  • New live suite scripts/testing/live-tests/context-drop.sh.

Verified

Gate (fmt, clippy, workspace tests) clean. Live on this ha.exe with openai-codex/gpt-6-luna at max: context-drop.sh 15/0, prime.sh 17/0, diag.sh 37/0, queue.sh 19/0, memory.sh 44/0, compaction.sh 25/0. Control: context-drop.sh on 0.9.6 is 4/11.