Skip to content

fix(index): warn when skipping failed documents - #1356

Open
Iams4kura wants to merge 1 commit into
Future-House:mainfrom
Iams4kura:bugfix/warn-skipped-index-errors-20260923t040236z
Open

Iams4kura wants to merge 1 commit into
Future-House:mainfrom
Iams4kura:bugfix/warn-skipped-index-errors-20260923t040236z

Conversation

@Iams4kura

Copy link
Copy Markdown

Summary

  • Fixes: After a document fails during indexing, later runs report success while silently skipping that file, leaving users unaware that the persisted index is incomplete.
  • Root cause: SearchIndex.filecheck treats the nonempty sentinel value ERROR exactly like a successful stored file hash when no body hash is supplied, and process_file therefore skips the document without any diagnostic.

Closes #1355.

Regression evidence

  • Before: uv run pytest tests/test_agents.py::test_filecheck_warns_about_previously_failed_documents -q exited 1

  • After: uv run pytest tests/test_agents.py::test_filecheck_warns_about_previously_failed_documents -q exited 0

Verification

  • uv run pytest tests/test_agents.py::test_filecheck_warns_about_previously_failed_documents tests/test_agents.py::test_getting_manifest tests/test_agents.py::test_settings_model_config tests/test_agents.py::test_tool_schema tests/test_agents.py::test_empty_index_without_index_rebuild -q
  • uv run prek run --all-files
  • uv run pylint src packages
  • uv run refurb .
  • uv build --package paper-qa

The broader index-build tests require the external model credentials documented in CONTRIBUTING.md. I attempted them locally, but they stopped in the unchanged OpenAI client setup because no key is available; I have not counted those runs as passing. The focused regression and the five credential-free agent/index tests above cover the changed decision path.

Scope

  • 2 files changed, +24 / -2 lines

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SearchIndex.filecheck silently skips files previously marked as ERROR

1 participant