Repository navigation
SCA-2974: Hold repeatable retained PCM digest mismatches - #25761
Merged
Git-on-my-level merged 9 commits intoNov 20, 2026
Merged
Conversation
Preserve the current purge-coalescing registry entry while adding the retained-digest hold switch once. Describe the existing fallback metric without declaring it a held-contract metric.
Git-on-my-level
deleted the
agent/m1-studio-devin-fusion-gpt-6-s/4c77311a7e60
branch
November 20, 2026 11:12
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.
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_heldwithretained_digest_changed. The successful CAS emits the boundedomi_fallback_totalreason; 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=falseto restore the legacy single-read 500 for new mismatches without altering existing held rows. Recovery, merge, projection, expiry, and metrics readers are listed inbackend/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=Trueread 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
env PYTHON=.venv/bin/python bash test-preflight.shpassed all 18 checks.BACKEND_PYTEST_WORKERS=2 bash test.shwith 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.make preflightpassed all 44 checks; the offline native-Opus decoder probe passed.Tests
backend/tests/unit/test_batch_pipeline_retained_digest_hold.pyexercises 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