Implement read_file_bounded for Windows x64 using one file handle #9

Closed
opened 2026-12-02 19:01:31 +00:00 by faumaray · 1 comment
Owner

The Windows x64 game needs to read a complete checkpoint through one opened file, with a byte ceiling enforced before allocation and throughout the read. The file may be replaced or change size while a background load is pending. Reading from the same handle lets the decoder validate one coherent candidate or report an error.

At the current game pin and Library HEAD, the Windows branch of Void::FileSystem::read_file_bounded returns SystemErrorCode::unsupported. The POSIX branch already uses a single descriptor and checks the cap again as it reads. The positional IO backend also reports unsupported outside POSIX. Bounded read implementation · File worker backend · System path tests

Could the existing bounded read API support Windows x64 regular files with Unicode paths? An implementer could add one-open-handle coverage for empty and binary files, an exact-limit input, an input over the limit before reading, growth past the limit after the initial size check, and I/O errors partway through. The caller needs a typed limit or I/O error and no successful partial contents. Please document sharing behavior if another process replaces the file during the read.

The game can then replace its Win32 checkpoint read adapter once the same checks pass. File signatures, package compatibility and world validation are handled downstream. Game S15 · Related Windows write-side request #3

The Windows x64 game needs to read a complete checkpoint through one opened file, with a byte ceiling enforced before allocation and throughout the read. The file may be replaced or change size while a background load is pending. Reading from the same handle lets the decoder validate one coherent candidate or report an error. At the current game pin and Library HEAD, the Windows branch of `Void::FileSystem::read_file_bounded` returns `SystemErrorCode::unsupported`. The POSIX branch already uses a single descriptor and checks the cap again as it reads. The positional IO backend also reports unsupported outside POSIX. [Bounded read implementation](https://git.faumaray.com/Void/Library/src/commit/7b0fea6095f603f9e1904f66dfdc7752f4be4792/include/Void/System/Path.hpp) · [File worker backend](https://git.faumaray.com/Void/Library/src/commit/7b0fea6095f603f9e1904f66dfdc7752f4be4792/src/IO/FileWorkers.cpp) · [System path tests](https://git.faumaray.com/Void/Library/src/commit/7b0fea6095f603f9e1904f66dfdc7752f4be4792/tests/standalone/System/Path.cpp) Could the existing bounded read API support Windows x64 regular files with Unicode paths? An implementer could add one-open-handle coverage for empty and binary files, an exact-limit input, an input over the limit before reading, growth past the limit after the initial size check, and I/O errors partway through. The caller needs a typed limit or I/O error and no successful partial contents. Please document sharing behavior if another process replaces the file during the read. The game can then replace its Win32 checkpoint read adapter once the same checks pass. File signatures, package compatibility and world validation are handled downstream. [Game S15](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/10) · [Related Windows write-side request #3](https://git.faumaray.com/Void/Library/issues/3)
Author
Owner

Implemented on branch issue/9-windows-bounded-read (commit f3176c2).

Windows read_file_bounded (from #3) documented and covered: one handle, cap checked before allocation and per chunk, coherent view across concurrent replacement. Branch is stacked on issue #3.

Branch: https://git.faumaray.com/Void/Library/src/branch/issue/9-windows-bounded-read
Merge request: https://git.faumaray.com/Void/Library/pulls/new/issue/9-windows-bounded-read

Implemented on branch `issue/9-windows-bounded-read` (commit `f3176c2`). Windows `read_file_bounded` (from #3) documented and covered: one handle, cap checked before allocation and per chunk, coherent view across concurrent replacement. Branch is stacked on issue #3. Branch: https://git.faumaray.com/Void/Library/src/branch/issue/9-windows-bounded-read Merge request: https://git.faumaray.com/Void/Library/pulls/new/issue/9-windows-bounded-read
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#9