Repository navigation
fix: read GAM's CSV with its backslash escape character - #67
Merged
Merged
Conversation
- GAM's setDialect escapes with a backslash; the parser had none, so a formatjson row whose JSON held a quote was dropped and backslashes came back doubled. - The mock's print users now prints GAM's escaped CSV; the property tests write GAM output with the escape. - scripts/gam_rc_table.py refuses a build whose CSV dialect moved and emits samples the suite reads back. - Adds the SwiftGamGui backport plan (Phase A approved; this is A1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
GAM writes every CSV with a backslash escape character (its
setDialect); the parser read without one, so aformatjsonrow whose JSON held a quote was dropped silently and backslashes came back doubled. Found by SwiftGamGui; item A1 of the new backport plan (Phase A approved). History: failure log.core/gam/parser.py: read withescapechar="\\"; argv unchanged.print usersprints GAM's escapedprimaryEmail,JSONCSV (was NDJSON); carol's record needs the escapes.scripts/gam_rc_table.py: under the build's Python, refuses a build whose CSV dialect moved and emits samples;tests/test_gam_csv_dialect.pyreads them back and holds the mock's bytes to GAM's writer.How it was verified
.venv/bin/python -m pytest -qpassesmake lintis clean (ruff + mypy)make a11ypasses anddocs/guide.mdsays what's new — n/a1609 passed offline; the real-reference mode (
GAM_RC_TABLEfrom python3.15,EXIT_CODES_REQUIRE_GAM=1) passes too. Without the parser fix, 8 tests fail.If it builds or runs a
gamcommandGAMCommandsas a list; each operator-supplied value is exactly one element (unchanged)ChangePreview→guard.enforce()in the apply route →_run_write— no write touchedLive status: Offline only, checked against bytes the vendored 7.49.02 build writes. A read-only check of a user whose title holds a quote is still owed.
Nothing private
🤖 Generated with Claude Code