Skip to content

Harden Windows installer lock recovery#7

Merged
cleak merged 1 commit into
masterfrom
codex/windows-installer-lock-recovery
Apr 8, 2026
Merged

Harden Windows installer lock recovery#7
cleak merged 1 commit into
masterfrom
codex/windows-installer-lock-recovery

Conversation

@cleak
Copy link
Copy Markdown
Owner

@cleak cleak commented Apr 8, 2026

Summary

  • add bounded lock recovery around the Windows cargo install path
  • keep the exact-path tempyr.exe process stop logic, but also retry when a brief external file lock causes a lock-related install failure
  • document the new Windows installer retry behavior in docs/install.md

Verification

  • ran install.ps1 with a clean custom install root
  • reran install.ps1 while the installed tempyr.exe --mcp process was running and verified the installer stopped the matching process and retried successfully
  • reran install.ps1 while the target binary was briefly locked by another process and verified the installer waited and retried successfully
  • parsed install.ps1 with the PowerShell parser and ran git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Improved Windows installer reliability: when the target binary is locked during installation, the installer now automatically retries multiple times with pauses before failing, instead of failing immediately.
  • Documentation

    • Updated Windows installation guide to reflect enhanced lock recovery and retry behavior during updates.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 92184fa0-b8b2-4242-90c1-399810f967e7

📥 Commits

Reviewing files that changed from the base of the PR and between 0e428f8 and 0619557.

📒 Files selected for processing (2)
  • docs/install.md
  • install.ps1

📝 Walkthrough

Walkthrough

This change adds a bounded retry mechanism to Windows installer logic for handling file-locked binaries. Documentation and PowerShell installation script are updated to clarify that when the target Tempyr binary is temporarily locked, the installer waits and retries multiple times before failing, rather than failing immediately.

Changes

Cohort / File(s) Summary
Documentation
docs/install.md
Updated Windows "Updating safely" guidance to document retry behavior when target binary is locked by another process.
PowerShell Installer
install.ps1
Added new function Invoke-CargoInstallWithLockRecovery implementing a bounded retry loop that detects lock-related failures, optionally stops matching Tempyr processes, and retries up to a maximum number of attempts with fixed delay before returning failure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Add cross-platform installer scripts #5: Adds initial single-attempt stop-and-retry logic for file-locked targets in install.ps1; this PR replaces it with a bounded retry loop implementing more robust lock recovery behavior.

Poem

🐰 A binary locked, we hop with care,
Our retry loop waits, shows we're fair—
No hasty exit, we pause and try,
Until the lock yields, or we must say goodbye! 🔒

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Harden Windows installer lock recovery' directly and specifically describes the main change: improving the robustness of lock recovery logic in the Windows installer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/windows-installer-lock-recovery

Comment @coderabbitai help to get the list of available commands and usage tips.

@cleak cleak merged commit 73243b9 into master Apr 8, 2026
1 check passed
@cleak cleak deleted the codex/windows-installer-lock-recovery branch April 8, 2026 04:46
cleak added a commit that referenced this pull request Apr 30, 2026
feat: journal stats dashboard (v2 backlog #7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant