check_sources
Check whether the sources behind stored memories changed or disappeared, returning per-record statuses (fresh, drifted, orphaned, unresolved, uncheckable) to guide re-reading before serving.
Instructions
CAUSAL staleness: has the SOURCE each memory came from CHANGED, or gone? Returns a report, not a boolean.
Decay elsewhere in this library is temporal — a half-life on age — and age cannot tell a fact that has
been true for five years from one that rotted in a week. This asks the question that can: did the thing
this memory is about actually change? Per record: FRESH (source resolves, still hashes the same),
DRIFTED (resolves, content changed — re-read it, don't serve it blind), ORPHANED (an addressable
source that is gone), UNRESOLVED_HERE (a relative or non-file locator the default resolver could not
address from this working directory — read it with resolution_base, it is not evidence of absence),
UNCHECKABLE (no fingerprint: no source, or a source naming the WRITER rather than a document).
READ UNCHECKABLE FIRST. Fingerprints are only taken when remember(source={"doc": <path>}) points at a
file that existed at write time, so on most stores this is the large number and the honest denominator.
ok is false whenever NOTHING was checkable, and the report says so — zero drifted over zero checked is
the same sentence as a clean store. Measured on our own deployment before shipping this: 210,544 records,
98.3% carrying a source, 0.01% carrying one that resolves to anything you could fetch again.
Scoped to the bound tenant/project when there is one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||