Tell an unkeyed build why it cannot self-update (LC-607) #567
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/lc607-updater-fails-before-network"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of LC-607. Does not close it: the update channel still needs a decision on where releases are published for end users. This fixes the part that is wrong under every possible answer to that question.
The bug
fetch_manifestfetched the manifest and its detached signature before checking whether the build has an embedded public key. An unkeyed build refuses every manifest at the verify step anyway, so the fetch could only change which error the user saw, and it showed the wrong one.Every desktop binary anyone could have installed is unkeyed.
publish-release.ymlis the only workflow that injectsLETS_CHAT_UPDATE_PUBLIC_KEY, and it has never completed a run; the binaries currently sitting in thelatestpackage came from main-push builds, which do not reference the variable. The compiled-in default source is the privatepsa-systems-privatepackages org, where an anonymous GET returns 401.So the real-world output was:
Three things wrong with that. It blames the network for something no network could fix. It prints an internal private-org URL to end users. And it makes an outbound request to a source that could never have satisfied it.
The change
Check
PUBLIC_KEY_HEXbefore touching the network:Behaviour is unchanged for a keyed release build, which skips the early return and proceeds exactly as before.
Verification
unkeyed_build_reports_not_configured_without_fetchingpointsLETS_CHAT_UPDATE_URLat a loopback address the net guard rejects outright, then asserts the not-configured message comes back. That is what makes it evidence about ordering rather than a restatement of the code: if the key check did not come first, the failure would be the guard's.Confirmed not vacuous by deleting the early return and re-running:
just checkclean, desktop tests pass.What is still open on LC-607
The channel itself. The packages owner is a private org, so no client can fetch from it regardless of signing; there is no
latest.jsonpublished; and the keypair was never provisioned. Steps 2 and 3 are mechanical once the publish target is chosen. Worth noting there is no urgency trap here: since every shipped binary is unkeyed and fails closed, no existing install is silently doing the wrong thing, and no already-distributed client gets stranded by whatever key is eventually generated.🤖 Generated with Claude Code
https://claude.ai/code/session_01FhDVMViNHqUbwmfe2aXTv5