Skip to content

feat(export): add JSONL_FLAT export format (HYBIM-788)#74

Merged
etserend merged 1 commit into
mainfrom
feat/HYBIM-788-port-6ccd06a
Jul 15, 2026
Merged

feat(export): add JSONL_FLAT export format (HYBIM-788)#74
etserend merged 1 commit into
mainfrom
feat/HYBIM-788-port-6ccd06a

Conversation

@etserend

@etserend etserend commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Ports upstream commit 6ccd06a from rungalileo/galileo-python (PR #621)
  • Adds JSONL_FLAT = "jsonl_flat" to LLMExportFormat enum
  • Extends ExportClient.records() decode path to treat JSONL_FLAT identically to JSONL
  • Adds jsonl_flat value to openapi.yaml LLMExportFormat schema

Stacked on: #73 (feat/HYBIM-788-port-e42a569 — include_code_metric_metadata)

Test plan

  • poetry run pytest tests/test_export.py -v — 18 passed
  • test_export_records_jsonl_flat — new test verifying JSONL_FLAT decodes records correctly and sets export_format on request body
  • ruff check src/splunk_ao/ — clean
  • No stray from galileo. imports in src/splunk_ao/

🤖 Generated with Claude Code

@etserend etserend marked this pull request as ready for review July 13, 2026 21:46
@etserend etserend changed the base branch from feat/HYBIM-788-port-e42a569 to main July 13, 2026 21:50

@fercor-cisco fercor-cisco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

@fercor-cisco

Copy link
Copy Markdown
Collaborator

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:

Upstream file Change Ported?
`openapi.yaml` add `jsonl_flat` to LLMExportFormat enum ✅ identical
`src/galileo/export.py` `== JSONL` → `in (JSONL, JSONL_FLAT)` ✅ identical (→ `src/splunk_ao/export.py`)
`.../models/llm_export_format.py` add `JSONL_FLAT = "jsonl_flat"` ✅ identical
`tests/test_export.py` add `test_export_records_jsonl_flat` ✅ ported

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

fercor-cisco
fercor-cisco previously approved these changes Jul 13, 2026
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

Copy link
Copy Markdown
Collaborator

What changed after the approval

Nothing substantive. The port itself is unchanged; the branch was just rebased onto a newer `main`.

Timeline:

  • Approval was at commit `1e42f6a` (2026-07-13). That commit is no longer in the branch history — the branch was force-pushed/rebased.
  • Current HEAD is `f2d7a55` with the same commit message.

Comparing the approved commit against the current HEAD, the three files carrying the actual JSONL_FLAT port are byte-identical:

File Change since approval
`src/splunk_ao/export.py` none
`src/splunk_ao/resources/models/llm_export_format.py` none
`tests/test_export.py` none
`openapi.yaml` one added block (see below)

The only diff is in `openapi.yaml` — an `include_code_metric_metadata` property block. This is a rebase artifact, not a real change to this PR:

Bottom line

The JSONL_FLAT feature — enum value, schema entry, decode-path handling, and test — is exactly what was approved. The post-approval force-push only rebased the branch onto a newer `main`, pulling in an unrelated `openapi.yaml` block that was already reviewed and merged separately (#73). The approval shows as dismissed because the force-push invalidated the approval commit, so it needs a re-approve, but there's no new logic to re-scrutinize.

@etserend etserend merged commit 3e3bf73 into main Jul 15, 2026
13 checks passed
@etserend etserend deleted the feat/HYBIM-788-port-6ccd06a branch July 15, 2026 18:18
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants