Repository navigation
fix(app): stop hermetic tests depending on host timezone; harden mobile-verify evidence paths and device doctor - #14313
Merged
Conversation
UTC same-day .single and DateTime.now() as "today" are only true in the
author's zone. Build same-day fixtures with local DateTime via
localCalendarDay, default selectedDate through package:clock, and
document the TZ=Pacific/{Kiritimati,Pago_Pago} entrypoint.
Failure-Class: new
Co-authored-by: Cursor <[email protected]>
#14305 caught empty OMI_VERIFY_EVIDENCE_DIR and the CLI default runner. Relative --evidence-dir still wrote receipts under app/ (runner cwd) while aggregation looked at the invocation cwd; AndroidTooling._run still let FileNotFoundError escape past device_doctor. Resolve evidence paths against the invocation directory, convert missing adb/xcrun to DeviceRunnerError, and accept device doctor --json like the siblings. Co-authored-by: Cursor <[email protected]>
app/AGENTS.md is already at its lean budget. The documented
TZ=Pacific/{Kiritimati,Pago_Pago} entrypoint lives in the harness
guide, which CI can call without growing agent context.
Co-authored-by: Cursor <[email protected]>
This was referenced Sep 17, 2026
Merged
Git-on-my-level
added a commit
that referenced
this pull request
Sep 18, 2026
* ci(app): run the Dart suite under Kiritimati and Pago_Pago Harness Z1 named these two TZ=... bash app/test.sh commands. The job stays off the critical path and is expected red until PR #14313 merges. Co-authored-by: Cursor <[email protected]> * test(app): make surface_timer_after_dispose_test timezone-independent ConversationDetailProvider.conversationOrNull() validates conversationLocalDayKey(startedAt ?? createdAt) against conversationLocalDayKey(selectedDate), which defaults to the clock at construction. The pinned DateTime(2026, 9, 18, 9) only matched when the runner's calendar day agreed with UTC, so the ActionItemDetailWidget test threw StateError('No valid conversation found') under UTC+14/UTC-13 and UTC-11 runners. Derive createdAt from DateTime.now() minus two hours and set selectedDate from the same instant via conversationLocalDayKey, mirroring what ConversationDetailPage.initState does; the day-key comparison is now tautological under any timezone and wall-clock time. Use DateTime.now() for the MemoriesPage fixture too. --------- Co-authored-by: Cursor <[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.
What changed and why
Hermetic Dart tests encoded the author's timezone (UTC same-day
.single, wall-clockDateTime.now()as "today"), and the mobile-verify / device-doctor harness still treated relative evidence paths and missingadb/xcrunas unclassified failures after #14305's instance fixes. This PR closes those classes: local-day fixtures +package:clock, evidence dirs resolved against the invocation cwd, and missing binaries classified as remediable doctor results.Product invariants affected
none
How it was verified
bash scripts/dev-harness/run-tests.sh— 288 passed, 7 skippedmobile_verify.py/device_runner.py/mobile_session.pyagainst the new tests: 5 failed (relative--evidence-dirand env path →zero-execution; missingadb/xcrun→ uncaughtFileNotFoundError;device doctor --json→ argparse exit 2)TZ=Pacific/Kiritimati bash app/test.sh— 2016 passed, 5 skippedTZ=Pacific/Pago_Pago bash app/test.sh— 2016 passed, 5 skippedmake mobile-verify ARGS="fast --all"(host UTC+7, no flags/env) — outcome passed, 20 executed / 20 passed. Receipt:/var/folders/3v/4wd8xf9s0z175zhynpxrt4g80000gn/T/mobile_verify_p2ccxezm/verify-receipt.jsonTZ=Pacific/Kiritimati make mobile-verify ARGS="fast --all"— outcome passed, 20/20. Receipt:/var/folders/3v/4wd8xf9s0z175zhynpxrt4g80000gn/T/mobile_verify_xvd2k79f/verify-receipt.jsonTZ=Pacific/Pago_Pago make mobile-verify ARGS="fast --all"— outcome passed, 20/20. Receipt:/var/folders/3v/4wd8xf9s0z175zhynpxrt4g80000gn/T/mobile_verify_rjp0sea1/verify-receipt.jsonmobile-session device doctorwith stripped PATH is covered bytest_device_doctor_stripped_path_is_classified_not_a_traceback(exit 2, no traceback, iOS checks still run)Did not add a second CI timezone workflow (package forbids new
.github/workflows/files). The entrypoint CI can call is documented inscripts/dev-harness/MOBILE_VERIFY.md(app/AGENTS.mdis at its lean budget).Tests
app/test/unit/search_rank_grouping_test.dart— same-day rank useslocalCalendarDay; UTC pair keeps rank and bucket count follows distinct local daysapp/test/providers/conversation_detail_provider_selection_test.dart—selectedDatedefaults toclock.now()underwithClockapp/test/support/local_day.dart— shared local-calendar constructorscripts/dev-harness/tests/test_mobile_verify.py— empty/relative/absoluteresolve_evidence_dir; relative--evidence-dirandOMI_VERIFY_EVIDENCE_DIRland next to the invocation, not underapp/; barefast --alluses a temp dirscripts/dev-harness/tests/test_device_runner.py— rawFileNotFoundErrorfrom adb/xcrun isagent-remediableand the other platform still runsscripts/dev-harness/tests/test_mobile_session.py—device doctor --jsonand stripped-PATH CLI doctorFailure class (fixes)
Failure-Class: new
Failure-class transition narrative (only when needed)
FC-host-tz-calendar-in-hermetic-tests: hermetic tests/journeys must not encode the host calendar or timezone. The violated contract is "same local day" / "today" derived from UTC literals orDateTime.now(). Canonical prevention islocalCalendarDay/conversationLocalDayKey,package:clockfor "today", and provingbash app/test.shplusmake mobile-verify ARGS="fast --all"underTZ=Pacific/KiritimatiandTZ=Pacific/Pago_Pago. Evidence is this PR (evidence_prsis[]). Harness evidence-dir and missing-binary classes stay instance/harden work on top of #14305; they do not add a second registry entry in this PR.Part of the mobile self-driving program (Harness lane, package Z1). Implemented by Cursor
cursor-grok-4.6-high. Coordinator verification on the head commit:bash scripts/dev-harness/run-tests.sh288 passed / 7 skipped; baremake mobile-verify ARGS="fast --all"passed with a validated receipt on a UTC+7 host;TZ=Pacific/Kiritimati bash app/test.shpassed except one run ofcapture_recovery_replay_scenarios_test.dart"process kill mid-capture", which this PR does not touch and which passed 4 of 4 in isolation under both timezones — a load-sensitive flake on a host running five test suites at once, tracked separately.🤖 Generated with Claude Code