Skip to content

fix(graph_builder): misleading log message when indexing vision-extracted images #343

Description

@arozumenko

Summary

The log line emitted by graph_builder.py when chunking a document is:

Document /path/to/settings-api-keys.png (1273 chars) fits in context - keeping as single chunk

When the file is an image processed by the vision extractor, the char count refers to the LLM-generated text description, not the binary file contents. The message looks identical to the old binary-garbage case (before the extractor was wired up), making it hard to tell from logs alone whether the image was correctly described or incorrectly read as raw bytes.

Acceptance Criteria

  • When the file extension is in KNOWN_VISION_EXTENSIONS, the log line distinguishes the extracted description from raw file content — e.g.:
    Document /path/to/foo.png — vision description (2820 chars) fits in context - keeping as single chunk
  • No behaviour change — logging only

Context

Surfaced during a local ingestion run of the wikis repo itself. The extractor was working correctly (input_tokens=2622 output_tokens=826) but the unchanged log message caused confusion about whether binary content was leaking into the index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    polishMinor UX / developer-experience improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions