Repository navigation
SCA-4146: Continue keyed iOS notes after the from-segments deadline - #26306
Git-on-my-level merged 17 commits into
Conversation
💡 Codex Reviewomi/backend/routers/developer.py Line 2538 in e2d5c56 With continued processing enabled, this dispatch holds one of only eight AGENTS.md reference: backend/AGENTS.md:L279-L279 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Independent review of implementation at e2d5c56 and current head (docstring-only follow-up): no blocking code findings. The admitted worker runs in the bounded executor with a lease heartbeat; enabled-mode active keyed replays return retryable 503, and completed replays return the stored conversation. Existing regression coverage exercises timeout, pending replay, and same-row completion. Release still needs to verify post-response worker completion on the candidate with no other request active.
Preserve both request-deadline and v3 backfill exception propagation. Update continuation tests for split staging and give the deadline integration tests a runner-safe budget. Co-authored-by: multica-agent <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Preserve deadline and V3 conflict propagation in notes processing. Co-authored-by: multica-agent <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ba1cf8658
ℹ️ 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".
| if continue_processing and existing_conversation.get('status') == ConversationStatus.processing: | ||
| # iOS acknowledges uploads by HTTP status alone. Keep its local copy | ||
| # until the admitted worker has persisted the completed conversation. | ||
| raise retryable_processing_response('from_segments_processing_in_flight') |
There was a problem hiding this comment.
Keep active replays retryable outside the continuation cohort
For keyed uploads outside the rollout cohort (including iOS with the default-off flag), the new HTTP waiter can return 503 at 25 seconds while its synchronous worker is still running. A retry during that interval reaches this branch with continue_processing=False and receives 200 for the unfinished processing row. The worker can subsequently hit require_request_budget() and roll the row back to in_progress, leaving no active processor. This prematurely acknowledges the upload: uploadOnDeviceSegments accepts the returned ID without checking status, and macOS ConversationFinalizationService marks the upload completed. Return the retryable in-flight response for these active keyed claims too, so clients keep retrying until processing actually completes.
Useful? React with 👍 / 👎.
|
REQUEST CHANGES — P1: keyed retries can acknowledge a conversation that the worker later leaves in progress.
Please either keep non-cohort keyed work on the synchronous path, or return the retryable in-flight response for keyed iOS rows whenever status is |
Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
Keep the continued iOS pipeline asynchronous through agentic and one-shot notes. Keep the HTTP waiter on its 25-second deadline and use executor slots for individual blocking stages. Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3927510fc1
ℹ️ 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".
| **notes_agent_inputs(main_conv, desktop_capture), | ||
| ) | ||
| if async_notes: | ||
| from utils.llm.conversation_processing import conversation_notes_steps |
There was a problem hiding this comment.
Move the new notes-step import to module scope
backend/AGENTS.md explicitly requires “All imports at module top level — never inside functions.” This newly added import violates that backend-specific requirement. Add conversation_notes_steps to the existing module-level imports from utils.llm.conversation_processing, alongside get_conversation_notes, rather than importing it inside the processing branch.
AGENTS.md reference: backend/AGENTS.md:L166-L168
Useful? React with 👍 / 👎.
Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ceb2d783cf
ℹ️ 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".
| from utils.conversations.processing_steps import run_async | ||
| from utils.executors import postprocess_executor |
There was a problem hiding this comment.
Move the new test imports to module scope
backend/AGENTS.md explicitly requires all imports at module top level, never inside functions, and this requirement also applies to backend tests. Move these newly added imports into the module-level import block; the newly added run_inline import in test_episodes_finalizer_hook.py needs the same adjustment.
AGENTS.md reference: backend/AGENTS.md:L166-L168
Useful? React with 👍 / 👎.
Co-authored-by: multica-agent <[email protected]>
## What changed and why Regenerated the GMP query migration inventory after #26474 added the Omi Core Features upload panels. The stale generated file fails the Backend Unit Tests on main and also blocks #26306. Tracked in SCA-4753. ## Product invariants affected none ## How it was verified - Ran `python3 backend/scripts/monitoring_gmp_shadow.py --inventory --output backend/charts/monitoring/gmp-query-migration-inventory.json`. Compared the generated entries with the dashboard at the #26474 merge. Only the four query consumers for panels 101, 102, and 103 and the total (326 to 330) changed. - Ran the 35 tests in `backend/tests/unit/test_monitoring_gmp_shadow.py` with the local test environment and with pytest on Python 3.11. Both runs passed. - Ran `make preflight` and validated the PR metadata. The shallow checkout skips the history-dependent failure-class ratchet. ## Tests The existing `test_committed_inventory_is_current` compares the committed file with the generator output and covers this repair. UI-Evidence: none -- generated inventory only Failure-Class: none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26517?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/26517?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26517&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. -->
Summary
SCA-4146. Use the existing 25-second deadline for Firebase-authenticated intake and for keyed uploads waiting on enrichment. Resolve completed replays before admitting work to the bounded enrichment pool.
For the keyed iOS rollout cohort, an async coordinator continues the same notes attempt after the HTTP waiter returns its existing retryable 503. It keeps the processing lease, uses a separate enrichment budget, and releases executor slots while awaiting agentic or one-shot notes. An active replay returns the same retryable 503 body and headers so iOS keeps its local audio. A completed replay returns the existing 200 response for the same conversation. Reclaiming an aged lease uses the stored transcript and compares the observed lease in the existing claim transaction.
The new mode defaults off. Before enabling the cohort, Release needs to verify that the Backend candidate can finish admitted work after its HTTP response with no other request active.
Verification
4235309e0fd4. With eight keyed iOS continuations paused in the real notes loop at a synthetic provider, the shared test pool had zero occupied workers. A separate keyed Android upload started in 4 ms and returned HTTP 200 in 6 ms against the 25-second deadline. The retry tests verified claim retention and same-conversation replay.a24fe70d849a.BACKEND_PYTEST_WORKERS=1 bash backend/test.sh test_client_processing_acceptance.py test_developer_from_segments_idempotency.py test_client_processing_trust_boundary.py test_client_segment_continuation.py test_from_segments_503_attribution.pypassed all 231 tests. The race tests cover the retryable 503, preservation of the newer projection after the first request completes, and a replay returning 200 for the same completed conversation.failed: [],SERVING, andREADBACKin SCA-3846.Use the same resource and time filters with
log_id("run.googleapis.com/stderr")and(jsonPayload.event="from_segments_503" OR textPayload:"from_segments_503")for the attribution read.Product invariants affected
Failure-Class: FC-per-hop-timeout
Line-Count-Exception: backend/routers/developer.py | 2907 -> 3032 | Keep validation, replay and claim authority together while isolating the HTTP deadline from continued processing.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3622 -> 3701 | Share enrichment and persistence stages between synchronous processing and the async continuation, and release workers during notes model waits.