#19569·omi

Cleanup: leftover references to memory modules deleted in #12697

Author: Git-on-my-levelCreated Sep 28, 2026Updated Sep 28, 2026
Labelsgood first issuebackendchoretech debt

Leftovers from the #12697 review, all still present on main:

  1. Stale provenance string. backend/utils/llm/working_observations.py persists "source": "utils.llm.working_memory.extract_l1_memory_archive_items_from_text", but that module was deleted. Point it at the surviving utils.llm.working_observations function. Nothing parses the old string.
  2. Stale doc citations. backend/docs/memory/domain_model.md still cites the deleted working_memory.py, l2_memory_routes.py and durable_memory_patches.py (4 references) as current code locations. Update them to the surviving canonical modules.
  3. Dead exports. memory_contracts.py exports L2MemoryRoute, SourceBackedMemoryCandidate and DURABLE_MEMORY_PATCH_FACT_SOURCE, which have no remaining external callers. Remove them, or wire them in if a caller should exist.

Acceptance criteria

  • One PR fixes all three; confirm each with git grep against current main first.
  • The dead-code ratchet and backend tests (via backend/test.sh) pass.