fix(hunt): an empty product file no longer fails the source producer on every row of a change

The 150 unread rows were not a checkout failure: the entry-point scan read every product file and one empty
file raised empty_source, which escaped the cached property and failed the source producer on every row of
the change (and re-read the whole tree per row). Empty product files are skipped; the row's own file still
has to be non-empty.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-10-14 00:53:37 +02:00
co-authored by Claude Fable 5.1
parent c01e61c4dd
commit fcb43fdd47
2 changed files with 10 additions and 2 deletions
+7 -1
View File
@@ -91,7 +91,13 @@ class Context:
@cached_property
def entry_points(self) -> list[mapping.EntryPointRecord]:
for path in self.product_files:
self.read(path)
try:
self.read(path)
except _Absent:
# An empty product file elsewhere in the tree is not this row's problem. Before this guard one
# such file failed the source producer on every row of the change, and the failure escaped the
# cache so every row re-read the whole tree.
continue
return mapping.analyze_entry_points(self.root, [build_file_target(self.root, self.root / path) for path in self.product_files])
@cached_property