Skip to content

Share artifact integrity labels instead of cloning per-item vectors - #16282

Merged
lpcox merged 2 commits into
mainfrom
copilot/rust-guard-shared-labels-implementation
Nov 10, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/rust-guard-shared-labels-implementation

Conversation

Copilot AI commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Artifact responses deep-copy integrity label vectors for every item. Constructing SharedLabels once replaces those copies with reference-count increments, preserving label values.

  • Implementation: Convert integrity labels before the ISSUE_ARTIFACT_READ | ISSUE_ARTIFACT_WRITE loop; use integrity.clone() per item.
  • Regression coverage: Check unchanged labels and shared allocation across multiple items for both tools and public/private repositories.

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
Copilot AI requested a review from lpcox November 10, 2026 16:48
@lpcox
lpcox marked this pull request as ready for review November 10, 2026 16:56
Copilot AI adaptive review requested due to automatic review settings November 10, 2026 16:56

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.

🟢 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 SharedLabels once 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rust-guard] Rust Guard: share ISSUE_ARTIFACT integrity labels via SharedLabels instead of per-item Vec clone

3 participants