Skip to content

atenet-egress: drop dead code and stale comments in the egress handler - #2895

Open
Lior Lieberman (LiorLieberman) wants to merge 1 commit into
agent-substrate:mainfrom
LiorLieberman:cleanup-egress-gateway
Open

Lior Lieberman (LiorLieberman) wants to merge 1 commit into
agent-substrate:mainfrom
LiorLieberman:cleanup-egress-gateway

Conversation

@LiorLieberman

Copy link
Copy Markdown
Collaborator

Small cleanups in the egress handler and sdsmint, no behavior change: drop a duplicate ActorRef and a credential-error case identical to the default, fix comments that still say injection is MITM-leg only or skipped without a provider (it's denied), and use synctest instead of real-time polls in the policy cache tests.

Split out of #2166.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

authenticateActorCertificate already returns a resources.ActorRef, so
handleConnect no longer copies it into a second one, and GetActor takes
ref.ToObjectRef(). mapCredentialProviderError loses a NotFound and
PermissionDenied case that returned the same 403 as its default.

Comments said credential injection runs only on the MITM leg and that a
rule needing a credential is skipped when no provider is configured; it
runs on both request legs and such a request is denied. sdsmint's
comments named the removed certauth.Signer.

Tests: synctest replaces the real-time polls in the policy cache cancel
test and the canceled-caller test, the handler's test CA comes from
internal/localca, and sdsmint's stream tests register their teardown
with t.Cleanup instead of a defer in each test.
@LiorLieberman Lior Lieberman (LiorLieberman) added the kind/cleanup Small fixes that are not bugs, for example a typo in a code comment label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Small fixes that are not bugs, for example a typo in a code comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant