Repository navigation
Settle fully proved native WAL duplicates - #26135
Merged
Merged
Conversation
Failure-Class: FC-split-mutation-authority
Failure-Class: FC-split-mutation-authority
Failure-Class: FC-split-mutation-authority
Failure-Class: FC-split-mutation-authority
Git-on-my-level
marked this pull request as ready for review
November 23, 2026 16:40
This was referenced Nov 23, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Nov 23, 2026
…n red, shard 7) (#26161) ## What changed and why Main has been red on Backend unit shard 7 since #26135 (`4729587c`). Every case in `tests/unit/test_merge_validation.py` errors at setup: ``` ImportError: cannot import name 'get_firestore_client' from 'database._client' ``` #26135 added `from database.record_audio import fence_record_audio_removal` to `utils/conversations/merge_conversations.py`. That fixture loads the module against a stubbed `database._client` that carries only `db`, so the real `database.record_audio` → `pipeline_ledger` chain can't import. The pure validation functions under test never call the fence, so the fixture now stubs `database.record_audio` the same way it stubs the other persistence modules. Test-only; no production code changes. This blocks the backend roll that carries #26129 (Play Billing server side), which is needed today for the Android test purchase before the Google resubmission. ## Verification From `backend/`, each file in its own process, as CI runs them: - `tests/unit/test_merge_validation.py`: 50 passed. The unfixed file gives 50 errors. - `tests/unit/test_merge_conversations_canonical_delete.py`: 18 passed. - `tests/unit/test_conversation_smart_merge_flatten.py`: 103 passed. Rollback: revert this PR. ## Failure class (fixes) Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26161?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/26161?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26161&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Git-on-my-level
added a commit
to Git-on-my-level/omi
that referenced
this pull request
Nov 23, 2026
BasedHardware#26135 made merge_conversations import database.record_audio at module scope. The fixture's database._client stub only carries db, so every test_merge_validation case errored at setup and Backend unit shard 7 went red on main at 4729587. Stub the fence module like the other persistence imports; the pure validation surface never calls it. Failure-Class: none 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
SCA-3376 phase 2a.
Qualification and release
Dark carrier only. The approved Nov 24 sampler remains independent. Phase 2a shadow needs its own exact-window privacy approval, the sampler result, full custody review, and Release preflight and written go-ahead. The read-only bucket check found no lifecycle expiry for either backing prefix. Durable merge admission persists the preserve-or-remove decision. A non-erasure merge of a settled source retains its original proof and canonical handle, and atomically republishes a direct, bounded lineage when the successor merges again. Explicit erasure on either end invalidates replay. Unknown lineage writers defer. Older revisions can bypass the new ordering. Release must prove every serving writer and a compatible rollback target before enabling settlement. No live audio bodies, raw exports, new provider work or direct production writes.
The proposed shadow has one 24-hour window, 480 fleet-wide claims, at most 49,920 Firestore point reads, 9,600 GCS RPCs and 7.5 GiB of manifest downloads on admitted proofs. Slot contenders are separate. Fixed-label begin/commit/rollback attempt and outcome counters track up to 1,920 lifecycle RPCs per approved shadow window. Shadow commit attempts must be zero. Read back would-settle whole bundles/files and I/O before active rollout. Active proof limits are 105 point reads, 20 GCS RPCs and at most one alias, one terminal receipt and 20 file receipt writes. Exact replay uses a read-only view capped at 56 point reads through one verified successor. A direct status miss costs one point read, and a hit costs at most 11 including the privacy snapshot. Fixed-label lookup outcomes inform the Release budget. First settlement adds one donor-row write. Shadow keeps the 104-read per-proof cap. Only Release can enable after the settled preflight, measured active traffic caps, panel SHIP and a recorded inverse.
Release runs the 1%, 10%, 50%, 100% backend-sync ramp as each closed 24-hour check qualifies. Watch custody violations, shadow disagreement, store amplification, latency p99 and request errors. Stop new settlements on any custody violation or missing telemetry. Roll back with the percent at zero and the source gate off, keeping the readers deployed. Phase 2b paid recovery is outside this PR.
Testing
Tuning
MAX_SLICES new: 128 per native intake attestation. Over-limit input exits to the existing hold path.
Initial canonical job limit is 4 and staged WAL limit is 20 files. Each seen source must prove all packet placements within the per-call I/O and two-second budget before committing.
MAX_RETAINED_DONORS new: 16. Above this limit, merge admission defers with sources intact.
Line-Count-Exception: backend/utils/sync/assignment.py | 1677 -> 1684 | Keep the seven-line custody guard adjacent to the existing transaction reads and before any sync ancestry rewrite.
Line-Count-Exception: backend/utils/batch_pipeline/intake.py | 1499 -> 1503 | Keep terminal receipt routing at the existing owner-scoped public status boundary, where it can precede the legacy redrive.
Failure-Class: FC-split-mutation-authority