Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
170f1a0
Check for updates from the desktop app, and decline while a job runs
owenpkent Sep 21, 2026
c766fd8
Tell a failed update check from a current one, and make Cancel cancel
owenpkent Sep 22, 2026
d2e4edc
Record the update check outcomes and cancellation in the changelog
owenpkent Sep 22, 2026
2e62510
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 8, 2026
ce0b815
Read the releases collection in the app's update check, and refuse an…
owenpkent Oct 8, 2026
14498f7
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 8, 2026
260a9c5
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 9, 2026
cd401c8
Update test counts
owenpkent Oct 9, 2026
415ff0f
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 9, 2026
dcae1f8
Report a failed update check from the CLI as an error, not as the new…
owenpkent Oct 9, 2026
0e142cd
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 11, 2026
e391172
Update test counts
owenpkent Oct 11, 2026
4afe5a1
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 11, 2026
f04d72e
Update test counts
owenpkent Oct 11, 2026
30a80f6
Test that the feed error message reaches the exception, CLI and GUI
owenpkent Oct 11, 2026
90c7bca
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Oct 11, 2026
262e0b0
Update test counts
owenpkent Oct 11, 2026
04f5966
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Nov 28, 2026
3e114ff
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Nov 28, 2026
d93a58d
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Nov 29, 2026
d976ecc
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Nov 29, 2026
2b3fe8c
Merge branch 'release-candidate-workflow' into in-app-update-check
owenpkent Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,46 @@ project uses [semantic versioning][semver].

### Added

- **The desktop app checks for updates, and declines while a job is running.**
One check a couple of seconds after the window opens, saying nothing unless
there is something to say, with the release named in the header and
**Help, Check for updates now** for an answer either way. **Options, Check
for updates on launch** turns the automatic check off. The check and the
signature probe run on a pool thread, so an unreachable network delays
nothing.

**Three outcomes, not two.** A check that could not be made is reported as a
failure rather than as "you are the newest release": the never-raising form
of the check returns nothing for a failed fetch, a TLS error and an
unparseable feed alike, and saying you are up to date on the strength of a
failed lookup is a claim. The feed is the releases collection, so an empty
collection or one with nothing newer is "up to date", and anything that is
not a collection of releases or a single release (an object without a
`tag_name`, which from that endpoint is an error body such as a rate limit
notice, a proxy's HTML page, or nothing) is the failure. Whose result it is belongs to the check that is
running, so a manual check started during the first couple of seconds
survives the launch timer firing behind it instead of being answered
silently. `offloader update` makes the same distinction: a
check that could not be made is an error on stderr with exit status 5, not
"the newest release available".

Installing follows the installer's refusal rather than working around it: a
running *or paused* job declines the update with the reason, since a paused
job is a partially written destination waiting to continue. Otherwise the
installer is downloaded and verified, the queue is checked a second time
because a job can start while the bytes arrive, and the app then closes
itself so maintenance can proceed. That close is what makes the update
possible, so it is announced rather than surprising. Progress is throttled
to roughly one signal per 256 KB but always reports the final block, so the
bar finishes instead of stopping just short.

**Cancel cancels.** The download is a blocking read loop on a pool thread and
cannot be interrupted, so cancellation is cooperative through the progress
callback — but it is terminal: the incomplete download is removed, nothing is
verified, and the app cannot go on to offer what the user just declined. Only
the file the release names is removed, since the download directory can be
one the caller owns.

- **A tag-triggered release candidate workflow.** Pushing `v*` gates the tag
against `src/offloader/_version.py` before spending a packaging run on it,
builds the unsigned bundle and installer on `windows-latest`, confirms every
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ ruff check src tests
pytest --cov=offloader --cov-report=term-missing
```

1531 tests at 87% line coverage. They cover formatting against the reference's
1582 tests at 87% line coverage. They cover formatting against the reference's
exact strings, checksum vectors and streaming equivalence, copy/verify
behaviour including simulated destination corruption, pause/resume/cancel
concurrency, retry discrimination, BRAW container parsing, ffprobe parsing,
Expand Down
24 changes: 14 additions & 10 deletions docs/release-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tests or builds were run for this documentation task.
| Dependencies | Minimum versions and optional extras | Recorded build environment and pinned release dependency sets |
| Media tools | ffmpeg/ffprobe discovered externally; copying works without them | Explicit installer dependency policy and useful missing-tool messaging |
| Integrity | Detailed guarantees and remaining limits in `data-safety.md` | Release-specific regression evidence and operational validation |
| Updates | `offloader update` checks GitHub Releases, verifies the signed installer and hands it over; no in-app check or notification | Wire the check into the desktop interface; qualify an end-to-end update against a published release |
| Updates | `offloader update` and the desktop app both check GitHub Releases, verify the signed installer and hand it over, declining while a job is active | Qualify an end-to-end update against a published signed release on a clean machine |

Sources: [`pyproject.toml`](../pyproject.toml),
[`CI`](../.github/workflows/ci.yml), [`README`](../README.md),
Expand Down Expand Up @@ -207,15 +207,19 @@ an arbitrary install directory that might contain user material.
user-context relaunch, and safe settings preservation. A generic unattended
deployment must not launch an app in a missing or unrelated user's session.

The command-line half of the update client is now implemented in
`src/offloader/update.py` and documented in [updates.md](updates.md). It meets
the conditions this section set: the signature, publisher and embedded version
are all verified before elevation, and the `/D=` target is computed from the
running executable rather than from the uninstall registry key. It does not
close a running instance, so an update requires the operator to finish first
and the installer's refusal remains the guarantee. What is still deferred is
the in-app part: an automatic check, a notification, and a progress surface in
the desktop interface.
The update client is now implemented in `src/offloader/update.py`, wrapped for
the desktop app in `src/offloader/gui/updates.py`, and documented in
[updates.md](updates.md). It meets the conditions this section set: the
signature, publisher and embedded version are all verified before elevation,
and the `/D=` target is computed from the running executable rather than from
the uninstall registry key.

The app never replaces itself under an active transfer. A running or paused job
declines the update with a reason, the queue is rechecked immediately before
the installer is launched, and the app then closes itself deliberately so
maintenance can proceed. What remains is qualification rather than
implementation: an end-to-end update from one signed published release to the
next, on a clean machine, which needs a signed release to exist first.

**Acceptance gates:** exercise first install, custom path, same-version
reinstall, upgrade, failed upgrade recovery, silent install, and uninstall on
Expand Down
65 changes: 59 additions & 6 deletions docs/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ becomes the release notes.
A feed that cannot be read is a failure, not an answer. Being offline, an HTTP
error (including GitHub's 403 or 429 when the unauthenticated rate limit is
reached), a redirect to a host outside the allowlist, or a body that is not
the expected JSON makes `offloader update` print the reason to stderr and exit
with status 5. It never prints "the newest release available" in that case:
the expected JSON, or an error body, makes `offloader update` print the reason
to stderr and exit with status 5. It never prints "the newest release available" in that case:
reporting a failure as "up to date" would let a broken proxy or a network
attacker suppress updates indefinitely without anyone noticing. (The library's
`check()` still returns None on any failure for a future background caller;
the command uses `find_release()`, which raises.)
the command and the app use `find_release()`, which raises `FeedError`.)

## Exit status

Expand Down Expand Up @@ -232,9 +232,62 @@ place where the installer's own transactional recovery manages it (see
`installation.py`); the updater does not attempt a second recovery mechanism
on top. The updater deletes nothing but its own download files.

**There is no automatic check yet.** `offloader update` is explicit. An in-app
check, a notification and a timer belong with the desktop interface and are
not implemented here; see [release-plan.md](release-plan.md).
## In the desktop app

The app checks once, a couple of seconds after the window opens, and says
nothing unless there is something to say: an unrequested check that reports
"you are up to date" is noise. When a release is found, the header carries a
line naming it. **Help, Check for updates now** runs the same check and does
report either outcome, and **Options, Check for updates on launch** turns the
automatic one off. The check runs on a pool thread, so a slow or unreachable
network delays nothing and a failure appears in the status bar rather than in
a dialog.

Three outcomes, not two. `update.check()` never raises and returns `None` for
a failed fetch, a TLS error and an unparseable feed alike, so a caller that
reports its result to somebody cannot use it: "you are the newest release" is
a claim, and it would be made on the strength of a failed DNS lookup. The app
and `offloader update` both use `find_release()`, which returns `None` only when
the feed answered and had nothing newer, and raises `FeedError` otherwise. A
check that could not be made is reported as a failure. From the command line
that is an error on stderr and exit status 5, distinct from 0 (up to date) and
1 (a newer release exists).

"Answered" means it returned the releases collection, or a single release
object (one with a `tag_name`). An empty collection, or one with nothing newer
for this install's channel, is up to date. Anything else is malformed and
raises `FeedError`: any other object (which this endpoint returns only as an
error body, such as a rate limit notice, whose message is reported), a list
holding something other than release objects, a proxy's HTML page, or no body
at all.

Whose result it is belongs to the check that is running, not to whoever asked
last. A manual check started inside the first couple of seconds is still
running when the launch timer fires; the timer's check is refused as a
duplicate, and the announcement the manual request asked for survives it. The
intent is only ever raised while work is in flight, so a manual request behind
an automatic check is answered too.

**Cancel cancels.** The download runs on a pool thread and cannot be
interrupted, so cancellation is cooperative: the progress callback is the one
place the loop hands control back often enough, and it raises there. The
request is then terminal — the incomplete download is removed, nothing is
verified, and `ready` is not emitted, so the app cannot go on to offer what
the user just declined. Only the file named by the release is removed, because
the download directory can be one the caller owns.

Installing from the app follows the refusal above rather than working around
it. If any job is running or paused, the update is declined with the reason;
a paused job counts, because it is a partially written destination waiting to
continue. Otherwise the installer is downloaded, verified, and the app asks
once more before closing itself so the installer can proceed. The app closing
is what makes the update possible, so it is announced rather than surprising,
and the queue is checked a second time immediately before it happens: a job
can be started while the bytes are arriving.

`src/offloader/gui/updates.py` holds that sequence, with every step
injectable, so `tests/test_gui_updates.py` drives all of it, including each
refusal, without a network, a certificate or an installer.

## Reference

Expand Down
Loading
Loading