verify_index
Verify documentation index integrity by recomputing SHA-256 hashes and comparing to stored content. Use cache mode for self-consistency checks, or live mode to detect source file drift and missing files.
Instructions
Byte-offset integrity check. Walks every section, byte-range-reads the bytes, recomputes SHA-256, and compares to the stored content_hash. source='cache' (default) checks the INDEX MIRROR: a clean result proves the index is internally consistent, NOT that the source document is still current. source='live' checks the real workspace files under the index source_root, so an edited source drifts and a deleted one goes missing. _meta.verify_layer always names which one ran. Reports drift / missing / error counts plus the drifting section ids. Sample N sections via the sample arg for cheap CI checks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| sample | No | Only verify the first N sections. | |
| source | No | Which bytes to verify. 'cache' (default) = the indexed raw mirror; clean means the index is self-consistent and says nothing about whether the source changed. 'live' = the workspace files under source_root. |