Repository navigation
fix(conversations-v3): multi-batch projection readback ignores the Home commit stamp (owner livelock) - #25734
Merged
Merged
Conversation
…h projection reads its writes back augment_home_writes stamps a fresh home_source_version (and home_content_invalidated) on every conversation write at Commit. The between-batch readback compared every written field, so the stamp looked like an external change: each pass committed batch 0 and raced, and the final batch that clears pending markers and resets the park never landed. - Name the stamped fields (home_feed_writer.COMMIT_STAMPED_FIELDS) and exclude them from the derived-row and recording readback; any other change still conflicts. - Log the document kind and changed field names when a readback conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rding compare (panel review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Nov 19, 2026
…g the Firestore hook (main red after #25734) (#25739) ## Summary Main went red after #25734. `database/conversations_v3.py` imported `COMMIT_STAMPED_FIELDS` from `database/home_feed_writer.py`, which imports `google.cloud.firestore_v1.types` at load time. That put the import on the chain routers/conversations → v3 summary → conversations_v3 → home_feed_writer. Isolated-router unit tests stub `google.cloud.firestore_v1` as a plain module, not a package, so they fail with `ModuleNotFoundError: ... 'google.cloud.firestore_v1' is not a package`. The affected files: - `test_conversations_date_range_validation` - `test_conversations_merge_duplicate_guard` - `test_dev_api_lock_bypass` - `test_lock_bypass_fixes` - `test_recovery_rule_skip` PR CI is graph-selected, so #25734 never ran them. Production is unaffected, because the real package is installed. ## Change - Move the constant to a new import-free module, `database/home_feed_fields.py`. - `home_feed_writer` re-exports it, so existing references keep working. - `conversations_v3` imports it from the new module. ## Verification All five files above pass locally, along with `test_conversations_v3_commit_readback` and `test_conversations_v3_claim_growth`. Failure-Class: none UI-Evidence: none -- backend import-only change 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MichaelC001
pushed a commit
to MichaelC001/omi
that referenced
this pull request
Nov 19, 2026
…an import-free module BasedHardware#25734 made conversations_v3 import home_feed_writer, which loads google.cloud.firestore_v1.types; isolated-router tests stub firestore_v1 as a non-package and fail. Production is unaffected. Failure-Class: FC-partition-depends-on-arrival-order Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Nov 19, 2026
…changes (#25739 follow-up) (#25742) ## Summary This is the follow-up from the #25739 panel (review-20261119t010333-6394, findings F1 and F3). **F1.** A change to `backend/database/conversations_v3.py`, `conversations_v3_processing.py`, `home_feed_writer.py` or `home_feed_fields.py` now selects the five isolated-router tests that #25734 broke without CI noticing: - `test_conversations_date_range_validation` - `test_conversations_merge_duplicate_guard` - `test_dev_api_lock_bypass` - `test_lock_bypass_fixes` - `test_recovery_rule_skip` These tests load `routers.conversations` fresh with `google.cloud.firestore_v1` stubbed as a non-package. The import graph never selects them for those modules, which is how main went red. The mapping is a new `AREA_TESTS` entry in `scripts/select_backend_unit_tests.py`. **F3.** `home_feed_writer` no longer re-exports `COMMIT_STAMPED_FIELDS`. The readback test now imports it from `database.home_feed_fields`, so it has a single import path. ## Verification - `select_backend_unit_tests.py --changed-files` with only `backend/database/conversations_v3.py` now selects all five. - `test_conversations_v3_commit_readback` passes. Failure-Class: none UI-Evidence: none -- backend CI selection and import path only 🤖 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/25742?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/25742?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F25742&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. -->
This was referenced Nov 19, 2026
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
After #25714 deployed, fleet parks fell from 85 to 6, but the product owner stayed wedged: still parked on
document_too_large, with 17 rows stuck atwriting.Root cause: a multi-batch projection commit treats its own Commit-hook stamp as an external change.
home_feed_writer.augment_home_writes(database/home_feed_writer.py:169) adds a fresh randomhome_source_versionto every conversation write at the Commit boundary. When transcript fields change, it also addshome_content_invalidated.commit_projectionreads its own writes back (database/conversations_v3.py:649-682).home_source_version(planner.build merges**existing). The hook replaced it, so the check raisessource_changed.Evidence (prod, read-only, owner on
prod-operator; field names and counts only):commit_projection, run against an in-memory copy of the closure without the Commit hook, commits both batches.document_too_largefirst.Fix
home_feed_writer.COMMIT_STAMPED_FIELDSnames the fields the hook stamps. The readback ignores them for both derived rows and recordings.augment_home_writesactually adds.v3 projection readback changed kind=<derived_row|recording> batch=<i> fields=[...], with field names only.Related findings (not changed here)
triggers.enqueue→cloud_tasks.enqueue_named_task:458) were Cloud Tasks transport errors:UNAVAILABLE("Connection reset by peer") andDEADLINE_EXCEEDED. They were not tombstone or ALREADY_EXISTS dedup; that path logs "already enqueued, skipping duplicate" and succeeds. The 500 is the designed fallback: Cloud Tasks retries the task.completed/tile_state=failed, reasonattempts_exhausted:update_time(database/conversations_v3_processing.py:38,summary_source_changed).update_time, plus the hook's stamp, so in-flight notes lost their fence twice andbegin_processingfailed them (conversations_v3_processing.py:247-249).summary_retryablefor the client retry.Test plan
backend/tests/unit/test_conversations_v3_commit_readback.py, with a fake Commit hook that stamps each write (6 tests):source_changed, and the log names the field but no ids. This is covered for a derived-row field and for the recording fence fieldsis_lockedanddata_protection_level;augment_home_writesadds, for both a transcript write and a metadata-only write.conversations_v3.py, 5 of the 6 tests fail.backend/docs/listen_pusher_pipeline/changes/2026-11-19-v3-readback-home-stamp.md.Failure-Class: none
🤖 Generated with Claude Code