You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- geminiChat: remove pre-call consecutiveFailures reset in hard-rescue.
force=true already bypasses the breaker check in chatCompressionService;
the pre-reset was redundant on success (post-call L614 already handles it)
and *broke* the breaker on failure paths — hard-rescue failures don't
increment via tryCompress (force=true skips that branch), only the
reactive overflow path at L992 explicitly increments. With the pre-reset
the counter oscillated 0↔1 every send and MAX_CONSECUTIVE_FAILURES=3 was
unreachable. Wrote a RED test asserting the forwarded counter is the
latched value, not zero; the test failed against the old code and passes
with the reset removed.
- geminiChat: log hard-tier-rescue triggers via debugLogger.warn including
effectiveTokens, hard, and the current consecutiveFailures so operators
debugging "compaction stopped working" have a breadcrumb.
- chatCompressionService: clamp effectiveWindow to >= 0 in computeThresholds
so the value surfaced in /context stays meaningful for tiny windows
(window < SUMMARY_RESERVE). auto/warn/hard outputs are unaffected because
each is Math.max(proportional, absolute) and the proportional branch
dominates whenever the absolute branch goes negative.
- turn.ts: rewrite COMPRESSION_FAILED_OUTPUT_TRUNCATED docstring. Drop the
misleading "compression succeeded" framing (the summary is dropped and
isCompressionFailureStatus returns true) and reference the full enum name
COMPRESSION_FAILED_EMPTY_SUMMARY instead of the abbreviation.
- contextCommand.test.ts: reword the no-API-data-session test comment.
collectContextData classifies estimated sessions against rawOverhead;
with default fixtures rawOverhead lands in `safe`, but heavy
system-prompt / skill / MCP loads can push it into warn/auto/hard.
- design doc Background: prepend a blockquote clarifying the section
describes pre-redesign behavior and that the inline file:line references
point at code before PR #4345 (which removes them).
- ui/types: replace the duplicated ContextThresholds interface with a
type alias to the core's CompactionThresholds. Field-by-field copy in
contextCommand.ts becomes a direct spread. ContextUsage.tsx keeps its
CompactionThresholds React component name — the alias avoids the
collision a direct import would have caused.
- contextCommand: interpolate the actual reserve value into the
"(window − 20K reserve)" annotation so SUMMARY_RESERVE retuning doesn't
leave the text stale.
0 commit comments