Skip to content

Add extract question from the conversation v2 - #1551

Merged
beastoin merged 1 commit into
mainfrom
qjufa_chat_1414
Dec 16, 2024
Merged

beastoin merged 1 commit into
mainfrom
qjufa_chat_1414

Conversation

@beastoin

Copy link
Copy Markdown
Collaborator

No description provided.

@beastoin
beastoin merged commit f83377a into main Dec 16, 2024
@beastoin
beastoin deleted the qjufa_chat_1414 branch December 16, 2024 05:00
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.
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