scan_unit_stats
scan_unit_stats(
path ,
)-> ‘tuple[int | None, int | None]’
Return the (mtime_ns, size_bytes) the index records for one scan unit.
This is the one definition of “has this source changed”: the index stores what this returns, and a reader checking a source it is about to trust calls the same function, so the two cannot disagree. A file answers with its own stat; a directory-format unit, which is one source made of many files, answers with its manifest fingerprint, since its own stat moves for neither a rewritten nor a resized member. A source the filesystem will not answer for states nothing.