refactor: Remove redundant doc comments throughout codebase

Removes module-level doc comments (//! lines) and excessive inline doc
comments that were duplicating information already evident from:
- Function/struct names (self-documenting code)
- Type signatures (the what is clear from types)
- Implementation context (the how is clear from code)

Affected modules:
- cli/* - Removed command descriptions duplicating clap help text
- core/* - Removed module headers and obvious function docs
- documents/* - Removed extractor/regenerator/truncation docs
- embedding/* - Removed pipeline and chunking docs
- gitlab/* - Removed client and transformer docs (kept type definitions)
- ingestion/* - Removed orchestrator and ingestion docs
- search/* - Removed FTS and vector search docs

Philosophy: Code should be self-documenting. Comments should explain
"why" (business decisions, non-obvious constraints) not "what" (which
the code itself shows). This change reduces noise and maintenance burden
while keeping the codebase just as understandable.

Retains comments for:
- Non-obvious business logic
- Important safety invariants
- Complex algorithm explanations
- Public API boundaries where generated docs matter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Taylor Eernisse
2026-02-05 00:04:32 -05:00
parent 976ad92ef0
commit 65583ed5d6
57 changed files with 143 additions and 1693 deletions

View File

@@ -1,5 +1,3 @@
//! Doctor command - check environment health.
use console::style;
use serde::Serialize;
@@ -100,30 +98,22 @@ pub struct LoggingCheck {
pub total_bytes: Option<u64>,
}
/// Run the doctor command.
pub async fn run_doctor(config_path: Option<&str>) -> DoctorResult {
let config_path_buf = get_config_path(config_path);
let config_path_str = config_path_buf.display().to_string();
// Check config
let (config_check, config) = check_config(&config_path_str);
// Check database
let database_check = check_database(config.as_ref());
// Check GitLab
let gitlab_check = check_gitlab(config.as_ref()).await;
// Check projects
let projects_check = check_projects(config.as_ref());
// Check Ollama
let ollama_check = check_ollama(config.as_ref()).await;
// Check logging
let logging_check = check_logging(config.as_ref());
// Success if all required checks pass (ollama and logging are optional)
let success = config_check.result.status == CheckStatus::Ok
&& database_check.result.status == CheckStatus::Ok
&& gitlab_check.result.status == CheckStatus::Ok
@@ -393,7 +383,6 @@ async fn check_ollama(config: Option<&Config>) -> OllamaCheck {
let base_url = &config.embedding.base_url;
let model = &config.embedding.model;
// Short timeout for Ollama check
let client = reqwest::Client::builder()
.timeout(std::time::Duration::from_secs(2))
.build()
@@ -418,9 +407,6 @@ async fn check_ollama(config: Option<&Config>) -> OllamaCheck {
.map(|m| m.name.split(':').next().unwrap_or(&m.name))
.collect();
// Strip tag from configured model name too (e.g.
// "nomic-embed-text:v1.5" → "nomic-embed-text") so both
// sides are compared at the same granularity.
let model_base = model.split(':').next().unwrap_or(model);
if !model_names.contains(&model_base) {
return OllamaCheck {
@@ -531,7 +517,6 @@ fn check_logging(config: Option<&Config>) -> LoggingCheck {
}
}
/// Format and print doctor results to console.
pub fn print_doctor_results(result: &DoctorResult) {
println!("\nlore doctor\n");