Skip to content

fix: improve instance wake/provision error quality#198

Open
bmdavis419 wants to merge 1 commit intocodex/pr-g-windows-path-hardeningfrom
codex/pr-h-instance-error-quality
Open

fix: improve instance wake/provision error quality#198
bmdavis419 wants to merge 1 commit intocodex/pr-g-windows-path-hardeningfrom
codex/pr-h-instance-error-quality

Conversation

@bmdavis419
Copy link
Collaborator

@bmdavis419 bmdavis419 commented Feb 28, 2026

Summary

  • add step-aware context for wake/provision failures
  • add server start retry behavior and richer diagnostics
  • improve failure messaging with health/log-tail context

Issues

Greptile Summary

This PR improves error diagnostics and reliability for instance wake/provision operations. Key changes include adding retry logic for btca server starts (up to 2 attempts with process cleanup between retries), optional git authentication configuration via BTCA_GIT_TOKEN env var, and enhanced error messages that include health check attempts/status and log tail output for easier debugging.

Key Changes:

  • Added startBtcaServerWithRetry() function that retries server start up to 2 times with pkill cleanup between attempts
  • Added configureSandboxGitAuth() to configure git credentials in sandbox (optional, requires BTCA_GIT_TOKEN env var)
  • Enhanced error messages in provision/wake flows to include health check details and btca server log tail
  • Added configure_git_auth step label for better error context
  • Applied retry logic consistently across provision, wake, update, and createSandboxFromScratch flows

No breaking changes detected. All new functionality is additive and properly wrapped in error handling.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The changes improve error handling and add retry logic without breaking existing functionality. All new features are optional and well-integrated into existing error handling patterns. Minor deduction for lack of explicit validation on the git token format.
  • No files require special attention

Important Files Changed

Filename Overview
apps/web/src/convex/instances/actions.ts Added git auth configuration, server start retry logic with pkill cleanup, and enhanced error messages with health check details and log tail context

Last reviewed commit: aec0baf

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