Skip to content

Pseudo-cherry pick of ArgSliceVector fixes#1594

Merged
TalZaccai merged 1 commit into
devfrom
argSliceVectorCherryPick
Mar 2, 2026
Merged

Pseudo-cherry pick of ArgSliceVector fixes#1594
TalZaccai merged 1 commit into
devfrom
argSliceVectorCherryPick

Conversation

@kevin-montrose

Copy link
Copy Markdown
Contributor

ArgSliceVector fixes from 6ef5c5c can't be directly picked, since Namespaces aren't a thing yet.

Reimplements the change here, since it's more-or-less Vector Set agnostic.

…straight cherry-pick because Namespaces aren't a thing in dev yet
Copilot AI review requested due to automatic review settings March 2, 2026 22:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reimplements upstream ArgSliceVector safety fixes to avoid returning PinnedSpanByte instances that can become invalid after ScratchBufferBuilder grows its backing buffer, without relying on namespaces being available in this branch.

Changes:

  • Switches ArgSliceVector storage from List<PinnedSpanByte> to storing (Offset, Length) tuples into the scratch buffer.
  • Updates enumeration to reconstruct PinnedSpanByte instances from a snapshot of the scratch buffer at enumeration time.
  • Adds debug-time guards to discourage mutation during enumeration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/server/ArgSlice/ArgSliceVector.cs
Comment thread libs/server/ArgSlice/ArgSliceVector.cs
Comment thread libs/server/ArgSlice/ArgSliceVector.cs
Comment thread libs/server/ArgSlice/ArgSliceVector.cs
Comment thread libs/server/ArgSlice/ArgSliceVector.cs
@kevin-montrose kevin-montrose requested a review from TalZaccai March 2, 2026 22:31
@TalZaccai TalZaccai merged commit 48c6ccf into dev Mar 2, 2026
27 checks passed
@TalZaccai TalZaccai deleted the argSliceVectorCherryPick branch March 2, 2026 22:48
@github-actions github-actions Bot locked and limited conversation to collaborators May 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants