Repository navigation
fix(agent): tell Windows users how to recover from a failed install - #1499
Merged
Merged
Conversation
The Windows installer computes advice for each failure, such as "Close Maple Work and retry" when a file is in use, but since the native report was added to the dialog that advice was dropped: the report message was rebuilt from scratch. Activation failures also printed the full status in decimal as "Stage: 1292435488". Seen on the signed 0.0.19 installer on x64 Windows 11, unelevated: upgrading while 0.0.18 runs is refused at generation-guards with Windows error 32, and the dialog gave no hint to close the app. The foreign write ACE dialog also lost its advice. - Keep the advice line above the native report, and show the real stage. - Offer Retry when a file is in use or another install is active, and rerun the native installer from the extracted payload. Each attempt gets a new report path, because the child creates it exclusively. Silent installs and exit codes are unchanged. - Report Windows errors 32 and 33 as file-in-use instead of io-uncategorized in the support code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
auto_runs_clear_calls_and_the_user_decides_the_rest (#1490) told bash to `touch` the marker by its absolute path. On Windows the bash tool runs Git Bash, which reads the path's backslashes as escapes and creates a different file, so `marker.exists()` failed every time in agent-full-windows. The lane's earlier green runs predate #1490. Touch it relative to the task's project folder, where bash runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retry reran the native installer from the same NSIS process. A failed transaction records that process as its owner, and the next attempt refuses while the owner is alive, so Retry always ended in prepare-installation/installation-busy on the x64 test VM. Running the installer again from a new process resumes the retained transaction, as the 0.0.19 test showed, so the advice now says to do that. The advice line, the stage text and the file-in-use support code stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The Windows installer works out advice for each failure ("Close Maple Work, then run the installer again" when a file is in use), but the dialog has dropped it since #1492 added the native report: when a report exists, the message is rebuilt from scratch without it. Activation failures also printed the full status in decimal as
Stage: 1292435488.Found while validating the signed 0.0.19 release on an x64 Windows 11 VM as a normal (unelevated) user:
activate-installation/generation-guardswith Windows error 32. The refusal and rollback are correct, but the dialog never says to close the app. Support code:MWI/installation/activate-installation/generation-guards/io-uncategorized.BUILTIN\UsersModify on%LOCALAPPDATA%\Programsnow reports.../validate-installation-parent/foreign-write-ace(good, that was fix(agent): report which Windows installer check failed and install in one transaction #1492's goal), but also without its advice line.Changes
file-in-useinstead ofio-uncategorized.auto_runs_clear_calls_and_the_user_decides_the_restfrom feat(agent): add Read only, Auto and Full access permission modes #1490 passedtouch C:\...\markerto Git Bash, which strips the backslashes, soagent-full-windowsfailed on it every time. It now touches a relative path in the task's project folder.An earlier commit here added a Retry button. It is removed: a failed transaction records the installer process as its owner, and the native installer refuses a new attempt while that owner is alive, so Retry from the same process always ended in
prepare-installation/installation-busy. Running the installer again from a new process resumes the transaction, which the advice now says.Testing
cargo test -p maple-agent-updaterwith a new test for thefile-in-usesupport code; pre-commitci-lintandci-testpassed. CI was fully green on71d13724, includingagent-full-windows.makensis -WX) from the Agent flake's pinned nixpkgs, with a stand-in config.Stage: 24; status: 0x4D090020andgeneration-guards/file-in-use. Pressing Retry then gaveinstallation-busy, which is why Retry is gone. The final dialog uses the same text with only an OK button.Not changed: the uninstaller leaves an empty install folder on purpose (see the comment in the uninstall section), and the generation guard still refuses to replace a running older version.
🤖 Generated with Claude Code