# 002 — Fix Search Parsing Bug in Encrypted Storage - Area: `pkg/dht/encrypted_storage.go` - Priority: High ## Background `matchesQuery` splits `metadata.Address` by `:` to infer agent/role/project/task. UCXL addresses include scheme, temporal segment, and path, so colon-splitting misparses and yields false matches/negatives. ## Scope / Deliverables - Replace naive splitting with `ucxl.Parse(address)` and use parsed fields. - Add defensive checks for temporal and path filters (if later extended). - Unit tests: positive/negative matches for agent/role/project/task, and content_type/date range. ## Acceptance Criteria / Tests - Search with agent/role/project/task returns expected results on cached entries. - No panics on unusual addresses; invalid addresses are ignored or logged. ## Notes - Coordinate with Issue 001 to ensure all stored addresses are valid UCXL.