Repository navigation
Retry transient Copilot installer failures in token optimizer - #11311
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The timeout’s --foreground setting can let stalled download children survive the 90-second deadline, requiring process-group termination and regression coverage.
1 open issue
What changed in this PR
This PR addresses the token optimizer’s pre-agent installation failure by adding targeted Copilot CLI download retries through the existing workflow lock postprocessor.
Changes:
- Adds three installer attempts with 30/60-second backoff, timeout controls, and exit-code-based retry selection.
- Preserves the CLI version, checksum, and cooldown pins.
- Adds regression coverage for recovery, exhaustion, fail-fast behavior, workflow targeting, and idempotency.
| File | Description |
|---|---|
scripts/ci/copilot-token-optimizer-workflow.test.ts |
Tests retry execution, preserved pins, and targeted patching. |
scripts/ci/apply-general-workflow-patches.ts |
Generates the optimizer-specific installer retry wrapper. |
.github/workflows/copilot-token-optimizer.lock.yml |
Applies the retry wrapper and step timeout. |
Review effort: Balanced (auto)
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Both checks failed because the lockfile still included |
✅ Coverage Check PassedOverall Coverage
Coverage comparison generated by |

The Daily Copilot Token Optimization Advisor failed before agent startup after six HTTP 504 responses while downloading the pinned checksum manifest.