Skip to content

bootstrap: attribute the failing step in errors; doctor checks Claude auth - #61

Closed
rayruizhiliao wants to merge 2 commits into
mainfrom
fix/bootstrap-voice-skip-and-doctor-auth
Closed

bootstrap: attribute the failing step in errors; doctor checks Claude auth#61
rayruizhiliao wants to merge 2 commits into
mainfrom
fix/bootstrap-voice-skip-and-doctor-auth

Conversation

@rayruizhiliao

@rayruizhiliao rayruizhiliao commented Aug 8, 2026

Copy link
Copy Markdown

Problem

Two issues hit running the agent onboarding flow end-to-end:

  1. Opaque errors (Inbound attachments dropped at the gateway (audio/image/etc.) #3). Bootstrap returned a bare {"error": "HTTP 404: Not Found"} with no indication of which step failed; you had to read the source to learn it was whoami (then later voice config).
  2. doctor reports auth green when it isn't (Support texted control commands (/clear, /new, /stop) #4). The "claude CLI" check only ran shutil.which("claude") (binary presence). A machine with the CLI installed but not logged in showed ✓ while the gateway couldn't actually answer — and install.sh even says "doctor will confirm" auth.

Change

  • bootstrap.py: track a step and include failed_step in error returns, so an HTTP error is attributable to the step that raised it.
  • doctor.py: add a "claude auth" check (ANTHROPIC_API_KEY or ~/.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 for failed_step on 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

rayruizhiliao and others added 2 commits August 8, 2026 15:28
…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>
@rayruizhiliao rayruizhiliao changed the title bootstrap: graceful Voice AI skip, failing-step in errors, real doctor auth check bootstrap: attribute the failing step in errors; doctor checks Claude auth Aug 8, 2026
@rayruizhiliao

Copy link
Copy Markdown
Author

Closing to keep scope on #1 (base_url, servers#480). This PR's changes — failed_step attribution in bootstrap errors (#3) and a real Claude-auth check in doctor (#4) — are being captured as tracked follow-ups instead.

@rayruizhiliao
rayruizhiliao deleted the fix/bootstrap-voice-skip-and-doctor-auth branch August 8, 2026 22:58
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