[Android Maintenance] Fix reasoning_effort enum for Duck.ai prompt submitted pixels#8966
Merged
malmstein merged 1 commit intoJun 23, 2026
Conversation
The m_aichat_unified_input_prompt_submitted_count and _daily pixels populate reasoning_effort from getResolvedReasoningEffort(), which returns ReasoningEffort.rawValue (none/minimal/low/medium/high) - the same value sent to the backend. The definition incorrectly declared the enum as the ReasoningMode values (fast/reasoning/extended_reasoning), causing live validation to fail. Align the enum with the actual wire values. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
malmstein
approved these changes
Jun 23, 2026
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.
Task/Issue URL: https://app.asana.com/1/137249556945/project/1213746476312668/task/1215891186389639
Description
Live pixel validation reported that
m_aichat_unified_input_prompt_submitted_countandm_aichat_unified_input_prompt_submitted_dailywere failing with/reasoning_effort must be equal to one of the allowed values.Root cause: the
reasoning_effortparameter on these two pixels is populated byNativeInputModeWidgetViewModel.fireSubmissionPixels()→getResolvedReasoningEffort(), which returnsReasoningEffort.rawValue— one ofnone,minimal,low,medium,high(the same resolved effort value that is sent to the backend viasendPrompt). However, the pixel definition declared the enum as["fast", "reasoning", "extended_reasoning"], which are theReasoningModeraw values. Those mode values are correctly used by the separatem_aichat_unified_input_reasoning_effort_selectedpixel'seffort_levelparameter (ReasoningMode.toEffortParam()), but not by the prompt-submitted pixels.This change aligns the
reasoning_effortenum on both prompt-submitted pixel definitions with the actual wire values (ReasoningEffortraw values). No code behaviour changes — only the definition inPixelDefinitions/pixels/definitions/duck_chat.json5is updated. The unrelatedreasoning_effort_selectedpixel'seffort_levelenum is intentionally left untouched.🤖 Android Maintenance Worker
Steps to test this PR
Lint / formatting
cd PixelDefinitions && npm run lint(prettier — passes locally)cd PixelDefinitions && npm run validate-defs-without-formatting(pixel-schema validation)Note: only a PixelDefinitions JSON5 file changed (no Kotlin/Android source), so
./gradlew spotlessCheck/lint_checkhave nothing applicable to check for this change.npm run lint(prettier) passed locally;npm run validate-defs-without-formattingcould not complete in the sandbox because it fetches the live target app version over the network (ERROR in product.json target version: fetch failed), which the CI sandbox firewall blocks — this is unrelated to the change and will run on CI.UI changes
Note
🔒 Integrity filter blocked 3 items
The following items were blocked because they don't meet the GitHub integrity level.
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".To allow these resources, lower
min-integrityin your GitHub frontmatter:Note
Low Risk
Schema-only change in PixelDefinitions with no Android runtime behavior changes; it restores validation for analytics events already emitted by the app.
Overview
Fixes live pixel validation failures on
m_aichat_unified_input_prompt_submitted_countandm_aichat_unified_input_prompt_submitted_dailyby updating thereasoning_effortparameter schema induck_chat.json5.The allowed values change from
fast/reasoning/extended_reasoning(UIReasoningMode) tonone/minimal/low/medium/high, matching what the app already sends viagetResolvedReasoningEffort()(ReasoningEffortraw values). The parameter description now says resolved reasoning effort.m_aichat_unified_input_reasoning_effort_selectedand itseffort_levelenum are unchanged.Reviewed by Cursor Bugbot for commit e704fae. Bugbot is set up for automated code reviews on this repo. Configure here.