Expand description
Recently-referenced ring: a bounded, per-(namespace, actor) cache of ids
this actor recently touched by name, held in daemon-warm memory only.
No schema, no persistence, no migration — a daemon restart empties it, and
that is fine: its miss path is the hybrid-search fallback in
reference_resolution::resolve_reference. Admission is gated by the
dispatch boundary (pack.rs::dispatch_with_identity) under a strict rule:
only by-id touches (create/get/update/delete/merge/link) admit an id.
search/list result-sets never enter the ring — the anaphora signal is
the sparsity, so admitting every search hit would drown “the old record”
in noise.
Structs§
- Reference
Ring - Daemon-warm, actor-scoped recently-referenced ring.
- Ring
Entry - One admitted id: the id itself, a best-effort display name (drawn from the dispatch result JSON — never a fresh fetch, to keep admission cheap on the Tier-1 latency budget), and the instant it was touched.
Constants§
- DEFAULT_
MAX_ OUTER_ KEYS - Maximum distinct
(namespace, actor)keys held at once. The per-key ring is capacity/TTL-bounded (above), but the outer map itself has no such bound by default — a daemon serving many transient actor ids needs an eviction rule for the map too, or it grows without limit. LRU by most-recent touch, sized generously above the 64-entry inner bound since this is the actor-fanout axis, not the per-actor recency axis. - DEFAULT_
RING_ CAPACITY - Default ring size per
(namespace, actor)key. - DEFAULT_
RING_ TTL - Default eviction age.