Remove a refusal helper nothing calls #212

Merged
paulhitt merged 1 commits from chore/audit-sweep into main 2026-09-21 23:14:56 +00:00
paulhitt commented 2026-09-21 22:51:44 +00:00 (Migrated from gitlab.com)

WireError.refusedForbidden built a 403 from a Refusal and had no caller
in Sources or Tests. Its sibling on the line above, refused(), is the
live one, so the enum and the pattern both stay.

Found by counting call sites across the four public repos ahead of an
external review. 259 functions in the relay, and this was the only dead
one: the other three the sweep flagged are SwiftNIO ChannelHandler
methods the framework calls, not us.

Two things it did NOT touch, both deliberate:

Refusal.capabilityRevoked has no references either, but it is a wire
constant that clients match on by string. Removing it is a protocol
change, not a cleanup, and it should be decided the way
deviceLimitReached was, which carries a note saying it is kept because
clients in the field still read it. capabilityRevoked has no such note.
Either it should, or it should go, and that is a call about the fleet.

swift build clean.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

WireError.refusedForbidden built a 403 from a Refusal and had no caller in Sources or Tests. Its sibling on the line above, refused(), is the live one, so the enum and the pattern both stay. Found by counting call sites across the four public repos ahead of an external review. 259 functions in the relay, and this was the only dead one: the other three the sweep flagged are SwiftNIO ChannelHandler methods the framework calls, not us. Two things it did NOT touch, both deliberate: Refusal.capabilityRevoked has no references either, but it is a wire constant that clients match on by string. Removing it is a protocol change, not a cleanup, and it should be decided the way deviceLimitReached was, which carries a note saying it is kept because clients in the field still read it. capabilityRevoked has no such note. Either it should, or it should go, and that is a call about the fleet. swift build clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paulhitt commented 2026-09-21 22:51:44 +00:00 (Migrated from gitlab.com)

assigned to @paulhitt

assigned to @paulhitt
paulhitt commented 2026-09-21 23:14:56 +00:00 (Migrated from gitlab.com)

mentioned in commit 8af2fdd652

mentioned in commit 8af2fdd652321c883287b44b0b35fdde7019b89d
paulhitt (Migrated from gitlab.com) merged commit 8af2fdd652 into main 2026-09-21 23:14:56 +00:00
Sign in to join this conversation.