Skip to content

feat: add session rollover lifecycle helper - #17

Merged
stephenschoettler merged 1 commit into
stephenschoettler:mainfrom
Tosko4:feat/session-rollover-bootstrap-audit
Apr 15, 2026
Merged

stephenschoettler merged 1 commit into
stephenschoettler:mainfrom
Tosko4:feat/session-rollover-bootstrap-audit

Conversation

@Tosko4

@Tosko4 Tosko4 commented Apr 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add a small rollover_session(...) lifecycle helper to the LCM engine
  • cover repeated /new-style session boundaries without duplicating retained nodes
  • tighten Hermes-native session rollover behavior without pretending the engine already has full transcript bootstrap / rotation machinery

Why

Session boundaries are exactly where long-lived context engines get weird if lifecycle handling is loose.

This PR takes the smallest useful step:

  • flush old-session state
  • rebind to the new session
  • optionally carry retained summaries forward
  • make repeated rollover boundaries deterministic

That gives Hermes LCM a cleaner rollover path right now, without overreaching into a much larger bootstrap/checkpoint design in the same slice.

Notes

This is intentionally not a full bootstrap / checkpoint / transcript-rotation implementation yet.
That larger state model still needs its own design and review.

Related host-side compatibility follow-up: NousResearch/hermes-agent#8416.
That companion PR improves Hermes Agent's external context-engine lifecycle ergonomics without changing default built-in behavior or bundling hermes-lcm into Hermes Agent.

Test Plan

  • python3 -m pytest tests/test_lcm_engine.py -q
  • python3 -m pytest tests/ -q
  • local host dogfood check confirmed Hermes is loading this plugin branch from ~/.hermes/plugins/hermes-lcm

@stephenschoettler stephenschoettler left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and correct. Having the lifecycle ordering (flush → reset → bind → carry over) in one method prevents integration bugs. Repeated rollover test is a good edge case to cover.

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