Repository navigation
[Repo Assist] refactor(rust-guard): hoist PR-status integrity build; let-else in visibility lookup - #17167
Merged
lpcox merged 1 commit intoNov 23, 2026
Conversation
…n visibility lookup Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the changes are described as behavior-preserving refactoring of label reuse and decode-error handling.
No open issues 🎉
What changed in this PR
This pull request performs a behavior-preserving Rust refactor that reuses shared integrity labels across response items and simplifies repository-visibility decode error handling.
Changes:
- Converts pull-request content and status integrity labels to
SharedLabelsfor cheaper reuse. - Generalizes
repo_default_labelsto accept values convertible toSharedLabels. - Replaces two visibility-response decode
matchblocks with equivalentlet ... elseexpressions.
| File | Description |
|---|---|
| guards/github-guard/rust-guard/src/labels/response_paths.rs | Reuses shared integrity labels for pull-request content and status response items and updates the label helper signature. |
| guards/github-guard/rust-guard/src/labels/backend.rs | Simplifies UTF-8 and JSON decode failure handling during repository visibility lookup without changing behavior. |
Review effort: Lite (adaptive)
Contributor
Author
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Notes:
No label applied (run is not an unqualified PASS).
|
lpcox
deleted the
repo-assist/improve-rust-guard-hoist-integrity-20261123-485a7581603ba437
branch
November 23, 2026 16:11
This was referenced Nov 23, 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.
🤖 This is an automated PR from Repo Assist.
Implements both improvements from #17159.
Changes
response_paths.rs: theget_check_runs/get_statusblock now buildswriter_integrityonce as aSharedLabelsand clones theArcper item. Theget_files/get_diffblock likewise converts its integrityVectoSharedLabelsonce instead of cloning aVecper item.repo_default_labelsnow takesimpl Into<SharedLabels>, so existingVec<String>callers compile unchanged.backend.rs: the two decode-failurematchblocks in the repo visibility lookup becomelet ... else. Log messages and return values are unchanged.No behaviour change.
Test Status
cargo build: passcargo test: 734 passed, 0 failedcargo clippy --all-targets: cleanrustfmt --checkon both touched files: cleanRefs #17159 (not closing — leaving that to maintainers).
Add this agentic workflow to your repo
To install this agentic workflow, run