Conversation
…or_from_str Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/39e51062-f61e-45d9-bd0a-5f6e0349f13c Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix redundant match arms in author_association_floor_from_str
fix(rust-guard): remove redundant match arm in Apr 12, 2026
author_association_floor_from_str
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Rust GitHub guard’s author_association_floor_from_str helper by removing a redundant match arm that returned the same value as the wildcard case, without changing behavior.
Changes:
- Removed the redundant
"FIRST_TIMER" | "NONE"match arm that was fully subsumed by the wildcard arm. - Added an inline comment clarifying that the wildcard also covers
FIRST_TIMER,NONE, and any unknown values.
Show a summary per file
| File | Description |
|---|---|
| guards/github-guard/rust-guard/src/labels/helpers.rs | Simplifies author_association_floor_from_str match logic by removing a redundant arm and clarifying fallback behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
This was referenced Apr 12, 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.
Two match arms in
author_association_floor_from_strboth returnedvec![], making"FIRST_TIMER" | "NONE"dead code — fully subsumed by the wildcard below it.Changes
guards/github-guard/rust-guard/src/labels/helpers.rs: Drop the"FIRST_TIMER" | "NONE"arm; fold into the wildcard with a clarifying comment.No behaviour change. The
lib.rsduplicate integrity-branch issue noted in the report was already resolved in the codebase.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/tmp/go-build4291131586/b514/launcher.test /tmp/go-build4291131586/b514/launcher.test -test.testlogfile=/tmp/go-build4291131586/b514/testlog.txt -test.paniconexit0 -test.timeout=10m0s E=3 .cfg /tmp/go-build406-ifaceassert x_amd64/vet . --gdwarf2 --64 x_amd64/vet .cfg�� /yaml.v3@v3.0.1/apic.go /yaml.v3@v3.0.1/decode.go x_amd64/vet ute.go mentation.go -o x_amd64/vet(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build4291131586/b496/config.test /tmp/go-build4291131586/b496/config.test -test.testlogfile=/tmp/go-build4291131586/b496/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build4291131586/b338/vet.cfg oding@v0.5.4/iso8601/parse.go oding@v0.5.4/iso8601/valid.go x_amd64/vet --gdwarf-5 nal/protolazy -o x_amd64/vet 4459�� g_.a ache/go/1.25.8/x64/src/log/log.go x_amd64/vet --gdwarf-5 4459165/b239/ -o x_amd64/vet(dns block)nonexistent.local/tmp/go-build4291131586/b514/launcher.test /tmp/go-build4291131586/b514/launcher.test -test.testlogfile=/tmp/go-build4291131586/b514/testlog.txt -test.paniconexit0 -test.timeout=10m0s E=3 .cfg /tmp/go-build406-ifaceassert x_amd64/vet . --gdwarf2 --64 x_amd64/vet .cfg�� /yaml.v3@v3.0.1/apic.go /yaml.v3@v3.0.1/decode.go x_amd64/vet ute.go mentation.go -o x_amd64/vet(dns block)slow.example.com/tmp/go-build4291131586/b514/launcher.test /tmp/go-build4291131586/b514/launcher.test -test.testlogfile=/tmp/go-build4291131586/b514/testlog.txt -test.paniconexit0 -test.timeout=10m0s E=3 .cfg /tmp/go-build406-ifaceassert x_amd64/vet . --gdwarf2 --64 x_amd64/vet .cfg�� /yaml.v3@v3.0.1/apic.go /yaml.v3@v3.0.1/decode.go x_amd64/vet ute.go mentation.go -o x_amd64/vet(dns block)this-host-does-not-exist-12345.com/tmp/go-build4291131586/b523/mcp.test /tmp/go-build4291131586/b523/mcp.test -test.testlogfile=/tmp/go-build4291131586/b523/testlog.txt -test.paniconexit0 -test.timeout=10m0s .cfg�� 4459165/b389/_pk-p -I x_amd64/vet --gdwarf-5 g/grpc/internal//usr/bin/runc -o x_amd64/vet .cfg�� lhk-/9CAufbOhYsrgo1.25.8 /tmp/go-build406-c=4 x_amd64/vet . _value"]."\n"; --64 x_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either: