가장 흔한 LLM testing 패턴은 모델 mock — mock_openai.return_value = "fake response". 테스트 영원히 통과. Production 은 망가짐 — SDK 가 parameter 바꿈, prompt drift, tool schema 가 required field 추가. Mock 은 fictional model 을 fictional behavior 에 pin, reality 가 아래에서 움직임.
Replay-based 가 답
실제 session 을 JSONL 로 capture. CI 에서 session event 를 코드에 replay (모델 출력은 JSONL 에서 mock, fixture 아님). Observable outcome 에 assert — final text, tool sequence, total cost. SDK 또는 prompt 변하면 정확한 line 에서 fail.
Mock vs replay 의 구체적 차이
- Mock: 'When called with X, return Y' (fictional)
- Replay: 'Real call 에서 정확히 이 events 받았어 — 코드가 같은 final state 도달하는지?'
cwkPippa JSONL 은 encrypted at rest
Per-conversation JSONL 에 line-level Fernet encryption, office Mac Keychain 에 passphrase. Peer Mac 들은 opaque blob 으로 fleet rsync round-trip, plaintext 절대 X. 2026-04-28 ship.