Skip to content

app-build: run StrandTests on the macOS Strand leg + fix the flaky test it surfaced - #607

Merged
ryanbr merged 2 commits into
mainfrom
fix/app-build-runs-strandtests
Jul 19, 2026
Merged

app-build: run StrandTests on the macOS Strand leg + fix the flaky test it surfaced#607
ryanbr merged 2 commits into
mainfrom
fix/app-build-runs-strandtests

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Re-opened from #606 on a non-ci/ branch (the app-build cleanup job auto-deletes ci/-prefixed branches, which broke #606's head ref mid-merge).

Two changes

  1. app-build.yml: run StrandTests on the macOS Strand leg. The workflow was compile-only, so the app-target unit tests in StrandTests never ran anywhere (swift-packages only covers Packages/**). Adds a macOS-only xcodebuild -scheme Strand -destination 'platform=macOS' test step; NOOPiOS stays compile-only. On-demand, like the rest of this disabled-by-default workflow.
  2. Fix the flaky test it immediately surfaced. HugeImportFirstPaintStressTests.testLatestDataLookupResolvesWithoutLoadingHistory asserted latestDataDayStart() equals the logical day of now−3600 — but the seed spans [now−3600, now−1], and now−3600 falls in the PREVIOUS logical day across the 04:00 rollover, so it failed in the 04:00–05:00 window (the run hit 04:49 UTC). MAX(ts)/latestDataDayStart resolves to the LATEST sample's day (≈now); assert against that. Test-only — the code is correct.

Verification

Dispatched app-build with the test step: it executed 918 StrandTests, 917 passed + the 1 flaky failure, then with the fix all green (run 29674198115, all legs success). This is the first time the app-target test suite has ever run in CI — it validates the pure app-target logic tests (backfill continuation #594, strain-target policy #597, etc.) that had been merged compiled-but-never-run.

ryanbr added 2 commits July 19, 2026 17:09
…ate)

app-build.yml was compile-only, so the app-target unit tests (StrandTests —
backfill-continuation, scheduled-report/strain-target policy, the extended-
battery formatter twin, etc.) never ran anywhere: swift-packages can't reach
them and this was build-only. Add a macOS-only test step (StrandTests is hosted
in the macOS app; NOOPiOS stays compile-only) with a concrete runnable
destination. On-demand, same as the rest of this workflow.
Surfaced the moment app-build began running StrandTests: the test seeds today's
dense HR over [now-3600, now-1] and asserts latestDataDayStart() equals the
logical day of now-3600 — but that earliest sample falls in the PREVIOUS logical
day across the 04:00 rollover, so it failed in the 04:00-05:00 window (the run
hit 04:49 UTC). MAX(ts)/latestDataDayStart resolves to the LATEST sample's day
(≈ now), so assert against that. Test-only; the code is correct.
@ryanbr
ryanbr merged commit f34ef5e into main Jul 19, 2026
1 check passed
@ryanbr
ryanbr deleted the fix/app-build-runs-strandtests branch July 19, 2026 05:15
ryanbr added a commit that referenced this pull request Jul 19, 2026
…sts (#609)

Same class as the HugeImportFirstPaintStressTests fix (#607), surfaced now that
app-build runs StrandTests: these assert latestDataDayStart() equals the logical
day of the seed's FIRST sample (base), but latestDataDayStart resolves to MAX(ts)
= the LAST sample (base + N-1). When a seed spans the 04:00 logical-day rollover
(e.g. base=03:57 → base+299=04:02), the two land on different days and the assert
fails in that window — this run hit it at 05:57 UTC (freshBase = now-2h = 03:57).

Assert against the latest sample's day instead: staleBase+299 / freshBase+299
(300-sample seeds) and liveBase+599 (600-sample seed). Test-only; the code is
correct (latestDataDayStart rightly returns the newest data's day).
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
…st it surfaced (ryanbr#607)

* app-build: run StrandTests on the macOS Strand leg (app-target test gate)

app-build.yml was compile-only, so the app-target unit tests (StrandTests —
backfill-continuation, scheduled-report/strain-target policy, the extended-
battery formatter twin, etc.) never ran anywhere: swift-packages can't reach
them and this was build-only. Add a macOS-only test step (StrandTests is hosted
in the macOS app; NOOPiOS stays compile-only) with a concrete runnable
destination. On-demand, same as the rest of this workflow.

* Fix flaky date-boundary assert in HugeImportFirstPaintStressTests

Surfaced the moment app-build began running StrandTests: the test seeds today's
dense HR over [now-3600, now-1] and asserts latestDataDayStart() equals the
logical day of now-3600 — but that earliest sample falls in the PREVIOUS logical
day across the 04:00 rollover, so it failed in the 04:00-05:00 window (the run
hit 04:49 UTC). MAX(ts)/latestDataDayStart resolves to the LATEST sample's day
(≈ now), so assert against that. Test-only; the code is correct.
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
…sts (ryanbr#609)

Same class as the HugeImportFirstPaintStressTests fix (ryanbr#607), surfaced now that
app-build runs StrandTests: these assert latestDataDayStart() equals the logical
day of the seed's FIRST sample (base), but latestDataDayStart resolves to MAX(ts)
= the LAST sample (base + N-1). When a seed spans the 04:00 logical-day rollover
(e.g. base=03:57 → base+299=04:02), the two land on different days and the assert
fails in that window — this run hit it at 05:57 UTC (freshBase = now-2h = 03:57).

Assert against the latest sample's day instead: staleBase+299 / freshBase+299
(300-sample seeds) and liveBase+599 (600-sample seed). Test-only; the code is
correct (latestDataDayStart rightly returns the newest data's day).
DX23876 added a commit to DX23876/noop that referenced this pull request Aug 1, 2026
…s never runs

The table claimed `app-build.yml` runs automatically on PR/push and called
`docs/CONTRIBUTING.md`'s "disabled by design" description stale. It is the
other way round: `gh workflow list` reports the workflow as
`disabled_manually` and its last run was 2026-07-21, while CONTRIBUTING is
correct. The `pull_request`/`push` triggers are still in the file, which is
exactly what makes the mistake easy — a disabled workflow looks live in the
repo and nothing in-tree contradicts it.

The consequence is worth stating plainly rather than leaving implicit:
`app-build.yml` is the only place `StrandTests` runs (ryanbr#607), so with it off,
app-target logic tests are gated by nobody. `CoachMemoryDedupTests` was broken
on 2026-07-28 and sat red on `main` until now — cited as the concrete case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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