feat(kebab-core): p9-fb-23 task 1 — IngestItemKind::Unchanged + IngestReport.unchanged

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-04 17:43:52 +00:00
parent 6a8d155da9
commit aa2a6ea7fc
5 changed files with 29 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ pub struct AggregateCounts {
pub new: u32,
pub updated: u32,
pub skipped: u32,
/// p9-fb-23: assets whose checksum + all version inputs matched the
/// existing DB record — parse / chunk / embed / vector upsert all
/// skipped.
pub unchanged: u32,
pub errors: u32,
pub chunks_indexed: u32,
pub embeddings_indexed: u32,

View File

@@ -347,6 +347,7 @@ pub fn ingest_with_config_cancellable(
let mut new_count: u32 = 0;
let mut updated_count: u32 = 0;
let mut skipped_count: u32 = 0;
let mut unchanged_count: u32 = 0;
let mut error_count: u32 = 0;
// Aggregate counts surfaced into `ingest_runs` (and tracing). Not
// exposed on `IngestReport` today — `kebab_core::IngestReport` is a
@@ -445,6 +446,9 @@ pub fn ingest_with_config_cancellable(
kebab_core::IngestItemKind::Skipped => {
skipped_count = skipped_count.saturating_add(1)
}
kebab_core::IngestItemKind::Unchanged => {
unchanged_count = unchanged_count.saturating_add(1)
}
kebab_core::IngestItemKind::Error => {
error_count = error_count.saturating_add(1)
}
@@ -585,6 +589,7 @@ pub fn ingest_with_config_cancellable(
new: new_count,
updated: updated_count,
skipped: skipped_count,
unchanged: unchanged_count,
errors: error_count,
chunks_indexed,
embeddings_indexed,
@@ -626,6 +631,7 @@ pub fn ingest_with_config_cancellable(
new: new_count,
updated: updated_count,
skipped: skipped_count,
unchanged: unchanged_count,
errors: error_count,
duration_ms,
items: if summary_only { None } else { Some(items) },