Skip to content

backend-go: finalization replay oracle, scoped (SCA-3551 lane 7) - #26293

Merged
Git-on-my-level merged 13 commits into
mainfrom
sca-3551-lane7-scoped
Nov 25, 2026
Merged

Git-on-my-level merged 13 commits into
mainfrom
sca-3551-lane7-scoped

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Scoped replacement for #26031 (SCA-3551 lane 7: the finalization replay oracle). It's based on main at f719b056 and contains only replay tooling. It touches no serving path.

Scope (45 + 1 files)

  • backend-go/tools/replay/: comparator, labels and witness tests.
  • backend/testing/finalization_replay/: the Python replay harness and diagnostic tests.
  • Makefile: the oracle-diag target.

#26031 had picked up out-of-lane drift: MCP serving Python, generated API clients and the OpenAPI spec. All of it has been dropped here.

What the oracle encodes

  • Discarded attach memo: the episode owner, with attach_revision, attach_completed and attach_finalized present and null on both sides. A dead letter has all four fields absent.
  • by_design:replay_clock covers profile clocks, resolver elapsed time, memory expiry (captured_at + 172800 s) and the group 7 notes hash.
  • by_design:generated_identity covers group 12, and by_design:encrypted_envelope covers the encrypted envelopes.

Current reviewed head: ec37b822b948a6e8f6c9b86bf11cbb1af7d2ad7b

  • Worker 2 (SHIP, 16:04Z) and Luna (SHIP, 16:07Z) reviewed this commit. All review threads are resolved, and all checks pass on it.
  • Verification at ec37b822 with worker aab6310d: 164 diagnostic Go gaps, 0 unlabelled, 0 execution failures. R7 holds on all 41 cases (Go ≤ Python), with a minimum margin of +2.

Historical runs (earlier heads, kept for the record; they are not the current head)

  • 672bfca3: two consecutive fresh runs with worker aab6310d. Each passed 41/41 with zero execution errors and zero diagnostic R7 overages. Both produced the same 164 normalized Go gaps, zero unlabelled. Every case matched the baseline Firestore reads, writes and deletes.
  • 85ef2d21: one smoke run gave the same 164 gaps and 0 unlabelled. The three terminal memo checks passed. 983c0b51 then added the pinned-formatter line in ordinary_sync_retry.py. The commits after that, up to ec37b822, address review findings.

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

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 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-25T15:31:18.350451Z b54e935 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 983c0b5194

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a5d273467

ℹ️ 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".

Comment thread backend-go/tools/replay/observation.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8eb9e608f

ℹ️ 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".

Comment thread backend-go/tools/replay/observation.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d18e7dc40a

ℹ️ 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".

Comment thread backend-go/tools/replay/observation.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 686cebee73

ℹ️ 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".

Comment thread backend-go/tools/replay/main.go Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

@Git-on-my-level
Git-on-my-level merged commit e060f71 into main Nov 25, 2026
69 checks passed
@Git-on-my-level
Git-on-my-level deleted the sca-3551-lane7-scoped branch November 25, 2026 19:40
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. -->
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