Repository navigation
fix(python-sdk): preserve Unicode separators in harness JSONL - #1148
santoshkumarradha merged 1 commit into
Conversation
Signed-off-by: Steven Huang <[email protected]>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Performance
✓ No regressions detected |
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
santoshkumarradha
left a comment
There was a problem hiding this comment.
Reviewed the JSONL delimiter handling and Unicode separator coverage. The focused Python harness CLI tests pass locally, and CLA plus required checks are green.
Summary
Preserve valid JSONL events containing literal U+0085, U+2028, or U+2029 in CLI output.
str.splitlines()treats those characters as record boundaries even inside JSON strings, so the shared parser silently discards the event. An OpenCode text event can consequently disappear while the provider reports success with no result.Split records on LF as specified by JSON Lines, retaining CRLF support and the existing handling of blank or malformed lines. This fixes the shared parsing path used by the OpenCode, Codex, and Pi providers.
Type of change
Test plan
OpenCodeProvider.execute(): before the fix,result=nulland 2 events; after the fix, exact text preserved and all 3 events. No model/API calls../scripts/test-all.sh: Control Plane and Go SDK passed in the cached Linux Go environment; Python SDK 2948 passed / 4 skipped / 38 deselected; TypeScript SDK 1383 passed / 1 skipped; Web UI 837 passed.cd sdk/python && ruff check .cd sdk/python && mypy --config-file mypy.ini agentfield/: 86 source files passed.make fmt tidy: completed; baseline-only formatting changes were reverted to keep this PR focused. No module files changed. Full tests then ran on the final tree.The repository's default exclusions for live/functional tests were retained. Web UI lint is opt-in in
test-all.shand was not enabled for this Python-only change.Test coverage
Checklist
docs/CONTRIBUTING.mdanddocs/DEVELOPMENT.md.