crossmem verify
Verify chunk integrity by re-hashing verbatim text against stored SHA-256 hashes.
Usage
crossmem verify [cite_key]
Arguments
| Argument | Description |
|---|---|
[cite_key] | Optional. If provided, only verify chunks for this cite key. If omitted, verify all wiki entries. |
What it does
- Walks
~/crossmem/wiki/for all.mdfiles (or the one matchingcite_key) - For each wiki entry with a
cite_keyin frontmatter:- Extracts all
<!-- chunk id=... -->blocks - Finds the
text_sha256in each chunk’s provenance YAML - Re-computes SHA-256 from the verbatim quoted text (
> ...lines) - Reports any mismatches as “DRIFT”
- Extracts all
- Prints summary: total chunks checked, total drifts detected
Exit codes
| Code | Meaning |
|---|---|
| 0 | All chunks verified, no drift |
| 1 | Error or drift detected |
Example
$ crossmem verify vaswani2017attention
[verify] Checking vaswani2017attention
Verified 47 chunks, 0 drift(s) detected.
$ crossmem verify
[verify] Checking vaswani2017attention
[verify] Checking lecun2015deep
Verified 93 chunks, 0 drift(s) detected.
When drift is detected:
DRIFT: vaswani2017attention chunk p4s32c1
expected: 5f3e1c...
actual: a8b2d4...
Verified 47 chunks, 1 drift(s) detected.