Repository navigation
feat(cli)!: export row-oriented results as JSON Lines - #5629
Conversation
- Support opt-in JSON Lines format (--format jsonl) for row-oriented results and collection views with clear record boundaries - Preserve stable source identities and stream records deterministically line-by-line - Emit final coverage and limitation metadata as a distinct line with https://rea.dev/schemas/jsonl-coverage-v1.json to prevent confusion with data rows - Distinguish error outputs with https://rea.dev/schemas/jsonl-error-v1.json - Reject non-row-oriented results that lack record boundaries with an unreadable_output error - Document JSON Lines streaming conventions in docs/cli.md - Add boundary tests covering empty results, multiline strings, partial coverage, large fields, and non-row rejection
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; both numbered findings are fixed and no new actionable issues remain. SummaryAdds row-oriented JSON Lines output while keeping source context separate from data rows.
Tests were not rerun because dependencies are absent. Whether another PR replaces this one could not be confirmed because GitHub access is unauthenticated. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Completed command result] --> B{Command failed?}
B -->|Yes| E[Write error record]
B -->|No| C[Apply output filter]
C --> D{One clear record collection?}
D -->|No| E
D -->|Yes| F[Build shared record plan]
F --> G{Token count requested?}
G -->|Yes| H[Count each encoded line]
G -->|No| I[Write rows and available context]
Reviews (4) · Last reviewed commit: "chore(cli): integrate current output con..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 722274e9cd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecd2f86bd1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Preserve complete non-row Evidence context, classify failures at their owner, and share bounded record serialization with exact-output token estimates. Retain SDK event streaming and await buffered diagnostics through finalization. BREAKING CHANGE: object collection JSONL results emit rows followed by a jsonl/v1 metadata record; unsupported document boundaries emit typed errors.
Use the parsed output controls from refreshed main throughout the launcher, result renderer and reusable CLI driver. Share the single-record encoder with token counting, including array-valued records. Update legacy non-row consumers for the declared JSONL contract and verify complete output plus token counting beyond the engine string limit.
|
@codex review Updated head |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
The final CI audit is complete for head CI checked out merge Observed baseline failures:
The Portable tests report contains 4 failed / 19,095 passed / 74 skipped assertions. Six more failures were visible only in canceled shard logs, so the aggregate alone was insufficient: shard 6, shard 4, shard 5. All seven canceled shard logs were checked. Cancellation leaves incomplete coverage; this is not a green/full CI claim. The feature's local validation remains 301 selected passing tests, The maintainer has explicitly authorized bypass for failures not introduced by this PR. The observed failures above will therefore be bypassed without modifying their unrelated producers. Raw controls, complete failure-set comparison and original CI artifacts are retained under |
--format jsonlnow exports supported collections as one data record per line, followed by ajsonl/v1metadata record that preserves non-row context, Evidence provenance, original coverage and unknowns. Classified and SDK-owned failures use explicit error records. CLI analysis/view workflows remain shared with MCP.The renderer prepares one collection plan, streams bounded writes, and estimates the exact emitted representation one line at a time. It preserves SDK generator events and standalone version/MCP doctor diagnostics, and waits for final writes through worker cleanup outcomes.
BREAKING CHANGE: JSONL object collections use row + metadata framing; reports/scalar selections without a supported record boundary return an actionable error. Use
--format jsonfor a complete document.$reais reserved on data records.Fixes #5487.
Validation:
npm run check,npm run docs:check(9 README tests), and 301 tests across 18 selected CLI/MCP/acceptance/consumer files passed. Real[email protected]analysis yielded 202 observation rows; all six refreshed before/after exports reconstructed identical full Evidence. Independent JSON/JSONL byte and digest checks passed beyond Node's string limit, including JSONL token counting from the actual file.CI is not green: all 10 observed failures (including six found only in canceled shard logs) reproduce with identical normalized diagnostics on actual CI base
592c46b001e46072a68915d093519b89e6baab5fand merge7251a0a934aab0d1b4263bc2494d21dad7f84ab2. Each selected control has 10 failed / 2 passed / 228 not executed; seven canceled shards leave incomplete coverage. Full attribution and limitations. Codex completed on this head without findings; Greptile reported 5/5 without new actionable findings.Completed-export medians on refreshed main
2443b949a: elapsed 4.510 → 4.576 s, child CPU 5.876 → 5.987 s, peak family RSS 496.3 → 495.1 MiB. Framing adds 114 bytes / 37 heuristic tokens; no speedup or token reduction is claimed. The large JSONL serialization/counting fixture peaked at 186.0 MiB. Methods, exact commands and unmeasured scope: verification report.Author readiness
Human owner: @vijaykiran06
Before merge
type(scope): outcome.