Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix(cli): retry busy Windows executable renames during upgrade (#5434)
This PR: - retries a busy Windows executable rename up to 10 times at 200 ms intervals during self-upgrade - keeps permission failures immediate and preserves the existing replacement rollback - tests temporary locks, retry exhaustion, and non-retryable failures, including exact attempt timestamps through the final retry at two seconds - records the change in the CLI changelog ## Context The second self-upgrade in the Windows smoke test failed with `EBUSY` while moving `composio.exe` to `composio.exe.old`: https://github.com/ComposioHQ/composio/actions/runs/43943628392/job/133568262696?pr=5417. The updater already retries removing a locked backup; the executable rename had no retry. This applies the same two-second retry budget specifically to `Busy` rename failures. It mitigates locks that clear within that window; the original lock holder and duration remain unknown. Validation on `0ba5498c19823d33b06951f9e484c37b06a5d419`: - `pnpm --filter @composio/cli exec vitest run test/src/utils/atomic-replace.test.ts test/src/services/upgrade-binary.test.ts`: 31 passed - `pnpm typecheck`: 14/14 tasks passed - `pnpm --filter @composio/cli run lint:effect`: 0 errors, warnings, or messages - Oxlint and Prettier checks on the changed files passed - Sensitivity checks: temporarily changing the retry interval to zero or 30 seconds makes the updated timing test fail; the production interval was restored before committing - Native Windows installation and runtime passed: https://github.com/ComposioHQ/composio/actions/runs/44061974883/job/133966653794 The native smoke test covers installation, repeated self-upgrades, locked-backup preservation, companion repair, agent setup, and credential storage. A passing run does not establish that it encountered and recovered from the original intermittent rename lock.