fix(index): %d can't format the "(all)" label-count fallback

`label_count or "(all)"` yields a str when --limit isn't passed (the
normal CI path), so the %d placeholder raised

    TypeError: %d format: a real number is required, not str

on every indexing run. logging swallows the error, so the index still
built correctly and CI stayed green — it just printed a stack trace
instead of the summary line. Visible in every refresh/build log.

%s formats both the int and the string fallback.

Verified both paths:
  no --limit   -> "loaded 218633 chunks from (all) label(s) in 6.6s"
  --limit 5    -> "loaded 180 chunks from 5 label(s) in 0.0s"

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FFBDnRWHispovmJVK9rXc9
This commit is contained in:
2026-09-10 21:32:00 -04:00
co-authored by Claude Opus 5
parent e390655640
commit e11dc8c457
+1 -1
View File
@@ -160,7 +160,7 @@ def main() -> int:
label_count += 1 label_count += 1
last_label_key = key last_label_key = key
records.append(rec) records.append(rec)
log.info("loaded %d chunks from %d label(s) in %.1fs", log.info("loaded %d chunks from %s label(s) in %.1fs",
len(records), label_count or "(all)", time.time() - t0) len(records), label_count or "(all)", time.time() - t0)
if args.bm25_only: if args.bm25_only: