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,25 +1,14 @@
//! Sync run lifecycle recorder.
//!
//! Encapsulates the INSERT-on-start, UPDATE-on-finish lifecycle for the
//! `sync_runs` table, enabling sync history tracking and observability.
use rusqlite::Connection;
use super::error::Result;
use super::metrics::StageTiming;
use super::time::now_ms;
/// Records a single sync run's lifecycle in the `sync_runs` table.
///
/// Created via [`start`](Self::start), then finalized with either
/// [`succeed`](Self::succeed) or [`fail`](Self::fail). Both finalizers
/// consume `self` to enforce single-use at compile time.
pub struct SyncRunRecorder {
row_id: i64,
}
impl SyncRunRecorder {
/// Insert a new `sync_runs` row with `status='running'`.
pub fn start(conn: &Connection, command: &str, run_id: &str) -> Result<Self> {
let now = now_ms();
conn.execute(
@@ -31,7 +20,6 @@ impl SyncRunRecorder {
Ok(Self { row_id })
}
/// Mark run as succeeded with full metrics.
pub fn succeed(
self,
conn: &Connection,
@@ -57,7 +45,6 @@ impl SyncRunRecorder {
Ok(())
}
/// Mark run as failed with error message and optional partial metrics.
pub fn fail(
self,
conn: &Connection,
@@ -158,7 +145,6 @@ mod tests {
assert_eq!(total_items, 50);
assert_eq!(total_errors, 2);
// Verify metrics_json is parseable
let parsed: Vec<StageTiming> = serde_json::from_str(&metrics_json.unwrap()).unwrap();
assert_eq!(parsed.len(), 1);
assert_eq!(parsed[0].name, "ingest");