molvqingtai's system log (Discord): v0.1.1314 updated itself at 00:43:49,
the old process exited 0, and ~160ms later `open` of the bundle failed
with -600 (procNotFound): LaunchServices still sent to the process that
had exited (the screen was locked). runAfterExit ran open once, nothing
looked at its status, and magpie stayed closed until a manual launch at
09:45.
Relaunch now runs relaunchCommand: the same open, tried again after
pauses of 0.5 1 1 2 2 3 4 seconds (13.5s, 8 tries) while it exits
non-zero, and not again once it succeeds. The detached own-session
shell (#2362) is unchanged. The new instance is not confirmed running
beyond open's exit 0.
Sibling, not changed: RelaunchBinary (Windows, Linux) starts the new
binary itself while this one is still up, with no open after exit; on
Windows with the old binary moved aside, startChecked already waits 20s
for the new one to say it is up and puts the old back otherwise. ayu's
"restart to update needs several clicks" is not this shape (candidates:
the install held by another program, or the busy-gateway wait) and needs
its own look.
Tests (internal/update/relaunch_retry_test.go): a fake `open` first on
PATH refuses its first tries with the -600 text.
- TestRelaunchOpenTriedAgain: relaunchCommand after a gone pid opens on
the third try. Old code: FAIL "open was tried 1 times and the new
version never opened" (30.04s).
- TestRelaunchOpenGivesUp: a refusing open ends after len(waits)+1 tries;
one that works on the second is not run again. Broken by hand (no
`&& exit 0`): FAIL "open tried 4 times, want 2".
- TestOpenWaitsTotal: waits add to 10-15s. Broken (0.5 1): FAIL "waits
add to 1.5s".
Real open: the same loop with /usr/bin/open on a scratch .app that
appeared after 2s failed 3 times ("does not exist", exit 1) and opened
it on the 4th, the app got --args tray.
Record for this push: 13 commits on origin/main ca4a1cde0, head tree
539c84e92. Go 1.26.8, sandbox HOME, GOMODCACHE/GOCACHE pinned. The full Go
run and vet were at tree d6393dfc8, the same Go code as this head: only
app.js comments (cut under the core script budget) and one ja string
changed after it.
- gofmt -l: nothing. go build ./...; go vet ./... (darwin), GOOS=linux
go vet -tags nogui ./..., GOOS=windows go vet ./...: clean.
- go test -timeout 45m ./..., through tee, one suite on the machine:
68 packages ok. The one red was internal/gui's
TestCoreScriptBudget: app.js 1,335,314 > 1,335,000, since main grew
app.js under the stack. The autoscroll commit's own comments were cut
(to 1,334,629) rather than the budget raised, and go test -count=1
./internal/gui is ok at this head (113s). Packages the run took from
Go's test cache had the same inputs.
- GUI: the 18 files this stack touches or names, both engines,
202 of 204 pass (tree 068acf128, this push less the last commit). The
two reds: gui-ja, red on main since c2636b7b5 and fixed by this push's
last commit (gui-ja and i18n-keys 6 of 6 there), and usage-fold's
chromium "several accounts" (#2163, red on main the same way).
- internal/update ok, with TestRelaunchOpenTriedAgain, TestRelaunchOpenGivesUp
and TestOpenWaitsTotal. GOOS=linux and windows builds are covered by vet.
The whole GUI suite ran at 1c1fc7183 (this stack's first 12 commits on
0ddcf28a1): 11713 of 11769 pass. Each of the 21 red files was then run
alone at the stack and at origin/main 8278fd9b0. Eight are red the same
way on main: plugin-card-update (#3079), quota-count-wrap and
quota-name-translated (#2228), s3-sync (#2448), usage-agents-hide
(#2276), usage-checkin (#3091), usage-fold's chromium "several
accounts" (#2163), usage-ledger (#3104). The other 13 pass alone on both
and were red only under that run's load (50 to 335): currency #3101,
plugin-github #3218, provider-fetch-again #3292, rest-try-now #2564,
routing-auto-reset #3293, routing-keys-fold #1612, routing-steady #1804,
routing-wb-restricted #1905, sessions-folder-delete #2218,
sessions-manage #3294, switch-only #3295, text-size #1866, usage-pack
#3296.
Not tried: a real update on a real Mac, or a real -600 from
LaunchServices; nothing on Windows.