Repository navigation
test(pusher): replay content-free record-path session traces - #24106
Merged
Merged
Conversation
Batch shadow re-runs recognition on stored audio and never exercises the pusher record path (seal, sticky upload failure, producer tokens, admission barrier), where the 10-29/30 live batch stops and the unsealed no-transcript backlog came from. Add a record-trace/1 corpus and a runner that drives each trace through the real pusher handler with strict Firestore fakes, once per durable mode. Six goldens pin current main, including the drained-pod token gap (known_gap, flipped by the fix) and that an exhausted upload leaves its producer token on the row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
…na r1) The durable outbox commits audio to storage the runner does not fake, so a durable audio replay could pass without exercising custody. Refuse that combination in the corpus check, run audio traces in legacy mode, and add a finalize-only batch_live_v1 trace that runs in both modes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Adds a content-free replay corpus for the pusher record path (seal, sticky upload failure, producer tokens, batch admission barrier) and a runner that drives each trace through the real
routers.pusherwebsocket handler.Batch shadow re-runs recognition on stored audio and never exercises this path. Both 10-29/30 live batch stops and the current unsealed no-transcript backlog were on it, so a record-path change had no pre-deploy replay. This gives one: add a trace per incident, in the PR that fixes it.
backend/testing/record_traces/traces/*.json:record-trace/1fixtures (row seed, websocket sessions as 103/101/104 frames with an upload outcome, expected end state). Durations and protocol shape only: no audio, IDs or user content.backend/tests/unit/test_record_traces.py: replays each trace with the existing strict-Firestore and recording fakes. Finalize-only traces run withAUDIO_DURABLE_OUTBOX_ENABLEDboth off and on. Traces with audio run legacy-only, and the corpus check refuses durable-plus-audio until an outbox fake exists, so a durable replay can never pass without exercising custody. It assertssealed,upload_failed,open_tokensand whetherrequire_record_audio_barrierwould admit the row.a05342f:batch_sync_v1owner;known_gapfor the sealsweep fix (fix: recover unsealed no-job batch captures with digest-gated backfill #24104) to flip.record_upload_failedis sticky, but a dead-token sweeper must keep requiringrecord_upload_failed == false.Test-only: no runtime code, flags or deploy.
Test plan
cd backend && python -m pytest tests/unit/test_record_traces.py -q: 11 passed locally (7 traces × their modes, plus the corpus shape check).Archive listing and tail durability are proved at admission against storage and are not modeled here.
🤖 Generated with Claude Code