Skip to content

fix(doctor): respect max_file_size when walking project files - #272

Open
shixi-li wants to merge 1 commit into
cocoindex-io:mainfrom
shixi-li:agent/doctor-max-file-size
Open

fix(doctor): respect max_file_size when walking project files#272
shixi-li wants to merge 1 commit into
cocoindex-io:mainfrom
shixi-li:agent/doctor-max-file-size

Conversation

@shixi-li

Copy link
Copy Markdown
Contributor

Summary

  • pass the project's max_file_size setting into Doctor's file matcher
  • add a regression covering the inclusive size boundary, oversized-file exclusion, and the no-limit fallback

Why

max_file_size is part of the project matching contract introduced in #248. Indexing and ccc grep already pass it to build_matcher, but Doctor's File Walk check omitted the fourth argument. As a result, ccc doctor could report oversized files as matched even though indexing and grep correctly skipped them.

This keeps Doctor's preview consistent with the files the rest of the project actually processes.

Validation

  • .venv/bin/pytest tests/test_daemon.py::test_file_walk_respects_project_max_file_size tests/test_file_walk.py -k 'file_walk_respects_project_max_file_size or max_file_size' -q — 4 passed
  • .venv/bin/ruff check src/cocoindex_code/daemon.py tests/test_daemon.py
  • .venv/bin/ruff format --check src/cocoindex_code/daemon.py tests/test_daemon.py
  • .venv/bin/mypy src/cocoindex_code/daemon.py

The locked full dev extra cannot be installed on this macOS x86_64 host because torch==2.13.0 has no compatible wheel; the focused tests above use the base dependency set, and CI can exercise the repository's full Linux matrix.

@shixi-li
shixi-li marked this pull request as ready for review August 10, 2026 09:20
@badmonster0
badmonster0 requested a review from georgeh0 August 14, 2026 05:28
@badmonster0

Copy link
Copy Markdown
Member

thanks @shixi-li , @georgeh0 can help take a look!

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.

2 participants