Return unique deterministic results from find importers #4

Closed
opened 2026-09-04 07:52:21 +02:00 by nami-ai · 1 comment
Collaborator

find importers returns one row per import edge because src/index/store.rs:202-205 selects from_file_id without DISTINCT or ordering. Repeated imports therefore duplicate paths in the public result; for example, a file containing import b twice returns ["a.py", "a.py"] for find importers b.py.

Please make the API return each importing file once and use a stable ordering. This also avoids duplicate edges inflating import counts and makes downstream graph output reproducible.

`find importers` returns one row per import edge because `src/index/store.rs:202-205` selects `from_file_id` without `DISTINCT` or ordering. Repeated imports therefore duplicate paths in the public result; for example, a file containing `import b` twice returns `["a.py", "a.py"]` for `find importers b.py`. Please make the API return each importing file once and use a stable ordering. This also avoids duplicate edges inflating import counts and makes downstream graph output reproducible.
Owner

Fixed in commit 4338e28.

Fixed in commit 4338e28.
Sign in to join this conversation.
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: endergebnis/rustytokens#4