fix(compression): recover rotated session lineage - #71001
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on 11ba7f4 ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job1 visual diff. inline evidence upload failed. Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso) |
…tated snapshots The salvaged drift check compared durable rows to the in-memory snapshot by content and ran in both modes. Two problems: 1. In-place compaction (the default) archives non-destructively — drift cannot lose data there, and the strict-prefix content comparison failed against seeded histories, aborting every in-place compaction (5 test failures in test_in_place_compaction.py). 2. Content equality wedges on sessions with legal in-memory mutation of past turns (multimodal compression, retry replacement) — the same permanent-abort shape as #14694. Now rotation-only and length-based: abort only when the durable parent has MORE rows than the snapshot (a writer committed in the lease window). Dead helper _durable_history_matches_snapshot removed.
…uard Two compression-tip hydration tests simulated legacy state by emptying the parent AFTER end_session(compression) — exactly the durable write the new closed-parent guard refuses. Reordered: empty first, close second. The tests' actual contract (old id hydrates from the live tip) is unchanged and still pinned.
This was referenced Jul 24, 2026
9 tasks
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.
Summary
Compression rotation no longer strands a stale worker appending to a closed parent session — child publication is atomic, closed parents refuse writes, and live children are discoverable for recovery.
Changes
/sessionsand/resume#59527 contract) — the PR's direct INSERT would have bypassed compression-fork inheritanceValidation
55+46+584 targeted tests green (lineage guard, rotation state, concurrent fork, hermes_state, gateway session); ruff clean.
Infographic