Skip to content

fix(context): state the messages-only basis in the proactive-compression log lines - #15055

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
skygunner:fix/14931-compression-log-basis
Sep 29, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
skygunner:fix/14931-compression-log-basis

Conversation

@skygunner

@skygunner skygunner commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR (plain language)

Proactive compression triggered: 17,508 tokens > ... sitting two lines above Input exceeds context window ... estimated 67,541 reads like a bug — it isn't. The first number is messages-only (tools are accounted separately as the threshold's reserve); the second is the full breakdown. Nothing said so, so this labels both log lines with their basis.

An empirical probe (chat and responses shapes, tools-heavy body) confirmed the current pipeline already logs the same messages-only basis on both inbound formats — the per-format inconsistency reported in #14931 died with the modular compression rewrite. Only the missing label remained.

This is Part 3 of a 3-part series on #14931 — Part 1: sibling-side limit resolution · Part 2: estimator calibration · Part 3 (this PR): log basis labels. Sibling PRs: #15053 and #15054. Please keep the issue open until all three land.

Change

  • Proactive compression triggered: X message tokens > Y threshold (Z limit, tools reserve R)
  • Context compressed: A → B message tokens (layers: ...)

Log text only; no behavior change.

…ion log lines

Refs diegosouzapw#14931. Part 3 of a 3-part series on the context-guard false kill:
- Part 1: sibling-side limit resolution (combo limits)
- Part 2: estimator calibration against provider-reported usage
- Part 3 (this PR): log basis labels

An empirical probe (chat and responses shapes, tools-heavy body) shows the
current pipeline already logs the same messages-only basis on both inbound
formats — the per-format inconsistency reported in diegosouzapw#14931 died with the
modular compression rewrite. What remained confusing was reading that
number next to the final guard's full-breakdown rejection
('Proactive compression triggered: 17,508' vs 'estimated 67,541'): nothing
said the first excludes tools. State the basis and the tools reserve in
both log lines. Log text only; no behavior change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants