Skip to content

fix: mismatch in roundtrip#168

Merged
stephantul merged 2 commits into
mainfrom
fix-read-write-roundtrip
May 29, 2026
Merged

fix: mismatch in roundtrip#168
stephantul merged 2 commits into
mainfrom
fix-read-write-roundtrip

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

We stored bytes but read them as non-bytes. This is fine for most code, since code is often just ASCII, but would crash on non-ascii

closes #167

@stephantul stephantul requested a review from Pringled May 29, 2026 07:11
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/index/index.py 100.00% <100.00%> (ø)
src/semble/version.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 29, 2026

Confidence Score: 5/5

Safe to merge — the change is a minimal, targeted correction of a read/write mode mismatch with no side effects.

The two-line fix directly aligns load_from_disk with save: both now use binary I/O, which is what orjson expects. No logic is altered, and orjson.loads already handles bytes input, so the roundtrip is now fully consistent for any content including non-ASCII.

No files require special attention.

Reviews (2): Last reviewed commit: "up version" | Re-trigger Greptile

@stephantul stephantul merged commit ea3c918 into main May 29, 2026
16 checks passed
@stephantul stephantul deleted the fix-read-write-roundtrip branch May 29, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'gbk' codec can't decode

2 participants