Skip to content

fix(compaction): preserve previous summary for empty history - #247

Merged
yumosx merged 1 commit into
pulseaiclub:mainfrom
MIXYANG:fix/compaction-empty-history
Sep 27, 2026
Merged

yumosx merged 1 commit into
pulseaiclub:mainfrom
MIXYANG:fix/compaction-empty-history

Conversation

@MIXYANG

@MIXYANG MIXYANG commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

When a mid-turn compaction has no older messages to summarize, it replaces the previous summary with No prior history., dropping context from earlier compactions.

Reuse the previous summary for an empty history bucket and share this behavior between normal and mid-turn compaction. Refresh inherited file-operation lists once: remove the old suffix only when it exactly matches the previous compaction's Details, preserving unmatched trailing text. This adds no history summarization request.

Regression coverage includes both paths with and without a previous summary, repeated compaction, file-list updates, missing or mismatched file metadata, and save/reload. The Unreleased changelog is updated.

Validation:

  • go test ./internal/session/... -count=1 passed.
  • Compaction package formatting and lint checks passed with golangci-lint v2.13.0.
  • Full local Windows checks were not green: extension fixtures hit dependency-verification timeouts against proxy.golang.org; TestFind_PathPatternUsesFullPath failed in unchanged code; full lint reported five clipboard errcheck findings and one process-launch gosec finding in unchanged Windows files.

@yumosx
yumosx merged commit 78b781d into pulseaiclub:main Sep 27, 2026
9 checks passed
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