fix: add encoding="utf-8" to plan_session_storage.py open() calls - #111
Open
realmaxc wants to merge 1 commit into
Open
fix: add encoding="utf-8" to plan_session_storage.py open() calls#111realmaxc wants to merge 1 commit into
realmaxc wants to merge 1 commit into
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.
The
plan_session_storage.pyfile has 6open()calls (lines 87, 95, 105, 139, 147, 154) that read and write JSON session files without specifying an encoding. On systems where the default locale is not UTF-8, plan sessions containing non-ASCII text (goal descriptions, user notes, candidate plan titles) will silently corrupt data or raiseUnicodeDecodeError.This adds
encoding='"utf-8"'to all 6 calls across bothPlanSessionStorage(create, get, list_all) andCandidatePlanStorage(create, get, list_by_session).Testing: Added
tests/test_pr_04_plan_session_encoding.pywith 3 tests:All 3 tests pass in the sandbox container.