Repository navigation
Fix CSV exports rejecting valid large fields - #54
Merged
mohsen1 merged 1 commit intoNov 17, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CSV exports currently reject valid cells larger than Python's default 131,072-character field limit, even when the response is well below the SDK's 8 MiB limit. For example, a synthetic findings export containing a 150,000-character claim raises
urn:proofline:sdk:invalid-responsein both clients, while the equivalent NDJSON page succeeds. This affects consumers exporting verbose findings or large JSON-valued cells. The bundled finding schema has nomaxLengthon claim or impact; the reproduction uses a loopback server, not evidence of hosted API output.The fix adds a private parser for the existing CSV dialect, preserving quoted commas, doubled quotes, Unicode, embedded CR/LF, empty cells, and EOF behavior. It avoids changing
csv.field_size_limit(), which would affect unrelated readers in the caller's process. The decoder retains header/row validation, raw response text, string cells, metadata, and typed errors, and enforces the existing 8 MiB byte bound when called directly. Public signatures, generated code, and the API contract are unchanged.Validation on Windows / CPython 3.14.3:
python scripts/check.py: 162 passed, 8 subtests passed, generation and contracts, Ruff lint/format, mypy, wheel/sdist builds, and installed-artifact sync/async HTTP smoke tests.csv.reader(strict=True)in an automated compatibility test. An independent AI-assisted review also compared 150,000 randomized inputs without finding a difference.To reproduce the regression tests:
python scripts/check.py --prepare .venv/bin/python -m pytest tests/test_exports.py tests/test_http.py -k 'export or csv' -qOn Windows use
.venv/Scripts/python.exe; install the bootstrap's pinneduv 0.13.7first if it is not already on PATH.Proofline review: fork PR #1, hosted review, run 1, completed on 16 November 2026. The checksum-verified Windows CLI 0.2.16 retrieved the automatic review using
proofline review --repo veliunusdu/sdk-python --pr 1 --json. Its recorded code assessment isCOMPLETED, withincompleteness_kind: nulland zero findings, for head399d4452acd0919b44949668347e15bc2569cda8against base0b08aa6388193efd0a6ee45c1675dba1fb70a624. The pushed branch still matches that reviewed head.Feedback decisions: no findings were returned, so none were accepted or rejected and no review-driven changes were made. I retained the tested fix. This was a code-only review without a linked cloud environment; zero findings does not establish that every possible defect was excluded.