-
Notifications
You must be signed in to change notification settings - Fork 144
feat(doctor): surface daemon-side exception tracebacks#177
Merged
Merged
Conversation
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>
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>
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.
Summary
ccc doctorso failures (e.g. a failing model check) are debuggable instead of showing only a one-line, truncated summary.tracebacktoEmbeddingCheckResultandDoctorCheckResult;check_embeddingcapturesformat_exc(),_check_modelpropagates it, and the CLI prints it dimmed/indented under the error.tracebacktoErrorResponse, populated by the daemon's streaming handler and appended to the client-raisedRuntimeError.None, keeping the msgpack wire format backward-compatible.Closes #173.
Test plan
uv run mypy .— clean (40 files).uv run pytest tests/— extendedtest_shared.pyandtest_e2e.pyassert the traceback is captured bycheck_embeddingand propagated through_check_model.