[loop-generated] [test] Add unit tests for memory/unified.py — 201 lines at 36% coverage #351

Closed
opened 2026-03-19 01:10:25 +00:00 by hermes · 2 comments
Collaborator

Problem

src/timmy/memory/unified.py has 201 lines and only 36.4% test coverage (56 lines missed). It handles unified memory access — a critical path for Timmy's memory system.

What to test

  • Initialization and config loading
  • Memory read/write operations
  • Query and search functionality
  • Error handling for missing/corrupted data
  • Integration with the broader memory system

Source files

  • src/timmy/memory/unified.py (201 lines)
  • Reference: tests/timmy/test_memory_system.py for patterns

Verification

tox -e unit

All existing 1744 tests must pass. Target: 15+ new tests, coverage above 80%.

## Problem `src/timmy/memory/unified.py` has 201 lines and only 36.4% test coverage (56 lines missed). It handles unified memory access — a critical path for Timmy's memory system. ## What to test - Initialization and config loading - Memory read/write operations - Query and search functionality - Error handling for missing/corrupted data - Integration with the broader memory system ## Source files - `src/timmy/memory/unified.py` (201 lines) - Reference: `tests/timmy/test_memory_system.py` for patterns ## Verification ``` tox -e unit ``` All existing 1744 tests must pass. Target: 15+ new tests, coverage above 80%.
Author
Collaborator

Obsolete: memory/unified.py belongs to old codebase being retired in Claude Code pivot.

Obsolete: memory/unified.py belongs to old codebase being retired in Claude Code pivot.
Author
Collaborator

Kimi instructions:

Add unit tests for src/timmy/memory/unified.py (currently at 36.4% coverage, 88 stmts / 56 missed).

Files to modify:

  • tests/timmy/test_memory_system.py (add tests for UnifiedMemory)

What to test:

  1. UnifiedMemory.__init__() — initialization with config
  2. store() — storing memories with different types
  3. search() — searching across tiers (hot, vault, semantic)
  4. get_context() — context assembly for queries
  5. forget() — memory deletion
  6. Integration between tiers

Key missed lines: 27-33, 38-67, 78-155, 160-161

How to verify:

tox -e unit -- tests/timmy/test_memory_system.py -v

Target: raise coverage from 36% to at least 75%. Mock database and embedding calls.

**Kimi instructions:** Add unit tests for `src/timmy/memory/unified.py` (currently at 36.4% coverage, 88 stmts / 56 missed). **Files to modify:** - `tests/timmy/test_memory_system.py` (add tests for UnifiedMemory) **What to test:** 1. `UnifiedMemory.__init__()` — initialization with config 2. `store()` — storing memories with different types 3. `search()` — searching across tiers (hot, vault, semantic) 4. `get_context()` — context assembly for queries 5. `forget()` — memory deletion 6. Integration between tiers **Key missed lines:** 27-33, 38-67, 78-155, 160-161 **How to verify:** ``` tox -e unit -- tests/timmy/test_memory_system.py -v ``` Target: raise coverage from 36% to at least 75%. Mock database and embedding calls.
kimi was assigned by hermes 2026-03-19 01:26:10 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#351