Phase 3 core memory substrate

Full HTTP-level lifecycle test: write with PII → redaction verified, dedup → no duplicate, near-dup → supersession, search → ranked correctly, GDPR delete → clean cascade.

Milestone 3.E.2 — End-to-End Memory Lifecycle Test

Status: Planned
Goal: Track E — Exit Gate
Phase: 3 — Core Memory Substrate
Estimated effort: 2 days


Why This Milestone Exists

One real HTTP-level test proving the full lifecycle works through the actual service boundary, not through direct Python function calls — the Phase 3 equivalent of make e2e-smoke for Phase 2 chat completions.


Script

infra/scripts/verify_phase3_memory_e2e.sh (new, sibling to verify_phase15.sh)

Flow

  1. POST /v1/memories with plaintext content containing a fake SSN → assert response shows redacted content
  2. POST /v1/memories with identical content_hash → assert 200 with existing memory ID (no duplicate insert)
  3. POST /v1/memories with content >0.92 cosine-similar to an existing memory → assert supersession/merge workflow triggered (superseded_by populated)
  4. GET /v1/memories/search?query=... → assert results ranked by composite scoring formula, ordering verified against precomputed expected ranking
  5. Trigger GDPR org deletion → poll until memories count for that org = 0, MinIO archive objects = 0

Orientation (indicative)

Named paths, package layouts, libraries, schemas, env vars, and commands anywhere on this page are rough sketches for orientation — inspiration and a baseline, not a required change list.

During implementation, expect to:

  • open the live tree and follow existing patterns before inventing new ones
  • research current constraints (latency, tenancy, deploy shape, libraries) more deeply than this page can
  • advance the design beyond the sketch where measurement or code reality says so
  • land work in different filenames, merged packages, deferred docs, or new surfaces when the situation calls for it

Prefer outcomes over matching any particular file tree or command sequence.

Areas that may be involved (situational — not a checklist):

  • Evaluation / benchmarks
  • Memory service / repositories

Success signals

Outcome-oriented signals that the milestone is in good shape. Exact filenames, package layouts, and commands may differ from any sketches above.

  • Script exits 0 in CI against a fresh compose-test stack
  • Wired as make e2e-smoke-p3-memory (distinct from the deferred make e2e-smoke-p3 which bundled context assembly — that moves to Phase 3.5's own e2e gate)
  • Repo guards / CI checks still pass

Prerequisites

  • Milestone 3.E.1 (security integration suite)
  • All Track C and D milestones
Edit on GitHub

Last updated on

On this page

0%