Repository navigation
fix: recover stale session summaries after late capture and restart - #1551
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rohitg00
added a commit
that referenced
this pull request
Oct 16, 2026
* fix: recover failed observation compression safely * fix: preserve legacy raw evidence until compression succeeds * fix(compression): validate callers joining in-flight recovery * fix: recover session summaries after late capture and restart (#1551) * test: allow Hermes contract suite time on busy CI runners * docs: align localized inventories and numeral agreement
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completed sessions can retain stale summaries when compression finishes after close or an observation is replayed later. A restart previously lost the remaining background work, leaving the session stale until another explicit request.
Persist summary repair intent before close and recover it at worker startup and on the existing finalization tick. Reuse scoped compression recovery before summarizing, keep failed work with bounded backoff, and make duplicate capture replay a no-op. Preserve disabled idle-finalization behavior.
Replace timestamp-only coverage with an observation-content fingerprint and guard summary publication against concurrent observation changes, session replacement, deletion, and imported summaries. Partial chunk output remains retryable. Recovery does not repeat graph extraction or consolidation. Compression callers independently validate scope and revisions when joining existing work, and a replacement retry processes only its current source.
This is stacked on #1546 and should merge after it. It is separate from the capture privacy and truncation changes requested on #1510.
Validation:
95461ea82e7c7b175087a31d7482b0062003a7b081bb71527aa9c236b66fa627.The packaged recovery gate runs in the existing Linux/macOS release-gate workflow and uploads its receipts. Generated documentation changes update the source-derived function, file, and KV scope counts.
The local packaged check uses Node 24.19.0 on macOS arm64, native iii 0.22.1, a deterministic loopback model and cached dependencies. It does not establish a clean dependency installation or live-model behavior. Process-loss tests allow ordinary state flush before killing the worker and engine. Older summaries without repair records rebuild on their next summarize request; this change does not scan every historical session.