Skip to content

feat(cli): add doctor diagnostics#75

Open
wananing wants to merge 1 commit into
ob-labs:mainfrom
wananing:fix/contextseek-doctor
Open

feat(cli): add doctor diagnostics#75
wananing wants to merge 1 commit into
ob-labs:mainfrom
wananing:fix/contextseek-doctor

Conversation

@wananing

Copy link
Copy Markdown
Contributor

Summary

Add contextseek doctor as a CLI self-check for ContextSeek configuration and component connectivity.

The command loads ContextSeekSettings, reports component-level PASS / FAIL / SKIP results 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 doctor subcommand that runs before normal client initialization so configuration load errors can be
reported as diagnostics.

The diagnostics reuse the existing config factory path to resolve and probe components:

  • storage is initialized and checked with a lightweight list operation
  • embedding runs a tiny probe when an embedding provider is configured
  • LLM runs a tiny prompt when an LLM provider is configured
  • none embedding/LLM providers are reported as SKIP because they are optional in the default zero-config workflow

Diagnostic output includes actionable hints pointing users back to .env.example, redacts configured secrets from
summaries and hints, and exits with code 1 when any component reports FAIL.

Added unit tests for parser support, default diagnostics, misconfigured storage, resolved model reporting, secret
redaction, and nonzero failure behavior

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.
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.

contextseek doctor — config & connectivity self-check

1 participant