Repository navigation
feat(native): interrupted-install route from a strict GetInstallRecovery read - #621
Merged
hanthor merged 1 commit intoOct 15, 2026
Merged
Conversation
…ery read Phase C step 1 (#344). The Wails relaunch routes an interrupted install (#287) to its own screen; the native shell had no such read or route. Engine - GetInstallRecovery joins ProtocolMethods and the assessment-session allowlist. It takes no parameters and runs startupValidate first, like the other startup reads. - It returns InstallRecoverySummary: class, cause, image, known step IDs, the engine's fixed title and message, the safe actions and the resume facts. Evidence lines, the step error and the raw observation stay out, because they can hold paths and free-form error text. - The native (strict) path reads the audited root with bounded strict readers: journal.json without duplicate, unknown or null fields, with a known outcome and catalogue step IDs; markers and root.disk by Lstat as regular files only; blob counting without reading bundle.json. The classification is the same classifyInstall the relaunch uses, and a test checks the two agree. - The journal owner is live only when its PID was created before the journal started (GetProcessTimes). processAlive compares executable names, which cannot work for wootc-engine.exe, and a PID that Windows reused after a reboot was created later. Shell - StartupRoute.Interrupted for resumable, failed and needs-repair, after a boot verdict, as in the legacy relaunch. An unknown class is refused. - The decoder accepts the exact field set only, enumerated values and bounded text; an absent attempt cannot carry actions, and an interrupted one needs engine text and a safe action. - The window shows the route, "Install: <class>" and the engine's text. No action runs; the actions need the install route (step 2). Proof - Go: strict reader, refusals, parity with the relaunch classifier, owner identity, RPC contract, and goldens of the engine bytes. The Windows "TestStatus" controls run them in readonly-cli-status. - C#: route tests (Linux), and decode tests over the same goldens with 16 refusal cases (native-build). - StartupWindowTests drives the real engine and window against a real C:\wootc with a staged state and a running journal whose PID is 4: it must show the Interrupted route and the engine's text, and leave the state bytes and ACL unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F5v5GG4NYnpzMrfPCo3vWN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase C step 1 for #344: the native shell reads the interrupted-install classification (#287) and routes to it. The Wails relaunch already does this; the native shell had neither the read nor the route.
Engine
GetInstallRecoveryjoinsProtocolMethodsand the assessment-session allowlist. It accepts no parameters and runsstartupValidatefirst, likeGetLastRunandGetRecoveryVerdict. A drift refuses it with the same fixed message.InstallRecoverySummary: class, cause, image, known step IDs, the engine's fixed title and message, the safe actions and the resume facts. It leaves outevidence, the steperrorand the rawobservation, because those can hold paths and free-form error text.journal.jsonwith no duplicate, unknown or null fields, a known outcome and catalogue step IDs; markers androot.diskbyLstat, regular files only; blob counting without readingbundle.json. It uses the sameclassifyInstallas the relaunch, and a test checks that both paths give the same summary.GetProcessTimes).processAlivecompares executable names, which can't match the legacy installer fromwootc-engine.exe. A PID reused after a reboot was created later, so it doesn't pass.Shell
StartupRoute.Interruptedforresumable,failedandneeds-repair. A boot verdict still wins, as in the legacy relaunch. An unknown class is refused.Install: <class>and the engine's title and message. No action runs: resume, retry and remove need the install route (step 2).Checks
Local, head
b1f469f:go vet ./...,GOOS=windows go vet ./...,GOOS=windows go test -cgo test ./...go generateInstallRecoverySummary,InstallRecoveryActions)dotnet test Wootc.Shell.Tests(Linux)Wootc.Shell.NativeTestsdecode and stage tests, run on LinuxWootc.Shell.NativeTestsandWootc.Shell.UiTestsbuilds (EnableWindowsTargeting)actionlint,docs-truth.bats, STE ondocs/winui-shell.mdHosted on
b1f469f, all green, in existing jobs (no new workflow or job):native-build:Wootc.Shell.NativeTests61 passed (43 before).StartupWindowTests2/2, including the real interrupted-install window case. The branded packagebazziteshowsInstall: noneinstalled.readonly-cli-status: every newTestStatusInstallRecovery…andTestStatusJournalOwner…control passed on Windows.What each hosted check covers:
readonly-cli-status: the GoTestStatus…controls on Windows, includingGetProcessTimes.winui-previewnative-build: the native decode tests, andStartupWindowTestswith the real engine and window. A fresh runner must showInstall: none. Then a realC:\wootcwith a staged state and arunningjournal whose PID is 4 (alive, but created at this boot) must show the Interrupted route and the engine's text, with the state bytes and ACL unchanged.Install: noneon an installed package.Not in this PR
in-progress(another legacy installer window is running). It keeps the existing route, as the legacy relaunch does.state.json.🤖 Generated with Claude Code
https://claude.ai/code/session_01F5v5GG4NYnpzMrfPCo3vWN
Generated by Claude Code