#memory
14 files tagged memory.
Context Assembler.Test
/** * ContextAssembler tests (H4.1). * * Proves: * - Budget NEVER exceeded: table-driven over budgets {0, tiny, ex…
Compactor.Test
/** * Compactor tests (H4.5). * * Proves: * - Compactor output records all validate against memory-record.schema.j…
Scope Wall.Test
/** * ScopeWall tests (H4.3). * * Proves: * - Same-scope read works (constructor requires scope) * - Cross-scop…
Helpers
/** * Test helpers for memory module tests. * * Provides: * - FakeD1: in-memory SQLite (bun:sqlite) implementing D…
Pointer Hierarchy.Test
/** * PointerHierarchy tests (H4.4). * * Proves: * - memory_expand round-trips: put full text in fake BlobStore → …
Promotion Engine.Test
/** * PromotionEngine tests (H4.2). * * Proves: * - Promotion fires at EXACTLY m_promote distinct traces (not m-1;…
Semantic Index.Test
/** * SemanticIndex contract test suite. * * Shared tests run against BOTH Fts5Index (with fake D1/SQLite) and * Vec…
Index
/** * Loop 4 — Memory Service: thin worker shell. * * Factory: pick VectorizeIndex when env.SEMANTIC binding present,…
Pointer Hierarchy
/** * H4.4 — Pointer Hierarchy. * * topic → summary → episodic_ref (R2 key). * * memoryExpand(record_id): resolve e…
Promotion Engine
/** * H4.2 — Promotion Engine. * * episodic → semantic: when a pattern recurs across ≥ m_promote distinct traces. * …
Scope Wall
/** * H4.3 — Scope Wall. * * All reads/writes carry a required scope. Default read path filters to the * caller's sc…
Semantic Index
/** * H4.6 — SemanticIndex: search abstraction with two implementations. * * VectorizeIndex — wraps Cloudflare Vecto…
Compactor
/** * H4.5 — Compactor: summarize raw working context into semantic MemoryRecords. * * compactStage(goal_id, stage_id…
Context Assembler
/** * H4.1 — Context Assembler. * * assembleContext({scope, goal_id, query, token_budget}): * 1. Query SemanticIndex…