web/lib/api.ts: defer NEXT_PUBLIC_API_BASE placeholder check from
module-load to first call. Docker bakes the literal placeholder for
runtime sed substitution, but Next.js evaluates this module during
static export of every prerendered page — the old throw failed the
admin/users page export and aborted the entire build.
Test alignment with shipped code (no behavior change):
- test_path_service: override _workspace_root alongside _project_root,
since get_memory_dir() reads workspace_root, not _user_data_dir.
- test_meta_settings: assertions now match shipped defaults
(l2_budget=20, min_chunk_chars=1000, max_chunk_chars=64000).
- test_unified_ws_turn_runtime + test_regenerate: drop emit_calls
assertions; turn_runtime doesn't emit a memory trace after chat
turns (feature was never wired up).
- test_turn_runtime_subscribe: 200 polls × 10ms instead of 20 × 0,
Python 3.14's asyncio scheduler doesn't give sleep(0) enough ticks
for the subscriber-append race.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the flat single-blob memory page with a structured store:
- L1 captures raw run traces; L2 holds normalized document records;
L3 holds curated slots per surface (chat, notebook, book, TutorBot).
- New consolidator pipeline (chunker, guards, parse, references, runs,
modes, line-doc, meta) turns traces into versioned line-oriented
documents with stable ids and snapshot history.
- Per-user isolation flows through PathService; the store API is
stateless.
UI ships a dedicated /memory workbench with graph / L1 / L2 / L3 /
resolve subpages, plus a reusable MemorySection embedded where the
legacy panel lived.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>