Repository navigation
fix(app): recognize a too-short speech profile upload from the backend detail again - #15058
Merged
kodjima33 merged 1 commit intoSep 20, 2026
Conversation
Member
|
Verified the full regression chain — thanks for the clean fix and the focused tests.
I also confirmed the other Checks are green. This restores the intended "not enough speech" dialog behavior from before #14514; leaving the merge call to the maintainers. 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Git-on-my-level
added a commit
that referenced
this pull request
Sep 20, 2026
…on) (#15219) * fix(backend): pass a request double to enable_app_endpoint in unit tests #15099 added a required `request: Request` parameter to routers.apps.enable_app_endpoint (for record_product_event telemetry). tests/unit/test_app_enable_install_count.py and tests/unit/test_setup_completed_url_uid_query.py call the endpoint function directly and still used the old 2-arg call, so main's Backend Unit Tests shard has been red with `TypeError: enable_app_endpoint() missing 1 required positional argument: 'request'` since the #15099 merge. record_product_event only reads request.headers and is fail-open, so a minimal ASGI-scope starlette Request with empty headers is a sufficient double -- the same construction tests/unit/test_product_metrics.py already uses for this module. Verification: bash test.sh with BACKEND_UNIT_TEST_FILE_LIST=tests/unit/test_app_enable_install_count.py,tests/unit/test_setup_completed_url_uid_query.py -> 3 passed, 4 passed. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(backend): classify speech_profile's _errorDetail as a bounded error-envelope reader #15058 added app/lib/backend/http/api/speech_profile.dart::_errorDetail, a helper called from uploadProfile that does a raw jsonDecode + field access on an error response body to extract a `detail` string. That merged in the same 2026-09-20T14:41Z burst as ~20 other app PRs and made tests/unit/test_app_client_schema_inventory.py's test_inventory_openapi_route_response_decode_migration_complete red on main: the migration-complete gate now sees uploadProfile's called function ranges include _errorDetail's two decode sites and classifies them as an unmodeled 'response_decode' site, tripping the raw_response_decode_site_count assertion. _errorDetail is exactly the shape scripts/inventory_app_client_schemas.py already carves out via NON_REST_RESPONSE_DECODER_FUNCTIONS: it inspects a bounded error envelope to choose an application control path (surface a backend-provided message), it does not decode an OpenAPI response DTO. conversations.dart::isSyncRecoveryWindowExceededResponse is the existing member of that allowlist for the same reason. Add speech_profile.dart::_errorDetail alongside it so the inventory keeps tracking real unmigrated response decoding without false-flagging error- detail extraction. Verification: bash test.sh with BACKEND_UNIT_TEST_FILE_LIST=tests/unit/test_app_client_schema_inventory.py -> 12 passed (previously 1 failed: test_inventory_openapi_route_response_decode_migration_complete). Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Fixes #15057
#14514 switched
uploadProfileto throwSpeechProfileUploadException(statusCode), but_isTooShortUploadErrorstill matched the backend'sdetailtext againsterror.toString(), which is now justSpeech profile upload failed (400). A too-short recording was retried three times and ended asUPLOAD_FAILEDinstead of showing the "not enough speech" dialog.The exception now carries the backend
detail(parsed from the error body when present), and the classifier reads it forSpeechProfileUploadExceptionand falls back totoString()for anything else.Two tests added to
test/providers/speech_profile_provider_test.dartthrow the exception with each backend message. With main's classifier both fail withExpected: true, Actual: <false>fortooShort. With the fix both pass, the upload is attempted once, and the rest of the file still passes.Failure-Class: FC-provider-http-error-format