Public Access
Let a failed update check say so, instead of reporting good news
The phone reported every build as current because the release repository is private. Gitea answers 404 rather than 403 for a repo you cannot see, the client reads that address anonymously, and AndroidUpdateChannel caught the failure and returned null — which IUpdateChannel documented as meaning "this build is the latest". The check had never once succeeded on any phone and nothing anywhere said so. Two faults, and the second is why the first lasted. The seam said null was the honest answer for an unreachable channel, on the reasoning that the caller does the same thing either way. That is true of the six-hourly pass and false of CHECK NOW. UpdateViewModel already draws the line correctly — silent on the timer, the exception's message on the button — and it could only ever draw the first half, because nothing was ever thrown at it. The desktop's channel does not catch, so the interface described neither implementation. So CheckAsync throws now, and null means one thing. A release that is reachable but missing its manifest or the APK it names throws too: "you are up to date" about a half-published feed is the same lie in a smaller costume, and the self-healing that argument protected is untouched, since the timer still swallows everything. The precondition is written down where somebody would look, rather than left as a sentence about where a token could live. ADR 0013 §4 already said a private release repository was incompatible with this design; nobody checked which side of it this repository was on. It is one curl, and manual-checks phase 16 now opens with it — pointedly not against /api/v1/version, which answers 200 from a forge that is up whatever is readable on it, and which is what made this look like nothing was wrong. Phone check 17.4 was the one that passed all along. It now presses CHECK NOW with the network off as well as on, because two different answers are the whole of what makes the first one worth reading.
This commit is contained in:
@@ -59,6 +59,20 @@ losing the local cache, the outbox and the device key.
|
||||
no setting for it — a configurable update URL is exactly the knob that would let an operator, or a
|
||||
stray edit to a plaintext file, point the update path at the party ADR 0001 models as the adversary.
|
||||
|
||||
◆ **Which means the repository has to be public, and it was not.** A constant address with no token is
|
||||
an anonymous read; the repository was private, so every check answered `404` and every phone reported
|
||||
itself current. See ADR 0013 §4, which had written the incompatibility down as a fact about where a
|
||||
token could live and not as something to check on the deployment. The check is one `curl` and it is
|
||||
there.
|
||||
|
||||
The Android channel made it invisible rather than merely broken: it caught every network and parse
|
||||
failure and answered null, which `IUpdateChannel` then documented as meaning "this build is current". So
|
||||
a pressed CHECK NOW reported the latest build for an outage that had lasted since the feature shipped.
|
||||
It throws now. The timer still swallows — a phone on a train is not news, and a half-published release
|
||||
still fixes itself in six hours without anybody being told — and the button reports what happened,
|
||||
which is the distinction `UpdateViewModel` was written to make and was never given anything to make it
|
||||
with.
|
||||
|
||||
5. **The comparison is Android's `versionCode` and not the version name.** That integer is what the
|
||||
platform itself uses to accept or refuse an install, so comparing anything else would let the client
|
||||
offer an update the platform then rejects. The feed publishes it in a small JSON manifest beside the
|
||||
|
||||
Reference in New Issue
Block a user