Repository navigation
test: add durable finalization, Sync, and Rewind gauntlets - #9981
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00f8de458c
ℹ️ 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".
|
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:
Before your next PR, please skim:
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! |
Monitor review pass (20260719T022039Z)Both open trusted-bot review threads were checked against the current PR HEAD ( Thread 1 — desktop-flow-lint.py (
Thread 2 — RewindStorage.swift cleanup race (
Actions taken: resolved both threads as addressed by existing code. Verification:
Note: PR merge state is |
2e07507 to
dcdc5c1
Compare
Protect the current video chunk's day directory across the first-frame writer startup window while retaining cleanup of unrelated empty directories. Verified: xcrun swift test --package-path Desktop --filter RewindActiveChunkRetentionCleanupTests; xcrun swift test --package-path Desktop --filter RewindRetentionCleanupTests Failure-Class: none
Exercise synthetic privacy admission through the real Rewind indexer, HEVC chunk encoder, SQLite lifecycle, finalized-video readback, and cleanup in a non-production bridge flow. Verified: xcrun swift test --package-path Desktop --filter RewindArtifactGauntletTests; omi-harness rewind-artifact-recovery bridge flow
Thread an optional evaluation timestamp through each vector read surface so fixed historical fixtures remain deterministic as wall time advances. The product vector route takes one request-time snapshot; default callers retain the existing real-time behavior. Verified: BACKEND_PYTEST_WORKERS=4 bash backend/test.sh (664 selected files passed); focused affected vector suites (98 passed).
Use generation-tagged writing/finalizing ownership so a stale frame or finalizer cannot mutate a restarted writer. Serialize first-frame cleanup with startup and give new chunks collision-proof paths that preserve absolute recovery time while retaining legacy parsing. Verified: xcrun swift test --package-path desktop/macos/Desktop --filter 'RewindChunkTimestampParseTests|RewindArtifactGauntletTests|RewindStorageVideoFrameExtractionTests|RewindActiveChunkRetentionCleanupTests'; cd desktop/macos && bash test.sh Failure-Class: none
Treat an in-flight MP4 trailer write as a shared durability barrier. Concurrent flushes now join the owning finalizer, and cancellation reports a failed flush instead of a successful shutdown. Fence a stale finalizer before it can invoke AVFoundation after cancellation. Verified: xcrun swift test --package-path desktop/macos/Desktop --filter RewindFlushFinalizationTests; cd desktop/macos && bash test.sh Failure-Class: none
dcdc5c1 to
2b4d4ff
Compare
Failure-Class: none
Monitor pass (20260719T083232Z) — no code changesUnresolved trusted review threads: 0 (live "Failed" checks: false positives. The flagged Merge state: No commit, no push, no thread resolution performed this pass — nothing met the actionable bar. |
Monitor pass (20260719T124207Z) — no code changesUnresolved trusted review threads: 0. Both Codex P2 threads ( "Failed" checks: false positives.
Merge state: Worktree rebase: the monitor auto-rebased the worktree onto the latest No commit, no push, no thread resolution performed this pass — nothing met the actionable bar. |
kodjima33
left a comment
There was a problem hiding this comment.
Durable finalization/Sync/Rewind test gauntlets. Approve-only (large test-only change).
Summary
nowsnapshot, including callers that inject a custom fixture clock.AlreadyExistshandoffs, then rehydrate that task after listener restart and prove exactly-once worker completion.Abortedretries, preserve the atomic outbox boundary, and return the existing retryable 503 contract only after that budget is exhausted. Failed gauntlet jobs now retain and tail their synthetic backend logs for actionable diagnosis.Final verification (rebased onto current
origin/main)BACKEND_PYTEST_WORKERS=4 bash backend/test.sh— all 675 backend unit test files passedbackend/testing/listen_pusher_stack/run.sh --keep --state-dir /tmp/omi-listen-pusher-final-head.X326dN— passed all inline and Cloud Tasks scenarios, including the deterministic REST/restart casebash backend/test.sh— all 675 backend unit test files passed again after the contention repairbackend/testing/listen_pusher_stack/run.sh --state-dir /tmp/omi-listen-pusher-contention-fix— passed all inline and Cloud Tasks scenarios after the contention repairbash backend/scripts/typecheck.sh— 0 errorscd desktop/macos && bash test.sh— launcher tests, Rust tests, and isolated Swift suites passedmake preflight— deterministic CI manifest passedscripts/pr-preflight --pr-body-file /tmp/omi-gauntlet-pr-body.mdandscripts/failure-class validate --base origin/main --head HEAD --pr-body-file /tmp/omi-gauntlet-pr-body.md— passedThe former PR head was GitHub-conflicted, which suppressed normal
pull_requestruns. This branch is rebased cleanly onto currentorigin/main; these are the final-head checks before its fresh CI run.Guard scope
The four-party read barrier intentionally lives only in the Listen gauntlet entrypoint, rather than in a shared or production primitive. It coordinates a controllable harness race after the real authenticated lookup; the production route, Firestore transaction, Cloud Tasks task construction, listener restart, and worker all remain unmodified. It extends the recovery surface introduced by merged #10000.
Product invariants affected
Failure class
Failure-Class: none
The Rewind lifecycle defects and bounded Firestore transaction-contention recovery have behavioral regression guards, but no existing semantic failure class describes either failure boundary.