check_sources
Check stored agent-memory sources: report which still resolve and match fingerprints, which drifted, and which are gone.
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 (a source is named but carries no fingerprint, or names the WRITER rather than a document),
NOT_BINDABLE (no source at all, e.g. a decision: nothing to fingerprint in any window, so it is left out
of the denominator rather than counted as a gap).
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 checked -- zero drifted over zero checked is not a clean store --
including a store whose records carry no source at all (every record NOT_BINDABLE). verdict names the
state: CLEAN (something was checked and nothing moved), DRIFTED (a source changed, vanished, or had
already moved at capture) or NOT_CHECKED; not_checked counts the records that could not be checked by
reason, the coverage ratios are null rather than 0, and a problem says that nothing was verified. 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 | |||