files.diff_against_disk
Check if a file's indexed content matches its current disk version. When they diverge, get line-level differences and fix stale search results by refreshing the index.
Instructions
Diagnose drift between one file's disk content and its FTS index. Status is one of in_sync, diverged, disk_unreadable, or no_index_row. On divergence returns sizes, line counts, the first divergent line number, and the disk vs index sample for that line — NOT a full diff (use files.get_diff for full diffs between commits). Read-only; no side effects, auth, or rate limits. Use when search results look stale; if status is diverged or no_index_row, run projects.refresh_index to fix.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | File ID |