Skip to content

Hand the screenshot run its locales in something gradle keeps - #652

Merged
andiwand merged 3 commits into
mainfrom
screenshot-locales-agp94
Sep 5, 2026
Merged

Hand the screenshot run its locales in something gradle keeps#652
andiwand merged 3 commits into
mainfrom
screenshot-locales-agp94

Conversation

@andiwand

@andiwand andiwand commented Sep 5, 2026

Copy link
Copy Markdown
Member

The 4.19.0 release photographed one locale of fifteen, on both devices, and both screenshots jobs reported success. screenshot-set caught it and the store kept 4.18.0's pictures.

What happens

AGP 9.4.0 cuts a -Pandroid.testInstrumentationRunnerArguments.<key> value at the first comma. Measured on this tree against one emulator, same command, same everything but the plugin:

passed reaches the runner
locales=de-DE,en-US under 9.3.2 args_map { key: "locales" value: "de-DE,en-US" }
locales=de-DE,en-US under 9.4.0 -e locales de-DE
locales=de-DE+en-US under 9.4.0 -e locales de-DE+en-US
class=A#doesNotExist,B under 9.4.0 -e class A#doesNotExist
sizes=a b,c under 9.4.0 -e sizes a b

A space survives and a comma does not, and the last row is the documented multi-class form, so this is AGP's rather than ours. Nothing in the 9.4.0 release notes mentions it.

What changes

The lane joins with a plus and the test splits on either, so am instrument driven by hand still takes a comma.

The lane checks that every language it asked for came out. That is the part that let this reach the store: ScreenshotTests photographs the locales it is handed and passes, so a list mangled on the way in is indistinguishable from a run asked for one language - and screenshots_narrowed? skips the full-set check on a release runner, which is holding half a set by design. The new check is per language, so it holds for that half too.

Checked

Against the API 36 AVD with the fifteen-locale list: -e locales cs-CZ+de-DE+en-US+es-ES+et+fr-FR+hi-IN+it-IT+ja-JP+pl-PL+pt-BR+ru-RU+sv-SE+tr-TR+zh-CN arrives whole. A full local capture is not part of this - the next release run is what exercises it end to end.

4.19.0's own pictures are not restored by this: build/v4.19.0 is written, so the release run refuses that version. The store shows 4.18.0's until the next release.

🤖 Generated with Claude Code

https://claude.ai/code/session_017zSYiEKUuTFhMy3jpee99C

andiwand and others added 3 commits September 5, 2026 10:13
AGP 9.4.0 cuts a `-Pandroid.testInstrumentationRunnerArguments.<key>` value at
the first comma. The lane joined the fifteen locales with one, so the runner was
handed `-e locales cs-CZ` and each device photographed a single language:

    9.3.2  args_map { key: "locales" value: "de-DE,en-US" }
    9.4.0  am instrument ... -e locales de-DE

It is AGP's bug rather than ours - the same truncation drops every class but the
first from the documented `class=TestA,TestB` - so the lane joins with a plus,
which arrives whole, and the test splits on either. A run driving `am instrument`
by hand is unaffected and can still spell it with a comma.

What made this cost a release is that it passed. `ScreenshotTests` photographs
the locales it is handed, so one language is a full run of a short list, and
`screenshots_narrowed?` skips the full-set check on a release runner holding half
a set. The lane now checks that every language it asked for came out, which holds
for half a set as well.

Found on the 4.19.0 release: both devices reported success with cs-CZ alone, and
`screenshot-set` refused the other fourteen. The store kept 4.18.0's pictures,
which is what that job is split out to make survivable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zSYiEKUuTFhMy3jpee99C
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zSYiEKUuTFhMy3jpee99C
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zSYiEKUuTFhMy3jpee99C
@andiwand
andiwand merged commit 2b84518 into main Sep 5, 2026
2 checks passed
@andiwand
andiwand deleted the screenshot-locales-agp94 branch September 5, 2026 08:25
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