Repository navigation
fix(projection): recover Codex rows parked by obsolete path collisions - #4356
Conversation
|
…ost:26831/ScriptedAlchemy/tracedecay into copilot/fix-parked-terminal-rows Co-authored-by: ScriptedAlchemy <25274700+ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: ScriptedAlchemy <25274700+ScriptedAlchemy@users.noreply.github.com>
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)
…terminal-rows # Conflicts: # crates/tracedecay/src/daemon/tests/rmcp_route/host_index_handoff.rs
Codex observations parked by the obsolete project_path collision are recovered once per store. Recovery walks bounded rowid windows and records completion only after the final committed window. Previously completed historical skips repair their derived projection state and request the existing temporal rebuild in the same guarded transaction. Suspended rebuilds receive the repaired staged effect, so resuming them preserves recovered messages. Original observations and sanitization receipts remain immutable; genuine collisions stay parked.
The predecessor behavior shipped in master history (
950bf21f85). Recovery uses existing background schema convergence and does not block daemon admission.The graph-off overflow regression holds background admission while restoring the canonical retained text owner and committing one bounded page. It retains exact owner/generation identity, committed progress, queryability, and zero full-decode assertions. The handoff fixture settles initial graph admission, then holds the scheduler across save admission and snapshots its exact generation under that hold. After releasing the scheduler, it still proves broker debt prevents currency without relying on an unknown verification state.
Includes master through
3fa43f6cba, including the discovery-clock fixture control and warming-route publication join. The handoff merge resolution preserves both master's readiness settlement and the branch's scheduler barrier.Validation:
954841daa2760d2c8280746bb1b18beff32db79c, the reported detached warm-up regression and the merged committed-save handoff regression both passed: 2 passed, zero failed or ignored, 937 filtered, 14.41 seconds. Bazel invocationd69c0045-2265-4bd7-9dd2-09a35c4f32b8forced Rustc and TestRunner remote, disabled local fallback, and disabled test-result caching.6a9b98fhead, the Linux fleet passed 168 of 169 targets. All 461 global-database unit tests passed; code-index tests passed 649 with one pre-existing ignored test. The sole failing target was the detached warm-up assertion now covered by the passing focused run.Full current-head hosted CI, including the Linux fleet, Clippy, shipped CLI, and aggregate result, must pass before merge.
Fixes #4327