Expand description
Evidence Layer (Epistemic Layer) for Microscope Memory.
Separates salience (how often something is recalled — driven by Hebbian, Resonance, Thought Graph, Dream) from evidence weight (how much independent factual support exists). Confidence is computed purely from independent Observation/Evidence links — never from recall energy or salience.
Binary format: evidence.bin (EVD1) — ledger; evidence_log.bin (EVL1) — audit.
§Invariants
- C1 — Salience isolation: Recall energy never modifies
confidence. - C2 — No self-echo: Storing the same text twice from the same source
does not increase
distinct_sources. - C3 — Support restriction: Only
ObservationandEvidenceclasses may appear assupports.InferenceandHypothesiscan never support. - C4 — Promotion gate:
Inference/Hypothesisblocks withdistinct_sources == 0cannot gain importance via Hebbian promotion. - C5 — Audit integrity: Any modification to
evidence_log.binis detectable via SHA-256 chain verification.
Structs§
- Audit
Chain - Append-only audit chain.
- Audit
Chunk - A single chunk in the hash chain.
- Audit
Record - A single audit record (the pre-hash payload).
- Evidence
Ledger - The in-memory evidence ledger, backed by
evidence.bin. - Evidence
Record - A single evidence record in the ledger.
Enums§
- Audit
Event - An event type in the evidence audit chain.
- Epistemic
Class - Epistemic classification of a memory block.
Constants§
- AUDIT_
MAGIC - Magic bytes for the audit log.
- DEFAULT_
SIM_ THRESHOLD - Maximum cosine similarity before two texts are considered echoes.
- EVIDENCE_
MAGIC - Magic bytes for the ledger file.
Functions§
- check_
promotion_ gate - Check whether a block is allowed to promote importance (C4 gate).
- class_
of_ flags - Compute the epistemic class from a flags byte (convenience for build/dream).
- confidence
- Compute confidence from an evidence record.
- content_
hash - Content-hash a text for ledger lookup (same FNV-1a as bump_entry_by_text_hash).
- flags_
with_ class - Encode a class into flags byte bits 0-2 (convenience for build).
- is_
echo_ cosine - Check if two texts are echoes using cosine similarity of their embeddings.
- link_
evidence - Link an independent Observation or Evidence to a claim.
- refute
- Record a refutation against a claim.