Skip to content

[ENHANCEMENT] Log code-index failures and state changes so a stuck index can be diagnosed #60

Closed as duplicate

Description

@simurg79

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 only console.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:
  • Where failures are swallowed today (fork main @ 9c78783):

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

Related: #57, #58, #59, #23, PR #34

Activity

  1. added
    enhancement
    on Nov 3, 2026
  2. simurg79 commented on Nov 3, 2026

    @simurg79
    OwnerAuthor

    Consolidated into #57, which now tracks all four parts of this incident (retry, recovery, Start Indexing race, logging) with the full evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions