Skip to content

fix(egress): let compilers leave tokenPassthrough targets unbound - #3497

Open
codyhartsook wants to merge 1 commit into
kagent-dev:mainfrom
codyhartsook:codyhartsook/boundTargets
Open

codyhartsook wants to merge 1 commit into
kagent-dev:mainfrom
codyhartsook:codyhartsook/boundTargets

Conversation

@codyhartsook

Copy link
Copy Markdown
Contributor

Description

compileActorEgressPolicy fails when any compiler is registered and a tokenPassthrough target has no header. That assumes every registered compiler exists to bind targets, but Compiler is a general extension point. A compiler that only adds another header gets its actors denied egress, even when the runtime forwards the caller's token.

This removes the binding check, so compilers now own binding each target. The existing policy validation stays.

A compiler that forgets to bind a target now fails at call time instead of at compile time. OSS doesn't register any compilers, so default installs don't change.

Related Issues

None required.

Testing

go test -race ./core/internal/substrate/ ./core/pkg/app/
make -C go lint

TestCompileActorEgressPolicyMayLeaveTargetsUnbound compiles a policy with no extensions and with one that adds another header, and neither binds the target.

Change Type

/kind fix

Changelog

Embedding controllers can now register egress policy compilers that leave tokenPassthrough targets unbound, because each compiler now owns target binding.

Signed-off-by: Cody Hartsook <cody.hartsook@solo.io>
@github-actions github-actions Bot added the bug Something isn't working label Nov 2, 2026
@codyhartsook codyhartsook changed the title fix(egress): stop requiring compilers to bind every target fix(egress): let compilers leave tokenPassthrough targets unbound Nov 2, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Nov 2, 2026
@codyhartsook
codyhartsook marked this pull request as ready for review November 2, 2026 23:30
@codyhartsook
codyhartsook requested a review from a team as a code owner November 2, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant