Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
enhancementNew feature or request
Description
Type
Enhancement — diagnostics
Problem / Value
When the index got stuck again on 2026-11-02 between about 18:54 and 19:00 PST (#57), nothing recorded why: no Roo-Code output channel lines, no console errors, and no Qdrant errors. We can't tell which file failed or at which step, so we can't fix the trigger. Per-file failures, scan errors, and state changes are either swallowed or written with console.log/console.warn, which installed builds don't keep.
Context
- The Roo-Code output channel had zero indexing lines all day. Code-index services log through
console.*; in installed builds onlyconsole.error(renderer.log, as[Extension Host] …) and unhandled rejections (exthost.log) survive. - Evening evidence: the last Qdrant write was at 18:54:33, there was no Qdrant traffic at all until the manual restart at 19:02:03, and the first failed search was at 19:00:11. Embedder errors and Qdrant errors are ruled out because both would have been logged. The remaining candidates are all silent today:
- a file read failure (file deleted or locked mid-batch, for example by test or formatting tools) →
local_errorat file-watcher.ts#L244 - a count-verification mismatch → file-completion.ts#L79
- an oversized chunk skipped with only a
console.warn(openai-compatible.ts#L137), which then throwsIncomplete embeddingsat file-completion.ts#L115 - a non-fatal parser error or write-gate rejection inside the watcher's
processFile
- a file read failure (file deleted or locked mid-batch, for example by test or formatting tools) →
- Where failures are swallowed today (fork
main@ 9c78783):- file-watcher.ts#L204 and #L244: per-file
local_erroris returned and never logged. #L182 only counts errors; #L139 forwards a batch-level error without logging it. - orchestrator.ts#L141: scan errors are collected into
batchErrorsand never logged. #L94/#L96 and #L164 switch toStandbywithout recording which files failed or why. - scanner.ts#L119: the error message includes the file path but only reaches the swallowing callback above.
- manager.ts#L427-L429 and #L441: superseded rebuild attempts return silently.
- file-watcher.ts#L204 and #L244: per-file
Acceptance criteria
- Code-index logs go to the Roo-Code output channel (or a dedicated
LogOutputChannel) with a[CodeIndex]prefix, so installed builds keep them. - Log every state change: old → new state, the status message, the source (scan end, watcher batch, stop, rebuild, error), and the attempt number.
- Log every failed file: workspace-relative path, step (read / parse / embed / upsert / delete / verify), error message, and whether it will be retried. Aggregate per batch so a mass failure doesn't flood the log.
- Log a scan summary: files processed / skipped / failed, blocks found / indexed, duration, and why the scan ended partial.
- Log Start, Stop, and rebuild requests, including superseded attempts.
- Show the latest failure reason (failed count plus one file) in the indexing status text.
- Never log secrets or file contents — paths and error messages only.
- Tests assert that a failed file, a partial scan, and a state change each produce a log entry.
Constraints/Preferences
- Keep steady-state noise low: no per-success lines by default (use debug or trace level for those).
- Land this before or together with [BUG] One failed file keeps the code index in Standby and blocks codebase_search until a manual restart #57 and [BUG] Indexing gives up on a file after one transient network error (batch retries removed in PR #34) #58, so the evening trigger is captured if it happens again.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
simurg79 commentedon Nov 3, 2026
Consolidated into #57, which now tracks all four parts of this incident (retry, recovery, Start Indexing race, logging) with the full evidence.