Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(doctor): surface daemon-side exception tracebacks#177

Merged
georgeh0 merged 1 commit into
main from
g/doctor-daemon-traceback
Jun 3, 2026
Merged

feat(doctor): surface daemon-side exception tracebacks #177
georgeh0 merged 1 commit into
main from
g/doctor-daemon-traceback

Conversation

@georgeh0

@georgeh0 georgeh0 commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Surface daemon-side exception tracebacks in ccc doctor so failures (e.g. a failing model check) are debuggable instead of showing only a one-line, truncated summary.
  • Per-check failures: add traceback to EmbeddingCheckResult and DoctorCheckResult; check_embedding captures format_exc(), _check_model propagates it, and the CLI prints it dimmed/indented under the error.
  • Streaming exceptions: add traceback to ErrorResponse, populated by the daemon's streaming handler and appended to the client-raised RuntimeError.
  • Both new fields default to None, keeping the msgpack wire format backward-compatible.

Closes #173.

Test plan

  • uv run mypy . — clean (40 files).
  • uv run pytest tests/ — extended test_shared.py and test_e2e.py assert the traceback is captured by check_embedding and propagated through _check_model.
  • CI.

When a daemon-side `ccc doctor` check failed (e.g. the model check), only a
one-line, 500-char-truncated summary reached the CLI; the full traceback was
logged to daemon.log but never surfaced, making failures hard to debug.
Carry the full traceback across both daemon→CLI error paths:
- Per-check failures: add `traceback` to `EmbeddingCheckResult` and
 `DoctorCheckResult`; `check_embedding` captures `format_exc()` and
 `_check_model` propagates it. The CLI prints it dimmed under the error.
- Streaming exceptions: add `traceback` to `ErrorResponse`, populated by the
 daemon's streaming handler and appended to the client-raised RuntimeError.
Both new fields default to None, keeping the msgpack wire format
backward-compatible.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@georgeh0 georgeh0 merged commit a821c20 into main Jun 3, 2026
4 checks passed
@georgeh0 georgeh0 deleted the g/doctor-daemon-traceback branch June 3, 2026 16:50
faysou pushed a commit to faysou/cocoindex-code that referenced this pull request Jun 9, 2026
) (cocoindex-io#177)
When a daemon-side `ccc doctor` check failed (e.g. the model check), only a
one-line, 500-char-truncated summary reached the CLI; the full traceback was
logged to daemon.log but never surfaced, making failures hard to debug.
Carry the full traceback across both daemon→CLI error paths:
- Per-check failures: add `traceback` to `EmbeddingCheckResult` and
 `DoctorCheckResult`; `check_embedding` captures `format_exc()` and
 `_check_model` propagates it. The CLI prints it dimmed under the error.
- Streaming exceptions: add `traceback` to `ErrorResponse`, populated by the
 daemon's streaming handler and appended to the client-raised RuntimeError.
Both new fields default to None, keeping the msgpack wire format
backward-compatible.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: Daemon crashes with "Cannot send a request, as the client has been closed" on index and search

1 participant

AltStyle によって変換されたページ (->オリジナル) /