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:
@@ -1,15 +1,9 @@
|
||||
//! Database upsert functions for resource events (state, label, milestone).
|
||||
|
||||
use rusqlite::Connection;
|
||||
|
||||
use super::error::{LoreError, Result};
|
||||
use super::time::iso_to_ms_strict;
|
||||
use crate::gitlab::types::{GitLabLabelEvent, GitLabMilestoneEvent, GitLabStateEvent};
|
||||
|
||||
/// Upsert state events for an entity.
|
||||
///
|
||||
/// Uses INSERT OR REPLACE keyed on UNIQUE(gitlab_id, project_id).
|
||||
/// Caller is responsible for wrapping in a transaction if atomicity is needed.
|
||||
pub fn upsert_state_events(
|
||||
conn: &Connection,
|
||||
project_id: i64,
|
||||
@@ -52,8 +46,6 @@ pub fn upsert_state_events(
|
||||
Ok(count)
|
||||
}
|
||||
|
||||
/// Upsert label events for an entity.
|
||||
/// Caller is responsible for wrapping in a transaction if atomicity is needed.
|
||||
pub fn upsert_label_events(
|
||||
conn: &Connection,
|
||||
project_id: i64,
|
||||
@@ -93,8 +85,6 @@ pub fn upsert_label_events(
|
||||
Ok(count)
|
||||
}
|
||||
|
||||
/// Upsert milestone events for an entity.
|
||||
/// Caller is responsible for wrapping in a transaction if atomicity is needed.
|
||||
pub fn upsert_milestone_events(
|
||||
conn: &Connection,
|
||||
project_id: i64,
|
||||
@@ -135,8 +125,6 @@ pub fn upsert_milestone_events(
|
||||
Ok(count)
|
||||
}
|
||||
|
||||
/// Resolve entity type string to (issue_id, merge_request_id) pair.
|
||||
/// Exactly one is Some, the other is None.
|
||||
fn resolve_entity_ids(
|
||||
entity_type: &str,
|
||||
entity_local_id: i64,
|
||||
@@ -150,11 +138,9 @@ fn resolve_entity_ids(
|
||||
}
|
||||
}
|
||||
|
||||
/// Count resource events by type for the count command.
|
||||
pub fn count_events(conn: &Connection) -> Result<EventCounts> {
|
||||
let mut counts = EventCounts::default();
|
||||
|
||||
// State events
|
||||
let row: (i64, i64) = conn
|
||||
.query_row(
|
||||
"SELECT
|
||||
@@ -168,7 +154,6 @@ pub fn count_events(conn: &Connection) -> Result<EventCounts> {
|
||||
counts.state_issue = row.0 as usize;
|
||||
counts.state_mr = row.1 as usize;
|
||||
|
||||
// Label events
|
||||
let row: (i64, i64) = conn
|
||||
.query_row(
|
||||
"SELECT
|
||||
@@ -182,7 +167,6 @@ pub fn count_events(conn: &Connection) -> Result<EventCounts> {
|
||||
counts.label_issue = row.0 as usize;
|
||||
counts.label_mr = row.1 as usize;
|
||||
|
||||
// Milestone events
|
||||
let row: (i64, i64) = conn
|
||||
.query_row(
|
||||
"SELECT
|
||||
@@ -199,7 +183,6 @@ pub fn count_events(conn: &Connection) -> Result<EventCounts> {
|
||||
Ok(counts)
|
||||
}
|
||||
|
||||
/// Event counts broken down by type and entity.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct EventCounts {
|
||||
pub state_issue: usize,
|
||||
|
||||
Reference in New Issue
Block a user