[docs] docs: add gVisor startup crash recovery documentation#6540
Conversation
Document the automatic retry mechanism for gVisor agent startup crashes: - Retryable exit codes 134 (abort) and 139 (segfault) - 30-second startup window to prevent retrying actual user failures - Maximum 1 retry attempt per command execution - Reference to src/container-lifecycle.ts implementation Addresses changes from commit d8ef306 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Documents automatic retry behavior for short-lived gVisor agent crashes.
Changes:
- Adds retry exit codes, timing window, and retry limit.
- Updates the container startup sequence with recovery behavior.
Show a summary per file
| File | Description |
|---|---|
docs/architecture.md |
Documents gVisor crash recovery, but overstates the runtime heuristic as proof user code has not started. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
docs/architecture.md:145
- This repeats the unsupported assertion that the 30-second check means no agent work began.
runAgentCommand()applies the check after any exit 134/139 and only compares Docker'sStartedAtandFinishedAt, so a short-running user command can trigger it too. Describe the measured-runtime heuristic rather than presenting it as a guaranteed startup boundary.
4. **gVisor Startup Crash Recovery** (when using gVisor runtime):
- If the agent container exits during startup with crash codes (134, 139), the firewall will retry once
- Only retries if the container crashed within 30 seconds (before any agent work began)
- Prevents transient crashes during V8/Node.js initialization from failing the entire workflow
- Exit codes 134 (abort) and 139 (segfault) are considered retryable startup crashes
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Medium
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @github-actions[bot] Add the |
|
@copilot merge main |
…ecovery-887f2796a0fa0ea4
Merged |
|
@copilot merge main |
…ecovery-887f2796a0fa0ea4
Merged |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
🔑 Smoke Copilot PAT reports failed. PAT auth path may have issues... |
|
✅ Contribution Check completed successfully! Contribution check complete: the PR is docs-only, updates the architecture documentation, and references related issue #6514 in the description. No guideline violations found that require a PR comment. |
|
🚀 Security Guard has started processing this pull request |
🔬 Smoke Test Results
Overall: PASS (core connectivity verified; file test skipped due to unexpanded workflow template variables)
|
Smoke Test: Claude Engine Validation
Overall result: PASS ✅
|
Smoke Test Results
PRs Reviewed:
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
Smoke Test: Copilot BYOK (Direct) ModeAll tests PASSED ✅
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) → api-proxy sidecar → api.githubcopilot.com Status: PASS
|
🔥 Smoke Test: Copilot Network Isolation
Overall: PASS — egress enforcement is working correctly.
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
All 5 scenarios pass. OTEL tracing integration is functioning as expected.
|
|
✅ GitHub MCP connectivity Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall: PASS
|
|
Smoke Test: PASS Reviewed PRs:
Checks:
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
Chroot Version Comparison Results
Result: ❌ FAILED — Node.js version mismatch detected (host:
|
|
Smoke Test Results:
Overall status: PASS Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Cc
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
🔥 Smoke Test Results — Docker Sbx
Overall: PARTIAL — MCP connectivity confirmed; pre-computed step outputs were not expanded in the workflow template. cc
|
Summary
This PR documents the gVisor startup crash recovery mechanism introduced in #6514, which automatically retries transient container initialization failures.
Changes Made
Updated
docs/architecture.mdwith:New Section: gVisor Startup Crash Recovery under "Container Architecture"
src/container-lifecycle.tsUpdated "Container Startup" subsection in "How It Works"
Verification
src/container-lifecycle.tsMAX_GVISOR_AGENT_RETRIES = 1,GVISOR_STARTUP_CRASH_WINDOW_MS = 30_000Related Issues
Addresses documentation gaps from #6514 (Retry gVisor agent startup crashes once before failing)
This ensures developers understand the automatic recovery behavior when gVisor containers encounter transient startup failures.