Repository navigation
fix: preserve covered prefixes and reject ambiguous compaction ownership - #456
100yenadmin wants to merge 5 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueWarning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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 |
|
Thanks for this bounded attempt at #247. That issue is now closed, and the underlying publication_invariant_conflict mechanism across compaction boundaries was fixed on main in v0.24.0 (#484, together with #462), with further occurrence-projection work in v0.24.1 (#510/#515). Closing as superseded. If ambiguous legacy ownership still blocks publication on current main, please open a fresh issue with a v0.24.1 reproduction and a PR against main. |
Problem and behavior
Compaction can reject a contiguous new leaf when a retained summary already covers the leading part of the logical conversation but the lifecycle frontier is stale. Source mapping and publication must use the same ownership domain; widening only publication is insufficient.
This change credits only a proven retained leading prefix, leaves original leaf lineage unchanged, and publishes new source occurrences once. Explicit conversation ownership remains authoritative. Ambiguous legacy ownership, duplicate claims, missing coverage, or inadmissible potentially emitted summary lineage reject publication without advancing the frontier.
The ownership check conservatively validates all current uncondensed roots that could be emitted, independently of token-budget prediction. This can refuse compaction for an invalid legacy root even when one particular cap would omit it. It does not delete, reassign, or silently repair that history.
Refs #247. This is a bounded replacement implementation; contributor PR #397 remains preserved. This PR does not close #247 or claim retained-session recovery, release acceptance, or a deployed repair.
Validation
7fb19f8d3518080c8d07408a2a28c3c66c15c51b.f063c8f3be4b3f0037e930d539c58ba33d73a918,PYTHONPATH=<pinned-Hermes-checkout> python -m pytest -q tests/test_issue_247_multisession_publication.py: 9 passed. The file exercises atomic refusal, exact leading-prefix credit, rollover, mixed below/above-frontier duplicate claims, conflicting blank legacy bindings, and capped emitted-root ownership.nameinstead of Hermes'stool_namewas corrected; it is not counted as a product defect.No schema migration, provider-routing change, host protocol, native fallback, or historical re-summarization is introduced. Existing original messages and summary nodes remain stored.