"""Synthetic Claude Usage proof fixtures. Run: python seed-claude-history.py <fixture-root>
Pass <fixture-root>/default-home as CLAUDE_CONFIG_DIR and <fixture-root>/claude-a
as CLAUDE_CUSTOM_HOME. Inherit both variables in T3_SCENARIO_INHERIT_ENV.
Point CODEX_HOME and OPENCODE_DATA_DIR at empty directories to isolate other providers.
"""
import json
import pathlib
import sys
root = pathlib.Path(sys.argv[1])
for home, count, day, output in [
    ('default-home', 20, '2026-11-03', 50000),
    ('claude-a', 5, '2026-11-12', 1000),
]:
    folder = root / home / 'projects' / 'synthetic'
    folder.mkdir(parents=True, exist_ok=True)
    with (folder / 'session.jsonl').open('w') as file:
        for index in range(count):
            record = dict(type='assistant', timestamp=day + 'T10:00:00Z',
                requestId=f'req_{home}_{index}', sessionId=home,
                message=dict(id=f'msg_{home}_{index}', model='claude-sonnet-4-5',
                    usage=dict(input_tokens=1000, output_tokens=output)))
            file.write(json.dumps(record) + '\n')
