Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch has not been deployed
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.
Using each record's dictionary insertion order as column order puts values in the wrong columns when records are reordered or have different fields. Reuse the existing file/sheet header and map values by field name.
CSV reads its existing header, leaves missing fields empty, and rejects new fields before appending. Callers can start a new file or explicitly migrate the schema. Excel preserves existing columns and appends newly seen fields on the right, leaving earlier rows empty in those columns. The CSV header read is offloaded with asyncio.to_thread.
Validation: all 7 regression tests fail before the fix. This isolated branch passes all 103 tests (Python 3.11, Windows with PYTHONUTF8=1). Tests reopen actual CSV/XLSX files and cover new writer instances, reordered/missing/unknown fields, and all 5 Excel sheet types.
This branch contains only schema mapping. It does not include the separate formula escaping or atomic-write changes. See docs/export-schema.md. Fork tracking and CI: PR #22. Related report: saksim#6.