Repository navigation
Share artifact integrity labels instead of cloning per-item vectors - #16282
Merged
Merged
Conversation
Co-authored-by: lpcox <[email protected]>
Copilot
AI
changed the title
[WIP] Improve Rust Guard to use SharedLabels for integrity labels
Share artifact integrity labels instead of cloning per-item vectors
Nov 10, 2026
lpcox
marked this pull request as ready for review
November 10, 2026 16:56
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the artifact-response label-sharing change.
No open issues 🎉
What changed in this PR
This PR reduces allocations in Rust guard artifact-response labeling by sharing integrity labels across items instead of deep-copying them, addressing #16266 without changing label values.
Changes:
- Construct
SharedLabelsonce for artifact read/write responses and clone the reference per item. - Add regression coverage for label values and shared allocation across both tools and public/private repositories.
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/labels/response_items.rs |
Shares artifact integrity labels and adds regression tests. |
Review effort: Balanced (auto)
This was referenced Nov 10, 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.
Artifact responses deep-copy integrity label vectors for every item. Constructing
SharedLabelsonce replaces those copies with reference-count increments, preserving label values.ISSUE_ARTIFACT_READ | ISSUE_ARTIFACT_WRITEloop; useintegrity.clone()per item.