Private
Public Access
0
0
Files
manual_slop/tests/fixtures/synthetic_src/ai_client.py
T
ed 0690dcef5f test(audit): Phase 10 - 7 integration tests against synthetic src/
Updated synthetic ai_client.py + aggregate.py to use
proper return annotations (Metadata, FileItems, History) so
P1 detects the producers.

7 integration tests:
1. synthetic src/ produces 10 real + 3 candidate profiles
2. Metadata has >=1 producer (after fixing fixture annotations)
3. Metadata memory_dim is 'discussion' (canonical)
4. FileItems memory_dim is 'curation' (canonical)
5. History memory_dim is 'discussion' (canonical)
6. Missing audit_inputs tolerated
7. render_rollups produces 4 non-empty rollup files

131 tests total passing.
2026-06-22 02:05:02 -04:00

26 lines
627 B
Python

"""Synthetic AI client for the v2 audit integration tests."""
from __future__ import annotations
from typing import Any, List
Metadata = dict[str, Any]
History = List[dict[str, Any]]
def send_result() -> Metadata:
data: Metadata = {"role": "user", "content": "hello"}
return data
def append_history() -> History:
data: History = []
return data
def to_list(history: History) -> History:
out: History = []
for entry in history:
role = entry["role"]
content = entry["content"]
out.append({"role": role, "content": content})
return out
def process(metadata: Metadata) -> str:
role = metadata["role"]
return role