Update checks after reconnect
The host checks for signed updates when a connectivity report contains any live interface and the app
is foregrounded. A Wi-Fi/cellular handover counts even if app.online stays true. A report containing
only none does not start a check. In the background, reports still update online state and trigger
sync; resume handles update discovery. This is part of contracts §2.3 and §4.6.
Previously, an app left open after airplane mode could sync successfully while an update banner continued saying it could not check, until resume or the next foreground interval. The host now retries on that connectivity report. No page action is needed.
A connection is a reason to try
Section titled “A connection is a reason to try”bundle.status() reads the last completed check without making a request. reason: "offline" means
“could not check on the last attempt”, at checkedAt. It stays the last result until another check
completes. A live interface does not prove that DNS, the server, or a captive portal will let it work.
After app.online, re-read status for the latest observation, but allow for the asynchronous check:
an immediate read can still return the old timestamp. Listen for bundle.updateReady to learn that
a verified bundle became pending, then re-read status. Do not turn an old failure into a claim that
the device is currently offline. A failed retry remains an honest last-attempt failure.
The update rules still apply
Section titled “The update rules still apply”Concurrent checks coalesce into one. The signature, app identity, sequence, floor, requirements,
paths, hashes and size checks are unchanged. Required data still takes the sync lease with its bounded
wait. A successful check makes the bundle pending and emits bundle.updateReady; it does not reload,
start a trial, or commit. Debug live development continues to suppress signed update checks.
Upgrade the native valence host package and rebuild to get this trigger. Existing ValenceApp
hosts and generated adapters inherit it: no schema bump, bridge method or handler change is needed.
Custom hosts should wire foreground connectivity reports to ValenceUpdater.checkForUpdate().
The host widget tests cover reconnect recovery, live handovers, mixed interfaces, coalescing, background sync/resume and signature rejection. Android device checks are separate; iOS remains experimental and untested. See the update protocol and lifecycle guide for the full status and activation rules.
Revision 19 adds bundle.check and bundle.checked: request discovery explicitly, and re-read bundle.status after every completed check, including needsStoreUpdate. bundle.updateReady remains limited to bundles that become pending. Refresh tooling, declare the new names, regenerate and rebuild the host to opt in.