Repository navigation
fix(sdk): drop cached text when a binary write replaces it - #6534
Merged
VascoSch92 merged 1 commit intoNov 6, 2026
Merged
Conversation
Closed
75 of 86 tasks
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.
HUMAN:
Fixed the stale cache read from #6348. I reviewed the diff and the test; a write must never leave a reader seeing the previous content.
AGENT:
Why
LocalFileStore.writecaches text it writes, but the binary branch wrote the bytes and left the key's cached text in place. Overwriting a file that was cached as text withbytestherefore made the nextreadreturn the previous content, and the file on disk held the new bytes.Summary
test_bytes_overwrite_does_not_serve_stale_cachefrom theworktree-test-edge-casesbranch (commit f2fcf6e) without itsxfail(strict=True)marker, per the [Bug]: Edge-case tests expose ~70 bugs across the SDK, agent server, tools and workspaces #6348 menu's acceptance criteria.Issue Number
Part of #6348 (menu sub-item: "LocalFileStore.write(bytes) leaves the previous str cached, so a later read returns the old content")
How to Test
Before this change
readreturns the replaced text; after, it returns the bytes that were written.tests/sdk/io/is 23 passed.ruff check/formaton the touched files are clean.Type
Notes
Binary content is still not cached; only the stale entry is removed.