Why: trimOldest dropped single messages without tool-pair awareness — after leading users were evicted it could orphan tool results or leave dangling calls (acceptance clause 2 product-side gap, N2 plan WP1).
What: oldestDrop → oldestDropRange — assistant-with-tool_calls and its contiguous tool results evict as one group; a leading orphan tool-result run evicts as one group; when a group would cross the current turn the trimmer stops (window may be slightly exceeded, pairing never broken). Tests pin both directions plus PrefixHash stability. Nested native/squad pins carry Agent-Native#25 (spill + cache contract).
Evidence: go test -count=1 ./... green; TestTrimOldestKeepsToolPairs asserts pairing across repeated trims.
Impact: trimming semantics change is intentional and documented in the card; no schema/API changes.
Why: trimOldest dropped single messages without tool-pair awareness — after leading users were evicted it could orphan tool results or leave dangling calls (acceptance clause 2 product-side gap, N2 plan WP1).
What: oldestDrop → oldestDropRange — assistant-with-tool_calls and its contiguous tool results evict as one group; a leading orphan tool-result run evicts as one group; when a group would cross the current turn the trimmer stops (window may be slightly exceeded, pairing never broken). Tests pin both directions plus PrefixHash stability. Nested native/squad pins carry Agent-Native#25 (spill + cache contract).
Evidence: go test -count=1 ./... green; TestTrimOldestKeepsToolPairs asserts pairing across repeated trims.
Impact: trimming semantics change is intentional and documented in the card; no schema/API changes.
Refs: Agent-Native#25, Agent-Squad#29, Agent-System-Documents#42
Why: trimOldest dropped single messages without tool-pair awareness —
after leading users were evicted it could orphan tool results or leave
dangling calls (acceptance clause 2's product-side gap).
Evidence: go test -count=1 ./... green; TestTrimOldestKeepsToolPairs
(pairing holds across repeated trims), TestTrimOldestDropsLeadingOrphanToolRun,
TestTrimOldestStopsWhenGroupCrossesCurrentTurn, TestPrefixHashStableForIdenticalInput;
native pins carry the spill and cache-contract work (Agent-Native#25).
Impact: trimming now evicts whole tool groups; the window may be
slightly exceeded when a group would cross the current turn — pairing
is never broken. Report.Truncations still records the count.
Refs: Agent-Native#25, Agent-Squad#29, N2 plan WP1
weichen
merged commit 8858ca9b8a into main2026-10-07 13:13:09 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why: trimOldest dropped single messages without tool-pair awareness — after leading users were evicted it could orphan tool results or leave dangling calls (acceptance clause 2 product-side gap, N2 plan WP1).
What: oldestDrop → oldestDropRange — assistant-with-tool_calls and its contiguous tool results evict as one group; a leading orphan tool-result run evicts as one group; when a group would cross the current turn the trimmer stops (window may be slightly exceeded, pairing never broken). Tests pin both directions plus PrefixHash stability. Nested native/squad pins carry Agent-Native#25 (spill + cache contract).
Evidence: go test -count=1 ./... green; TestTrimOldestKeepsToolPairs asserts pairing across repeated trims.
Impact: trimming semantics change is intentional and documented in the card; no schema/API changes.
Refs: Agent-Native#25, Agent-Squad#29, Agent-System-Documents#42