simonw--llm
527f84fd5d
LOGS_SQL and LOGS_SQL_SEARCH left join the calls table on responses.id (they share ids by construction). --json output now includes head_input_message_id and head_output_message_id. Rows that predate the DAG schema — or historical fixtures that only wrote to responses — get NULL for those columns, so existing tests are unaffected. Two new tests cover both cases: real prompt round-trip (fields populated) and legacy-shape rows (fields NULL). This is the minimum hook from the Deferred list in plans/dag-schema.md. Union-read (prefer calls over responses, reconstruct prompt/response from the DAG) is still deferred — a follow-up once there are calls rows without matching responses rows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>