feat(export): add JSONL_FLAT export format (HYBIM-788)#74
Conversation
…HYBIM-788) Port upstream commit e42a569 from rungalileo/galileo-python. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Port upstream commit 6ccd06a from rungalileo/galileo-python (PR #621). Adds LLMExportFormat.JSONL_FLAT enum value and treats it identically to JSONL in the streaming decode path so callers can request flattened output. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.
Verdict: approve — Minimal, correct JSONL_FLAT port with matching enum/schema/decode changes and a targeted test.
Port verification: faithful ✅Compared this PR's port commit (`1e42f6a`) against upstream `6ccd06a` (rungalileo/galileo-python PR #621). Nothing from upstream is left out. Upstream touches 4 files, all ported 1:1:
Note: the extra files visible in the PR diff-against-`main` (`log_records_export_request.py` + the two `include_code_metric_metadata` tests) belong to the other stacked commit `10b2fb4` (porting `e42a569`), and are correctly out of scope for this port. Only deviation (cosmetic, not a loss)In the ported test, `root_type` was changed from upstream's `RootType.SESSION` to `RootType.TRACE`. Both are valid enum values, and `root_type` is irrelevant to what this test asserts (JSONL_FLAT decoding + `export_format` on the request body). Harmless — but matching upstream would minimize port drift. Verdict: every enum value, the decode-path change, the OpenAPI schema entry, and the test are all present and behaviorally equivalent. The only differences are the expected `galileo` → `splunk_ao` rename and the trivial `RootType` swap. No functionality lost. 🤖 Generated with Claude Code |
Summary
6ccd06afrom rungalileo/galileo-python (PR #621)JSONL_FLAT = "jsonl_flat"toLLMExportFormatenumExportClient.records()decode path to treatJSONL_FLATidentically toJSONLjsonl_flatvalue toopenapi.yamlLLMExportFormat schemaStacked on: #73 (feat/HYBIM-788-port-e42a569 — include_code_metric_metadata)
Test plan
poetry run pytest tests/test_export.py -v— 18 passedtest_export_records_jsonl_flat— new test verifying JSONL_FLAT decodes records correctly and setsexport_formaton request bodyruff check src/splunk_ao/— cleanfrom galileo.imports insrc/splunk_ao/🤖 Generated with Claude Code