Skip to content

design: brain posterior read-path is unwired — recall ranking never consumes profiles (BrainProfileHint + PackTunable dead) #85

@ohdearquant

Description

@ohdearquant

Calibration study 2026-06-10 (workspace .khive/workspaces/20260610/recall-calibration/memo.md) confirmed what #62 suspected and Ocean observed directly ("I don't see how brain profile is impacting the retrieval"):

Verified by call graph (grep + read, spot-checked independently):

  • PackTunable::project_config() / apply_config() (khive-brain-core trait, khive-pack-memory impl) have zero production callers — only the impl's own unit tests call them.
  • BrainProfileHint in RecallConfig (crates/khive-pack-memory/src/config.rs:83) is dead config — defined, serde-defaulted, never read at ranking time.
  • The write path works (brain.feedback → events → posteriors). The read path (resolve profile → project posteriors into scoring config → apply per-recall) does not exist.

Needed: a design decision (ADR-level — it changes the pack contract) for where posterior projection happens:

  1. Per-recall: recall handler resolves caller's bound profile (brain.resolve semantics) and projects posteriors into the scoring config before ranking — fresh but adds a lookup per recall.
  2. On-activation: brain.activate pushes projected config into the memory pack's tunable state; recall reads cached state — fast, but staleness between updates.
  3. Hybrid: cached projection invalidated by brain event epoch.

Whichever is chosen must define: which posteriors map to which scoring tunables (the calibration variable inventory lists 22), the fallback when no profile is bound (global defaults), and namespace/actor resolution order (relates #75, and feedback auto-resolution per #62).

Relates #62 (posterior-serving verification is the test this design must make passable). Blocks any "profile impact" claims in product surface.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions