fix(windows): preserve binary bytes in anchored file reads - #7077
allenliang2022 wants to merge 1 commit into
Conversation
|
| Filename | Overview |
|---|---|
| api/workspace.py | Correctly adds O_BINARY only to non-directory opens; POSIX behavior remains unchanged because the optional flag resolves to zero. |
| tests/test_media_message_snapshots.py | Adds focused coverage for Windows Ctrl-Z truncation and verifies that file and directory opens retain distinct flag contracts. |
Reviews (1): Last reviewed commit: "fix(windows): open anchored files in bin..." | Re-trigger Greptile
…6871), mobile nav order (#6909) (#7099) * fix(navigation): preserve mobile action mirror order Reposition stale extension action mirrors during synchronization without moving already-correct elements, preserving native tab order and keyboard focus. Assisted-by: Hermes Agent:gpt-5.6-sol Assisted-by: Codex:gpt-5.6-luna Assisted-by: Claude Code:claude-opus-5 * fix(typography): route native controls through UI font Assisted-by: Hermes Agent:gpt-5.6-sol Assisted-by: Codex:gpt-5.6-luna Assisted-by: Claude Code:claude-opus-5 * fix(windows): open anchored files in binary mode * docs(changelog): note #7077 O_BINARY, #6871 native-control font, #6909 mobile nav order --------- Co-authored-by: starship-s <45587122+starship-s@users.noreply.github.com> Co-authored-by: allenliang2022 <allenliang2022@users.noreply.github.com> Co-authored-by: n <a@n>
|
Shipped in experimental release exp-v0.52.234. Non-directory anchored file opens now set 🤖 Released by the release-manager agent. |
…l font (nesquena#6871), mobile nav order (nesquena#6909) (nesquena#7099) * fix(navigation): preserve mobile action mirror order Reposition stale extension action mirrors during synchronization without moving already-correct elements, preserving native tab order and keyboard focus. Assisted-by: Hermes Agent:gpt-5.6-sol Assisted-by: Codex:gpt-5.6-luna Assisted-by: Claude Code:claude-opus-5 * fix(typography): route native controls through UI font Assisted-by: Hermes Agent:gpt-5.6-sol Assisted-by: Codex:gpt-5.6-luna Assisted-by: Claude Code:claude-opus-5 * fix(windows): open anchored files in binary mode * docs(changelog): note nesquena#7077 O_BINARY, nesquena#6871 native-control font, nesquena#6909 mobile nav order --------- Co-authored-by: starship-s <45587122+starship-s@users.noreply.github.com> Co-authored-by: allenliang2022 <allenliang2022@users.noreply.github.com> Co-authored-by: n <a@n>
Thinking Path
O_BINARYuse text semantics.0x1Abyte occurred at offset 568 was therefore reported and served as 568 bytes even though its real size was 5,248,045 bytes.O_BINARY; the shared anchored-open helper did not.What Changed
O_BINARYflag to non-directory opens inopen_anchored_fd().Why It Matters
Without this flag, arbitrary binary workspace files can be truncated at the first DOS Ctrl-Z byte on Windows. For video snapshots this produces invalid Range lengths and browser playback failures even though the source file and checksum are valid.
Verification
origin/master: RED,actual_size == 568instead of4665.23 passed, 7 skipped.origin/master + 1 commitbranches. A cleanorigin/mastercontrol reproduced the failures (or classified the remaining two as one platform skip and one concurrency-only pass). No failure was unique to this branch.python -m py_compile api/workspace.py tests/test_media_message_snapshots.pygit diff --checkRisks / Follow-ups
O_DIRECTORYand do not receiveO_BINARY.O_BINARYresolves to zero on platforms that do not define it, preserving existing POSIX behavior.