fix(hooks): keep ingest commit status off the drain residual - #1838
Merged
Merged
Conversation
The hook and the project catch-up share one per-scope projection queue. Counting observations_committed beside that drain still let the drain residual decide the terminal status: leftover rows promoted a pass that persisted nothing into committed, and an empty residual left a peer-won Codex pass as exact_duplicate. The advisory stop required committed, so the race was the flake. Admission now owns the terminal status for Cursor and Codex. A drain residual cannot commit a pass, hide a commit, or invent a duplicate. Byte-budget deferral is unchanged. The Codex stop accepts the same durable terminals as the Cursor ingest and still rejects accepted_for_replay. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
ScriptedAlchemy
marked this pull request as ready for review
September 19, 2026 06:56
Owner
Author
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…-drain-residual-0aa8
…-drain-residual-0aa8
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
committed, hide a real commit, or invent anexact_duplicate.committedorexact_duplicate, neveraccepted_for_replay.Motivation
packaged_host_ingest_delivers_a_registered_advisory_cycleflaked because the hook and the project catch-up drain one queue. Countingobservations_committedbeside that drain left the residual in the status equation. Leftover rows made a Codex pass that persisted nothing look committed; an empty residual left the peer-won pass asexact_duplicate. The stop assertion requiredcommitted, so which drainer won was the flake.Changes
account_hook_admissionkeeps Cursor hook deferral and duplicate evidence on the admission, not the drain.ingest_commit_verdictignores drainmessages_upsertedwhen the route's admission owns the commit (Cursor and Codex project). Hermes and other message-counted routes are unchanged.Test plan
cargo test -p tracedecay-sessions --lib runtime::hosts::cursor::tests::— 13 passedcargo test -p tracedecay-mcp --lib hook_runtime::ingest::tests::— 13 passedcargo test -p tracedecay-mcp --lib ingest::kernels::tests— 3 passedcargo clippy -p tracedecay-sessions -p tracedecay-mcp --lib -- -D warningsChecklist
ci.ymluntouched; nopull_requesttrigger added