Skip to content

fix(platform): leave klaus-gateway's a2a namespace and default agent to the chart under the change-over - #1409

Merged
fiunchinho merged 1 commit into
mainfrom
fix-klaus-gateway-changeover-a2a
Dec 3, 2026
Merged

fiunchinho merged 1 commit into
mainfrom
fix-klaus-gateway-changeover-a2a

Conversation

@fiunchinho

Copy link
Copy Markdown
Member

Part of #1398

Problem

On a lab whose platform.valuesFiles overlay turns on platformPublicNamespace.changeOver (seen on agent-platform 4.191.0-rc.2 with platformPublicNamespace: {changeOver: true}), agentlab platform with platform.klausGateway on fails at render:

execution error at (agent-platform/templates/components.yaml:413:45): klausGateway.a2a.namespace (kagent) differs from the platform's shared place (public-agents): with platformPublicNamespace.changeOver the chart sets it, so Slack's bare agent names resolve where the platform's agents are; leave klausGateway.a2a.namespace unset

The lab's values template always wrote klausGateway.a2a.namespace: kagent and defaultAgent: agentlab-klaus-gateway-test. This blocks the live proof of item 2 of #1398.

Change

  • tmplData.PlatformChangeOver() (internal/lab/klausgateway.go) merges platform.valuesFiles in order, as helm -f does, and reads platformPublicNamespace.changeOver; only a literal true counts (the chart's schema types it boolean). A later overlay's changeOver: false wins.
  • The values template asks it inside the klausGateway: block only. Under the change-over the a2a block writes neither namespace nor defaultAgent; without it the values stay as today (kagent, the proof's fixture). No other render reads the overlays, and a render that turns the component on for itself (chartGatewayVersion, through mutate) gets the same answer as the install.
  • docs/klaus-gateway.md describes the exception. No HACKS.md record names these values. No CHANGELOG.md edit: the repository releases from pull request titles.

What the chart uses under the change-over

From the agent-platform chart's klaus-gateway values helper (helm/agent-platform/templates/_helpers.tpl, same at v4.191.0-rc.2 and main):

  • a2a.namespace: public-agents, the platform's shared place (agent-platform.platformNamespace). An own value that differs fails the render.
  • a2a.defaultAgent: public-agents/default-agent, derived while components.default-agent is on (on with kagent, muster and agent-manager, which a lab with klaus-gateway runs). An own value would win. If an overlay turns the default agent off, the klaus-gateway chart's own default (sre-agent) applies.

Why one condition and not "never write them"

The meta chart derives a2a.namespace only under the change-over; before it, the klaus-gateway chart's default kagent applies, so dropping the namespace on every lab would also work. defaultAgent is different: the chart derives <platform namespace>/default-agent whenever the default agent is on, change-over or not, and an own value wins. Leaving it unset on every lab would move every lab's Slack default from the proof's fixture to kagent/default-agent, and older charts without the derivation would fall back to the klaus-gateway chart's sre-agent. So the condition is needed for defaultAgent, and one condition for both keys is the simpler rule; without the change-over the lab's values do not change.

Do the proofs' expectations hold on a changed-over lab?

This change breaks none of them; some did not hold on such a lab before it either (it did not render at all):

  • The host-mode gateway of klaus-gateway-test, decisions-test and the Slack checks of organizations-test pass their own --a2a-namespace=kagent and --a2a-default-agent (gatewayArgs), so the component's values do not reach them. The public part's Slack start and S3 pick qualified refs (<namespace>/<agent>).
  • Step 9 of the component proof opens its thread through the picker by the fixture's name (pickerRef accepts kagent/<name>), not through the component's default agent.
  • Not from this diff, expected not to hold on a changed-over lab (not run): klaus-gateway-test keeps its fixtures in kagent, where the change-over runs 0 workers and binds no person, so its fixture is not expected to get Ready or to be offered in the picker. And organizations-test's Slack S1 (rosterProblem, slackRoster) exempts only kagent as the platform tenant, so a roster row of public-agents/* would read as another organization's.

Tests

  • TestPlatformValuesKlausGatewayChangeOver (internal/lab/render_test.go): through platformValuesWith (the lab's render with the overlays merged, what the chart receives): the change-over overlay drops both keys, also with the component off in agentlab.yaml and on for the render only; an overlay with changeOver: false after it keeps kagent and the fixture. TestPlatformValuesKlausGateway keeps owning the case without overlays.
  • The new test fails on main for the intended reason (both change-over rows: "names namespace kagent and defaultAgent agentlab-klaus-gateway-test, want neither"), run in a separate worktree at origin/main with only the test file copied.
  • go test ./internal/lab/ -run 'TestPlatformValuesKlausGateway|TestKlausGateway|TestPlatformValues|TestRender' passes; golangci-lint run with GOOS=linux: 0 issues.
  • The repository has no test that runs helm template with the pinned chart (the roster tests use charts they write), so there is no chart render case to add.

Review

The change's class was single: the Opus reviewer ran in its default mode, which runs no tests, beside Codex round 1. In deep mode it may run tests; then it runs after Codex round 1 in the same heavy slot, not at the same time.

Id Reviewer Severity Outcome Finding
R1-1 Codex important deferred: #1408 PlatformChangeOver reads only the overlays, so a chart whose own values turn the change-over on (a chartPath checkout, a later release) still gets namespace: kagent and fails the render.

The Opus reviewer reported no finding. Codex round 2 recorded the answer and approved head e57dac6.

…to the chart under the change-over

With platformPublicNamespace.changeOver on in the lab's overlays, the meta chart sets klausGateway.a2a.namespace to public-agents and fails the render on the lab's kagent; it derives a2a.defaultAgent too. The values template now writes neither key while the merged overlays turn the change-over on, and today's values otherwise.

Part of #1398
@fiunchinho fiunchinho self-assigned this Dec 3, 2026
@fiunchinho
fiunchinho marked this pull request as ready for review December 3, 2026 17:19
@fiunchinho
fiunchinho requested a review from a team as a code owner December 3, 2026 17:19
@fiunchinho
fiunchinho removed the request for review from a team December 3, 2026 17:19
@fiunchinho
fiunchinho merged commit 7c684fa into main Dec 3, 2026
8 checks passed
@fiunchinho
fiunchinho deleted the fix-klaus-gateway-changeover-a2a branch December 3, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant