Skip to content

Unblock release pipeline: Android Gradle cache + detector history window - #5

Merged
tmonga2208 merged 2 commits into
mainfrom
fix/release-pipeline
Oct 10, 2026
Merged

tmonga2208 merged 2 commits into
mainfrom
fix/release-pipeline

Conversation

@tmonga2208

Copy link
Copy Markdown
Owner

The Release workflow has never published a release. Two independent causes:

  • Android job fails at setup-java. cache: gradle hashes *.gradle files at setup time, but android/ is generated by expo prebuild later, so the step errors with "No file ... matched". Replaced with actions/cache on ~/.gradle, keyed on pnpm-lock.yaml + app.json.
  • pnpm test fails on both platforms since August. runDetectors takes an explicit localDate but fetched history relative to Date.now(). The fixture dates (2026-07-09..11) fell outside the 21-day window once the wall clock passed them, so possible_meal › raises confidence when the pattern recurs got no history. The window is now anchored on the localDate being evaluated.

Local: pnpm check passes (shared 214, mobile 116, api 118 tests).

🤖 Generated with Claude Code

tmonga2208 and others added 2 commits October 10, 2026 12:29
… window)

The Release workflow has never published: the Android job died in setup-java
because `cache: gradle` hashes Gradle files that do not exist until prebuild,
and since August the shared test step fails on a detector test.

- android.yml: cache ~/.gradle with actions/cache keyed on the lockfile and
  app.json instead of setup-java's built-in Gradle cache.
- detectors: anchor the 21-day history window on the localDate being evaluated
  rather than Date.now(), so a run for a past day still sees its own history.
  This is what made 'raises confidence when the pattern recurs' start failing
  once the wall clock moved 21 days past the fixture dates.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
'applies the choice to memory immediately' fired setPreference and returned
while its storage write was still behind an in-flight dynamic import. On a
loaded runner the one-macrotask drain in beforeEach is not enough, the import
overlaps the next test's, and Vitest resolves that second import to the real
async-storage module ('window is not defined', swallowed by the store) — so
'persists the choice under the documented key' never sees its write. The test
now waits for its own write before finishing. Reproduced at ~7% under CPU
load before, 0/40 after.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@tmonga2208
tmonga2208 merged commit db15d71 into main Oct 10, 2026
1 check passed
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