From 6b085db8411bd6b99f0a53ca29359f6dfe82ad59 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 5 May 2026 17:12:06 +0000 Subject: [PATCH] feat(fixtures): replace toy passthrough sample with Claude/Gemini/Codex shapes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three vendor-shaped fixtures replace the synthetic `sample.json`. Each exercises a structurally distinct JSON payload through the live cribl/cribl preview API via the existing `pipelines.test.ts` auto-discovery: - `claude-code.json` — nested `message.content[]` with polymorphic `tool_use` entry, inline `usage` accounting, UUID `sessionId` - `gemini.json` — flat shape with `type` discriminator + `projectHash` - `codex.json` — turn-scoped `item.tool.result` with `rollout-` session and discrete `tool` field Each fixture keeps `datatype: 'cribl-demo'` so the existing route filter still matches; each `.expected.json` partial-matches the three Eval-stamped fields (`sourcetype`, `index`, `datatype`) plus one or two distinctive input fields per vendor. No pipeline, route, test-code, workflow, or doc changes. Downstream packs mirroring this template swap fixture content + filter/Eval as needed; the harness shape is unchanged. Shape sources (plausible, not byte-canonical): - Claude Code: https://code.claude.com/docs/en/agent-sdk/session-storage - Gemini CLI: https://github.com/google-gemini/gemini-cli/issues/15292 - Codex CLI: https://developers.openai.com/codex/cli/reference https://claude.ai/code/session_01W79ngAnJY1uRwMnTAEhBKH --- ...xpected.json => claude-code.expected.json} | 3 ++- tests/fixtures/passthrough/claude-code.json | 22 +++++++++++++++++++ .../fixtures/passthrough/codex.expected.json | 10 +++++++++ tests/fixtures/passthrough/codex.json | 12 ++++++++++ .../fixtures/passthrough/gemini.expected.json | 10 +++++++++ tests/fixtures/passthrough/gemini.json | 12 ++++++++++ tests/fixtures/passthrough/sample.json | 7 ------ 7 files changed, 68 insertions(+), 8 deletions(-) rename tests/fixtures/passthrough/{sample.expected.json => claude-code.expected.json} (53%) create mode 100644 tests/fixtures/passthrough/claude-code.json create mode 100644 tests/fixtures/passthrough/codex.expected.json create mode 100644 tests/fixtures/passthrough/codex.json create mode 100644 tests/fixtures/passthrough/gemini.expected.json create mode 100644 tests/fixtures/passthrough/gemini.json delete mode 100644 tests/fixtures/passthrough/sample.json diff --git a/tests/fixtures/passthrough/sample.expected.json b/tests/fixtures/passthrough/claude-code.expected.json similarity index 53% rename from tests/fixtures/passthrough/sample.expected.json rename to tests/fixtures/passthrough/claude-code.expected.json index 9573b8b..799633f 100644 --- a/tests/fixtures/passthrough/sample.expected.json +++ b/tests/fixtures/passthrough/claude-code.expected.json @@ -3,6 +3,7 @@ "sourcetype": "cribl:demo", "index": "main", "datatype": "cribl-demo", - "_raw": "demo event" + "type": "assistant", + "sessionId": "fe82a754-0606-4bcf-b79a-f7b6f2a72bc8" } ] diff --git a/tests/fixtures/passthrough/claude-code.json b/tests/fixtures/passthrough/claude-code.json new file mode 100644 index 0000000..e6941b9 --- /dev/null +++ b/tests/fixtures/passthrough/claude-code.json @@ -0,0 +1,22 @@ +[ + { + "datatype": "cribl-demo", + "_time": 1736836313.996, + "type": "assistant", + "sessionId": "fe82a754-0606-4bcf-b79a-f7b6f2a72bc8", + "message": { + "role": "assistant", + "model": "claude-opus-4-5-20251101", + "content": [ + { + "type": "tool_use", + "id": "toolu_abc", + "name": "Read", + "input": { "file_path": "/src/app.ts" } + } + ], + "stop_reason": "tool_use", + "usage": { "input_tokens": 1234, "output_tokens": 567 } + } + } +] diff --git a/tests/fixtures/passthrough/codex.expected.json b/tests/fixtures/passthrough/codex.expected.json new file mode 100644 index 0000000..140025a --- /dev/null +++ b/tests/fixtures/passthrough/codex.expected.json @@ -0,0 +1,10 @@ +[ + { + "sourcetype": "cribl:demo", + "index": "main", + "datatype": "cribl-demo", + "type": "item.tool.result", + "sessionId": "rollout-019ddfce-b73e-7230-ae24-a70b89c76982", + "tool": "exec_command" + } +] diff --git a/tests/fixtures/passthrough/codex.json b/tests/fixtures/passthrough/codex.json new file mode 100644 index 0000000..f40cacc --- /dev/null +++ b/tests/fixtures/passthrough/codex.json @@ -0,0 +1,12 @@ +[ + { + "datatype": "cribl-demo", + "_time": 1736850010, + "type": "item.tool.result", + "sessionId": "rollout-019ddfce-b73e-7230-ae24-a70b89c76982", + "turnId": "turn_001", + "tool": "exec_command", + "input": { "command": "grep -n 'def' api.py" }, + "output": "1: def get_user(id):\n5: def handle_error():" + } +] diff --git a/tests/fixtures/passthrough/gemini.expected.json b/tests/fixtures/passthrough/gemini.expected.json new file mode 100644 index 0000000..3100cab --- /dev/null +++ b/tests/fixtures/passthrough/gemini.expected.json @@ -0,0 +1,10 @@ +[ + { + "sourcetype": "cribl:demo", + "index": "main", + "datatype": "cribl-demo", + "type": "user", + "sessionId": "sess-abc123", + "projectHash": "proj-hash-xyz" + } +] diff --git a/tests/fixtures/passthrough/gemini.json b/tests/fixtures/passthrough/gemini.json new file mode 100644 index 0000000..a9bfa4d --- /dev/null +++ b/tests/fixtures/passthrough/gemini.json @@ -0,0 +1,12 @@ +[ + { + "datatype": "cribl-demo", + "_time": 1736850000, + "type": "user", + "id": "msg_1", + "sessionId": "sess-abc123", + "projectHash": "proj-hash-xyz", + "model": "gemini-2.0-flash", + "content": [{ "text": "Implement auth middleware" }] + } +] diff --git a/tests/fixtures/passthrough/sample.json b/tests/fixtures/passthrough/sample.json deleted file mode 100644 index ec57193..0000000 --- a/tests/fixtures/passthrough/sample.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "_raw": "demo event", - "_time": 1714137600, - "datatype": "cribl-demo" - } -]