check_sources
Checks whether the sources backing each memory have changed or vanished, returning a per-record report of statuses like fresh, drifted, or orphaned.
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 when records name sources and NONE of them could be checked -- zero drifted over zero
checked is not a clean store -- and a problem says so. A store whose records carry no source at all
(every record NOT_BINDABLE) had nothing to check: ok is true there, checked is 0, the coverage ratios
are null rather than 0, and a problem still 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 | |||