Skip to content

ci: run Flipcash2's test tasks from an empty Gradle cache on build PRs - #2065

Merged
bmc08gt merged 5 commits into
code/cashfrom
ci/build-logic-dep-resolve
Nov 30, 2026
Merged

bmc08gt merged 5 commits into
code/cashfrom
ci/build-logic-dep-resolve

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Flipcash2 Build and Deploy runs only on workflow_dispatch, so a build change reaches it after merge. Its setup-java Gradle cache misses whenever a version or build script changes, and the job then downloads every dependency. CI restores code/cash's Gradle home and never makes those requests. #2040 and #2051 both passed CI and then failed Flipcash2 on a Maven Central 429 Too Many Requests: an android-all jar in run 45655461980, and the Node.js pom in run 45850181346.

flipcash2-cold-cache.yml runs the test tasks of Flipcash2's test job (generateEmojiList kotlinStorePackageLock jsNodeTest flipcashTestDebug with -PskipCoverage=true) with nothing restored into ~/.gradle, using ci.yml's heap caps. A step before it fails if ~/.gradle/caches/modules-2 or ~/.m2/repository already exists, since settings.gradle.kts lists mavenLocal(). It runs on manual dispatch and on PRs that touch build-logic/, buildSrc/, the root build.gradle.kts or settings.gradle.kts, gradle/, gradle.properties, kotlin-js-store/, the provision-config action or the workflow itself. Config comes from provision-config, so Dependabot PRs get placeholder keys rather than empty ones. It shouldn't become a required check: a required check that the path filter skips never reports.

It leaves out the lane's last task, :apps:flipcash:app:lintDebug, which lints every module and doesn't fit the runner from an empty cache. The first run here, with the project's 6 GB daemon heaps, lost its runner 62 minutes in. The second, with ci.yml's caps, finished the test tasks in 28 minutes and was still linting 90 minutes later when it timed out. So the check doesn't resolve lint's own classpath, or the androidTest classpaths that only the lint tasks resolve.

CLAUDE.md and docs/architecture/15-ci-and-release.md now say to get the failing request's HTTP status and URL before writing a fix for a failed download.

The dep-review skill creates its worktree with git worktree add, which fires no hook, so the worktree had no local.properties and Gradle failed to configure :apps:flipcash:app with a FileNotFoundException. The skill now copies the file from the main checkout. It copies rather than symlinks because a worktree can set its own overrides there, such as protoLocalRoot.

Flipcash2 Build and Deploy runs only on workflow_dispatch, and its
setup-java Gradle cache misses whenever a version or build script
changes, so it downloads every dependency. CI restores code/cash's
Gradle home, so #2040 and #2051 passed it and then failed Flipcash2 on
Maven Central 429s.

The new workflow runs `fastlane flipcash_tests` with no Gradle cache on
PRs that touch build-logic, buildSrc, the root build scripts, gradle/,
gradle.properties, kotlin-js-store or the Fastfile. CLAUDE.md now asks
for the failing request's HTTP status and URL before a download fix.
`git worktree add` fires no SessionStart hook, so the worktree had no
local.properties and Gradle failed to configure :apps:flipcash:app with
a FileNotFoundException. The skill now copies it from the main checkout.
@bmc08gt bmc08gt self-assigned this Nov 30, 2026
The first run lost its ubuntu-24.04 runner 62 minutes into fastlane
flipcash_tests, and no log was uploaded. Flipcash2's passing test runs
restore both its dependency and build caches; this job compiles
everything with the project's -Xmx6g daemons, the setup ci.yml capped
after #1996 lost runners the same way.

Write ci.yml's heap caps to ~/.gradle/gradle.properties, which overrides
the project's, so the fastlane command stays the same as Flipcash2's.
Raise the timeout to 120 minutes.
Flipcash2's lane ends with :apps:flipcash:app:lintDebug, which lints
every module, and from an empty cache that does not fit the runner.
With the project's 6 GB daemon heaps the first run lost its runner 62
minutes in. With ci.yml's caps the second run finished the test tasks
in 28 minutes (no failed requests) and was still linting 90 minutes
later when it hit the 120-minute timeout.

Run ci.yml's capped unit-test command with -PskipCoverage=true, which
is the lane's task list minus lint, instead of fastlane. That removes
the Ruby setup and the ~/.gradle/gradle.properties step, and the
fastlane/Fastfile path trigger. Timeout 50 minutes.

The check no longer resolves lint's classpath or the androidTest
classpaths that only the lint tasks resolve; CLAUDE.md and the CI doc
now say it covers the test tasks only.
@bmc08gt bmc08gt changed the title ci: run Flipcash2's test job from an empty Gradle cache on build PRs ci: run Flipcash2's test tasks from an empty Gradle cache on build PRs Nov 30, 2026
…ep-resolve

* origin/code/cash:
  docs(claude): bound the whole operation a timeout's budget covers (#2068)
  fix(notifications): write pushes that beat the database, and finish reply actions (#2061)
  fix(chat): keep in-flight sends when a server echo arrives (#2058)
  fix(messenger): keep text typed while a chat's draft loads (#2064)
  fix(chat): coalesce delta syncs, lock the sequence tracker, resync on resume, fix typing heartbeat (#2063)
  fix(grpc): give unary calls a 30 second default deadline (#2062)
  fix(chat): clear opened photos on logout and keep staged photos out of backup (#2060)
  fix(desktop): bind TransactionRouter so the desktop graph compiles again (#2067)

# Conflicts:
#	CLAUDE.md
@bmc08gt
bmc08gt merged commit a37eb4b into code/cash Nov 30, 2026
7 checks passed
@bmc08gt
bmc08gt deleted the ci/build-logic-dep-resolve branch December 1, 2026 03:53
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