Skip to content

Proposition pinning and eviction immunity #9

@jimador

Description

@jimador

Observation

Under memory pressure (too many propositions for the token budget), some propositions must be retained regardless of age, confidence, or access frequency. There's no mechanism for marking a proposition as "must retain."

  • "Patient is allergic to penicillin" — must never be evicted, even if old and unreferenced
  • Operator-designated ground truth — facts that define the rules of the context
  • Domain invariants — operating constraints the system must always respect

Without pinning, an adversarial user could indirectly evict critical facts by flooding the context with noise propositions that push important ones out of the budget.

What DICE already has

  • PropositionStatus — ACTIVE, SUPERSEDED, CONTRADICTED, PROMOTED — lifecycle state, but nothing means "never evict"
  • importance: ZeroToOne — high importance doesn't guarantee retention under pressure
  • metadata: Map<String, Any> — could carry pinned: true as a convention

Proposal

Something like:

data class Proposition(
    // ... existing fields ...
    val pinned: Boolean = false,
)

Behavior:

  • Eviction immune — never removed by budget enforcement or memory pressure
  • Decay immuneeffectiveConfidence() or decay policies (Memory tier classification #11) skip pinned propositions
  • Always injected — token budget enforcement (Proposition provenance metadata #7) includes pinned propositions first, then fills remaining budget from unpinned
  • Conflict protection — contradicting a pinned proposition could require explicit confirmation rather than automatic resolution

Repository additions:

fun pin(propositionId: String): Proposition
fun unpin(propositionId: String): Proposition
fun findPinned(contextId: ContextId): List<Proposition>

Backward-compatible: pinned = false is the default.

Open questions

  • Is a boolean sufficient? Or do you need pinning reasons and scopes (e.g., pinned for a specific conversation vs. globally)?
  • What if pinned propositions exceed the token budget? Should there be a hard limit on pinned propositions per context?
  • Should pinning be automatic? E.g., operator-sourced propositions are auto-pinned, user-sourced are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions