Skip to content

fix: remove non-working summarization middleware - #1883

Merged
avoidwork merged 3 commits into
mainfrom
fix/remove-summarization-middleware
Nov 18, 2026
Merged

avoidwork merged 3 commits into
mainfrom
fix/remove-summarization-middleware

Conversation

@avoidwork

@avoidwork avoidwork commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Description

PR #1881 moved auto-compaction into the TUI but left the custom SummarizationMiddleware registered in deepAgents.js. This removes the middleware, its onCompacted plumbing, and the enabled/trigger/keep config. keepMessages and contextFraction stay, and /compact and auto-compact now honor keepMessages. The status bar's red threshold now comes from summarization.contextFraction instead of a hardcoded 80%, so it turns red exactly where auto-compaction fires. docs/CONFIGURATION.md is rewritten, and the docs/DOCKER.md table now lists SUMMARIZATION_KEEP_MESSAGES and SUMMARIZATION_CONTEXT_FRACTION.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Breaking: the summarization schema is strict, so a config.yaml that still sets summarization.enabled, trigger or keep is rejected. Delete those keys.

Testing

  • Deleted the middleware's unit and integration tests along with the middleware.
  • Rewrote tests/unit/config/summarization.test.js for the reduced schema, including rejection of the removed keys.
  • Updated statusBar.test.js so the orange/red boundary follows the compaction fraction, with a test that a configured fraction overrides the default. Updated conversationArea.test.js to compare the default against the schema.
  • npm test: 5512 pass, 0 fail. npm run lint: 0 errors.

Coverage

  • Line coverage maintained

Not verified for this update: a standalone npm run coverage run was not completed. The pre-commit hook regenerates coverage.txt on each commit.

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Threat model: N/A. This removes code and adds no new inputs, I/O, or secrets. The reactive context-window handler (#1251) is unchanged and remains the overflow safety net.

PR #1881 moved auto-compaction into the TUI but left the library-replacing
SummarizationMiddleware registered. Remove it, its onCompacted plumbing, and
the trigger/keep/enabled config. Keep keepMessages and contextFraction, and
make /compact and auto-compact honor keepMessages.
@avoidwork avoidwork added the bug Something isn't working label Nov 18, 2026
@avoidwork avoidwork self-assigned this Nov 18, 2026
The status bar spinner turned red at a hardcoded 80% while auto-compaction
used config.summarization.contextFraction, so the two could drift apart.
Pass contextFraction through App and InputArea to StatusBar so red starts
exactly where auto-compaction fires. Take the fallback default from
SummarizationSchema instead of duplicating 0.8 in the TUI.
@avoidwork
avoidwork merged commit 8aede43 into main Nov 18, 2026
2 checks passed
@avoidwork
avoidwork deleted the fix/remove-summarization-middleware branch November 18, 2026 03:36
@avoidwork avoidwork mentioned this pull request Nov 18, 2026
6 of 12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant