Repository navigation
fix: return deterministic directory listings - #1309
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe directory lister now returns directory contents in alphabetical order. A test mocks an unsorted ChangesDirectory listing order
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change makes directory listings deterministic and adds focused regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryDirectory listings are now returned in a deterministic alphabetical order. Runtime validation confirmed that arbitrary filesystem entry order is normalized while empty and invalid-directory responses remain unchanged. Confidence Score: 5/5No blocking failure remains. The directory-listing behavior correctly sorts arbitrary filesystem results and preserves existing error and empty-directory behavior.
What T-Rex did
Reviews (2): Last reviewed commit: "chore: retrigger Greptile review" | Re-trigger Greptile |
vitali87
left a comment
There was a problem hiding this comment.
Thanks, this is a good fix: os.listdir order is filesystem-dependent and agents consuming the listing benefit from determinism, and the regression test pins it with a deliberately unordered mock. Two small things before merge: the Greptile Review check errored without posting findings (their side, not yours; an empty push or rebase retriggers it), and please confirm the branch is current with main. Substantively this looks merge-ready.
4937fc6 to
3dbe173
Compare
|
I rebased the branch onto the latest main and pushed the update. The focused tests and checks all pass. I also pushed an empty commit to retrigger Greptile, but the check has not appeared yet on the new commit. |
|
@greptile review |
|
@coderabbitai review |
|
|
@Whxuan0701 GOOD JOB! |
Summary
Type of Change
Related Issues
No existing issue found.
Test Plan
make test-paralleloruv run pytest -n auto -m "not integration")make test-integration, requires Docker)Focused validation:
uv run pytest -q codebase_rag/tests/test_directory_lister.py(21 passed)uv run ruff format --check codebase_rag/tools/directory_lister.py codebase_rag/tests/test_directory_lister.pyuv run ruff check codebase_rag/tools/directory_lister.py codebase_rag/tests/test_directory_lister.pyuv run ty check codebase_rag/tools/directory_lister.pygit diff --checkRepository-wide local unit tests were also attempted on the unchanged base and reached 7,161 passed / 142 skipped, with two unrelated failures and one collection error caused by optional dependencies and the Intel macOS environment. CI remains the authoritative full-suite result.
Checklist
make pre-commit)# type: ignore,cast(),Any, orobjecttype hintsSummary by CodeRabbit
Bug Fixes
Tests