File access checks distinguish queue waits from OS blocks

Merged
AF
2d ago
+561-19

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

File access checks now distinguish time spent waiting in AFT's own queue from actual OS blocks, so queue waits no longer trigger the macOS Privacy & Security hint or blame the operating system.

  • Checks that never start before the deadline report read_io_queue_timeout; started-but-unfinished checks keep reporting read_blocked.
  • The macOS hint now appears only on macOS.
  • Successful metadata and canonicalize probes cache traversal evidence per request Secret and reuse it for siblings without enumerating an ancestor directory; the cache is request-local and published only after success reaches the caller.
  • Expired helper work never starts even if a slot becomes available late.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issue was found.

Summary

File checks now separate waits for AFT helpers from unfinished OS calls. The follow-up changes restore sibling-check reuse without listing parent folders.

  • File checks report whether a timeout happened before or during OS access.
  • Path checks resolve names without listing their parent folders.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Check a path] --> B{Safe traversal already known?}
  B -->|Yes, final component is not a symlink| C[Check directly]
  B -->|No| D[Run a bounded helper]
  D --> E{Check succeeds?}
  E -->|Yes, parent filesystem is local| F[Share parent evidence within this request]
  E -->|Deadline expires| G[Return timeout without publishing evidence]
  F --> H[Reads and directory listings still need separate checks]

Reviews (2) · Last reviewed commit: "mason: reuse bounded stat traversal evid..." · Reviewed by Greptile