Skip to main content

Module read

Module read 

Source
Expand description

Hot-path read API per read-protocol.md.

The entry point is Pipeline::execute_query. It parses a single (query ...) form, resolves the keyword predicates against the pipeline’s symbol table (without mutation), and projects over the pipeline’s record history and supersession DAG via the as-of resolver (6.4).

Scope (7.2 — filters, flags, framing, filtered array):

PredicateStatus
:kindsem, pro supported; epi, inf return empty
:s @S, :p @Psupported (Semantic only)
:as_of Tsupported (delegates to resolver § 7.2)
:as_committed Tsupported (§ 7.3)
:limit Nsupported; sets TRUNCATED flag when hit
:include_retireddefault false; retired-symbol records drop unless set
:include_projecteddefault false; projected records drop unless set
:confidence_thresholddefault 0.5; flag-only threshold (does not filter)
:explain_filtereddefault false; when true, dropped records surface in filtered
:show_framingdefault false; when true, framings parallels records
:debug_modeshorthand for :explain_filtered + :show_framing
everything elseReadError::UnsupportedPredicate

Flag surface (§ 6):

  • STALE_SYMBOL — any kept record references a retired symbol.
  • LOW_CONFIDENCE — any kept record’s effective (decay-adjusted) confidence < threshold. Computed via crate::decay::effective_confidence against the pipeline’s current crate::decay::DecayConfig.
  • PROJECTED_PRESENT — any kept record has flags.projected.
  • TRUNCATED:limit was hit.
  • EXPLAIN_FILTERED_ACTIVE:explain_filtered (or :debug_mode) active.

Framing values at 7.2: Advisory (default), Historical (:as_of predates query_committed_at), Projected (record’s flags.projected bit set). Authoritative lands in Step 4 when pin / authoritative write forms are wired.

Structs§

FilteredMemory
A record that was dropped from the result set by a filter.
ReadFlags
Read-result flag bitset per read-protocol.md § 5 / § 6.
ReadResult
Result of a read-path query per read-protocol.md § 5.

Enums§

FilterReason
Why a record was filtered out of ReadResult::records. Exposed via ReadResult::filtered when :explain_filtered true.
Framing
Framing classification per read-protocol.md § 5. Attached per-record in ReadResult::framings when :show_framing true.
FramingSource
Who authorised an authoritative framing. Spec § 5 / confidence-decay.md § 7 / § 8.
KindFilter
Memory kind filter used by :kind.
ReadError
Read-path error family. Every variant means the query did not execute; no state was observed or mutated.