Repository navigation
SCA-4388: Preserve explicit summary reprocess failures - #26301
Git-on-my-level wants to merge 7 commits into
Conversation
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06b0ff51de
ℹ️ 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".
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
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. |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
8adfebf to
57d398e
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57d398ed86
ℹ️ 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 redis.exceptions import RedisError | ||
| from utils.llm.gateway_error_contract import is_retryable_processing_http_exception |
There was a problem hiding this comment.
Move the new helper imports to module scope
The new refund helper imports Redis and gateway-contract dependencies inside the function, contrary to backend/AGENTS.md: “All imports at module top level — never inside functions.” Move these imports, along with the new function-local reserve_rate_limit_slot import in utils/other/endpoints.py, to their respective module import sections so dependency tracing across the shared backend services remains complete.
AGENTS.md reference: backend/AGENTS.md:L166-L174
Useful? React with 👍 / 👎.
Extracts the single Redis fixture alias from #26301 so the shard 6 repair can move independently. The stub now exports `RedisError` at the package root, as redis-py does. This resolves the setup import error from `database.batch_privacy_owner_cache` on main carrier `751100e704f77c53c45b17e1eb4ac90098f51053`. `backend/test.sh test_rate_limiting.py` on `multica-worker-1` passed 92 tests with one guarded fakeredis Lua skip. The carrier’s full shard 6 selection passed on `multica-worker-1` (319 files, exit 0) with its original changed-path list, rotation 4/8, and the CI-style FFmpeg, FFprobe, and `backend/.venv` setup. [Failed carrier shard](https://github.com/BasedHardware/omi/actions/runs/45724903563/job/139598198821) · [Source PR #26301](#26301) Product invariants affected: none. Failure-Class: none
57d398e to
2956efe
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
2956efe to
6af6a18
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
6af6a18 to
198054f
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
198054f to
5f598a0
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
5f598a0 to
104384a
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 104384ad5c
ℹ️ 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 explicit_reprocess: | ||
| if explicit_selection_failures: | ||
| # A typed provider failure can replay the request. Leave the | ||
| # derived effects for the attempt that actually gets a summary. | ||
| return |
There was a problem hiding this comment.
Add the required conversation-lifecycle change note
This changes explicit reprocessing so failed app selections skip derived effects and return typed provider failures, but the commit adds no pipeline change note. A search of backend/docs/listen_pusher_pipeline/changes/ also found no note covering these changes. backend/AGENTS.md requires conversation-lifecycle changes to include a note in that directory in the same PR; add one documenting the failure behavior, retry/refund semantics, flag state, and verification evidence.
AGENTS.md reference: backend/AGENTS.md:L164-L164
Useful? React with 👍 / 👎.
104384a to
8d51dc8
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
## Summary Adds the pipeline change note for the explicit-template reprocess behavior in #26301 (SCA-4388). The note covers typed 429/502/503 responses, both empty-result classes, the Flutter retry, hourly-slot refund and single usage record, and the existing retryable-provider switch. This is the docs-only follow-up for SCA-5595. The live request-log and tick read remains pending rollout in SCA-4388. ## Verification - `git diff --check origin/main...HEAD` - `make preflight` - `scripts/pr-preflight --pr-body-file ../.sca-5595-pr.md` - The note links to the passing backend and Flutter checks on #26301 and to the regression tests. ## Product invariants affected none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26673?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/26673?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26673&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. -->
8d51dc8 to
9f9a18a
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
9f9a18a to
6b0dfce
Compare
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
Summary
Carry the selected template's execution failure to the shared conversation-processing HTTP mapper. Explicit reprocess returns typed 429 for provider-account state, typed 503 with Retry-After for transient failures, and the existing 500 for internal faults.
Return 502
app_result_failedfor empty context or model output. Includefailure_classin the 502 detail. The warning uses the same class, the route, and the conversation ID for correlation with the request log. Keep the previous template result. Keep provider exception text and account identifiers out of those diagnostics. Apply derived effects only after the selected template succeeds.Show localized guidance for the three known provider-account codes in the summary card and legacy snackbar. Use gateway guidance for a structured 429 with a missing or unknown code, keep the manual 502 retry, and reuse the single delayed retry for an explicit reprocess with a typed 503.
Refund the hourly slot for a typed retryable 503 in its original Redis bucket. Empty selected-app results do not write app usage.
Product invariants affected
Failure-Class: FC-byok-account-state-escapes-as-server-fault
UI-Evidence: none -- The existing failure card layout is reused. Flutter widget tests verify all three provider-account messages in French on both surfaces.
Verification
Rebased head
6b0dfceed33cc1c1835c5316a699b09b5ba440daon main269ce9504c9768afb6b1e5dcec45160ec6181fee. All seven patches carried forward unchanged. The feature-flag registry check passed, along with 254 file-isolated backend tests (one skipped) and 83 focused Flutter tests on M1.Rebased head
6af6a1864e3e7cd44f4d269201ed6d69e7de13d2onaa995f8e2097de99902c93428ea04eca230b9b4c. The rebase preserves #26258's background Flex behavior and refreshes the activenotes-11source test pin without bumping the runtime prompt version. The file-isolated backend run passed 452 tests with one skip, including the typed response contract, empty-result logging, and background Flex regressions. The four focused Flutter suites passed all 87 tests.Previous rebase head:
2956efe16974776c120ee67e0035d96429821deeon main860312c73f6a71126a2e7796663e250bb35da07c. Main supplies the Redis test stub line. The source-digest refresh applies to the activenotes-10pin with no runtime version bump. Focused prompt-digest, rate-limit and reprocess suites passed (108 tests, one skip).Fix head:
8adfebff113ca4d6e28c921eaccea547a2496799.The merge repair refreshes the
notes-9source digest pin for the reviewed template-result handling. Notes generation is unchanged and stored checkpoints stay reusable. The prompt-version guard, notes dedupe, prompt caching, and reprocess tests passed (103 tests).SCA-4388
Line-Count-Exception: app/lib/backend/http/api/conversations.dart | 1808 -> 1829 | Reuse the existing processing retry and decode the reprocess outcomes at the HTTP boundary.
Line-Count-Exception: app/lib/pages/conversation_detail/conversation_detail_provider.dart | 1592 -> 1603 | Carry the typed provider-account code through the existing failure state.
Line-Count-Exception: app/lib/pages/conversation_detail/page.dart | 2161 -> 2166 | Show the account message in the existing legacy feedback surface.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3560 -> 3606 | Preserve the app failure through the worker and defer derived effects until the selected template succeeds.
Line-Count-Exception: backend/routers/conversations.py | 3551 -> 3576 | Keep the existing reprocess response and refund only the original reservation on a typed retryable failure.
Line-Count-Exception: backend/database/redis_db.py | 1671 -> 1694 | Reserve and release within the same rate-limit bucket using the existing scripts.