feat(cli): add doctor diagnostics#75
Open
wananing wants to merge 1 commit into
Open
Conversation
Add a contextseek doctor command that loads ContextSeekSettings and checks storage, embedding, and LLM connectivity with component-level PASS/FAIL/SKIP output. Redact configured secrets from diagnostic output and return nonzero when a configured required component fails. Fixes ob-labs#46.
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
Add
contextseek doctoras a CLI self-check for ContextSeek configuration and component connectivity.The command loads
ContextSeekSettings, reports component-levelPASS/FAIL/SKIPresults for config, storage,embedding, and LLM, and returns a nonzero exit code when a configured required component fails.
Fixes #46.
Solution Description
Register a new
doctorsubcommand that runs before normal client initialization so configuration load errors can bereported as diagnostics.
The diagnostics reuse the existing config factory path to resolve and probe components:
noneembedding/LLM providers are reported asSKIPbecause they are optional in the default zero-config workflowDiagnostic output includes actionable hints pointing users back to
.env.example, redacts configured secrets fromsummaries and hints, and exits with code
1when any component reportsFAIL.Added unit tests for parser support, default diagnostics, misconfigured storage, resolved model reporting, secret
redaction, and nonzero failure behavior