Repository navigation
Add extract question from the conversation v2 - #1551
Merged
Merged
Conversation
Glucksberg
pushed a commit
to Glucksberg/omi-local
that referenced
this pull request
Apr 28, 2026
aryanorastar
added a commit
that referenced
this pull request
Oct 27, 2026
Malformed Daily Recap records can crash reads, and invalid generated content must not be saved as the completed recap that later retries reuse. This completes the existing validation PR at the read and generation/persistence boundaries. - Keep the shared read/JSON-validation guard, valid-row pagination and search limits, bounded scans, content-free validation logs, and the public-sharing allowlist. Corrupt-only owner reads return 503 rather than a false empty account; missing/private public records remain 404. - Validate generated candidates before persistence in both legacy and V4 producers, including scheduled and on-demand work. Their existing failure handling releases the day lock and retains retryable failure state. The manual notification-preview route also validates before saving or delivering; regeneration still validates before overwrite. - Creation returns only completed existing records. V4 pending/failed/not-generated state rows re-enter the real producer, so a failed attempt can generate on retry; a live competing day lock returns 409. Existing malformed completed records remain preserved, without automatic paid regeneration or source-conversation changes. Original validation approach and baseline tests by @kaleidoscopeAI; contributor commits remain intact. Maintainer fixes extend this same PR rather than duplicate it. Verification - Review at 1a6bed0 found a genuine P2: the saving helper persisted an invalid record before the route returned 502, and retry returned 503 without generation. The old retry test replaced that helper and could not detect the write. New tests failed in both producer modes on unchanged code; that test has been replaced. - 138 affected unit tests passed through backend/test.sh. All 24 real-main.app integration cases passed, with actual producer selection, source eligibility/deserialization, day locks, Firestore create/update, state markers, response serialization and idempotency. Only paid-compute/model/provider boundaries and the hermetic datastore adapters are substituted; the generation/persistence helper is not replaced. - Failure/retry cases cover invalid schema, non-JSON content and invalid root payloads in both legacy and V4 modes; invalid refresh preserves previous content/ID/sharing, and a healthy retry replaces it in place. Existing content and source conversations remain intact; a third creation returns the stored recap without another model call. - Local uvicorn/curl independently returned 502 -> 200 -> 200 in both modes: no invalid generated record after failure, only a V4 failed state where applicable, one completed recap after retry and exactly two model calls. No production/customer data or provider transaction was used. - Current-head CI is green at `7e8af1b47faa65610f5b99667ef41346b2a797fd` with `ci:full`: six backend unit shards and guardrails, hermetic backend E2E (165 passed, three skipped, two expected failures), both stack gauntlets, API/emulator/runtime/source contracts, formatting/hygiene, and the full Flutter analyzer/test check. The normal push gate also passed all 38 preflight checks and reported zero backend type errors. Prior 626 unit/query results at 1a6bed0 are historical evidence, not proof for this follow-up. The final diff was reviewed; #21347 remains draft for re-review as requested. Rollout: after review/merge, deploy the API backend serving recap routes and the notifications job using the changed shared producers. No new mobile build, credential or index is required. Existing malformed historical data and these customers' actual missing recaps/recording sync require separate Support investigation; these fixtures do not establish their cause or recovery. Closes #21360 (technical work; the separate Support case stays open). Existing references: #8264, #1551. Failure-Class: FC-malformed-doc-read Line-Count-Exception: backend/routers/users.py | 2724 -> 2773 | Validate recap candidates at the owning producer before persistence while preserving explicit failure and retry behavior. Line-Count-Exception: backend/routers/developer.py | 2828 -> 2834 | Validate recap candidates at the owning producer before persistence while preserving explicit failure and retry behavior.
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.
No description provided.