Skip to content

Wire SessionMemoryAdvisor to resolve and use CompactionScope - #38

Open
AdepuSriCharan wants to merge 3 commits into
spring-ai-community:mainfrom
AdepuSriCharan:feature/compaction-scope-advisor
Open

Wire SessionMemoryAdvisor to resolve and use CompactionScope#38
AdepuSriCharan wants to merge 3 commits into
spring-ai-community:mainfrom
AdepuSriCharan:feature/compaction-scope-advisor

Conversation

@AdepuSriCharan

Copy link
Copy Markdown
Contributor

Stacked on #37 (please review that first).

This is the final piece for branch-aware compaction. With CompactionScope introduced in #36 and wired through the repository layer in #37, this PR makes SessionMemoryAdvisor use it at runtime.

Changes

  • SessionMemoryAdvisor resolves its active EventFilter and passes it to SessionService, ensuring compaction only targets the active branch.
  • Added SessionMemoryAdvisorIT to reproduce the original compaction starvation issue and verify branch-local compaction triggers and archives correctly.

Fixes #35.

- add session and branch compaction scopes
- make compaction strategies use scope-aware turn boundaries
- preserve existing session-level compaction behavior
- add tests for session and branch scope semantics

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
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.

Branch-aware sessions are not isolated during compaction

1 participant