Repository navigation
fix(build): pin the screenshot render JVM to UTC - #7803
Conversation
CST pins the render JVM's locale but not its timezone, so a preview that formats an absolute date records a different day on a host east of UTC than CI renders, and the one glyph is enough to fail validate.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
UTC timezone configuration build-logic/convention/src/main/kotlin/AndroidScreenshotConventionPlugin.kt, .skills/testing-ci/SKILL.md |
The plugin sets user.timezone to UTC for matching screenshot-test tasks. The existing test-retry opt-out remains. The documentation describes the UTC pin and states that CST pins only the locale. |
Priority:
Merge Risk: 
Minimal · up to ff8cd
-
No actionable merge risk is identified; the timezone pin can proceed with normal checks.
Pre-merge checks: 
7 · 
1
-
Failed checks: 1 warning Passed checks: 7 passed-
Full details: Sibling Call Sites And Presence Semantics
-
Explanation
The pull request changes only screenshot JVM timezone configuration and related documentation. The diff does not change NodeItem, NodeItemCompact, metric nullability, zero guards, presence checks, or physical-value defaults. Therefore, the sibling-call-site and zero-default checks do not apply.
Full details: Tests Prove The Path, Not The End State
-
Explanation
PASS. The pull request changes only
.skills/testing-ci/SKILL.mdandAndroidScreenshotConventionPlugin.kt. It adds no tests and changes no test assertions, so the check's failure conditions do not apply.
Full details: Moved Code Diffed Against Its Original
-
Explanation
The PR does not move or extract a type or function. The diff modifies the existing
AndroidScreenshotConventionPluginKDoc and addssystemProperty("user.timezone", "UTC")inside the existing screenshotTesttask configuration. It also updates documentation. No declaration is deleted, no replacement location is added, and no moved-code call-site comparison is required.
-
Full details: Regression Coverage For Changed Behavior
-
Explanation
Missing regression coverage for the changed
AndroidScreenshotConventionPluginpath. Intasks.withType<Test>().configureEach, matchingScreenshotTesttask names now receivesystemProperty("user.timezone", "UTC")(plugin lines 51–60). This affects the JVM timezone used by screenshot rendering and can change absolute-date output across host timezones. The diff changes only the plugin and documentation; it adds no functional test. The reportedTZ=Asia/Tokyorun is manual evidence, and the existing golden comparison does not directly verify task configuration or run under a non-UTC timezone. A matching task could lose the property without a codified test, and the non-matching-task boundary is also untested.Resolution
Add a Gradle TestKit or equivalent convention-plugin functional test. Apply
meshtastic.android.screenshotin a fixture with the required Compose Screenshot plugin, create matching and non-matchingTesttasks, and run the matching task with a non-UTC host timezone. Assert inside the test process thatTimeZone.getDefault().idisUTCor assert the task system property isUTC. Assert that the unrelatedTesttask is unchanged. The matching assertion must fail when the newsystemProperty("user.timezone", "UTC")line is removed.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
CST pins the render JVM's locale but not its timezone, so a preview that formats an absolute date records a different day on a host east of UTC than CI renders. The sample node's
lastHeardis 2023-11-14 22:13 UTC, and #7802's goldens read November 15 - one glyph, 0.0009 of the image, over the 0.0005 threshold.🐛 Bug Fixes
AndroidScreenshotConventionPluginsetsuser.timezone=UTCon every screenshotTesttask, soupdateandvalidaterender the same day on every host.🧹 Chores
.skills/testing-cinotes the pin.Testing Performed
TZ=Asia/Tokyo ./gradlew :screenshot-tests:validateDebugScreenshotTest --rerun --no-build-cache -Dorg.gradle.isolated-projects=falseonmainfails the 14 NodeItem goldens that show the date; on this branch all 359 pass.Summary by CodeRabbit