installers_never_run_at_the_same_time slept 3 ms inside each installer and
up to 4 ms before each of its 24 jobs queued, so whether two installers ever
overlapped depended on thread timing. A queue that let two run at once could
still pass.
The test now runs three rounds, one per kind of job (an install, a removal,
a lone installer). In each round the first job's installer blocks on a
channel the test holds. The test then starts seven more jobs one at a time
and requires each to report that it is waiting before it starts the next.
After the first installer is released, every later call also blocks until
the test has checked that it is the only one running. Both assertions (at
most one installer running, all 24 targets handled) are unchanged.
With the queue's busy check removed, or with either `alone` or `batched` no
longer marking the installer busy, the test failed in 20 of 20 runs each.
Two tests of the Flatpak helper runner decided their results with the
clock. One canceled the run after 100 ms and checked that it took under
5 s. The other waited out the real 5 s output limit against a `sleep 8`
descendant and checked that it took under 8 s.
`cancellable_output` now waits through `cancellable_output_until`, which
asks a `keep_waiting` callback each time the helper or its output is
unfinished, as `run_command_until` does. `cancellable_output` keeps the
one-hour limit for the helper and the 5 s limit for its output. The
cancel test cancels on the second check, while `sleep 86400` runs. The
output test ends the wait at the first ask while a descendant holds the
pipes. Both run under a 60 s `with_deadline` hang guard.
The macOS disk-image fixture retried a busy `hdiutil` after sleeps of
0.5 to 4 s and gave up after about 8 s. It now asks again until hdiutil
gives another answer, and a helper that stays busy for a minute fails
the test. The attach in `an_install_that_ended_partway_does_not_block_the_next`
no longer skips the test when the helper stays busy.
Sonar's new-code coverage gate was 71.4% (needs 80%): CatalogSource and the
signature/document refusal paths had no tests. Add tests with a fake fallback
source and a fresh signed catalog; no network is used.
Mark TransformBox::handle_side and PreferencesWindow::size as point
quantities the host supplies, and make CheckContext #[non_exhaustive].
#3855 and #3738 are reverted above: they read egui memory, raw keys and
pointer clicks outside runtime::egui.
- resolve the check_for_update doc-comment conflict with main
- offer prereleases from the signed catalog to a prerelease build, as the GitHub path does
- accept %2B in catalog download links and return the canonical link
- validate links against the catalog entry's own repo spelling
- share the stable/prerelease pick between latest_for and latest_for_repo
- add regression tests; rustfmt
Conflict: main split install.rs into install/{linux,macos,windows,freebsd,tests}.rs. Ported this PR's change into that layout unchanged in substance: retry_busy_detach* stay in install.rs; detach_with and the clear_mounts retry are in install/macos.rs (its stderr test as #[craft_ui::testing::trial]); the retry-policy tests and the two busy-mount tests are in install/tests.rs as #[trial] (craft-update runs harness = false), and the clear_mounts control now pins Permission denied as in this PR. Local: craft-update lib tests (new retry tests run) and clippy -D warnings pass.
While update checks are off, the check dialog showed a release the updater
still held, with Update and Check Again, instead of the Off message. The
dialog now treats Status::Off as hiding the release: it shows the Off
message with OK alone and no release notes link.
The test that turns checks off during a running check now waits until the
check's thread is inside the source before turning checks off, then lets
the request finish and checks that its release is not offered.
The context source returns CheckError like CheckSource on main, CheckContext's app field gets its doc line, and the context test moves to updater/tests.rs as a trial.
Keeps main's typed CheckError and check_releases_at; a 404 on the release list is CheckError::Failed naming the repository. The test moves to http::tests as a trial that serves a 404.
A result that said checks are off stayed after checks were turned back on, so the check dialog kept saying so and offered only Close. Turning checks on now sets Status::Off back to Idle, where the dialog offers Check Now.
ArtCraft Launcher's development builds install from a mirror on this computer (its `local-mirror` feature, `cargo xtask local serve`). With the feature, `check_download_link` accepts loopback links and `Http::new` leaves the agents for remote hosts off HTTPS-only.
Without it nothing changes: a build refuses a loopback download link and the remote agents refuse plain HTTP before they connect. `default`, `ui`, `screen-testing`, `suite` and `oci_migration` do not turn it on; the facade forwards it only as its own `update-local-mirror`, which no other facade feature turns on.
- QuitCommand::Quit (window.quit, Cmd+Q) replaces egui's quit shortcut, which the runtime clears at
install. The runtime runs it from any source through the root window's close path, so the app's
close decision asks about unsaved work. Its default yields to another command bound to the chord,
as the window shortcuts' defaults do (library::yields_default).
- HostBuilder::icon_png gives the app's icon once, beside its AppInfo; the update dialogs show it in
their head instead of the name's initial.
- Docs: craft-framework.md §2.2 Quit and Zoom keys rows, craft-host README.
Conflicts resolved (upstream's design and defaults win; the port's opt-ins stay):
- ui-contract fonts: upstream's served-faces provider, catalog job queue and byte budget;
the port's FaceBytes::chain (Word subset siblings, F-8) re-done on the provider: a served
face lists its served chain faces before the interface faces, a sibling landing after its
owner remakes egui's fonts once, drawing a face marks its chain drawn. The port's chain
trial moves onto upstream's rig, plus a late-sibling trial.
- text editor HostCx follows FacesCx's job-based document_face and document_face_bytes.
- ui-widgets Swatch: upstream's SwatchFill (split, spectrum, image, empty) with the port's
Swatch::optional / SwatchFace::optional (new SwatchFill::None, the "no colour" diagonal)
and Swatch::icon (glyph on the empty well) on top; both word sets kept.
- draw PaintBar: upstream's MixerLoad fill.
- font-manager: upstream's sample band; host rows (port) use it too.
- ui-panels / ui-patterns dock grips: upstream's drag_origin and named slack.
- platform clipboard tests: both trials kept.
Co-Authored-By: Claude <noreply@anthropic.com>
257 conflicted files staged with their conflict markers (630 hunks). The one
modify/delete, crates/ui-patterns/src/patterns/preferences/body.rs (deleted
upstream, modified by the port), keeps the port's file for its area to carry
into upstream's preferences/page.rs. Plan: landing/fw-sync-plan.md.
Turning checks off could return while a check's thread that had already
read the flag as on went on to call the network. The thread now moves its
state from waiting to asking with one compare-exchange as it begins the
request, so after checks are turned off a thread that has not begun asks
nothing. A test pauses the thread just before its request, turns checks
off, and checks that the request is not made.
check_for_update read GitHub's release list for stable releases only, so a
build that is itself a published pre-release (0.1.0-alpha.3) was never
offered the next alpha. A copy whose version carries a release channel
label (alpha, beta, rc, nightly) now also considers pre-releases and is
offered the newest release by semver precedence. Stable copies and builds
from source (-dev, -integration) are offered stable releases only, as
before.
Updater::set_checks_enabled(false) (and with_checks_enabled) stops
check_at_start and check_now from asking the network or reading the
launcher's file. A requested check reports the new Status::Off, which the
result dialog shows as "Update checks are turned off in {app}." with OK.
Turning checks off drops a running check's answer, and its thread skips
the request when it has not begun it yet. An update that is installing
or ready carries on, and offer() still opens the prompt for a release
the app found itself.
with_source's CheckSource takes no arguments and was documented for
tests, so an app with its own release rules had to work out the app,
the running version and the built-in check's HTTP client again.
ContextSource gets a CheckContext with the app, the version the
Updater compares, http() for the built-in check's client, and
check_github() for the built-in check itself. with_source keeps its
signature and now goes through with_check.
check_for_update answered a 404 on the release list with Ok(None), so a
requested check showed "up to date" for a repository that was renamed,
deleted or made private. It now returns an error that names the
repository, and a requested check shows it as the reason the check
failed.