Repository navigation
fix(agent): report which Windows installer check failed and install in one transaction - #1492
Merged
Merged
Conversation
This was referenced Nov 7, 2026
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.
Problem
A Windows 11 Pro user's Maple Work 0.0.18 install failed at stage 22 with
0x4E000005. That code comes from the installer's own preflight guard (windows_fs.rsinvalid_at), not from a Windows read or write failure. But the dialog says it could not read or write, and the guard's label goes to stderr, which NSIS drops. 18 guard reasons share that one exit code, so the report can't tell us which one fired.We reproduced the route on a Windows 11 VM by granting
BUILTIN\UsersModify on%LOCALAPPDATA%\Programs. The guard also refuses a parent that only lets other accounts create folders, which is stricter than a new install needs.Changes
Three commits:
MWI/installation/validate-installation-parent/foreign-write-ace, plus the Windows build, elevation, native error, build identity and elapsed time. Ctrl+C in the error dialog copies it. The last ten logs are kept in%LOCALAPPDATA%\Maple Work Installer Logs. Paths, accounts, raw error text and app data stay out of the report, and a canary test checks that. Logging is best effort and never changes the result.FILE_ADD_SUBDIRECTORY) and nothing else. Everything else stays strict: the installed root and files, other foreign write rights, unsafe owners, reparse points and hard links are still refused. The new root still gets its own protected ACL.--internal-windows-installer-installcommand, which owns admission, locks, copying, registration, shortcuts and activation. It writes durable checkpoints, so a helper that crashes still leaves its last step in the log. A failure before activation restores registration and removes only the shortcuts it created, if they are unchanged. The launcher, uninstaller and previous generation stay for rollback. Legacy helper commands, updater formats, trust policy and activation exit codes are unchanged.The user's actual trigger is still unknown. This makes the next report say which guard fired, and relaxes the one guard we showed was too strict.
Testing
Not built or tested locally for this PR. Codex wrote and tested the patch on a native Windows 11 Pro ARM64 VM (build 26200.9711) against
f09df6ba; the touched files have not changed on master since. From its report:cargo test -p maple-agent-updater(109 unit and 5 native bootstrap tests), workspace Clippy for Windows with-D warnings,cargo fmt --check, and an NSIS 3.12 compile./Sinstall under a parent granting Everyone only folder creation exited 0 in 8.4 s and left the parent's ACL unchanged..../foreign-write-aceand created nothing.Not covered: x64 hardware, signed Prod packages, installs without elevation (the VM ran elevated), and the app's window after install (the inspection tool failed). Full Linux and macOS CI did not run there.
ci:packageis on to build the unsigned Windows x64 and ARM64 installers for testing on our VM, andci:windowsadds the native updater tests and the full Windows suite. Both should come off once we have the results.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.