# 2026-02-07

## Morning
- Alice approved and merged caching PR #355
  - She suggested adding cache hit/miss metrics — added Prometheus counters
  - `cache_hits_total{layer="l1"}`, `cache_hits_total{layer="l2"}`, `cache_misses_total`

- Continued Milvus product search integration
  - Added batch embedding pipeline for product catalog import
  - Used OpenAI text-embedding-3-small, batching 100 products per API call
  - Full catalog (487K products) embedded in ~45 minutes
  - Embedding cache in SQLite prevents re-embedding unchanged products

## Afternoon
- Production incident: order-service OOM killed (14:23 - 14:47)
  - Cause: memory leak in the new caching middleware — LRU cache wasn't respecting max size under concurrent access
  - Fix: replaced `dict`-based LRU with `cachetools.LRUCache` (thread-safe)
  - Hotfix PR #361 merged and deployed within 20 minutes
  - Post-mortem scheduled for tomorrow

- Kafka webhook consumer testing
  - Integration test with Stripe test webhooks — all 12 event types handled correctly
  - Load test: sustained 500 events/sec with <100ms processing latency
  - Dead letter queue correctly catches malformed events
  - PR #358 approved by Alice, deploying to staging

## Evening
- Helped Diana debug a React hydration mismatch in the search results page
  - Cause: `Date.now()` called during SSR produces different value on client
  - Fix: use `useEffect` for timestamp display instead of inline rendering
  - Learned: Next.js App Router SSR is strict about hydration consistency
