357. A test that paints asks for the library, and a download asks again
Date: 2026-09-17
Status
Accepted. Repairs Snapshot run 12 (commit f716adec). Applies ADR-0338’s rule
to one more test and adds retries to :assets’ downloads.
Context
Snapshot run 11 was green. Run 12 was red on four jobs, for two unrelated reasons, both read off the runners’ check-run annotations and job logs:
publish / {linux,macos,windows} / Java—:core:test, 2267 tests, 1 failed:WindowResizeTest > what the manager decided arrives through onResize, and a frame follows, withUnsatisfiedLinkError: libgoldberry not found. Those jobs build with-Pgoldberry.skipNative=true, so there is no library by design. The test came in with ADR-0342. It is the only one of the five that runs the frame loop, and a frame rasterizes. It never calledRendererRequirement.enforce(), which is the fifth instance of the defect ADR-0338 fixed in four tests.publish / linux / Verify layouts (linux-aarch64)—:core:prepareAssetsfailed withServer returned HTTP response code: 500forgithub.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip. The other three verify legs downloaded the same archive in the same minute. It was GitHub’s failure, andAssetCachemade one attempt.
Because the Java job stops at the first failing task, :widgets, :html,
:example and :natives never ran there. A local run of every module’s tests
with -Dgoldberry.native.library=/nonexistent/libgoldberry.so found no other
test in that state: 0 failures across 5263 tests.
Decision
The painting test skips without a library. A download retries a failure that can pass on its own, and only that.
WindowResizeTest.arrivesThroughTheHandlercallsRendererRequirement.enforce(). The other four tests there only move a headless window and keep running without the library.io.github.digitalsmile.goldberry.assets.download.Downloadermakes the request throughjava.net.httpwith redirects followed. It tries four times, waiting 2, 4 and 8 seconds, on HTTP 408, 429, any 5xx or anIOExceptionfrom the connection. Any other status fails on the first attempt: a 404 is a pin that names nothing. Each failed attempt is printed to stderr, so a slow asset step says why.AssetCache.fetchandfetchTextgo through it.fetchTextis now an instance method, so the licence download shares the cache’s downloader.- The checksum is not retried. An archive that arrives whole and hashes
wrong is a changed upstream, and
AssetCache’s message says so.
Consequences
- A GitHub outage that lasts longer than about 14 seconds still fails the asset step, and should: a longer wait makes a stuck run look like a slow one.
- The transport, the sleeper and the attempt count are constructor arguments,
so
DownloaderTestcovers the retry policy with no network and no waiting. - Any new
:coretest that opens a window and runsGoldberry.run()with a paint handler needs the same guard. The no-library run above is how to check:./gradlew test --continue -Dgoldberry.native.library=/nonexistent/libgoldberry.so.