Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe installer now retries selected Windows rename failures during bundle publication and recovery. Tests cover retry timing, successful publication, rollback, backup restoration, cleanup, non-retryable errors, and non-Windows behavior. ChangesBundle publication recovery
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The retry, rollback, and recovery changes have no remaining actionable merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Windows source installation executes the newly built gentle-ai.exe to verify its version immediately before publishing its staging directory. Transient executable or scanner handles can make the following rename fail with EPERM; the installer currently attempts the rename once and removes staging in its finally block. The reporter and two other participants reproduce the missing package-local runtime, including on the current pinned runtime 3.1.0; two report success on the second rename attempt after a delay. The local clone confirms that publishBundle still makes single-attempt renames, while its existing backup/rollback protocol can preserve an earlier bundle.
Summary
Add a private rename retry function in scripts/gentle-ai-installer.mjs, used by the production publication path: on effective platform win32 (options.platform ?? process.platform), retry only EPERM, EBUSY, and EACCES for five total attempts with asynchronous waits of 200, 400, 800, and 1600 ms; propagate the last original error immediately for other codes or after exhaustion. Preserve options.rename as the underlying filesystem operation and route both forward renames and the rollback rename in publishBundle through this function, retaining the movedPrior transition only after a successful backup rename, existing directory/symlink checks, and backup preservation when rollback fails.
Test Plan
Closes #946
Summary by CodeRabbit