Repository navigation
Fix ChunkedArrayWriter position at exact chunk boundaries - #10243
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes how ChunkedArrayWriter.Position is computed when the writer is exactly at a chunk boundary (i.e., _currentChunkOffset == BufferSize), ensuring the reported position/length reflects the correct flat byte count instead of losing the carry into the next chunk.
Changes:
- Fix
ChunkedArrayWriter.Positionto use arithmetic addition instead of bitwise OR so chunk-boundary positions carry correctly. - Add regression tests to validate
Position/Lengthat exact chunk boundaries and that captured boundary positions can be used to address subsequently written bytes (including via the scratch-buffer path).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/HotChocolate/Utilities/test/Utilities.Tests/ChunkedArrayWriterTests.cs | Adds regression coverage for Position and addressing correctness at exact chunk boundaries. |
| src/HotChocolate/Utilities/src/Utilities.Buffers/ChunkedArrayWriter.cs | Fixes Position computation so boundary offsets correctly increment the flat cursor. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Patch coverage100.0% of changed lines covered (1/1)
Project coverage: 54.5% (243355/446634 lines) |
This was referenced Aug 29, 2026
Merged
This was referenced Sep 7, 2026
Closed
Closed
Closed
This was referenced Sep 14, 2026
Closed
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#405
Closed
This was referenced Sep 21, 2026
Closed
Closed
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#410
Merged
This was referenced Oct 5, 2026
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.
No description provided.