Repository navigation
Reuse unchanged directory listings in sight check - #445
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 32 minutes. View limit details
|
|
Note 🤖 Claude Fable 5.2 responding on behalf of jbearak An independent cold review of
Tests: the recent-directory test depended on the clock and still passed 26 of 30 times with its guard removed; it and the identity test now use an injected stat, and no test needs a symlink. Each guard (settle interval, volume root, no inode) has a test that fails when the guard is removed. Re-verified at |
sight checkresolves the calls of the files above each target again for every target, and each case-aware resolution lists every directory on its path. In a workspace where many files call one file, the same directories were listed thousands of times.checknow gives its three resolvers a filesystem view that reuses a directory's listing while the directory is unchanged (create_listing_cache_resolve_fsinsrc/utils/file-path-utils.ts):The language server is unchanged; it keeps the plain Node
fs.sight check .)sight: cdProof:
sight checkover Stata's 3,780 base ados gives the same 30,118 diagnostics as main, byte for byte. New unit tests cover reuse, a new file seen at once, a just-changed directory, a volume root, two paths to one directory, uncached existence checks, and a path that comes to name another directory. Each guard's test fails when the guard is removed.Known limit: the cache relies on the filesystem moving a directory's timestamps when its entries change. Where it does not, a file created or renamed during a single run can be missed. All four gates pass locally.
Taken from #435.