land: inspect-fresh-after-edit

Merged
AF
4d ago
+569-13

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

A scoped aft_inspect can now certify a stale diagnostics report as authoritative when a file changed after the server last analyzed it, reported for pull-only servers like TypeScript 7's native server. The fix keeps reports fresh after edits and disk changes, including for files outside the project where no file watcher exists.

  • An AFT edit now marks the edited server's pulled report stale, since pull-only servers publish nothing after a change.
  • The scoped sweep re-sends an open document whose file changed on disk before deciding, and reports the file unknown when the current text cannot be sent.
  • A report for an open document from a pull-capable server is reused only if a pull produced it or a push carried the open document's version; a late unversioned clearing push no longer certifies a file clean.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Scoped aft_inspect now refreshes diagnostics after edits and checks whether open documents changed on disk.

  • Scoped inspections check that open-file diagnostics match the current text.
  • The fake language server can model pull results from synced text.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Scoped inspect] --> B{Open document changed on disk?}
  B -->|Yes| C[Mark old reports stale and send current text]
  C -->|Send fails| D[Report file unknown]
  C -->|Send succeeds| E{Current report available?}
  B -->|No| E
  E -->|Yes| F[Use current diagnostics]
  E -->|No| G[Request or wait for diagnostics]
  G -->|Answered| F
  G -->|Budget expires| D

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile