Conversation
Add provider-native Codex continuity, deterministic map operators, shared storage ownership, durable lock recovery, large-file lineage, bounded restart reconciliation, and explicit soft/hard compaction behavior while preserving existing Hermes plugin and storage compatibility. Constraint: Preserve plugin name, context engine name, and database compatibility Rejected: Raise compression timeouts | leaves archive scanning unbounded and masks the restart defect Confidence: high Scope-risk: broad Reversibility: clean Directive: Keep opaque provider capsules out of FTS, summaries, inspection, and public expansion Tested: 2,846 tests passed with one expected skip; Ruff; compileall; shell syntax; live 590K-token gateway auto-resume Not-tested: GitHub Actions Python 3.13/3.14 runners before PR publication
codejeet
marked this pull request as ready for review
August 14, 2026 07:59
Restarted gateway sessions can contain thousands of replay rows, transient host placeholders, and rewritten Discord messages. Reconcile them with linear-time prefix/suffix matching, a conservative durable-tail anchor for very large histories, and an indexed tool-result archive lookup. Constraint: Preserve ambiguous short deltas and immutable stored payloads Rejected: Raise the 30-second timeout | masks quadratic work and continued duplicate ingestion Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep the 4096/1024 large-replay anchor conservative unless production evidence and replay-safety tests justify changes Tested: 1071 core and engine tests; exact 8964-message production replay in 2.136 seconds; 9000-message mismatch in 0.14 seconds Not-tested: Destructive cleanup of pre-existing duplicate LCM rows
This was referenced Aug 15, 2026
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
Why
Long-running concurrent gateway sessions exposed two production failures: restart reconciliation repeatedly scanned a 12,799-file, roughly 540 MB archive, and cloned engines could contend over independently owned SQLite helpers. The first failure pushed a 590K-token resume beyond the 30-second host timeout. The bounded lookup and per-pass identity cache reduce that reconciliation to roughly 2 seconds while preserving every source row and externalized payload.
Validation
Notes