Repository navigation
ci(app): run the Dart suite under two far-east timezones - #14440
Conversation
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]>
| name: Dart Tests (Pacific/Kiritimati) | ||
| runs-on: ubuntu-latest | ||
| needs: changes | ||
| if: needs.changes.outputs.has_app_dart == 'true' | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Setup Flutter | ||
| uses: subosito/flutter-action@v2 | ||
| with: | ||
| channel: stable | ||
| flutter-version: 3.44.5 | ||
| cache: true | ||
|
|
||
| - name: Cache build_runner state | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: app/.dart_tool/build | ||
| key: ${{ runner.os }}-flutter-buildrunner-${{ hashFiles('app/pubspec.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-flutter-buildrunner-${{ hashFiles('app/pubspec.lock') }}- | ||
| ${{ runner.os }}-flutter-buildrunner- | ||
|
|
||
| - name: Resolve Flutter dependencies | ||
| working-directory: app | ||
| run: flutter pub get | ||
|
|
||
| - name: Prepare Flutter dev compile inputs | ||
| working-directory: app | ||
| run: | | ||
| cp lib/firebase_options_local.dart lib/firebase_options_dev.dart | ||
| cp lib/firebase_options_local.dart lib/firebase_options_prod.dart | ||
| { | ||
| echo "API_BASE_URL=" | ||
| echo "USE_WEB_AUTH=true" | ||
| echo "USE_AUTH_CUSTOM_TOKEN=true" | ||
| echo "STAGING_API_URL=" | ||
| } > .dev.env | ||
| : > .env | ||
|
|
||
| - name: Generate Flutter code | ||
| working-directory: app | ||
| run: dart run build_runner build --delete-conflicting-outputs | ||
|
|
||
| - name: Run Flutter tests under Pacific/Kiritimati | ||
| run: TZ=Pacific/Kiritimati bash app/test.sh | ||
|
|
||
| - name: Run Flutter tests under Pacific/Pago_Pago | ||
| if: always() | ||
| run: TZ=Pacific/Pago_Pago bash app/test.sh |
# Conflicts: # .github/workflows/mobile-app-checks.yml # backend/tests/unit/test_workflow_contracts.py # scripts/dev-harness/MOBILE_VERIFY.md
|
Merge origin/main completed — union resolutions in |
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.
|
Fixed the timezone-dependent test in bdcfc78: |
What changed and why
Runs the Dart suite a second time under two far-east timezones —
Pacific/Kiritimati(UTC+14)and
Pacific/Pago_Pago(UTC−11) — so a date-dependent test cannot pass only because CI happensto run in UTC.
This closes the remaining half of package Z1's acceptance, which asks that
mobile-verify fast --allpass "with no flags on a UTC+7 host and under a forced far-eastTZin CI". The first half merged as #14313; this half was written at the same time, neveropened as a PR, and was found tonight by an audit for unpushed work. It is rescued here as a
single commit cherry-picked onto current
mainrather than as its original branch, whose othertwo commits are #14330's already-merged content.
The class it guards against is not hypothetical in this repository: a host-timezone failure in
search_rank_grouping_test.dartis exactly whyTZ=UTCis pinned on the local owner command inthe first place. Pinning UTC makes local runs reproducible; it also means nothing ever exercises
the boundaries where a UTC+14 or UTC−11 host puts a date on the other side of midnight.
Product invariants affected
none
How it was verified
actionlintclean on the edited workflow.backend/tests/unit/test_workflow_contracts.pypasses 30 tests, including the assertions this commit adds for the new matrix entries.
app/AGENTS.mdis 11411 bytes, at budget and not over it.Not claimed: that the second pass currently finds a defect. It is a guard, and if it goes red on
its first real run that is the point of it rather than a fault in it.
Tests
The workflow contract tests assert the added timezone entries, so the second pass cannot be
silently dropped from the matrix later.
Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code