Skip to content

feat(agent-platform): make governance a typed input and have a second person approve every governance change - #1053

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

Rotfuks merged 29 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of giantswarm/giantswarm#38902. Review records are posted on this PR at the end.

What does this PR do?

The platform's governance (muster's mode and the servers it governs) is now something the Platform Manager writes, reads back and reviews, instead of something a reconcile can drop or one person can loosen alone. Slice 9 of the epic's PRD.

Area What changes
Typed input governance.mode and governance.governedServers are inputs of the agent-platform definition, rendered into the meta chart's top-level governance and governedServers and read back from the configmap patch on record, so a reconcile no longer drops them. Validation follows what muster refuses to start on and what the meta chart refuses to render. Every governance choice is refused while no meta chart release renders muster's governance configuration, so no installation reads as governed while its muster is not.
Review of a change A plan reads a governance change old to new (GovernanceOf) and names what loosens (governed to trusted, a source no longer governed, a role changed, a safe entry added or one named like a write). Values that cannot be read on either side count as a loosening. The comparison is of the effective governance, against the installation's reviewed-governance record (see below), so a disable followed by an enable, or a direct edit of the configs repository, asks again.
Second person A commit or wave whose plan changes governance records it on the Action and always asks the team review, test installations too. approve_action refuses the actor, by GitHub id too; for a governance change the approver must be an active member of the GitHub team approvals.governanceTeam (unset means nobody can approve one, fail closed). A stage merged outside the manager decides nothing. The review puts what loosens first and never cuts it.
Audit Committed, self-approval refused, approved, merged, merged outside the manager without a decision; merges per stage with pull requests and heads.
Fixed platform parts Giant Swarm's own governance parts render on every installation the manager manages, as parts no input changes: the Platform Manager's role floors (governance.roleFloors: platformManager with approve_action and merge_action), the Platform Manager as a governed server with its safe list (5 read tools), and the Giant Swarm admin groups as muster's connector admins and workflow editors (4 line). The open-source charts and muster no longer carry them (decision recorded in the epic). An override of giantswarm-platform-manager is refused unless it is the platform's entry read back.
Overrides Refused when they drop a floor, change a server's role, stand for one of the chart's sources, carry markup, name a floor as safe, or list more than 64 safe entries. muster's roles and floors and the chart's governedServers live in definitions/agent-platform/governance.yaml, held to muster and the chart by a test that reads sibling checkouts where present.
Docs docs/governance.md: the baseline, the reviewers' team, the safe list's side effects, every audit line, that a direct edit of the configs repository is detected at the next plan and not prevented.

Commits (24): 9749dcb, f87631d, 6cdb0b4, 888334b (the input, the review, the second person), 6ec0eb0, ea37b12, c655359, ed3196f, 1f2f326 (review fixes, docs, e2e), 9c83a93, 3eb427a, 2340c45 (the fixed platform parts and the docs of the flow), 111f8c2, fae585b, 723dfda (release gates, the removal of platform parts is a loosening, the release order), 9fc3938, 79d3de1, 46e4ff8, 1d34eeb (the delta review's fixes), aab6f08, 7cf2c12 (the reviewed-governance record), aba44eb, a1ac13f (compare-and-swap, admission policy, disabled mark), ffe990f (docs condensed: docs/governance.md, values comments, schema descriptions; no behaviour change).

What is the effect of this change to users?

  • On a test installation too, a governance change now waits for a second person of approvals.governanceTeam.
  • A reconcile no longer drops governance.* values.
  • Installations the manager manages get the Platform Manager's floors, its governed entry and the Giant Swarm admin groups from the definition, on the agent-platform chart that carries them as inputs.

How does it look like?

The review for a governance change leads with the change old to new and the lines that loosen it. The audit lines are logged as listed in docs/governance.md.

Changes from the plan

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

  • Review baseline. A plan compares the configs repository with a per-installation GovernanceRecord (a new CRD only the manager's ServiceAccount writes, set by merge_action when it merges an approved governance change), not with the newest reviewed Action; an installation without a record asks the review, which then shows the whole governance. A stale Action merged late or a hand revert could displace an order-derived baseline.
  • The record is protected. Each Action records the record its plan compared with, and merge_action refuses to merge a stage of an approved governance change when the record has moved since (governance_record_moved_since_plan: deny it and commit again); the write is a compare-and-swap. A ValidatingAdmissionPolicy (actions.governanceRecordPolicy, default on) denies create, update and delete of governancerecords to any identity but the release's ServiceAccount. A record written by a reviewed disable is marked disabled, so the enable after it is not logged as a change made outside. Not covered: a cluster admin can still impersonate the ServiceAccount.
  • Second person. The approver must be an active User member of the GitHub team approvals.governanceTeam; unset or unreadable refuses every governance approval, so set it at deploy.
  • Connector admins count as governance. tenants.platformTeam and any value that changes connector admins or workflow editors needs the team review too; widening counts as loosening.
  • Input shape and gates. The input is governance {mode, governedServers} rendered into the chart's governance map and governedServers; GovernanceChart and GovernanceMuster are unset, so every governance choice is refused until the releases that carry it are pinned.
  • Giant Swarm's own parts live here. The Platform Manager's role floors (approve_action, merge_action), its governed entry with a five-read safe list and the Giant Swarm admin groups as connector admins and workflow editors are rendered by the manager; muster and the agent-platform chart no longer carry them.
  • Not done. Branch protection on the configs repositories is asked of their owners; a merge outside the manager is detected and audited, not prevented.
  • 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.
  • Rollout: set approvals.governanceTeam at deploy. Until it is set nobody can approve a governance change, which fails closed.
  • Needs the agent-platform chart that renders governance as a map (governance: {mode, roleFloors}) and the muster release that reads governance.roleFloors; the release gates (GovernanceChart, GovernanceMuster) are unset until those releases exist and refuse every governance choice meanwhile.
  • Three of the Platform Manager's safe tools bring Action records up to date and post the facts; docs/governance.md says so.

What is needed from the reviewers?

  • Decide the value of approvals.governanceTeam for the deployment.
  • Check the fixed platform parts against the open-source repos' generic config (agent-platform and muster, linked below).
  • Everything was reviewed independently: slice 9 (0 blocker, 6 major, all fixed), the refactor that moved the platform parts here, then a delta review, a re-check, a final re-check and a last review of the baseline and the record (0 critical, 0 high; two redesigns of the baseline came out of it). Open findings are low or below (L-05, L-14, L-15) and listed in the record.

Do the docs need to be updated?

Done: docs/governance.md.

Testing

Check Result
go build ./..., go vet ./..., goimports -local clean (at the review-fix round)
golangci-lint run 0 issues at the review-fix round
go test ./... pass at the review-fix round; the later commits add tests
E2E=1 go test ./internal/e2e/... the governance audit of a wave and a disable, and the actor under a new login, are asserted
make helm-lint, make test-chart pass at the review-fix round
Review (independent model), 27 mutations and PoC tests 0 blocker, 6 major, 7 minor, 3 nit; security 0 critical, 0 high, 5 medium, 5 low; all fixed

Final reviews (a second model): go build, go vet and E2E=1 go test ./... pass at 723dfda, 1d34eeb, 7cf2c12 and a1ac13f; 105 mutants over four passes; the record's CRD, RBAC and admission policy were run on a local kube-apiserver 1.37 (13 cases: any identity but the release's ServiceAccount is refused, also system:masters; the ServiceAccount creates and replaces, has no delete or patch; spec.installation other than the name is refused). golangci-lint, helm unittest and the full test set per mutant were not run by the reviewers; CI is the reference. Not run: a real GitHub or Slack (the end-to-end tests use fakes), a real three-way merge, the manager deployed on an installation. Not lab-tested: the agentlab runs do not include this repository. The drift tests against muster and agent-platform skip in CI until those repositories merge; add the sibling checkouts to CI when the releases are cut.

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 giantswarm/agent#143 agent chart 3.0: tools and default, requireApproval removed
agent-skills giantswarm/agent-skills#90 agent management skill
agent-platform-operator giantswarm/agent-platform-operator#74 organization chart source follows the configuration
agentlab giantswarm/agentlab#1355 lab: governed mode docs, the portal's Dex client, the portal's workload token

…econcile

The platform's governance mode and the servers muster governs become inputs
of the agent-platform definition (governance.mode, governance.governedServers),
rendered into the meta chart's top-level governance and governedServers and
read back from the configmap patch on record, so a reconcile no longer drops
them. Validation follows what muster refuses to start on and what the meta
chart refuses to render. Every governance choice is refused while no meta
chart release renders muster's governance configuration (GovernanceChart
unset), so no installation reads as governed while its muster is not.
…loosens

GovernanceOf compares the governance and governedServers of an
installation's agent-platform values on record and as rendered, with their
values, and names the changes that loosen it (governed to trusted, a source
no longer governed or back to the chart's entry, a role changed, a safe
entry added, one named like a write marked). Values that cannot be read on
either side count as a loosening change. The summary reads the governance
on a line of its own instead of among the values keys.
… test installations too

A commit or wave whose plan changes an installation's governance records
the change on the Action (spec.governance) and always asks for the Team
review, also where every target is a test installation; requestApproval
never records such an action as not requiring review. approve_action keeps
refusing the actor, so a second person of the team decides. The review
leads with the governance old to new and what loosens it. Every step is
audited: committed, self-approval refused, approved, merged, and merged
outside the manager without a decision. docs/governance.md describes the
input, the rule, the audit lines and the proposed safe list for this
manager.
…carry markup

A server's role is fixed by the meta chart for its own sources, so an
override may no longer change it (muster applies a role's floors by the
server's role); a server key of its own must name its role and may not
stand for one of the chart's sources. No floor of any role may be safe,
safe entries must be tool names and a list holds at most 64. muster's
roles and floors and the chart's governedServers now live in
definitions/agent-platform/governance.yaml, held to muster and the chart by
a test that reads sibling checkouts where present (review S9-02, S9-03,
S9-13).
…muster hold

A plan's governance change now compares what muster governs on both sides,
a source left to the meta chart read as the chart's entry, so a first
override shows what it adds and removes and an explicit trusted dropped is
no change. Write verbs anywhere in a tool name and floors of any role are
marked, values from the record are escaped for Slack, muster's own
muster.muster.governance and a muster hold below the release that enforces
the governance count, and a disable deleting governed values is a
loosening change. Snapshots let an Action record the governance it leaves
(review S9-01, S9-03, S9-04, S9-09, S9-10, S9-14).
…k the second person's team

Every Action records the governance its commit leaves (spec.governanceAfter;
a disable records the governance before it), and a plan compares against
the newest reviewed one: a disable followed by an enable, or a change made in
the configs repository directly, is a governance change again and asks the
review, the outside change named and logged. A disable deleting governed
values asks the review on test installations too. Before recording that a
test installation needs no review, the commit reads the values on the
default branch again. approve_action refuses the actor by GitHub id too, and
for a governance change anyone who is not an active member of the
approvals.governanceTeam GitHub team or no person, read as the approver and
failing closed. A stage merged outside the manager decides nothing for a
governance change; such merges are audited in any state, merges per stage
with their pull requests and heads. The review puts what loosens first and
never cuts it, refusing a change whose loosening lines do not fit, and an
Action stored without its governance is refused (review S9-01, S9-03,
S9-05, S9-06, S9-07, S9-08, S9-11, S9-15, S9-16).
…afe list's side effects

docs/governance.md now says how a change is compared (effective governance,
against the last reviewed action), what the definition refuses, who may
approve, what the review shows first, every audit line, that a direct edit
of the configs repository is detected at the next plan rather than
prevented, and that three of the Platform Manager's safe tools bring Action
records up to date and post the facts (review S9-06, S9-12).
…he actor under a new login

The actor approving under a renamed login with the same GitHub id is
refused; the wave's and the disable's commit audit lines are asserted, so
removing either call fails a test (review S9-11, S9-16).
…xed platform parts

The open-source charts and muster no longer carry anything of Giant Swarm
(decision #92), so the definition renders it on every installation it
manages: the Platform Manager's role floors (governance.roleFloors:
platformManager approve_action and merge_action), the Platform Manager as a
governed server with its safe list, where the meta chart takes the
governance, and the Giant Swarm admin groups as muster's connector admins
(muster.rbac.mcpServerEditor.subjects) on the 4 line. The mode moves to
governance.mode. No input changes these parts: an override of
giantswarm-platform-manager is refused unless it is the platform's entry
read back, and the plan reads a governance without roleFloors as having the
platform's, so writing them changes nothing while a floor that goes
loosens.
docs/governance.md describes the fixed platform parts the definition
renders (role floors, governed server, connector admins), why they are no
inputs, the governance.mode input and the drift test against muster and the
chart from before and after decision #92.
… workflow editors

The agent-platform chart drops them as defaults of
muster.rbac.workflowEditor.subjects (decision #93), so the definition
renders them on every installation on the 4 line beside the connector
admins, fixed and never an input.
This was referenced Nov 26, 2026
…e its parts removed

The Platform Manager's MCPServer runs in its release namespace,
giantswarm-platform-manager, outside muster's: its governed entry is now
giantswarm-platform-manager/giantswarm-platform-manager, and an input
naming that server under any key is refused. The plan no longer reads
absent role floors or a missing Platform Manager entry as the platform's,
so removing them out of band is a loosening governance change. A drift
test fails once the meta chart renders the governance while the
definition's gates are not set to its floor, so the release order cannot
leave Giant Swarm installations without the Platform Manager's floors
(review F1, F2).
…ions

docs/governance.md now says that the definition's governance gates are set
before the chart release that renders the governance, carries the Giant
Swarm upgrade snippet agent-platform's UPGRADE.md no longer has (editor
groups, role floors, the Platform Manager's governed entry), and names the
Platform Manager's server key.
…ge of their own

With absent role floors read as none, the first commit that puts Giant
Swarm's governance parts on record is a tightening governance change; the
tests that need no governance change start from a record that carries them
(review F2).
@circleci-architect

circleci-architect Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Published Helm chart giantswarm-platform-manager

0.96.1-r27740a5ft20261130135621h081b39d
Chart giantswarm-platform-manager
Version 0.96.1-r27740a5ft20261130135621h081b39d
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/giantswarm-platform-manager:0.96.1-r27740a5ft20261130135621h081b39d
Digest sha256:6f19c680534278bee3f6c5dda6875ad4e03345eef93427f80f07be16da0fd6d8
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/giantswarm-platform-manager --version 0.96.1-r27740a5ft20261130135621h081b39d

Posted by architect-orb · build 46469 · commit 081b39d · updated in place on every push

… snapshot-less actions

A plan now compares the record's governance with what the last reviewed
action left also when it writes the agent-platform values as they are on
record, so an outside edit is named and logged rather than adopted. Only an
action that recorded the governance it leaves can be the baseline; one
without a snapshot is skipped, and actions are ordered by their stage's
merge, ties by name and logged. A governance merged between the plan and
the pull requests is recorded on the action (status.governance) as a
loosening change, so its review shows it and only a member of the
reviewers' team approves it, for a commit and a wave alike (review D-GO-01,
D-GO-02, D-GO-07, D-GO-11).
…es unchanged values

docs/governance.md says which actions are a baseline, that an outside edit
is shown when the values are written unchanged, that a governance moved
under the plan becomes a change of the action, and the new
governance_baseline_ambiguous line (review D-GO-01, D-GO-02, D-GO-07).
… write verbs

The platform team and the subjects of muster's connector-admin and
workflow-editor bindings are part of the governance snapshot: a subject
added widens who may loosen approvals and is a loosening change the team
reviews, on test installations too; absent editor subjects read as the
Giant Swarm groups the definition renders. The write mark reads more verbs
(drain, cordon, upgrade, install, terminate, rollout, label, ...) and the
words of camelCase names (decision #97, review D-GO-20, D-GO-24).
…ompare every plan with it

The governance a plan is compared with is no longer derived from the
Actions' order or states. A GovernanceRecord per installation, in the
manager's namespace and written only by its ServiceAccount, holds what the
team last reviewed: merge_action writes it when it merges the stage of an
approved governance change, with the approver and the configs pull
request's merged head. Every plan compares the configs repository with it,
so an edit outside the manager, a revert by hand or an older action merged
after a newer one is an unreviewed change the next commit asks the team to
confirm or restore. An installation without a record asks the review while
its governance is in play (fail closed; its first reviewed commit records
it), and a reviewed change reverted by hand is audited (decision #99,
review D-GO-25, D-GO-26, D-GO-31).
docs/governance.md replaces the baseline derived from the Actions with the
GovernanceRecord: who writes it and when, what every plan compares, the
fail-closed migration of installations without one, and the new audit
lines (decision #99).
…unrecorded governance whole

Each Action records which record its plan compared with
(spec.governanceBase); merge_action merges a stage of an approved
governance change, and writes the record, only while the installation's
record is still that one, so an approval given against an older record no
longer displaces a newer review. Without a record the review shows the
governance the commit leaves whole, against the chart's defaults. A
reviewed disable marks its record, and the enable after it is compared
with the governance from before under its own line instead of reading as
an outside change. A ValidatingAdmissionPolicy lets only the manager's
ServiceAccount create, update or delete the records, and the CRD holds
spec.installation to the object's name (review D-GO-33 to D-GO-36,
D-GO-40).
docs/governance.md describes the merge's compare-and-swap, the admission
policy on the records, the whole-governance review without a record and
the enable after a reviewed disable (review D-GO-33 to D-GO-36).
@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record

Part of giantswarm/giantswarm#38902 (tool approval, slice 9 and the Giant Swarm side of the OSS-neutrality refactor). Purpose: this record says what was reviewed on this branch (governance as a typed input of the agent-platform definition with second-person approval, and the Giant Swarm governance parts rendered as fixed platform parts), by whom and with which outcome, so that reviewers can skip what is covered. Branch tool-approval is 23 commits on 9a4ceb7, tip a1ac13f. Hashes are those of the pushed tool-approval branch.

Read this first

  • One independent code and security review of slice 9 (0 blockers, 0 highs), one independent security re-check of the refactor that moved Giant Swarm specifics here, then a delta review, a re-check, a final re-check and a last review of the governance baseline and its replacement, the reviewed-governance record (Claude Fable 5.2 throughout). 0 open blockers, highs or mediums; the open findings are low or below and listed at the end.
  • The baseline was redesigned during review. The first fix derived the governance a plan compares with from the Actions' order and states; two re-check findings showed it could be displaced (a stale Action merged late, a hand revert). It was replaced by a GovernanceRecord per installation (a new CRD written only by the manager's ServiceAccount when merge_action merges an approved governance change), with a compare-and-swap at the merge and an admission policy on the record. Findings from before that change that name the Actions' order are obsolete.
  • Nothing here is live yet, by design: GovernanceChart and GovernanceMuster (the release gates) are empty, so every governance choice is refused until they are set to the real releases; approvals.governanceTeam must be set on the deployed manager or no governance change can be approved. Both are release steps, see open items.
  • Not lab-tested: the Platform Manager is not deployed in agentlab. Not exercised: a real GitHub or Slack, a real three-way merge (the end-to-end tests use fakes), who holds write rights on governancerecords on a real hub.

Review rounds

# Round Scope Reviewer Kind Result
1 Code and security review, slice 9 9a4ceb7..888334b (9749dcb, f87631d, 6cdb0b4, 888334b; 24 files, +1360); 27 mutations, PoC tests Claude Fable 5.2, independent, decision log read after the findings code and security 0 blocker, 6 major, 7 minor, 3 nit; security 5 medium, 5 low
2 Fix round c655359, 6ec0eb0, ea37b12, ed3196f, 1f2f326 implementer fix all 16 findings fixed, each with a regression test that fails on 888334b
3 Refactor: Giant Swarm parts move here 9c83a93, 3eb427a, 2340c45 implementer feat the platform parts render as fixed parts, never inputs
4 OSS-neutrality refactor re-check the three commits (tip 2340c45); PoC tests against muster 54f797e and the chart with the floor set Claude Fable 5.2, independent security 2 findings for this repository (F1, F2 medium); others in muster and agent-platform
5 Fix 111f8c2, fae585b, 723dfda implementer fix F1 and F2 fixed; F10 upgrade note moved here
6 Final delta review, Go services 888334b..723dfda in full (c655359, 6ec0eb0, ea37b12, ed3196f, 1f2f326, 111f8c2, fae585b, 723dfda), interplay only 9c83a93, 3eb427a, 2340c45; go build, go vet, go test ./..., E2E=1 go test ./internal/e2e/...; drift tests against snapshots of muster and agent-platform; 43 mutants (34 killed, 9 survived); 2 end-to-end PoCs Claude Fable 5.2, independent code and security 0 blocker, 0 high; 2 medium [sec] (D-GO-01, D-GO-02) against the fix of S9-06, 1 low [sec] (D-GO-07), D-GO-11 (minor), D-GO-20 (nit), D-GO-24 (info)
7 Fix 9fc3938, 79d3de1, 46e4ff8, 1d34eeb implementer fix D-GO-01, 02, 07, 11, 20, 24 fixed
8 Re-check of the delta fixes at 1d34eeb; go test ./..., e2e subset; 24 mutants (17 killed, 7 survived); 2 new PoCs Claude Fable 5.2, independent re-check every stated fix verified except that D-GO-02 is partly fixed; new D-GO-25 and D-GO-26 (medium [sec]: the baseline can still be displaced by a stale Action merged late or a hand revert), D-GO-31 (nit)
9 Fix (redesign) aab6f08, 7cf2c12 implementer fix the governance a plan compares with is an explicit reviewed-governance record per installation; D-GO-25, 26 fixed, the ordering logic is gone
10 Final re-check at 7cf2c12; E2E=1 go test ./...; 23 mutants (15 killed, 8 survived); PoC Claude Fable 5.2, independent re-check D-GO-25, 26 fixed as stated; new D-GO-33 (medium [sec]: an approved Action merged late overwrites a newer record), D-GO-34 (low [sec]), D-GO-35 (info), D-GO-36 (minor), D-GO-40 (nit)
11 Fix aba44eb, a1ac13f implementer fix D-GO-33 to 36 and the platform-manager part of D-GO-40 fixed: compare-and-swap at the merge, an admission policy on the record, a disabled mark
12 Last review 7cf2c12..a1ac13f (aba44eb, a1ac13f); go build, go vet, E2E=1 go test ./...; the rendered CRD, RBAC and admission policy on a local kube-apiserver 1.37 (13 cases); 15 mutants (9 killed, 6 survived) Claude Fable 5.2, independent security 0 critical, 0 high; L-05 (low / minor), L-14 (a) (info), L-15 (nit); the policy of the record works as stated on a real API server

What was checked

Question Result
Typed input moves governed to trusted, drops a source, shrinks or widens a safe list without review No: GovernanceOf compares rendered values with the record; any line forces the review (two independent guards). e2e proves commit and wave
Mixed change; null source drop; unreadable values; unset release gates Caught; fail closed. Not verified: whether konfigure keeps a null through to Helm (if dropped, the chart's entry stays, which fails toward governing)
Stale or raced Action; same person approves; disable, direct edits, merges outside Head pinned at merge; login or id comparison and GitHub's own self-approval refusal; gaps found and fixed (S9-01, S9-05, S9-06, S9-07)
Validation against muster and the chart; review text; audit lines; safe list Matches what muster refuses to start on; findings S9-02 to S9-04, S9-11, S9-12
Atomic render of floors with the entry; outage on upgrade ordering The role floors and the governed entry are written together or not at all; none from released versions

Mutations (round 1): 27 with E2E=1: 15 killed, 3 survive only because a second guard covers them, 6 survive for lack of a test (S9-11, fixed), 3 did not compile and were redone. Checks run by the implementer after every round: go build ./..., go vet ./..., goimports -local, golangci-lint run (0 issues), go test ./..., E2E=1 go test ./internal/e2e/..., make helm-lint, make test-chart.

Findings

ID Severity Title Outcome
S9-01 major (security medium) disable then enable takes a governed test installation to trusted with one person fixed in ea37b12 with 6ec0eb0: a disable records the governance it deletes as a loosening change; every Action records the governance it leaves; every plan compares against the newest reviewed action
S9-02 major (security medium) a role override switches a server's floors off, and the manager accepts it fixed in c655359: a chart source's role must equal the chart's; a server key must name a role and may not alias a chart source; a floor of any role is refused on any safe list
S9-03 major (security medium) the review can be cut before the loosening, or forged, by typed values fixed in c655359, 6ec0eb0, ea37b12: entries restricted to a safe character set and 64 per list; values escaped for Slack; the loosening block comes first and is never cut (a commit whose loosening lines exceed 1000 characters is refused)
S9-04 major (security low) a first override shows no old value, so added entries are not visible fixed in 6ec0eb0: the plan compares effective governance (chart entry as the old side)
S9-05 major (security medium) the "second person" is any other GitHub login; team membership is never checked fixed in ea37b12: the approver must be an active member of approvals.governanceTeam and a User; unset or unreadable refuses (fail closed)
S9-06 major (security medium) a change made in the configs repository directly is adopted by read-back, unseen fixed in ea37b12, docs ed3196f with a first design (the plan compares against the governance the newest reviewed action left), replaced after the re-check by the reviewed-governance record (D-GO-25, D-GO-26); a differing record is logged and shown as a loosening line, the next commit asks the review
S9-07 minor (security low) merges outside the manager: later wave stages count as decided; audit misses cases fixed in ea37b12 (merged without approval decides nothing for a governance change; resync audits it)
S9-08 minor (security low) plan-to-branch window: the record compared is not pinned to the branch base fixed in ea37b12 (re-read with a fresh client before recording that no review is needed)
S9-09 minor (security low) the "loosens" label misses cases fixed in 6ec0eb0
S9-10 minor (security low) changes beside the two keys that weaken governance are not governance changes fixed in 6ec0eb0 (muster's own governance and a muster hold below the gate count; a chart hold does not, it fails toward governing)
S9-11 minor test gaps: audit call sites, the muster gate, audit detail fixed in ea37b12, 1f2f326, c655359 (e2e asserts every audit line; one mutant, test = false on the disable path, survives behind a second guard)
S9-12 minor safe list: reads in effect, but three tools write the record and post fixed in ed3196f (documented; the list is unchanged and set as the chart's default entry here)
S9-13 minor muster's floors and roles and the chart's source roles copied without a drift check fixed in c655359 (TestGovernanceMatchesMusterAndTheChart reads sibling checkouts; skips without them)
S9-14 nit a no-op needs a second person fixed in 6ec0eb0
S9-15 nit with an older Action CRD the governance block and the audit lines vanish fixed in ea37b12 (fails before any pull request opens, naming the CRD)
S9-16 nit approver comparison by login fixed in ea37b12 (login or GitHub id)
OSS-F1 medium fail-open window: chart and muster can reach installations before the Platform Manager renders its floors, leaving approve_action and merge_action unasked fixed in 111f8c2, fae585b: release gate. TestGovernanceGatesFollowTheChart fails when the chart's floor is set while GovernanceChart is empty or GovernanceMuster differs; docs state the order (set both gates in the manager release, reconcile every installation before the chart range admits it). Not done: a verify_capability report of a chart that takes governance without the platform parts
OSS-F2 medium the plan reads removed platform parts as present, so removing them out of band is not a governance change fixed in 111f8c2, 723dfda: an absent roleFloors reads as none and the effective servers are seeded with the chart's sources only; putting the parts on record once is a tightening change that asks the review once per installation
OSS-note n/a the governed entry key matched only a server in muster's namespace fixed in 111f8c2: the entry is the namespaced key and a server named under any other key is refused
Final reviews: delta review, re-checks and last review
ID Severity Title Outcome Re-check
D-GO-01 medium [sec] an outside edit is adopted silently when the next plan leaves the values file unchanged fixed in 9fc3938, docs 79d3de1: the record is compared with the baseline whatever the plan writes; the dry run and "nothing to commit" name the change, governance_on_record_changed_outside is logged verified
D-GO-02 medium [sec] an action that does not write the values file erased the baseline fixed in 9fc3938; the ordering half stayed open (D-GO-25, D-GO-26) and went away with the record verified (design change)
D-GO-07 low [sec] a "record moved" review carried no governance block and skipped the team check fixed in 9fc3938: the moved lines are status.governance (loosening), read everywhere through one accessor verified
D-GO-11 minor four guards without a pinning test fixed in 9fc3938 (one test each) verified
D-GO-20 nit the "named like a write" mark missed verbs and camelCase names fixed in 46e4ff8, 1d34eeb verified
D-GO-24 info [sec] tenants.platformTeam and the muster editors' subjects were not governance, so one person could widen who may loosen approvals fixed in 46e4ff8: they are in the governance snapshot, a subject added loosens verified
D-GO-25 medium [sec] a stale Action merged late became the baseline, so a direct push taking governed out again matched it fixed in aab6f08, 7cf2c12: the reviewed-governance record fixed as stated; the class stayed partly open (D-GO-33)
D-GO-26 medium [sec] a revert by hand dropped the reviewed Action from the baseline fixed in aab6f08: the record survives; the revert is audited (governance_change_reverted) fixed
D-GO-31 nit surviving mutants (baseline order, decided reading status.governance, a ServiceAccount subject's namespace) fixed: two pinned, the order logic removed verified
D-GO-33 medium [sec] an approved governance Action parked before a later review overwrote the newer record when merged fixed in aba44eb: each Action records the record its plan compared with; merge_action refuses when it moved (governance_record_moved_since_plan) and the write is a compare-and-swap verified in the last review
D-GO-34 low [sec] the review of an unrecorded installation confirmed a governance it did not show fixed in aba44eb: without a record the change is shown against an empty governance verified in the last review
D-GO-35 info [sec] "written only by the manager" was RBAC of this chart alone fixed in aba44eb: a ValidatingAdmissionPolicy (default on) denies create, update and delete of governancerecords to any identity but the release's ServiceAccount verified on a local kube-apiserver 1.37 (13 cases)
D-GO-36 minor after a reviewed disable the next plans logged a false "changed outside" fixed in aba44eb: the record is marked disabled verified in the last review
D-GO-40 nit surviving mutants (a record that does not parse, a record written without governanceAfter, a record written while the merge waits, the revert audit paths) fixed in aba44eb verified in the last review
L-05 low / minor a disable whose values on record do not parse records governanceBase: none although a record exists, so its merge is refused and cannot be re-planned open: fails closed, by reading, not run
L-14 (a) info [sec] the record's policy matches every namespace without exception, so deleting the manager's namespace by hand cannot remove the records (it would stay Terminating); a cluster admin can still impersonate the ServiceAccount, mint its token or delete the binding open: a note in the chart README is suggested
L-15 nit surviving mutants without a test: the store's half of the compare-and-swap, a wave that records no governanceBase, the merge check on a stage without a governance change, the CRD's name rule open

Lab verification

None. The manager is not deployed in agentlab; its effects on muster (floors, the governed entry, workflow editors) were exercised only through muster's own tests and the chart's verify-tool-approval, which check the mechanism with a fixture role. e2e tests run against fakes of GitHub and Slack.

Open items

Findings still open or partly fixed:

Item Severity What remains Why it is acceptable now
L-05 low / minor a disable whose values on record do not parse can never be merged through the manager fails closed (deny and commit again records the same); by reading, not run
L-14 (a) info [sec] the record's admission policy has no exception for namespace deletion; a cluster admin can impersonate the ServiceAccount note it in the chart README; by design for a cluster admin
L-15 nit six untested mutants (the store's compare-and-swap half, a wave without governanceBase, the merge check on a stage without governance, the CRD name rule) the guards exist and the next plan fails closed
Release gates release step set GovernanceChart and GovernanceMuster in the manager release that precedes or accompanies the chart release, then reconcile every installation before the chart's version range admits it unset gates refuse every governance choice (fail closed); a test fails if the sibling chart sets its floor first
Governance team release step set approvals.governanceTeam on the deployed manager unset means nobody can approve a governance change (fail closed)
Migration an installation with governance in play asks the review on its first commit that writes the agent-platform values and that merge writes the record; an installation whose values already match stays unrecorded until a commit changes a file fails closed ("nothing to commit" names the difference)
Configs repositories branch protection on the configs repositories was asked of their owners, not done here merges outside the manager are detected and audited, not prevented
Drift tests in CI the drift tests skip without sibling checkouts; until muster and agent-platform merge, their main branches do not carry the shapes the tests compare against CI should set AGENT_PLATFORM_CHECKOUT and MUSTER_CHECKOUT when the releases are cut
konfigure whether a null in the configmap patch survives to Helm if dropped, the chart's entry stays: fails toward governing
F1 option 3 verify_capability does not report a chart that takes governance without the platform parts the manager does not know the resolved chart version, only holds
Safe list three safe tools bring Action records up to date as the caller and post facts to a thread documented in docs/governance.md; they decide nothing

Never run:

  • A real GitHub or Slack (the end-to-end suite uses fakes), and the manager deployed on an installation or in agentlab.
  • A real three-way merge: the end-to-end fake remote writes the merged branch's file over the default branch, so the D-GO-25 and D-GO-33 PoCs put the governed lines back by hand.
  • Who holds write rights on governancerecords on a real hub; the namespace controller against the record's policy; a cluster admin impersonating the ServiceAccount.
  • golangci-lint and helm unittest; platform-manager mutants ran against the e2e subset and the unit packages, not the full suite per mutant.
  • A remote-target cluster and Flux remediation: not applicable to the manager; a browser: not applicable.

@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: 2defe601505a4d785066ff51417e7b1050fdd9f4 (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: typed governance rendering, reviewed snapshots, second-person review, commit/merge/revert/wave paths, record CRD/admission and selected regression tests. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

The scoped independent pass supports typed/preserved governance, human team review even on test installations, reviewed-baseline comparison and explicit loosening disclosure. Release floors and cluster rollout remain outstanding prerequisites already documented.

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

None newly established.

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 Tests cover external edits, stale approved records, disable/enable, waves, reviewer authority and untruncated loosening; inspected selectively, not rerun.
Correct (edge cases) no additional defect established Inspected changed contracts and cross-repository dependencies; not a proof of all interleavings.
Standard mechanism existing patterns used Existing Actions/Team review plus Kubernetes optimistic concurrency; governance names come from the PRD.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries static review only Human team membership, actor separation, record write authorization and stale-record checks inspected.
Simplest fix retain approach Reuse the Action review flow and a persisted reviewed baseline; no new smaller replacement recommended.
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 / 0 non-blocking / 0 suggestions Findings above supplement the existing review record.
Merge danger one-way door persisted governance records and GitOps rollout decisions.

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. Large test, fixture and documentation changes were inspected selectively; this is a focused deep review of the contracts above, not exhaustive line-by-line coverage.

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 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
…s inline approval

The input portalWorkloadToken.enabled (off by default) binds muster's
muster-approval-decider Role to the portal's ServiceAccount
(muster.rbac.approvalDecider.subjects) and has the portal's chart project
that ServiceAccount's token for audience muster and name it in
muster.workloadTokenFile (backstage.musterWorkloadToken.enabled in the
Component's values). The meta chart wires both only for a portal it deploys
itself; a portal of the customer-portal definition is a release of its own.

Refused while the meta chart, muster or portal chart release carrying it is
unset (GovernanceChart, PortalWorkloadTokenChart), off the 4 line, under a
hold below them, without a portal on the installation and while the portal's
chart line admits no chart that projects the token. Read back from the
binding's presence, so a reconcile keeps it.
…t trusts its client

The input is now inlineApproval.enabled. Beside the decider binding and
the projected token it names the portal's Dex client, backstage as the
record reads it, as the portal's own (backstage.oidcClientId) and as
muster's one trusted client (muster.muster.approval.trustedClients); a
portal signing in through a client of its own is refused.

The gates now check what the installation resolves to, not only that a
release exists: InlineApprovalChart (the meta chart that sets the
trusted-clients floor), InlineApprovalMuster (that floor) and
PortalWorkloadTokenChart, a release candidate only where the installation
or the portal's chart line follows them, the muster check with or without
a hold. A portal on another installation is refused, naming the fallback
to muster's approval page.

The binding names the ServiceAccount the portal's values on record set
(installation.portals[*].serviceAccount), else the chart's default, and
the input reads back from that binding in the list, not from the key's
presence. Tests cover the parsed subjects, a render and read-back round
trip, the 3 line and release candidates.
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — portal workload token

Independent code and security review by Claude Fable 5.2 of d6c5eb4, then fix verification of f8aa628 (inlineApproval.enabled). go test -count=1 ./...: 26 packages ok.

Result after the fixes: 0 blocker, 0 high, 0 medium, 1 low open (security), 1 new low, 3 info. First round: 2 medium, 4 low.

Closed: the input now writes the trusted client beside the binding and the token (PT-01); the gates refuse a release candidate where the installation or the portal's line follows stable only, for muster with or without a hold (PT-02); the read-back is the portal's binding in the list, so an empty list reads off (PT-03); tests compare the parsed subjects and round-trip render and read-back (PT-08); the ServiceAccount name comes from the portal's values on record (PT-09).

Trusted client: only backstage, the definition's portal client, can be written. Any other id on record refuses the input (the hub's Dev Portal with its hand-registered client is refused), and only the portal running on the installation itself is read, so another installation's portal on the record cannot make this one trust its client.

  • PT-04 (low, sec, open): turning the input on is not a governance change; it now adds a trusted client as well as a decider. Add both to the governance snapshot, or record why not.
  • FV-01 (low): the rollout plan still creates a client agent-platform-portal, expects the input on gazelle, and names two of the five gate variables.
  • Info: backstage is every portal's client on that Dex, so the separation rests on the workload token; an own portal with no client on record falls back to backstage; an exact release-candidate tag as the portal's line is refused.

@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge c33c1bd

Merge of origin/main (10 commits, #1066 among them) checked by Claude Fable 5.2: no finding. go test -count=1 ./...: 26 packages ok. No hand resolution beyond two different rows of the definition's README. #1066 adds two kept keys under muster.muster.oauth.server; they do not overlap the keys this branch renders (muster.muster.approval, muster.rbac.approvalDecider, backstage.oidcClientId, governance, governedServers), and the read-backs are unchanged. Nothing of the branch is dropped or doubled. No test combines organization principals on record with inlineApproval.enabled; by reading they are independent.

@Rotfuks
Rotfuks merged commit ce21435 into main Nov 30, 2026
20 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 14:20
teemow added a commit that referenced this pull request Dec 1, 2026
…e-run-values

* origin/main:
  feat(agent-platform): roll credential-api when its credentials rotate (#1083)
  feat(agent-platform): let an outside A2A issuer be trusted for its asserted email (#1082)
  fix(agent-platform): give credential-api's Valkey password a Secret of its own (#1081)
  fix(deps): update module github.com/mark3labs/mcp-go to v1.7.0 (#1068)
  feat(agent-platform): keep a hand-set agent chart line and its migration on reconcile (#1080)
  fix(agent-platform): refresh the credential-api golden for the release gates (#1078)
  feat(agent-platform): set the tool approval release gates to the epic releases (#1077)
  fix(agent-platform): format probes.go and refresh the credential-api golden (#1074)
  feat(agent-platform): run credential-api (#1071)
  fix: relay muster's URL elicitations with mcp-toolkit v0.15.0 (#1073)
  feat(agent-platform): render the kagent controller's trusted audiences (#1072)
  feat(agent-platform): configure the external application entry (#1062)
  feat(agent-platform): make governance a typed input and have a second person approve every governance change (#1053)

# Conflicts:
#	definitions/agent-platform/README.md
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