Skip to content

feat(organization): reconcile the agent chart source on every reconcile - #74

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

Rotfuks merged 13 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of giantswarm/giantswarm#38902.

What does this PR do?

An organization's agent chart OCIRepository was created once and never updated, so a changed agent chart URL, semver range or filter never reached existing organizations: new agents there installed the old chart. The agent chart's 3.x line (tool approval, linked below) needs every organization to follow the configured source.

Every reconcile now brings spec.url, spec.interval and spec.ref back to the configured chart source. It keeps every other field and label (for example insecure, a certificate secret) and writes nothing when the owned fields already match. An object of that name the operator did not write (no organization-object label) is still left alone. The operator's ClusterRole gets update on ocirepositories (was get, create), limited by resourceNames to the chart's name (the last segment of agentChart.ociUrl), and get on the migrate report ConfigMap only.

  • spec.ref is owned as a whole map: Flux resolves digest over semver over tag, so a stray tag or digest left beside the range would pin or shadow it.
  • A move to a higher major (2.x to 3.x) waits for agent-manager's migrate: the organization's source moves only when the report ConfigMap migrate writes in the organization's namespace carries the ready mark for that major and names every HelmRelease on the source. Until then the ref stays, url and interval follow, and the organization is Ready=False (ChartSourceHeld). A range of no or several majors creates and moves no source (ChartRangeInvalid). The operator is the only writer of the copy, so migrate cannot move it itself.
  • Docs updated: README, values.yaml and schema, the helm README (agentChart.ociUrl).

Since the first review record: a merge of main (the AWS SDK update only), a test-only CI fix (each envtest starts its own manager) and condensed docs and values comments; no change to the reconcile or the gate. Tip 86f31d0; the update comment in the review record says the same. Review round of 2026-11-27 (Quentin): ad0943c, 754e612 and a merge of main; tip 754e612; see the comment "Review record — Quentin's review".

What is the effect of this change to users?

Organizations follow the operator's configured agent chart source: a changed URL or range within a major reaches existing organizations on the next reconcile, and a higher major reaches an organization once migrate has marked it ready. The operator needs the added RBAC; the chart renders it.

What does it look like?

No visual change.

Changes from the plan

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

  • Holds a new major. An organization's chart source moves to a new major only after agent-manager's migrate has marked the organization ready, with every release on that source named in the mark; until then the organization is Ready=False (ChartSourceHeld, requeued every agentChart.migrationPoll, 1m default). A range of no or several majors creates and moves no source (ChartRangeInvalid), also where a source already carries it; a recreated source waits for the mark when a release on it last deployed a lower major. The design had the source follow a major at once; that left every organization release still carrying muster.requireApproval failing chart 3.0's schema.
  • The mark is bound to the releases. The ready mark names each release with the UID and generation migrate recorded; the source moves only if all still match, otherwise the organization holds with ChartSourceHeld naming the releases, and a mark without versions holds. A release recreated or edited after the report no longer passes on its name alone.
  • Range grammar. Ranges that admit a major of 100 or more are refused.
  • Scope of the change. The operator also updates the source on every reconcile, which the design didn't ask for; the operator is a repository the design didn't list.
  • 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. Found in the M2 lab (2026-11-26): the organization source kept its creation URL and its range did not move with the 3.x line, so an organization's agents stayed on the 2.x chart and agent-manager chose toolset over tools for them. The M3 lab saw it again.

What is needed from the reviewers?

  • Confirm that holding a move to a higher major until migrate's ready mark is wanted, and that ChartSourceHeld and ChartRangeInvalid are the right signals.
  • Check the RBAC change (update on ocirepositories by resourceNames, get on the migrate report ConfigMap).

Do the docs need to be updated?

Done in this PR (README, values comment and schema, helm README).

Testing

  • Fake-client unit tests (internal/controller/chartsource_test.go): create, move keeping fields and labels, a defaulted spec not rewritten, a foreign object untouched, semverFilter set and removed.
  • envtest, running with the chart's rendered RBAC: the source moves on reconcile.
  • golangci-lint v2.14.0 run via go run (the locally installed version cannot typecheck under the Go toolchain used).
  • Gate tests: fake-client cases for the gate, envtest "held then moved on the mark" and TestChartRangeInvalidEnvtest (its own API server, >=2.6.0), envtest as the rendered RBAC (updating another OCIRepository and reading another ConfigMap are Forbidden). A second model reviewed the change in four passes (delta review, re-check, final re-check, last review) with 38 mutants; no open finding above minor.
  • Not re-run in the agentlab after the fix; the lab runs showed the defect (M2I-1). Never run: the gate with a real organization, Flux's remediation of the organization releases that fail chart 3.0's schema, the operator under the platform chart's admission policy.

Review round 2026-11-28 (ad0943c, 754e612): unit tests and envtest for the version-bound gate and the range limit; internal/controller passes in the independent re-check (envtest not run there).

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
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

The organization's agent chart OCIRepository was created once and never
updated, so a changed agent chart URL, semver range or filter never
reached existing organizations: new agents there installed the old chart.

Every reconcile now brings spec.url, spec.interval and spec.ref back to
the configured chart source, keeping every other field and label, and
writes nothing when they already match. An object of that name the
operator did not write is still left alone. The operator's ClusterRole
gets update on ocirepositories.
@circleci-architect

circleci-architect Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Published Helm chart agent-platform-operator

0.5.1-r27740a5ft20261130184326h0d7ad5e
Chart agent-platform-operator
Version 0.5.1-r27740a5ft20261130184326h0d7ad5e
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent-platform-operator:0.5.1-r27740a5ft20261130184326h0d7ad5e
Digest sha256:d260a9244f2c7b21b73527c814a50ae7e5f3f21935a9ee261532f156cd061d17
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-platform-operator --version 0.5.1-r27740a5ft20261130184326h0d7ad5e

Posted by architect-orb · build 1589 · commit 0d7ad5e · updated in place on every push

This was referenced Nov 26, 2026
…ntil migrate marks it ready, and scope source updates to the chart's name

A move of an existing organization's agent chart OCIRepository to a higher
major now waits per organization for agent-manager's migrate: until its
report ConfigMap there (agentChart.migrationReport) carries
agent-platform.giantswarm.io/agent-chart-ready-major with the new major, the
source keeps its ref while url and interval follow, the organization is not
Ready (ChartSourceHeld) and is reconciled again every agentChart.migrationPoll.
An organization with no HelmRelease on the source moves at once. Ranges are
read as migrate and the platform chart read them, every alternative of a ||
range included.

The ClusterRole updates OCIRepositories only by the chart's name and reads
migrate's report ConfigMap only. A write the API server stores nothing of is
logged at V(1), not as an update.
…f no or several majors

A missing chart source whose namespace has a HelmRelease that last deployed a
lower major is created only once agent-manager's migrate marks the namespace
ready, as a move of the source would wait. A configured range that admits no
release version (a pre-release pin) or several majors (>=2.6.0) creates and
moves no source and sets Ready=False with reason ChartRangeInvalid instead of
waiting for a mark migrate never writes. The mark must also name every
HelmRelease on the source (agent-platform.giantswarm.io/agent-chart-ready-releases):
a release created after migrate's run holds the move, and the condition says
to run migrate again.
…ries the range

An invalid range (several majors or none) was reported only when the chart
source was missing or its ref differed. A source that already carried it
(>=2.6.0) stayed Ready and Flux would move it to a major migrate never marked.
Also pin the ref that names no major and the newest-first history order.
@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record

Part of giantswarm/giantswarm#38902 (tool approval, milestone 3, found in the milestone 2 lab run). Purpose: this record says what was reviewed on this branch (the chart source reconcile and its gate on a new major), by whom and with which outcome, so that reviewers can skip what is covered. Branch tool-approval is 4 commits on b0bd42e, tip 701cced (15 files, +1049/-30). Hashes are those of the pushed tool-approval branch.

Read this first

  • What changed: the operator created an organization's agent chart OCIRepository once and never updated it, so a moved --agent-chart-oci-url or semver never reached existing organizations. New agents there installed the old chart and failed (additional properties 'tools' not allowed). The operator now keeps the source in sync on every reconcile, and holds an organization at its chart's major until agent-manager's migrate has marked it ready.
  • Reviewed independently by a delta review, a re-check of its fixes, a final re-check and a last review (Claude Fable 5.2). The first review found the "followed at once" design could leave organization releases failing on chart 3.0; the gate on migrate's ready mark is the fix. 0 open blockers, majors or mediums.
  • Behaviour to review closely: an organization's source moves to a higher major only when the report ConfigMap migrate writes in the organization's namespace carries the ready mark for that major and names every HelmRelease on the source. Until then the organization is Ready=False (ChartSourceHeld); a range of no or several majors creates and moves no source (ChartRangeInvalid).
  • Never run in a cluster: the gate with a real organization, Flux's remediation of the organization releases that fail chart 3.0's schema, the operator under the platform chart's admission policy. The lab runs found the defect (M2I-1) with the released operator; the fix was not deployed there.

Review rounds

# Round Scope Reviewer Kind Result
1 Lab run 2 (slice 3) released operator in agentlab tester lab defect M2I-1: the organization's source keeps its creation URL and semver
2 Lab run 3 (slice 8) released operator in agentlab tester lab M2I-1 seen again; the design "the operator moves every organization's source at once" was not observable
3 Implementation df74930 implementer fix tests below
4 OSS-neutrality audit added lines read-only audit audit no findings (the existing chart registry default is untouched; one test URL of the same shape is pre-existing)
5 Final delta review, Go services b0bd42e..df74930; go build, go vet, go test with envtest 1.35.0 and the rendered RBAC of the chart; 9 mutants (6 killed, 3 survived) Claude Fable 5.2, independent code and security 0 high; D-GO-03 (major, operational), D-GO-09 (low [sec]), D-GO-15 (minor), D-GO-18 (nit)
6 Fix 636bf4a implementer fix D-GO-03 (the gate on the ready mark of migrate), D-GO-09 (RBAC by name), D-GO-18 fixed
7 Re-check of the delta fixes at 636bf4a; envtest suite (140 s); 15 mutants (2 RBAC): 14 killed, 1 survived Claude Fable 5.2, independent re-check D-GO-03, 09, 18 verified; new D-GO-29 (minor), D-GO-31 (nit)
8 Fix 7a514c4 implementer fix D-GO-29 fixed (ChartRangeInvalid, recreated source waits, the mark names releases), D-GO-31 pinned
9 Final re-check at 7a514c4; go build, go test ./internal/controller; 14 mutants (12 killed, one by the compiler; 2 survived) Claude Fable 5.2, independent re-check D-GO-29 fixed with one gap: D-GO-37 (minor); D-GO-40 (nit)
10 Fix 701cced implementer fix D-GO-37 fixed: an invalid range is reported also on a source that already carries it; D-GO-40 cases added
11 Last review 7a514c4..701cced; envtest 1.35.0 for ChartRangeInvalid and EnsureChartSource; 3 mutants, all killed Claude Fable 5.2, independent security no finding for the operator; L-14 (b) (info)

What was checked

Check Result
Fake-client unit tests (chartsource_test.go) create, move keeping other spec fields and labels, an API-defaulted spec not rewritten, a foreign object untouched, semverFilter set and removed. Red against the old ensureExists
envtest against a real API server with the chart's rendered RBAC "the chart source follows the operator's configuration"; the resourceVersion stays across a second reconcile (no hot loop)
Gate on a new major (636bf4a, 7a514c4, 701cced) fake-client cases for the gate, envtest "held then moved on the mark", TestChartRangeInvalidEnvtest with its own API server; 38 mutants over three passes (rounds 5 to 11)
Lint golangci-lint v2.14.0 run through go run (the installed v2.6.2 cannot typecheck under Go 1.27)

Design points (the gate was reviewed in rounds 5 to 11; the rest is from the implementer's notes)

Point Decision
What is written on an existing source merge: spec.url, spec.interval, spec.ref follow the configuration; every other spec field, label and annotation stays (a replace would drop a lab's insecure: true or API defaults and risk a hot loop)
spec.ref owned whole: Flux resolves digest, then semver, then tag, so a stray tag or digest would shadow the range
Hot loop the owned fields are compared first; a write only on a difference
Per-organization pin none: the organization resource has no chart field and only the operator may write the copy
A source the operator did not write left alone (no organization-object label)
RBAC the ClusterRole gains update on ocirepositories, limited by resourceNames to the chart's name (the last segment of agentChart.ociUrl); get on ConfigMaps only for agentChart.migrationReport
A higher major an existing source moves to it only when migrate's report in the organization's namespace carries the ready mark for that major and names every HelmRelease on the source; held, the ref stays, url and interval follow, Ready=False ChartSourceHeld, requeue every agentChart.migrationPoll (1m)
A range of no or several majors creates and moves no source: Ready=False ChartRangeInvalid, also where the source already carries the range
A recreated source created only after the mark when a release on it last deployed a lower major

Findings

ID Severity Title Outcome
M2I-1 medium an organization's agent chart source is created once and never updated fixed in df74930 (unit tests and envtest)
ID Severity Title Outcome Re-check
D-GO-03 major (operational) the platform feeds one chart range to agent-manager and the operator, so every organization's source moved on the first reconcile while migrate did not rewrite organization releases; releases still carrying muster.requireApproval failed chart 3.0's schema and stayed failed fixed in 636bf4a: a move to a higher major waits for migrate's ready mark verified, with residuals (below)
D-GO-09 low [sec] update on every OCIRepository of the cluster fixed in 636bf4a: resourceNames on update; envtest runs as the rendered RBAC verified
D-GO-15 minor a source of the chart's name that the operator did not write is skipped with a debug log line only, so the organization stays Ready open: fails safe, the symptom of the defect returns with no signal not addressed
D-GO-18 nit surviving mutants (interval, labels); an update that stores nothing logs as a change fixed in 636bf4a (cases added; a write whose resourceVersion is unchanged logs at debug level) verified
D-GO-29 minor the gate did not hold for a range with no release major, a missing source, or an open range fixed in 7a514c4 fixed with one gap (D-GO-37)
D-GO-31 nit the OCIRepository kind check of the release count had no test fixed in 7a514c4 verified
D-GO-37 minor ChartRangeInvalid was raised only when the source was missing or its ref differed fixed in 701cced verified in the last review
D-GO-40 nit surviving mutants: a ref naming no major (tag, digest) not holding; the deployed major read from the oldest history entry fixed (cases added; mutants killed)
L-14 (b) info [sec] on a source that already carries an invalid range the operator reports ChartRangeInvalid and leaves the ref; Flux still follows the range when 3.x is published open: releases with requireApproval still fail the 3.x schema, as before n/a

Residuals of D-GO-03: between migrate's write and the operator's move (until the operator runs with the new range, then its poll) a rewritten release's 2.x upgrade fails and keeps its asking revision; a release created on the 2.x source after migrate's run holds the move and ChartSourceHeld names it and the re-run command. A forged ready mark moves the source early; releases still carrying requireApproval then fail the 3.x schema and agent-manager binds default: Ask for them, so nothing is lifted.

Lab verification

Not run with this commit. Lab run 2 found the defect; lab run 3 ran the released operator (0.4.7), whose organization source kept its creation URL and its old semver, so agents in the organization namespace stayed on the 2.x chart. The fix was not deployed in the lab.

Open items

Findings still open or partly fixed:

Item Severity What remains Why it is acceptable now
D-GO-15 minor a same-named source the operator did not write leaves the organization Ready with a debug log only the operator never touches it; the symptom of the original defect would return without a signal
D-GO-03 residuals major, mitigated a rewritten release's 2.x upgrade fails and keeps its asking revision until the operator moves the source (rollout, then poll); an older agent-manager writes no release list, so the operator then holds every organization that has releases fails closed; documented in the platform chart's UPGRADE.md and agent-manager's README
L-14 (b) info [sec] Flux follows an invalid range that was set before this operator the platform chart refuses such a range; releases with requireApproval fail the 3.x schema
Chart name change nit a source under an old name is left in place (the name is the URL's last path segment) unchanged behaviour
Kept fields follow the source nit insecure, secretRef or certSecretRef kept on an existing source follow it to a new registry the documented merge choice

Never run:

  • The gate with a real organization in a cluster, and Flux's remediation of the organization releases that fail chart 3.0's schema while the source is held and after it moves.
  • A lab run of the fix: lab run 2 found the defect and lab run 3 ran the released operator (0.4.7), whose organization source kept its creation URL and semver.
  • The operator under the platform chart's admission policy on a real cluster (envtest runs as the chart's rendered RBAC against a real API server).
  • golangci-lint at the repository's pinned version (v2.14.0 ran through go run; the installed v2.6.2 cannot typecheck under Go 1.27).
  • helm unittest, a remote-target cluster, a browser and Slack: not applicable or not installed.

@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record — update

Part of giantswarm/giantswarm#38902. Covers only what is new since the record above (tip 701cced). Branch tool-approval is now 9 commits on b0bd42e, tip 86f31d0. 5 commits since: 65bef37 (fix(deps): update aws sdk (#73), arrived with the merge), 596c498, caf891e, 68e901e (merge of origin/main), 86f31d0.

Read this first

  • No new review round touches this repository; the reconcile and the gate on a new major are unchanged. What changed: a merge of main (dependency update only, go.mod and go.sum), a test-only CI fix (596c498, caf891e: each envtest starts its own manager, so controller name validation is skipped; gofmt), and docs and values comments condensed (86f31d0).
  • Not independently re-checked: all of the above. The merge brings only the AWS SDK update.
  • Not run by anyone: the full envtest suite against the merged dependencies outside CI.

Open items

None new. Findings left open in the record above stand.

# Conflicts:
#	internal/controller/organization.go
@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: 41b9783eb1309dc62e29dff546e363bb77e50400 (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: chart-source reconciliation, major-range validation, migration report consumer, polling/RBAC and relevant fake-client/envtest assertions. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

The source now follows operator configuration and holds major upgrades pending migration. The ordinary hold/move contract is represented; the name-only readiness residual below deserves follow-up.

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

  • [P2] Bind readiness to the release version that migration inspected. chartmajor.go:162 compares only HelmRelease names with the migration report. A release edited back to legacy values, or deleted/recreated under the same name, after the report was written still passes the gate. The source can move to 3.x and leave that release failing the legacy-value rejection. This needs no forged report; it is stale ordinary state. Coordinate with agent-manager to record/check UID and relevant generation or values digest, and test same-name changes after migration. Approval remains fail-closed, so this is an operational follow-up rather than a security blocker.

Suggestions

None beyond the existing review follow-ups.

Deep verification

Aspect Status Evidence / limit
Problem confirmed on base yes The removed ensureExists path in internal/controller/objects.go left an existing chart source unchanged.
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 Source idempotence, held/moved majors, late new names, invalid ranges and recreated source tests inspected.
Correct (edge cases) gaps noted See findings; runtime behavior unverified.
Standard mechanism existing patterns used Flux OCIRepository and Kubernetes reconcile/resourceVersion patterns; existing Ready conditions.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries static review only Named ConfigMap read and ownership guard inspected; stale readiness is an availability issue, not an approval bypass.
Simplest fix retain approach Retain the migration hold; strengthen report identity rather than adding another controller.
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 organization chart-major upgrades and Helm release availability.

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.

@QuentinBisson

Copy link
Copy Markdown
Contributor

Cross-repository reuse and simplicity follow-up

Reviewed 41b9783eb1309dc62e29dff546e363bb77e50400.

Non-blocking: give the three chart-major classifiers one explicit contract. The Go classifiers in agent-manager and operator, and the Helm helper, duplicate finite-probe range classification with different limits. For >=100.0.0 <102.0.0, the Go code derives only 100 (missing admissible 101), while Helm emits none. This is a source-derived example, not an executed test, and does not affect the current 2→3 migration. Avoid presenting the functions as general equivalent semver classifiers: constrain and document the supported grammar/range, reject unsupported inputs, and share conformance fixtures across all three consumers. Masterminds/semver already supplies matching, but Check alone does not prove which majors a range intersects. A new service or broad abstraction is unnecessary.

The chart-source reconciler has a reasonable boundary; a new migration orchestration framework is not needed. The earlier stale readiness finding is the more immediate domain-model issue: the readiness record identifies release names but not the UID/values generation that migration actually inspected. Strengthening that record and sharing classifier contract tests would address concrete drift without a broad rewrite.

No OAuth/MCP/A2A wire protocol is implemented by these operator changes; their responsibility is preserving the policy rollout preconditions.

Verification: static source and published-spec review only; no PR code executed. Local builds, tests/race tests, lint, Helm gates, browser flows and independent-client interoperability remain unverified. Heads were rechecked unchanged. This supplements the earlier deep-review verdict and does not clear its blockers.

Document the range grammar the chart-major classifier reads and refuse a
range that admits a chart major of 100 or more as unsupported, as
agent-manager's migrate and the agent-platform chart do.
…rded

A HelmRelease recreated under the same name or whose spec changed after
agent-manager's migrate run now holds the organization's chart source move,
with a ChartSourceHeld condition naming it, until migrate runs again. A mark
without the release versions holds too.
@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 754e612; since the last record (86f31d0): ad0943c, 754e612 (plus a merge of main: b228c41, 95b951c, 41b9783).

ID Point Outcome
QB-05 The gate compares HelmRelease names only: a release edited back to legacy values or recreated under the same name still passes fixed in 754e612 with agent-manager 2f67c08: the operator moves the chart source only if every release's UID and generation match the ready mark; otherwise it holds with ChartSourceHeld naming the releases; a mark without versions holds. Unit and envtest
QB-07 Chart-major classifiers differ on range limits small version in ad0943c: ranges admitting a major of 100 or more refused, a test. Shared fixtures stay a follow-up

Independent re-check

Claude Fable, 2026-11-28, detached worktree at 754e612, read-only, fixes reverted in turn.

ID Verdict Evidence
QB-05 fixed holds on a missing entry, a UID or generation mismatch and a mark without versions; mutants (UID only, generation only, missing versions) each fail a test
QB-07 done, small version mutation fails TestTargetMajorRefusesRangesPastMajor99

go test ./internal/controller green. envtest not run by the checker.

Open items

ID Severity What is open
N-4 low chartmajor.go:205: generation does not move when a ConfigMap or Secret behind spec.valuesFrom changes, so that edit after the run is not seen. Such a release is only marked when already deployed from the target chart and approval fails closed, so operational only. A values digest would cover it
QB-07 follow-up shared classifier fixtures

@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@QuentinBisson thanks for the thorough review (your comment). Addressed: QB-05 fixed in 754e612 (the gate checks each release's UID and generation), QB-07 in ad0943c. Shared classifier fixtures stay a follow-up.

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 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge round

Part of giantswarm/giantswarm#38902. Reviewer: Claude Fable 5.2, independent of the implementing and merging model, read-only, verdicts formed from the code. Full review: reviews/final/merge-round-2-review.md in the epic's workspace.

Covers the merge of main 3228b7ef (conflict in go.mod). Result: no findings.

  • go.mod takes main's AWS SDK versions and keeps github.com/Masterminds/semver/v3, which internal/controller/chartmajor.go imports. go mod tidy -diff is clean and go.sum equals main's.
  • The merge brings no code besides main's: a generated workflow file, CHANGELOG, go.mod, go.sum.

Run: go build ./..., go vet ./..., go test ./... (pass; envtest suites skip locally, CI passes).

@Rotfuks Rotfuks changed the title fix(organization): reconcile the agent chart source on every reconcile feat(organization): reconcile the agent chart source on every reconcile Nov 30, 2026
@Rotfuks
Rotfuks merged commit 4c4953a into main Nov 30, 2026
18 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 18:50
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