Skip to content

Replay paired serving finalization lifecycle fixtures - #26352

Merged
Git-on-my-level merged 3 commits into
mainfrom
sca-3551-serving-lifecycle
Nov 26, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
sca-3551-serving-lifecycle

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

SCA-3551 adds the paired missing-row fence and account erasure fixtures to the pinned workerd diagnostics. The runner captures the pre-wipe views and records the post-wipe Firestore absence and Go queue custody through the workerd test seam on #26346.

Current head: ac891072 (fast-forward of db654737 via 99fbd280). 99fbd280 validates the fence memo against the pre-delete conversation and link snapshot and checks the link survives unchanged (oracle artifact; accepted count 86→85). ac891072 requires the bound intake memo whenever intake expects one, so both-sides-missing evidence is rejected. Worker 2 R19 SHIP at ac891072 (Python replay 44 passed/1 skipped; Go memo comparator tests passed). Test tooling only: backend-go/tools/replay/ and backend/testing/finalization_replay/; no serving code. Rollback: revert the merge commit.

The comparator landed on main in #26322 at 58a67241. This PR now targets main and contains only the paired lifecycle runner changes.

Set ORACLE_DIAG_PAIRED_LIFECYCLE=1 to enable the paired fixtures and ORACLE_DIAG_SIDE_TIMEOUT_SECONDS=720 for the supplemental suite. The 109 jobd pre-wipe rows stay diagnostic. The serving missing-row attach memo evidence contributes one accepted gap, bringing SCA-3551 to 86 before later group releases.

At db654737, the Python replay suite passed 42 tests with one replay-binary-dependent skip, and all 37 local preflight checks passed.

The full 720-second-budget run against pinned worker 0a0640ae completed all 41 cases. R7 held in every case at a minimum margin of +2 Firestore operations. Fence used 13 Go vs 25 Python operations, and erasure used 126 vs 130. The run had 163 diagnostic gap rows, zero unlabelled, zero pre-wipe binding failures, and zero execution errors. The normalized findings match the accepted baseline.

Git-on-my-level added a commit that referenced this pull request Nov 26, 2026
…-commit meter (SCA-3551 lane 7) (#26322)

Follow-up to #26293 (SCA-3551 lane 7, the finalization replay oracle).
It's based on `main` at `e060f71e`, the #26293 merge. It touches only
replay tooling and no serving path.

**Current head: `73f41d0c`**, a merge of main `fd7f1519` into the
reviewed `9fa4bc15` (fast-forward of `bdad61e1`). The merge adds no
replay changes; it gives the PR a fresh check history on repaired main.
It includes the paired-erasure comparison and the two binding/evidence
commits below.
- `c6dd4765`, from bundle `8ca3e1ae`. The driver now gives both sides
the same lifecycle inputs:
- **Missing-row fence:** the Python row is deleted after claim, just
before the finalizer's first worker read.
  - **Erasure:** runs after a completed or discarded Python replay.

This clears both whole-`/conversation` differences. One conflict in
`driver.py` was resolved by hand: the speaker-trace hook from main runs
first, then the paired `run_python` wrapper.
- `96789fc5`, from bundle `006671ae`. Failed Firestore Commit RPCs are
reported per side and per case, outside the R7 total. Preserved Home
tokens with same-field pre-run evidence are compared literally.

- `2ad9855d` is the FIX-FIRST commit for the CI replay gate. On the
erasure fixture, the finalization witnesses (speaker resolver and batch
privacy) are read just before the wipe; the main comparison still uses
the documents and effects after erasure. CI's `invalid_binding`
assertion in `verify.py` is unchanged.
- `90d1799f` and `9dcf507b` are FIX-FIRST commits for the speaker
witness. The speaker checks read the pre-wipe view on both sides. A
departure receipt proves only the erasure. A Go row that existed before
the wipe but has no resolver result is reported as `missing_in_go` /
`speaker_resolver_unverified`.
- Regression tests cover an untraced Go resolver result, an invalid Go
speaker envelope, and a missing Go resolver result.
- `884221b1` compares the pre-wipe conversation and derived documents
across sides with the live rules, emitted under `/before_erasure`. The
resolver gap comes from that comparison, once. Regression tests change
speaker `assignments`, `structured.title` and the authenticated payload.
- The 109 pre-wipe rows from the `cmd/jobd` conformance flow are
diagnostic only, like jobd's other raw rows, and aren't counted. The
serving `workerd` erasure run is required before integrated zero
(SCA-3551).

- `2b90f180` keeps effects and erasure checks for proved-absent Go rows
and pairs post-wipe account operation receipts by operation type,
generation and owner digest. Duplicate and mismatched receipts remain
findings.
- The current head runs the same binding validator on both pre-wipe
views. Regressions cover missing jobs and mismatched fanout on Python
and Go, and missing or mismatched Go fence fields. Findings carry a
`/before_erasure` prefix.

**Scope:** `backend-go/tools/replay/` and
`backend/testing/finalization_replay/` only.

**Verification**
- At `9fa4bc15`, `go test ./tools/replay/...` and all 37 local preflight
checks passed. Each of the six pre-wipe binding mutations fails with the
previous comparator. The full local `./tools/replay/test.sh` passed on
Firestore and Postgres, with 10/10 admission cases, 41/41 active cases
completed, zero execution errors, zero `invalid_binding` rows, and the
verifier’s negative mutations passing.
- The paired serving runner in #26352 reran the pinned worker `0a0640ae`
in all 41 cases. R7 held with a minimum margin of +2, zero execution
errors, 163 diagnostic gap rows, zero unlabelled, and zero pre-wipe
`invalid_binding` rows.
- On Studio, at `96789fc5` (`go test ./tools/replay/...` passed again at
`2ad9855d`):
  - `go test ./tools/replay/...` passes.
  - `pytest testing/finalization_replay`: 40 passed, 1 skipped.
  - `scripts/backend-python-format --check` is clean.
  - The managed pre-push gate passed.
- Worker 1's emulator replays ran on the separate bundles, not on this
combined head:
- At `006671ae` with worker `aab6310d`: 41/41 cases, 0 execution errors,
R7 41/41 with a minimum margin of +2, 164 diagnostic go_gap rows, 0
unlabelled, 0 failed Commit RPCs.
  - At `8ca3e1ae`: both `/conversation` rows clear.
- At `2ad9855d`, from Worker 1: CI's `./tools/replay/test.sh` step,
building `jobd` from this tree, passes with 0 `invalid_binding` rows. On
the pinned `aab6310d` worker: R7 41/41 at +2, and 164 diagnostic gaps
with 0 unlabelled, the same as at `96789fc5`.
- At `9dcf507b`, from Worker 1: CI's `./tools/replay/test.sh` passes
with 0 `invalid_binding` rows. On the pinned `aab6310d` worker: R7 41/41
at +2, and 164 diagnostic rows with 0 unlabelled. GitHub CI: all 65
checks pass at `9dcf507b`.
- At `884221b1`, from Worker 1: `test.sh` passes with 0
`invalid_binding`. The pinned `aab6310d` run gives R7 41/41 at +2, with
164 rows and 0 unlabelled.
- `9dcf507b` passed all 65 checks but didn't compare the pre-wipe views
across sides. `2ad9855d` and `90d1799f` are earlier heads, kept for the
record.
- `96789fc5` is an earlier head, kept for the record: it failed the CI
replay gate with 9 `invalid_binding` rows on
`erase-removes-owner-and-jobs`.

**Open item, outside this PR:** Python leaves a Firestore finalization
job at `/effects/erasure/jobs_for_uid` after erasure. It's labelled
`python_bug?` and tracked on SCA-4408 (Python fix #26310).

Merge goes through Release intake. The Go lead signs off on parity on
SCA-3551.

🤖 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/26322?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/26322?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26322&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. -->
Base automatically changed from sca-3551-lane7-followup to main November 26, 2026 02:54
@Git-on-my-level
Git-on-my-level marked this pull request as ready for review November 26, 2026 15:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T15:28:03.272927Z ac89107 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 860312c into main Nov 26, 2026
76 checks passed
@Git-on-my-level
Git-on-my-level deleted the sca-3551-serving-lifecycle branch November 26, 2026 15:39
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