Skip to content

refactor(session): separate runtime context management and harden snapshots persistence#293

Merged
GCWing merged 5 commits intoGCWing:mainfrom
wsp1911:main
Mar 27, 2026
Merged

refactor(session): separate runtime context management and harden snapshots persistence#293
GCWing merged 5 commits intoGCWing:mainfrom
wsp1911:main

Conversation

@wsp1911
Copy link
Copy Markdown
Collaborator

@wsp1911 wsp1911 commented Mar 27, 2026

  • add structured fallback compression when model summarization fails
  • split runtime context storage from compression responsibilities
  • remove redundant legacy session history persistence and in-memory history caching
  • add paginated session message retrieval in the server RPC layer
  • persist runtime context snapshots on semantic updates
  • fix /btw turn indexing and session metadata persistence

wsp1911 added 5 commits March 26, 2026 21:38
- add structured compression payload metadata to reminder messages
- fall back to sanitized local turn compression when model summarization fails
- track whether compression used a model-generated summary
- reorganize session compression into dedicated modules and add tests
- limit PersistenceManager to project-scoped session persistence
- make history and compression managers in-memory only
- simplify agentic system initialization across CLI, desktop, and server
- use the compression manager as the runtime session context cache
- rebuild canonical message history from persisted turns when needed
- add paginated session message retrieval in the server RPC layer
- remove obsolete desktop and web APIs that depended on the old history cache
- replace CompressionManager with SessionContextStore and ContextCompressor
- move runtime context state handling into SessionManager + SessionContextStore
- make ExecutionEngine depend on ContextCompressor explicitly
- remove the old mixed-responsibility manager and update wiring
- save context snapshots at turn start, context append, compression replace, and turn end
- await snapshot persistence when compression rewrites runtime context
- document best-effort, non-transactional snapshot persistence
- restore by merging snapshot state with newer persisted turns
- fix `/btw` turn indexing and session metadata persistence
@GCWing GCWing merged commit 12df29e into GCWing:main Mar 27, 2026
4 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