Repository navigation
fix(projection): re-arm Codex queue rows parked on obsolete project_path collision - #4356
ScriptedAlchemy with Copilot wants to merge 14 commits into
Conversation
|
…ost:26831/ScriptedAlchemy/tracedecay into copilot/fix-parked-terminal-rows Co-authored-by: ScriptedAlchemy <[email protected]>
Co-authored-by: ScriptedAlchemy <[email protected]>
815a89c to
45d7c23
Compare
03cfac0 to
eabbde4
Compare
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Cross-referenced #4327 and the current session reconciliation. The obsolete collision is selected narrowly and the one-time marker is atomic. Before treating #4327 as complete, add the issue's missing production-path upgrade regression: seed a real parked Codex observation, run registered schema convergence and a projection pass, assert its message text becomes readable, and show genuine transcript/lineage/project-key collisions remain parked on a second upgrade. The current test only fabricates last_error strings and inspects retry deadlines. Also keep the repair bounded per writer transaction (inline finding).
Rechecked the newer eabbde4 head: moving the LIKE predicate into the SQL literal leaves both points unchanged. This is source review; no native latency measurement or passing upgrade test is claimed.
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Pushed 67314e5 to complete the bounded recovery fix. Inspection of shipped beta.88 code showed that terminal parking also saved an OutputCollision disposition and an empty canonical temporal effect and advanced the checkpoint. Clearing only the retry deadline would acknowledge the old skip as ExactDuplicate, leaving the message missing.
The repair now walks committed windows of at most 128 queue rows, matches only the obsolete Codex project_path collision, verifies the saved zero-output effect, and replays through the existing collision-guarded writer without rewinding the checkpoint. Trigger removal/recreation, derived-effect replacement, retry changes, and completion marking stay inside the same write transaction. Genuine conflicts remain parked. It also requests the existing temporal reset and repairs a matching staged skip in a suspended rebuild so later activation cannot discard the recovered message.
Added registered upgrade/restart and suspended-rebuild journeys, public message-read assertions, preserved unrelated collision/checkpoint assertions, and an injected write failure that verifies complete rollback and restored immutability guards. Pinned CI rustfmt and git diff --check pass; two static passes found no remaining concrete issue. Native tests have not run locally; CI must execute //crates/tracedecay-global-db:unit_test. Marked ready to enable that lane.
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Fixes #4327
Codex observations parked by the obsolete
project_pathcollision can remain invisible after an upgrade. The old projector also wrote anOutputCollisiondisposition, advanced its checkpoint, and recorded an empty temporal effect. Clearing the retry deadline alone leaves that historical skip looking like an exact duplicate.This change recovers those observations once per store. It walks the queue in bounded rowid windows, retains the exact Codex
project_pathpredicate, and records completion only after the final committed window. For previously completed skips, the same guarded writer transaction repairs the derived projection state and requests the existing session temporal rebuild. A suspended projection rebuild receives the repaired staged effect so resuming it cannot erase the recovered message. Observations and sanitization receipts remain immutable; genuine collisions remain parked.Coverage includes bounded-window interruption/restart, the one-time convergence marker, genuine collision preservation, registered upgrade with recovered message text, suspended rebuild resume, and transactional rollback. The registered upgrade journeys are
registered_upgrade_recovers_parked_codex_messages_onceandregistered_upgrade_keeps_recovered_codex_messages_after_rebuild_resumeintracedecay-global-db.On the current head, the repository gates, scope gate, dashboard checks, and benchmark harness checks pass. Native Clippy, shipped build, feature gates, and Linux fleet validation are still queued or running. The existing native regression targets must finish before merge.