Skip to content

feat(helm): add tool approval settings and replace muster.requireApproval with default: Ask - #143

Merged
Rotfuks merged 14 commits into
mainfrom
tool-approval
Nov 30, 2026
Merged

Rotfuks merged 14 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Breaking: chart 3.0 removes requireApproval — the squash title should mark the major (Dominik to decide)

Part of giantswarm/giantswarm#38902.

What does this PR do?

muster now decides Allow, Ask or Block for every tool call (giantswarm/muster, linked below). This PR makes the agent chart say what an agent may do with its tools.

  • tools and default (new): top-level tools lists the tools the agent is composed with (1 to 32 items; each a selector server:, tool:, workflow: or preset:, optionally set to Allow, Ask or Block, as in - server:github: Ask), and top-level default is the setting for every tool in tools without its own (Allow, Ask or Block). An Allow over a connector's Ask holds only when a connector admin grants it through agent-manager. They render as the X-Muster-Tool-Approval header on every request of the agent's RemoteMCPServer, so they hold for Sessions agent-manager did not start. The header carries no grants and can only make tools stricter than the connector's own setting; Sessions agent-manager binds take its settings and grants instead. Held only while the runtime sends the header (the docs say so).
  • toolset stays for now, deprecated in favour of tools (a tool the list leaves out is invisible to the agent; an entry can also be Block).
  • Chart 3.0 removes muster.requireApproval. The values schema refuses the key and the templates refuse it too, so a release with schema validation skipped (disableSchemaValidation) fails with the message "set default: Ask instead" instead of rendering an agent that asks nothing. default: Ask replaces true: muster asks a person before every tool call through the binding. The NOTES deprecation line and the render failure for the combination with approval settings go with it.
  • Tests: helm unittest cases for tools and default (render, failures, schema) and a make helm-require-approval-test step that renders with the schema skipped and asserts the template's own refusal for true and false, with muster off and for a chat-only agent; the refusals of tools are asserted on the template that raises them (303f238).

Commits: 8a3bc5a, 551d660, a5984ef (the values, tests, docs), 9bd75b9, 8900a15 (the header), 1081d22, 32f814c (3.0), 0dc6300, 34fffb7, 95493af, 303f238 (template refusal, docs, tests), 23e7567 (docs condensed: README, values comments, schema descriptions; no behaviour change), a294ac4 (README: what migrate writes in organization namespaces; review round of 2026-11-27, docs only). Tip a294ac4.

What is the effect of this change to users?

  • A new agent can carry a tool list with settings; muster enforces it per Session.
  • An agent whose values set muster.requireApproval must move to default: Ask before it goes to 3.0. agent-manager's migrate does this for agents it owns (see agent-manager's PR); a GitOps release gets a diff it reports and never writes; a release with valuesFrom is reported, never overwritten.
  • Running Sessions of an agent that asked before keep asking across the upgrade.

What does it look like?

default: Ask
tools:
  - server:github
  - tool:x_github_merge_pull_request: Allow
  - tool:x_github_delete_repository: Block

renders on the RemoteMCPServer two headers: X-Muster-Toolset: server:github,tool:x_github_merge_pull_request,tool:x_github_delete_repository and X-Muster-Tool-Approval: tool:x_github_merge_pull_request=Allow,tool:x_github_delete_repository=Block,default=Ask.

Changes from the plan

Where this PR differs from the design in the epic (giantswarm/giantswarm#38902):

  • Settings render as a header. Selectors keep rendering as X-Muster-Toolset, and settings and default render as a second header, X-Muster-Tool-Approval (client-asserted, it can only tighten), as well as being bound by agent-manager, so Sessions agent-manager didn't start are tightened too.
  • toolset stays. It is deprecated beside tools instead of replaced (both set fails the render); tools takes at most 32 entries and toolset keeps 128.
  • Delivery. One pull request per repository carries all three milestones, instead of one pull request per slice.

Any background context you can provide?

  • Epic giantswarm/giantswarm#38902.
  • Merge order: muster and agent-manager releases first. The agent-platform chart moves the agent chart line to 3.x only when agent-manager has the migrate hop and muster the approval floor, and refuses a range that admits a major it has not been checked against.
  • Not in this PR: the portal and agent-manager that write tools (linked below).

Upgrade notes

Chart 3.0 removes muster.requireApproval. Set muster.default: Ask instead; the key is refused by the schema and by the templates, so skipping schema validation does not bring it back. Agent-manager's migrate hop (2.x -> 3.x) rewrites agents it owns before the chart line moves.

What is needed from the reviewers?

  • Decide how the squash title marks the major (see the first line).
  • Confirm that default: Allow is accepted by design: it only sets the tools in tools without their own setting, and an Allow never lifts a connector's Ask unless a connector admin grants it.

Testing

Check Result
make helm-require-approval-test (the render with the schema skipped for true and false; a mutant that disables the template refusal fails it, run in a delta review) passes; CI runs it
helm unittest (tools_test.yaml and the others) not run by anyone (plugin not installed); the cases were reproduced with helm template; CI runs them
agentlab, 2026-11-26 (M2 lab): chart 2.7.0 of 8900a15 create_agent with tools stored and rendered; Session bound with the list; Block hidden; Allow over Ask refused; exception granted by a connector admin only
agentlab, 2026-11-26 (M3 lab): chart 3.0.0-m3.1 of 95493af requireApproval refused with the schema (additional properties) and without it (the template's message); default=Ask renders the header; agents moved by migrate ask through muster; no agent that asked before asks nothing afterwards

Not exercised: a valuesFrom release (admission refuses it in the lab's namespaces; unit-tested in agent-manager).

Review round 2026-11-28: a294ac4 is docs only; the README was checked against agent-manager's migrate.go and the ready mark (UID and generation).

Related pull requests

Repository PR Role
muster giantswarm/muster#1912 enforcement, approval page, governance, agent settings and grants
backstage giantswarm/backstage#3655 portal: connector and agent tool settings, session prompt, inline approval card
klaus-gateway giantswarm/klaus-gateway#618 Slack prompt and return
agent-platform giantswarm/agent-platform#1495 governance value, safe lists, wiring, agent chart 3.x guard and migrate preflight, the portal's own client and trusted-client wiring
agent-manager giantswarm/agent-manager#483 chart default, per-agent approval settings and grants, migrate 2.x to 3.x
model-manager giantswarm/model-manager#462 chart default
vm-manager giantswarm/vm-manager#264 chart default
cluster-manager giantswarm/cluster-manager#359 chart default
workspace-manager giantswarm/workspace-manager#229 chart default
toolchain-manager giantswarm/toolchain-manager#100 chart default
skill-manager giantswarm/skill-manager#48 chart default
agent-platform-mcps giantswarm/agent-platform-mcps#108 chart defaults for the families
agent-skills giantswarm/agent-skills#90 agent management skill
agent-platform-operator giantswarm/agent-platform-operator#74 organization chart source follows the configuration
giantswarm-platform-manager giantswarm/giantswarm-platform-manager#1053 governance as a typed input, second-person review
agentlab giantswarm/agentlab#1355 lab: governed mode docs, the portal's Dex client, the portal's workload token

Checklist

  • Make sure values.yaml and values.schema.json are valid.

Settings and default reach muster on every request of the agent's
RemoteMCPServer, so they hold for Sessions agent-manager did not start.
The header carries no grants and can only make tools stricter; Sessions
agent-manager binds take its settings and grants instead.
Chart 3.0 no longer renders kagent's requireApproval on the muster binding
and its values schema refuses muster.requireApproval. default: Ask replaces
true: muster asks a person before every tool call through it. The
deprecation line in NOTES.txt and the render failure for the combination with
tool approval settings go with it.
The values schema refused the key, but a release with schema validation
skipped (HelmRelease disableSchemaValidation) rendered the agent without
kagent's flag and without default: Ask. The tool list now fails on the key
whatever its value.
…he schema skipped

helm-unittest validates the values schema first, so its case passed with
the template check removed. make helm-test now renders with the schema
skipped and asserts the template's own message, true and false, with muster
off and for a chat-only agent.
@circleci-architect

circleci-architect Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Published Helm chart agent

2.5.2-r27740a5ft20261130181111he76ea2f
Chart agent
Version 2.5.2-r27740a5ft20261130181111he76ea2f
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent:2.5.2-r27740a5ft20261130181111he76ea2f
Digest sha256:605be8f20915ad76b4e61cffabf6c45ef069e9dd38eaa800fc850bcee29a816a
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent --version 2.5.2-r27740a5ft20261130181111he76ea2f

Posted by architect-orb · build 1962 · commit e76ea2f · updated in place on every push

@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record

Part of giantswarm/giantswarm#38902 (tool approval, milestones 2 and 3). Purpose: this record says what was reviewed on this branch (the agent chart's tools and default approval values, the X-Muster-Tool-Approval header, and the removal of muster.requireApproval in 3.0), by whom and with which outcome, so that reviewers can skip what is covered. Branch tool-approval is 11 commits on 0196f67, tip 303f238. Hashes are those of the pushed tool-approval branch.

Read this first

  • Milestone 2 commits (8a3bc5a, 551d660, a5984ef) had an independent code and security review and a Fable re-check of the fixes. Milestone 3 commits (1081d22, 32f814c) had an independent review and re-check as part of the agent chart 3.0 review. The pinning tests 95493af and 303f238 were read and mutated in a delta review (Sonnet): no finding. 0 open blockers, majors or mediums.
  • Not independently re-checked: 8900a15 (docs fixing R-06). 0dc6300 and 34fffb7 were verified by the re-check.
  • helm unittest was not run by anyone (not installed): the unit suites in tests/, including tools_test.yaml, were reproduced with helm template. make helm-require-approval-test (added in 95493af) runs the refusal with the schema skipped and passes; disabling the template refusal fails it.
  • The branch is this repository's only change for tool approval; the migration of existing releases is done by agent-manager's migrate hop (see its record).

Review rounds

# Round Scope Reviewer Kind Result
1 Slice 3 code review 8a3bc5a, 551d660, a5984ef; helm template for 10 combinations Claude Sonnet 5.5, independent code no finding specific to this chart beyond one nit (C-18)
2 Slice 3 security review same commits Claude Fable 5.2, independent security finding S-03 (settings accepted and reported while nothing binds them) concerns the header
3 Fix 9bd75b9 (header), docs 8900a15 implementer fix
4 Re-check at 9bd75b9; chart rendered with helm template Claude Fable 5.2, independent re-check C-02 header mutants killed; new: R-06 (header is client-asserted)
5 Agent chart 3.0 review 1081d22, 32f814c Claude Fable 5.2, independent code and security S8-04 (major), S8-09, S8-10
6 Fix 0dc6300, 34fffb7, 95493af implementer fix
7 Re-check of the 3.0 fixes at 34fffb7; 28 mutations, ~75 helm template probes Claude Fable 5.2, independent re-check S8-04 fixed but the test did not pin it (R-03), now pinned by 95493af
8 Lab runs chart 8900a15 as 2.7.0 (run 2); 95493af as 3.0.0 (run 3) tester lab pass
9 OSS-neutrality audit added lines read-only audit audit no vendor-specific lines
10 Delta review, charts and portal 95493af, 303f238 (the refusals of tools asserted on the template that raises them); make helm-require-approval-test passes, a mutant that disables the template refusal fails it; the template: keys sit on the template that raises Claude Sonnet 5.5, independent code no finding

What was checked

Area Method By
Spec conformance of _helpers.tpl, schemas, values, NOTES against the contract read; helm template for tools with toolset, tools with requireApproval, preset:none with a setting or default, bad enum, default alone, requireApproval alone round 1
Header rendering and what it enforces read, mutants rounds 2, 4
3.0 removal: every spelling of muster.requireApproval (true, false, null, "true", with muster off and preset:none) helm template, also with --skip-schema-validation rounds 5, 7

Findings

ID Severity Title Outcome Re-check
M2-S3-C-02 (chart part) major settings accepted and reported as live while nothing enforces them fixed in 9bd75b9: the chart renders the settings as X-Muster-Tool-Approval, which muster applies where no sender binding carries settings verified (header mutants killed)
M2-S3-C-18 nit tools: [preset:none] with default fails the render while toolset: [preset:none] with default renders accepted: the contract's wording, kept n/a
M2-S3-S-03 medium settings accepted and reported while nothing binds them fixed with C-02 verified
M2-S3-R-06 low X-Muster-Tool-Approval binds only clients that send it fixed by documentation in 8900a15: the header is client-asserted, holds only while the runtime sends it and only tightens not re-checked
M3-S8-04 major (security medium) only the values schema stands between a leftover muster.requireApproval: true and an agent that asks nothing fixed in 0dc6300 (template fails on any requireApproval key) fixed; test did not pin it (R-03)
M3-S8-09 minor the hop's tests validate against a hand-made 3.0 schema fixed with 34fffb7 (the chart's own 3.0 schema copied into agent-manager's testdata) verified
M3-S8-10 minor upgrade notes overstate what the render refuses fixed in 34fffb7 (replace with default: Ask; which releases migrate only reports) verified
M3-S8-R-03 minor the regression test of S8-04 passes without the fix fixed in 95493af (make helm-require-approval-test, schema skipped, muster off and preset:none); red on the pre-fix templates not re-checked

Lab verification

Run Result
Run 2 (slice 3) chart 8900a15 packaged as 2.7.0 and served to agent-manager through an embedded-chart swap; rendered RemoteMCPServer headers X-Muster-Toolset and X-Muster-Tool-Approval with Allow, Ask and Block entries and default=Ask; the header only tightens when sent by a person's client (Allow over Ask stays Ask, Block hides, an unparsable value asks for everything)
Run 3 (slice 8) chart 95493af packaged as 3.0.0: requireApproval refused with the schema (additional properties) and with --skip-schema-validation (template message); default=Ask renders X-Muster-Tool-Approval: default=Ask; agents migrated to 3.0 ask through muster; creation with tools on 3.0 renders the headers

Open items

Findings still open or partly fixed:

Item Severity What remains Why it is acceptable now
M2-S3-R-06 low X-Muster-Tool-Approval is client-asserted: it binds only clients that send it and only tightens the settings agent-manager binds to Sessions it starts are authoritative; documented in 8900a15 (not independently re-checked)
M2-S3-C-18 nit tools: [preset:none] with default fails the render while toolset: [preset:none] with default renders the contract's wording, kept
8900a15 no independent re-check docs only
Organization namespaces an organization's agent chart source is updated by the operator, not by this chart see the agent-platform-operator record
Other runtimes agent runtimes that do not send the header are not covered by it they depend on agent-manager's binding

Never run:

  • helm unittest (the suites in tests/ were reproduced with helm template), helm-docs.
  • Other agent runtimes against the header; a cluster, Flux, a remote-target cluster, a browser and Slack: not part of this repository.

@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: 23e75671764ae1842d36da77ccde63218b236abc (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: approval header/schema, rejection of legacy requireApproval, migration compatibility and documentation. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

The chart carries the new settings and rejects the obsolete flag. Migration preserves Ask where the old binding rendered; compatible manager/muster and release sequencing remain required.

This is a scoped contract assessment, not an exhaustive numbered acceptance score. Independent focused specification cross-checks covered the core enforcement/client contracts and platform/manager integration. Declared follow-ups and accepted design changes are not counted as new defects.

Blocking

No new blocking code finding established in this pass.

Non-blocking

  • [P3] Correct the organization migration promise. README.md:450 says releases in organization namespaces are reported, never written. The final agent-manager migration rewrites managed non-GitOps organization releases and reports readiness for the operator. Document those writes and the report-only exceptions so operators know what migration changes.

Suggestions

None beyond the existing review follow-ups.

Deep verification

Aspect Status Evidence / limit
Problem confirmed on base n/a: feature slice The diff introduces the approval-related contract reviewed here; no claim of a locally reproduced base failure.
Fix addresses named root cause covers inspected scope Relevant changed paths traced against the scoped requirement.
Spec criteria met qualitative; no exhaustive score See Spec above.
Tests pin the contract static evidence Header/schema and legacy-key regression assertions inspected; runtime enforcement is in muster.
Correct (edge cases) gaps noted See findings; runtime behavior unverified.
Standard mechanism existing patterns used Helm values/schema and MCP binding conventions; PRD approval terminology.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries static review only Agent header integrity depends on manager-bound policy; no new chart bypass established.
Simplest fix retain approach The chart remains a declarative policy carrier.
Reuse check no new duplication finding Existing surrounding helpers/patterns inspected within the stated scope.
CI checks green reported checks / skips See CI note below.
Pipeline gates unverified locally PR code execution prohibited in this session.
Findings 0 blocking / 1 non-blocking / 0 suggestions Findings above supplement the existing review record.
Merge danger one-way door removed chart value and migrated agent releases.

Reported checks passed or were skipped; no failed/cancelled check to triage. A skipped job is not evidence that its gate ran.

Unverified locally: applicable builds, tests (including race/integration/envtest), vet, formatting/lint/pre-commit, generators, Makefile verification targets, Helm rendering/schema/unit checks, and browser/live-cluster flows. No PR code was executed. GitHub-reported CI provides supporting evidence, not a local reproduction.

Recommendation: merge as-is within this review's scope, subject to existing release-order/rollout prerequisites and previously documented open items. This is not sign-off on production cutover: actual compatible release pins and the documented organization/remote-target rollout evidence remain required.

Team context: none.

@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Review record — Quentin's review

Part of giantswarm/giantswarm#38902. Answers the review of 2026-11-27 (comments below). Branch tool-approval tip a294ac4; 1 commit since the last record: a294ac4 (plus the docs condensing 23e7567, already on the branch).

ID Point Outcome
QB-10 README says releases in organization namespaces are "reported, never written" but migrate now rewrites managed ones fixed in a294ac4 (docs only): managed organization releases are rewritten, GitOps-owned ones get a diff, readiness is the ready mark carrying each release's UID and generation (agent-manager#483)

Independent re-check

Claude Fable, 2026-11-28, read-only: the README matches migrate.go and the ready mark. Docs only, no tests.

Open items

None.

@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@QuentinBisson thanks for the thorough review (your comment). Addressed: QB-10 fixed in a294ac4: the README now says what migrate writes in organization namespaces.

Details and the independent re-check are in the review record.

@Rotfuks
Rotfuks marked this pull request as ready for review November 30, 2026 08:36
@Rotfuks
Rotfuks requested a review from a team as a code owner November 30, 2026 08:36
@Rotfuks
Rotfuks merged commit b04470a into main Nov 30, 2026
13 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 18:37
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.

2 participants