Skip to content

SCA-2974: Hold repeatable retained PCM digest mismatches - #25761

Merged
Git-on-my-level merged 9 commits into
mainfrom
agent/m1-studio-devin-fusion-gpt-6-s/4c77311a7e60
Nov 20, 2026
Merged

Git-on-my-level merged 9 commits into
mainfrom
agent/m1-studio-devin-fusion-gpt-6-s/4c77311a7e60

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Quarantine recovery re-reads only the mismatched retained source, once, under the same privacy and generation fences. Both reads must disagree with the manifest's SHA-256 of decoded PCM before recovery commits failed_held with retained_digest_changed. The successful CAS emits the bounded omi_fallback_total reason; the task receives 200 and duplicate deliveries and automatic redrive do not retry the source. A matching confirmation resumes ordinary recovery. Storage outages, missing inputs, invalid manifests, and switched-off target 409s keep their existing paths.

The SHA-256 check, custody, expiry/deletion policy, and reviewed operator redrive are unchanged. Set BATCH_PIPELINE_RETAINED_DIGEST_HOLD_ENABLED=false to restore the legacy single-read 500 for new mismatches without altering existing held rows. Recovery, merge, projection, expiry, and metrics readers are listed in backend/utils/batch_pipeline/CONTRACT.md.

State exit: retained_digest_changed is a refusal reason on the existing terminal failed_held state. Normal retained dead-letter expiry still applies, and only a reviewed operator redrive can requeue the row.

Cause evidence

An offline native-Opus probe reproduced the exact digest failure with identical object bytes and generation. Admission's source_metadata=True read used the frame table to skip a zero-sample diagnostic packet; recovery used the plain decoder, which decoded that packet. The asymmetric branch arrived in #25045, before #25675. A rewrite to a different generation cannot satisfy the pinned read. This proves a decoder path can cause the error without a rewrite; it does not identify the affected production cohort or establish the rollout trigger. This change does not alter decoder selection or regenerate manifests.

Product invariants affected

none

How it was verified

  • M1, Python 3.11: env PYTHON=.venv/bin/python bash test-preflight.sh passed all 18 checks.
  • M1, BACKEND_PYTEST_WORKERS=2 bash test.sh with 10 selected unit files: digest, invalid/missing inputs, artifacts, serving, held dead-letter, projection exception taxonomy, pipeline sim, flag budget, and quarantine recovery. All selected files passed after rerunning the three affected fixture/flag files.
  • Held-custody, recovery-admission, and recovery-custody conformance: 112 simulator cases passed; 56 Firestore emulator cases skipped because no loopback emulator was running.
  • make preflight passed all 44 checks; the offline native-Opus decoder probe passed.
  • Not verified: the post-deploy one-hour error window. No production reads, writes, merges, or deploys for this PR.

Tests

backend/tests/unit/test_batch_pipeline_retained_digest_hold.py exercises the real FastAPI handler, manifest materialization, and recovery transactions with synthetic pinned reads. It covers confirmed mismatch, delivery replay, transient mismatch, read outage, rollback, stale intent, changed URI, privacy revocation, and automatic versus reviewed redrive.

UI evidence

UI-Evidence: none -- backend recovery only

Failure class (fixes)

Failure-Class: FC-batch-fault-domain-head-of-line-poison

View guided diff Turn on auto-fix

@Git-on-my-level
Git-on-my-level merged commit 68fc1ee into main Nov 20, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/m1-studio-devin-fusion-gpt-6-s/4c77311a7e60 branch November 20, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant