Skip to content

Add timeout_ms to fd, walk, ls, and async path functions - #23

Merged
jph00 merged 2 commits into
mainfrom
walk-timeout
Aug 5, 2026
Merged

Add timeout_ms to fd, walk, ls, and async path functions#23
jph00 merged 2 commits into
mainfrom
walk-timeout

Conversation

@ncoop57

@ncoop57 ncoop57 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Path-finding functions (fd, walk, ls, fda) now accept timeout_ms, returning partial results with stop_reason=\"timeout\" — matching the existing behavior on rg/rga/nbrg/nbrga.

Changes

  • walk.rs: Refactored find/find_cancelable into a unified find_iter built on the generic StreamIter/spawn_walk engine, eliminating the bespoke channel/worker code. find is now a thin collect() over the iterator.
  • python.rs: walk_py, find_py, and find_async_py route through collect_stream_py / stream_async with deadline support, returning (Vec<String>, bool) tuples so Python can set stop_reason.
  • __init__.py: Added timeout_ms param to walk, fd, and fda; results wrapped via _mk_results to carry the timeout flag.
  • Docs: Updated DEV.md and README.md to document timeout_ms on all path functions.
  • Tests: Added timeout assertions for fd, walk, and fda.
  • fd_iter/fda_iter: Lazy path walks over the same find_iter engine, yielding FileEntry rows. Adds the FindIter pyclass and _core.find_iter/find_iter_async in python.rs.

@ncoop57 ncoop57 changed the title timeout_ms for path walks: fd/fda/walk/ls on the shared stream engine Add timeout_ms to fd, walk, ls, and async path functions Aug 5, 2026
@ncoop57
ncoop57 marked this pull request as ready for review August 5, 2026 19:22
@ncoop57
ncoop57 requested a review from jph00 August 5, 2026 19:22
@jph00
jph00 merged commit c5d3599 into main Aug 5, 2026
5 checks passed
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