Skip to content

v0.1.7 — system-event laundering fix (security) + derived_from

Choose a tag to compare

@qspencer qspencer released this 13 Jul 14:56
  • security (ingest/gate/compile): closed the system-event laundering
    bypass — third-party text embedded inside a SYSTEM/USER-authored event (a
    triage verdict quoting a received email's subject, a summary of a message
    body) previously acquired the event's full trust and could surface as
    assertable user facts. remember() gains derived_from: declare
    author=SYSTEM, derived_from=THIRD_PARTY and trust is capped at the minimum
    of the two — edges cap at use_only (claims still quarantine), and the
    episode routes to the unverified channel at the gate and is excluded from
    the compiled wiki (episodes now route by third-party influence, not
    authorship alone). Provenance records both fields; MCP remember exposes
    the parameter; documented in docs/concepts.md ("Mixed provenance") and
    SECURITY.md. Found by the first production consumer on a real-mailbox
    backfill (130 laundered assertable edges); reported in
    proposals/system-event-laundering.md with the attack fixture now locked as
    a regression test.

  • ingest: an unparseable extraction no longer leaves a history gap — the
    turn records a content-free placeholder episode ("(unprocessed event —
    extraction returned no parseable JSON; content not retained)") with full
    provenance/evidence_ref. Deliberately not the raw event text: that would
    feed unmediated, possibly adversarial input straight into recall prompts.

  • _json: among list fallbacks, extract_json now prefers a non-empty
    list of dicts (the shape of a bare triples array) over junk like [] or
    [1, 2] that happened to parse earlier in the prose.

  • graph: his/her removed from the value-equivalence filler list — they
    can point at a third party ("his assistant" vs "her assistant") and so carry
    meaning; user-referential possessives (my/our/their) remain filler.

  • examples: openai_provider.pyOpenAIComplete wraps any
    OpenAI-compatible chat-completions API (OpenAI, vLLM, Ollama's /v1), with
    per-role model mapping, honest structured-output fallback, and a memoized
    capability check. First outside contribution — thanks @vreddy-commits (#8).