Repository navigation
feat: add lossless-ignored sidecar table and store API (WS1.5 PR-1) - #162
100yenadmin wants to merge 6 commits into
Conversation
Groundwork for storing ignore_message_patterns drops losslessly instead of discarding them. Adds an additive ignored_messages child table plus the store read/write API, with no ingest behavior change yet: no drop path is redirected here, so replay, FTS, token counts, and cursor reconciliation are untouched. The sidecar is deliberately separate from the messages table. Keeping ignored content out of the parent means the ~10 'stored row == replay row' reconciliation assumptions and the external-content FTS rebuild never see it, so lossless capture needs no changes to those fragile subsystems (the reason a messages.ignored column was rejected). Migration is version-fenceless: ensure_ignored_messages_table runs unconditionally in run_versioned_migrations and does not bump SCHEMA_VERSION, so an older build simply ignores the table and keeps dropping -- downgrades stay safe. append_ignored_batch routes rows through the same ingest protection as append_batch (redaction / externalization before persist). Session rebind and delete keep the sidecar bound to its parent session. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Imported upstream pr-conversation
@codex review current head 9bcbc27. Base PR for the lossless ignored-message sidecar stack; please review the schema/store API boundary and migration/test coverage before the follow-on capture PR is considered. Imported upstream pr-conversation
@codex review current head b22be578. Addressed the cleanup P2: doctor clean apply now deletes ignored_messages in the same transaction, with purge and rollback regression coverage. Validation: exact regressions 2 passed; adjacent 85 passed; stacked full suite 1622 passed, 12 xfailed; ruff and hygiene gates passed. Imported upstream pr-conversation
Re-gate evidence for current head
@codex please review this exact head, especially ignored-only discovery and cleanup atomicity. Imported upstream pr-conversation
@codex Please review repaired head Repair: cleanup candidate discovery now includes ignored-sidecar-only sessions; regression covers preview discovery and backup-first apply deletion. Transactional rollback coverage remains green. Fresh local evidence: focused 4 passed; full suite 1616 passed / 12 xfailed; ruff, compileall, py_compile, shell syntax, and Please focus on the candidate CTE scope and ignored-only cleanup semantics. Imported upstream pr-conversation
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". Imported upstream pr-conversation
@codex review\n\nCurrent repaired head: Imported upstream pr-conversation
@codex review Please review exact repaired head This fast-forward repair addresses the three current P2 findings: metadata-length validation before transactions, ignored-only cleanup discovery with backup-first deletion, and atomic normal/sidecar reassignment, deletion, and cleanup rollback. Independent local review reproduced 92 focused tests plus 3 critical concurrency/rollback regressions. Imported upstream pr-conversation
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". Imported upstream pr-conversation
Moved to draft to reduce the size of the open review queue, as requested. Nothing is closed and no work is lost: the branch and its history stay intact. This will be reopened once the corresponding workstream base has clear review direction. Queue context: #416. This PR is the base of the WS1.5 stack — #363 builds on it — so it is one of the first that would be reopened. Imported upstream pr-review-commented
💡 Codex ReviewHere are some automated review suggestions for this pull request. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". Imported upstream pr-review-commented
💡 Codex ReviewHere are some automated review suggestions for this pull request. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". Imported upstream pr-review-commented
💡 Codex ReviewHere are some automated review suggestions for this pull request. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". Imported upstream pr-review-comment
When the follow-on capture path starts using this insert, Useful? React with 👍 / 👎. Imported upstream pr-review-comment
When a session has only rows in Useful? React with 👍 / 👎. Imported upstream pr-review-comment
When callers provide Useful? React with 👍 / 👎. |
|
Triage: this PR is fully contained in #163. Established by commit-set inclusion, not inspection — every commit on this branch is an ancestor of #163's head, and #163 carries additional commits on top. So landing #163 lands this work too, and this PR should close as included at that point rather than being reviewed separately. Not closing it yet, because #163 is not itself ready: it needs a rebase against current main. If #163 is ultimately abandoned, this branch becomes the fallback, so it stays open until that is decided. One correction to what its checks currently show: the red on this PR is stale, not broken. It failed |
|
Thank you @ai-ag2026. This draft mirrors upstream hermes-lcm#362, which was closed upstream without being merged. Its preservation record (#99) is closed. It is a behaviour-neutral schema substrate on a base about 1,200 commits behind main, which has since shipped v0.24.0 and v0.24.1. Closing as a stale mirror. Please refile against current main if the ignored-message sidecar is picked up again. |
Important
This executable LCM-X PR was recreated by the migration operator from the exact upstream commit head. GitHub did not transfer the original PR actor, dates, review objects, or approval state.
Source and attribution
e83a818a135a298682dfe91e1bb46e6a0c8aa3e3ai-ag2026/hermes-lcm:pr/ws1.5-ignored-sidecarmainupstream/pr-362Truedraft(a maintainer can mark it ready when current-head review is wanted)@coderabbitai ignore
Original commit authorship and history remain in the commits. Historical discussion and review text are imported below as attributed ordinary comments; they are not new approvals or change requests.
Original upstream PR description
Summary
This remains the behavior-neutral storage substrate for preserving messages dropped by
ignore_message_patternswithout exposing them to replay, FTS, token counts, or cursor reconciliation.ignored_messageschild table andidx_ignored_sessionthrough the idempotent versioned-migration path./lcm doctor clean apply.zip(...)truncation and partial writes.The reviewed head is
e83a818a135a298682dfe91e1bb46e6a0c8aa3e3.Why
An
ignoredcolumn on the hotmessagestable would break the project’s stored-row/replay-row assumptions and allow external-content FTS rebuilds to index ignored content. A separate child table keeps ignored content structurally outside replay, FTS, counts, and reconciliation while retaining it for audit and explicit inspection.The repair also closes the lifecycle gaps identified during review: ignored-only sessions are discoverable by cleanup, cleanup deletes sidecar rows atomically, reassignment/deletion roll back both normal and sidecar mutations on failure, and optional metadata cannot silently truncate a batch.
Validation
Exact reviewed head:
The effective added-line security scan over
upstream/main..HEADreported 0 findings. Independent same-card review ACCEPT reproduced the 92 focused tests and the 3 critical concurrency/rollback regressions on the exact head.Notes
ensure_ignored_messages_tableremains idempotent and does not advanceSCHEMA_VERSION; older builds ignore the extra table, preserving downgrade behavior.messagesplusmatched_pattern; ignored content remains audit-on-demand rather than active context.5033da015819cacbd3b8b87248bfdca9b8221edb; no force-push or history rewrite was used.Refs
message_parts.is_ignored.messages.ignoredflag, which would reintroduce FTS rebuild and reconciliation coupling.