Skip to content

P1: Persist trust/provenance state on memory rows (src=) and surface it in injection #37

Closed

Description

@abogartz

Part of #83.

Problem

runWriteGate computes the grounding of every write (refs / canonical / grounded_by=engagement / trusted) but persists it only to evidence. The row itself carries no trust tier, so a user-stated preference and a model guess mined by auto-capture are the same object at read time. This is exactly the weakness the Agent Memory Atlas records for Prime Agent ("No trust state. A user's confirmed preference and a model's guess are the same object").

Safety Does Not Compose (arXiv:2608.27141) shows a decaying score and a latched state are different kinds of objects — so this must be a state field, not a confidence number.

Proposal

  • Add src=user|verified|engagement|capture|import to the row schema (written at gate time; imports/capture set theirs; user when the write was an explicit user remember-request).
  • Render it in formatMemory like the existing whitelisted [via …] tags (same forgery rules: fixed vocabulary, never raw user tags).
  • Use as a ranking tie-break (user > verified > engagement > capture/import) once the recall bench can measure the effect.

Cost

Small; touches schema.ts, gates.ts (already knows), inject.ts formatting, viewer display.

Merged scope — session pointers on auto-captured rows (was #39)

Captured rows also carry no pointer back to the session they came from. Same claim (the row carries no provenance), same schema change, so this rides here:

  • The capture pipeline stamps the source sessionID (and an approximate last-activity timestamp) into the row before the write gate — a dedicated from_session= field alongside src=, under the same forgery rules: fixed vocabulary, never raw user tags.
  • memory_evidence / the viewer can then join a memory back to the transcript that justified it; the panel can show "captured from session X".
  • Import: rows already re-enter through the gates; keep the export header's origin info visible per-row where present.

The atlas verdict applies verbatim to both halves: "Treating a model's rationale as evidence. A turn id would cost nothing."

Activity

  1. added
    store-security
    on Oct 24, 2026
  2. abogartz commented on Oct 27, 2026

    @abogartz
    OwnerAuthor

    Closed as completed — provenance shipped in v0.6.0 (PR #32).

    The src= field became tags: PROVENANCE_TAGS = ["auto-capture", "import"] (src/inject.ts:49) persists origin on the row, and injected rows surface it ([via import] marker, stated in the memory_import contract). Import merges the import tag while preserving original tags, so provenance survives the round trip. The issue's intent — trust state persisted on rows and surfaced at injection — is satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    store-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions