Repository navigation
test(batch): gate projection changes with structure and boundary replay - #23943
Conversation
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c88ffbd506
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| newly_reached = { | ||
| unit: sites | ||
| for unit, sites in changed_units.items() | ||
| if unit in old_blocked and not set(sites).intersection(new_exceptions) |
There was a problem hiding this comment.
Preserve regressions in independently exercised validation stages
When a baseline unit is assignment-blocked, this exemption also suppresses new vad and source_audio failures at previously known sites. However, runner.py runs those validations for every unit before walking any owner chain, so those stages were already exercised even for blocked units. For example, if the baseline has a source-audio error on another unit and the candidate introduces that same error on a blocked unit whose source validation previously succeeded, compare() returns regression: false. Restrict the exemption to stages actually made unreachable by the baseline chain block, or record stage-level reachability before classifying failures as newly reached.
Useful? React with 👍 / 👎.
| # Descending query is reversed so each chain retains commit order. | ||
| units.reverse() |
There was a problem hiding this comment.
Order captured owner chains by their log sequence
When committed_at timestamps tie or arrive out of order across workers, reversing the timestamp-ordered query does not restore predecessor order. The production merger records caller-supplied now as committed_at, while log_sequence and previous_segment_id establish transactional chain order. The runner anchors its watermark to the predecessor of the first listed unit, so a misordered corpus can start in the middle of an owner chain and never exercise its earlier sampled units. Those identical blocks on candidate and baseline are then accepted by the differential gate. Use the captured sequence or predecessor links to order each sampled owner chain before choosing its starting watermark.
Useful? React with 👍 / 👎.
| 'exceptions': dict(sorted(exceptions.items())), | ||
| 'unit_issues': {key: sorted(value) for key, value in sorted(issues.items())}, | ||
| 'chain_blocks': blocks, | ||
| 'persisted': len(log.persist_order), | ||
| 'coverage': dict(sorted(coverage.items())), |
There was a problem hiding this comment.
Compare per-unit dispositions to detect newly quarantined results
If a candidate starts quarantining previously successful units, the replay can still report PASS: Session.persist() counts quarantined receipts as persisted and advances the watermark, while the pending check treats any projection receipt as unblocked. Production assign_parts() catches eligible SyncAssignmentConflict exceptions and persists that disposition without an error/retry log, so the exception collector does not detect it either. This report omits receipt states and assigned conversation IDs, leaving compare() unable to distinguish successful assignment from a newly held, unassigned result—even for the healthy synthetic incident units. Include per-unit dispositions in the reports and fail unexpected transitions from successful assignment to quarantine or supersession, while preserving explicitly expected discarded-target quarantines.
Useful? React with 👍 / 👎.
Compare immutable candidate and baseline code using the real projection walk, assignment planner, VAD/source slice validators, and cross-Context claims. Capture only field-masked structural metadata; fail incomplete corpora closed.
|
Luna round 2 returned SHIP at One nonblocking P2 remains: rows already rejected for unknown structural evidence skip some geometry-gap counters. The gate still fails closed on the structural gap, and the current 2,000-unit corpus has no such unknown rows, so this does not change its verdict. Follow-up The gate does not claim captured audio/VAD geometry or Firestore contention coverage. Capture's final RPC mask excludes whole geometry arrays, and the receipt explicitly names the approved Firestore-structure plus synthetic-boundary scope. |
Problem and change
Batch projection fixes have needed another production ramp to encounter deterministic unit-shape failures. Add a fixed offline adapter and
make batch-replay REF=<sha> BASE=<sha> CORPUS=<path> OUTPUT=<path>so the lead can compare immutable product revisions before deploying.The adapter runs the real owner walk, VAD span validator, partition/build, assignment transaction planner against StrictFirestore targets, source-audio slicing against synthetic PCM, and follow-up claims with real fakeredis Lua across copied executor Contexts. It blocks outbound sockets, gRPC channels, and cloud client construction. Bridge/summary external effects are fake leaves.
Capture allowlist and limits
Read-only
ro-prodcapture selects numeric durations/VAD sample counts; owner/unit/content/conversation/predecessor/watermark/sibling identities; lane, state, attempts, retry presence, recovery state; and target lifecycle/route/privacy flags. It never requests wholespeech_spansormanifest.referencesarrays: Firestore cannot mask element subfields, so requesting them could read nested text or paths. The exact RPC field projections are inbackend/testing/batch_replay/capture.py, the README and each corpus. Geometry slots remain null; only synthetic inputs supply geometry. IDs are HMAC-SHA256 with a fresh private corpus salt. No transcript, audio, names, emails, URIs, or error messages are persisted. Corpus/salt stay mode 0600 under a 0700 scratch directory, outside Git.Live capture contains 2,000 units. All 2,000 lack decoded durations, VAD span arrays and manifest geometry in Firestore. Lead ruling
a76a1aexplicitly forbids artifact export/decryption and accepts Firestore chain/state/assignment structures plus labelled synthetic geometry. The normal gate always adds the incident fixture and a duration-quantile boundary matrix (EOF minus/exact/plus one sample, invalid VAD overrun, first/last valid slices and invalid source/capture slices). Invalid shapes must be rejected. Reports namecoverage_scope=firestore-structure+synthetic-boundariesand retain all missing captured geometry incoverage_limits. Optional strict captured-geometry mode fails those gaps. This PASS cannot claim replay of captured audio/VAD geometry. The follow-up corpus includes one-hop redirect-target lifecycle states. Delete private corpus/salt after the program (David rulinga5c4f6); lead owns that handoff. Tracked in anxcard:batch-replay-gate-20261029. No production deploy or data mutation is part of this PR.Validation
BACKEND_UNIT_TEST_FILE_LIST=/Volumes/Ephemeral/scratch/replay/unit-files.txt BACKEND_PYTEST_WORKERS=4 bash backend/test.sh, throughomi-heavyandnice -n 19.7bc941c43d57409f02ce2d18c18bfa3eee7c8db1reproduces the one-sample EOF VAD ValueError and discarded-backfill owner-chain block; main91d5616fa922e8f77fe02dbea40fa85ef8f45f1eclears those with fix(backend): clamp EOF VAD spans overrunning the admitted duration #23926/fix(batch): hold structural record-target conflicts instead of wedging the owner chain #23932. The corpus also exercises cross-Context follow-up claim release (fix(firestore): release the transaction retry deadline scope across Context boundaries #23928).7bc941c: zero new exception sites or blocked units; FAIL for missing geometry. Subsequent accepted-scope gate adds mandatory synthetic distributions and captures referenced redirect states. Reports stay under/Volumes/Ephemeral/scratch/replay/(private local artifacts).Gate fails new exception sites, regressions on previously exercised units, newly blocked units, synthetic oracle/incident failures, or missing structural coverage. Fixing a head can expose a known downstream conflict on an already-blocked baseline unit; that is recorded separately, while new classes/sites always fail. No
.github/change. Lead owns merges/deploys; one Luna review round is required.Review fixes
The first Luna review requested a tighter read boundary and dispatch/verdict fidelity. Capture now excludes whole geometry arrays at the RPC mask and never inspects them in sanitization. Unknown outcomes, terminal-empty results without proof, and unknown lanes block replay as coverage gaps. Both main-corpus and incident boundary lists are checked explicitly, independently of exception flattening. Quantiles retain observed duration frequency, and per-unit exception counters catch repeated failures at an existing site. Targeted regressions cover all six review findings; round two is limited to this delta.