ReviewOS

also looking at this

craft-native/craft

fix(android): recover remote loads after connectivity returns

#265
Merged glennmichael123 wants to merge codex/android-load-failure-fallback into main
4 files +130 -11
9 days ago

Summary

  • fall back to bundled Android assets only for main-frame connectivity failures
  • retry the configured remote origin when connectivity returns or the app enters the foreground
  • discover every Kotlin compile fixture so new JVM tests cannot silently be skipped

Decision

ERROR_IO is included with ERROR_HOST_LOOKUP, ERROR_CONNECT, and ERROR_TIMEOUT. Android can also use it after a server accepted a connection and then broke it, so this is intentionally a little broader than the iOS whitelist. Keeping it isolated in CraftLoadFailure makes that choice cheap to change if device evidence shows it hiding reachable-server faults.

TLS, authentication, bad-URL, unsafe-resource, and other errors remain on Chromium's error surface instead of being hidden behind the bundled copy.

Verification

  • fail-first: the focused builder test failed against the old unconditional fallback
  • mutation checks caught bypassing the classifier, retaining the fallback latch, and retrying without a false-to-true network transition
  • bun test in packages/android: 103 passed
  • bun run test:sdk: 566 passed (outside the filesystem/network sandbox so HMR can bind localhost)
  • bun run typecheck
  • bun run verify:packages: 36 checks
  • bunx --bun pickier .: 0 errors, existing 36 warnings
  • generated Gradle fixture reached configuration locally; this Mac has no Android SDK, so android-builder is the Kotlin/JUnit compiler signal

The pure classifier is exercised by CraftLoadFailureTest. The network callback and onResume recovery paths are pinned by generated-source wiring tests; they are not executed by the plain JVM fixture.

Closes #254

4 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.