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

Merged
claude merged 1 commits from fix-index-log into main 2026-09-10 21:33:47 -04:00
Contributor

label_count or "(all)" yields a str whenever --limit isn't passed — which is the normal
CI path — so the %d placeholder raised on every indexing run:

TypeError: %d format: a real number is required, not str
Arguments: (218633, '(all)', 10.680204153060913)

logging swallows the exception, so the index still built correctly and CI stayed green. The
only damage was a stack trace in place of the summary line, in every refresh/build log —
noise that makes a real failure harder to spot.

%s formats the int and the string fallback both.

Verified

Path Output
no --limit (the broken one) loaded 218633 chunks from (all) label(s) in 6.6s
--limit 5 loaded 180 chunks from 5 label(s) in 0.0s

Found in the run-24307 build log while confirming the mcp 2.x deploy (#6). Unrelated to that
change — it predates it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FFBDnRWHispovmJVK9rXc9

`label_count or "(all)"` yields a **str** whenever `--limit` isn't passed — which is the normal CI path — so the `%d` placeholder raised on every indexing run: ``` TypeError: %d format: a real number is required, not str Arguments: (218633, '(all)', 10.680204153060913) ``` `logging` swallows the exception, so the index still built correctly and CI stayed green. The only damage was a stack trace in place of the summary line, in every `refresh`/`build` log — noise that makes a real failure harder to spot. `%s` formats the int and the string fallback both. ## Verified | Path | Output | |---|---| | no `--limit` (the broken one) | `loaded 218633 chunks from (all) label(s) in 6.6s` | | `--limit 5` | `loaded 180 chunks from 5 label(s) in 0.0s` | Found in the run-24307 build log while confirming the mcp 2.x deploy (#6). Unrelated to that change — it predates it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FFBDnRWHispovmJVK9rXc9
claude added 1 commit 2026-09-10 21:33:39 -04:00
`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
claude merged commit 254c4df71d into main 2026-09-10 21:33:47 -04:00
claude deleted branch fix-index-log 2026-09-10 21:33:47 -04:00
Sign in to join this conversation.