Every magpie-releases build from v0.1.4160 to v0.1.4169 failed
windows-check (amd64 and arm64) at "Launch magpie": the exe logged
"magpie 0.1.4166 started (app, ...)" and the gateway never answered, so
none of those versions has assets.
Cause: 14807bcf2 made a copy still named as the site's download
(magpie-windows-amd64.exe) a download wherever it is kept, asked about
through the install dialog. The release check starts
dist\magpie-windows-amd64.exe, so update.Settle now put up the task
dialog. The question comes before anything starts in gui.Run, the
gateway included (Install opens the installed copy in this one's place),
and on the runner no one answers it, so the app waited on it forever.
Now askInstallFolder leaves update.AskFolder unset when no one can
answer (unanswerable): CI set, as every CI service sets it (GitHub's
CI=true), or a window station no one sees (a service, a start over
SSH; GetUserObjectInformation UOI_FLAGS without WSF_VISIBLE). Unasked,
a copy kept outside Downloads runs where it is with nothing recorded
(isDownload's existing ask=false rule), and one in Downloads installs
to the default as it did with no dialog. A person's start on their own
desktop is asked as 14807bcf2 has it. The gateway can't start before
the answer instead: Install forwards to the installed copy and this one
quits, so its gateway would have to be handed over first.
Also fixes#6648: TestSettleAsksAboutADownloadKeptElsewhere expected
forwards() true on every OS, but forwarding is Windows' alone (as its
sibling checks at install_test.go:382/452 already say), so it was red
on Linux and macOS since 14807bcf2.
Tests: TestNoInstallQuestionOnCI (Windows: CI=true leaves AskFolder
nil) and TestInstallQuestionNeedsSomeoneToAnswer (any OS).
Run:
- Reproduced on xiaomi-gpu (Windows 11) as the CI step does it: the exe
built with go-winres's manifest (so the task dialog exists), named
dist\magpie-windows-amd64.exe, started `app` with CI=true in the
logged-in console session (session 1, through a schtasks /it task),
sandbox USERPROFILE/LOCALAPPDATA/APPDATA/TEMP, MAGPIE_ADDR on a port
of its own, polling /v1/models 30x2s. At ee6352b63: RED, "the gateway
never answered", nothing after the start line. With this change:
GREEN, "install: not asking where to install: CI=true", gateway
answered, still up 5s later, nothing installed.
- Over SSH (session 0) with CI unset: the question is skipped ("no one
sees this desktop"); the app then exits on WebView2's controller
there (no desktop), which is that session's, not this change's.
- Broken by hand: askInstallFolder reading another variable ->
TestNoInstallQuestionOnCI red ("asks where to install with CI=true").
- win-run go test -count=1 -run 'TestNoInstallQuestionOnCI|
TestInstallQuestionNeedsSomeoneToAnswer|TestInstallWords' -v
./internal/gui/: ok.
- wsl-run go test -tags nogui -count=1 ./internal/update/ (magpie-desktop,
Ubuntu 24.04): ok (#6648's red gone).
- mica-run: gofmt -l internal/ clean; GOOS=windows go vet and GOOS=linux
go vet -tags nogui ./internal/update/ ./internal/gui/ clean; darwin go
vet clean.
- win-run go test -count=1 ./internal/update/: ok except
TestPackagedByDpkg (#4603, open, untouched).
- mica-run go test -count=1 ./internal/update/ (macOS): ok.
Not run before the push: the full suite (mote at load 144) and the
whole ./internal/gui package (running on xiaomi-gpu and mica at push;
the release blocker didn't wait for it). Not tried: a real person's double-click from D:\下载 after this
change (the dialog path itself is unchanged).