bootstrap: attribute the failing step in errors; doctor checks Claude auth - #61
Closed
rayruizhiliao wants to merge 2 commits into
Closed
bootstrap: attribute the failing step in errors; doctor checks Claude auth#61rayruizhiliao wants to merge 2 commits into
rayruizhiliao wants to merge 2 commits into
Conversation
…cks auth
Three robustness fixes uncovered running the onboarding flow end-to-end:
- Voice AI: a freshly signed-up identity has no phone number, so the voice
endpoints 404 ("No inbound-call config set for this identity") and aborted
the entire bootstrap. Catch that specific 404, record a
`skipped_voice_ai_no_phone` action, and continue to signing + gateway. Real
(non-404) errors still propagate.
- Errors now carry `failed_step` so a bare "HTTP 404" is attributable to the
step that raised it instead of requiring a source read.
- doctor: add a real "claude auth" check (ANTHROPIC_API_KEY or
~/.claude/.credentials.json). The prior "claude CLI" check only verified the
binary was on PATH, so doctor reported green while the gateway couldn't
actually answer.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per review, remove the skipped_voice_ai_no_phone handling and its helper; keep only the failing-step attribution (#3) and the doctor auth check (#4). The `step` tracking remains, so a voice error is still reported with failed_step="configure_voice". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two issues hit running the agent onboarding flow end-to-end:
{"error": "HTTP 404: Not Found"}with no indication of which step failed; you had to read the source to learn it waswhoami(then later voice config).doctorreports auth green when it isn't (Support texted control commands (/clear, /new, /stop) #4). The "claude CLI" check only ranshutil.which("claude")(binary presence). A machine with the CLI installed but not logged in showed ✓ while the gateway couldn't actually answer — andinstall.sheven says "doctor will confirm" auth.Change
bootstrap.py: track astepand includefailed_stepin error returns, so an HTTP error is attributable to the step that raised it.doctor.py: add a "claude auth" check (ANTHROPIC_API_KEYor~/.claude/.credentials.json), matching install.sh, alongside the existing binary-presence check.Testing
uv run --with pytest pytest tests/test_bootstrap.py tests/test_doctor.py→ 7 passed, including a test forfailed_stepon a voice-step error and the doctor auth states.Related (separate PR)
Note: the Voice AI graceful-skip (#2) was intentionally dropped from this PR per review.
🤖 Generated with Claude Code