mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
2.0 KiB
2.0 KiB
03.1 — Delete superseded context reducers
tinyagents/middleware.rs doc-comments already note these were "effectively
dead on the live loop" before being re-expressed as middlewares.
Current status: harness/compaction/cache_align.rs and the
harness/compaction/mod.rs shim are deleted; the volatile-token detector now
lives inside TinyAgents CacheAlignMiddleware.
Steps
context/microcompact.rs(269): deleted. The shared placeholder/default constants now live incontext/mod.rs, and the live clearing logic is the TinyAgentsMicrocompactMiddleware.context/pipeline.rs(454) +context/guard.rs(236): deleted. The minimal usage/session-memory state now lives incontext/stats.rs, and live compression usesContextCompressionMiddleware+summarize.rs(SUMMARIZE_THRESHOLD_FRACTIONpreserves the 0.90 trigger).harness/compaction/cache_align.rs(200) +compaction/mod.rsshim: superseded byCacheAlignMiddleware; directory deleted.context/tool_result_budget.rs(172): deleted. The UTF-8-safe fallback truncation helper now lives beside action-workspace artifact preview handling; the live TinyAgents path usesToolOutputMiddlewareper-tool caps.- Legacy compaction-breaker fields in
ContextStatsState/ContextStats: deleted after exact non-test call-path checks showed no production readers. The remaining stats projection is UI utilisation plus session-memory state. - Summarization provenance: ensure every compression emits
AgentEvent::CompressedwithSummaryRecorddata (source ids, before/after token estimates) — wireContextCompressionMiddleware:: records()into the run outcome/journal.
Deletions
context/microcompact.rs,context/pipeline.rs,context/guard.rs, andharness/compaction/are deleted.
Acceptance
context/line count drops ~1.2k;stats()UI footer parity test green; compression fires at 90% window on all three turn paths (existing summarize tests).