Repository navigation
feat(agentteams): controller candy, top composition, manager image, and the pod bed (Unit 3) - #247
Conversation
…nd the pod bed (Unit 3)
The controller layer of the AgentTeams cutover: candy/agentteams-controller
builds the agentteams-controller + agt binaries from the pinned AgentTeams
v1.2.2 source, downloads kube-apiserver v1.31.3, installs the CRD manifests +
builtin agent trees, and runs the controller as a rootless supervisord service
on :8090 with the kine-backed embedded kube-apiserver. The charly-owned
start-controller.sh resolves the shared credentials from the /data volume and
execs the controller — no upstream install script, no root.
The top composition candy/agentteams composes the five foundation candies
(minio, matrix, element, higress, controller) into one box, and the
agentteams-manager box (tag: manager) composes the openclaw gateway runtime
built from the pinned upstream source commit, plus mc and the agt REST client.
The check-agentteams-pod bed replaces check-agentteams-core-pod: it binds the
host rootless podman socket into the box, pins AGENTTEAMS_MANAGER_IMAGE to the
pre-built manager image, and adds the manager-spawn check — the controller
creates the default Manager CR and the check polls /api/v1/managers until the
manager reaches "phase":"Running", proving the controller can spawn the manager
container through the bound socket from the pre-built image.
The manager crash-loop, root-caused and fixed across three repos: the
controller's dockerCreatePayload sends no Cmd/Entrypoint and charly images
baked none, so the spawned manager ran bare bash and restarted forever. The fix
is box-authored OCI packaging — spec (entrypoint:/cmd: wire fields, landed
v0.2026224.403), sdk (OCI ENTRYPOINT/CMD emission + quadlet HostName= parity,
landed v0.2026224.422), and this repo: the agentteams-manager box declares
entrypoint: [supervisord, -n, -c, /etc/supervisord.conf], start-controller.sh
derives AGENTTEAMS_CONTROLLER_URL from ${HOSTNAME} (bash builtin — no
hostname(1) binary), and the direct-run charly start argv emits --hostname
<name> for parity with the quadlet HostName=. Submodule gitlinks pinned to the
merged spec (9e52340) + sdk (b49946e) SHAs; the spec require bumped to
v0.2026224.403 across charly/go.mod, plugin-deploy-pod/go.mod, and every
external plugin go.mod (the sweep the gitlink bump forces — the loader builds
external plugins standalone, so a stale require fails the build).
Also lands the listServices root-cause fix: the predicate now reads init_systems
(non-empty = at least one init system triggers) instead of the dead has_init
aggregate the resolution pipeline never populates, with a regression test.
R10: charly check run check-agentteams-pod (disposable) — PASS, 13 steps, exit
0, zero warnings, with the manager-spawn check proving the controller reaches
the manager's Running phase through the bound rootless podman socket.
Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly/sdk Go + candy/config (cross-repo: spec → sdk → main, B6 producer→consumer order) Checklist
Comments considered: none (the PR carries no comments). Cross-PR interactions considered: none open — Decision — FAIL, not mergedBlocking finding (item 17): the PR introduces a gofmt-dirty file, Exactly what the author must fix: run Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
gofmt -w candy/plugin-deploy-pod/hostname_parity_test.go — the trailing comment alignment in the buildStartArgs call did not match gofmt's column rules. Formatting-only; the test body is unchanged and still passes. Assisted-by: Claude Code deepseek-v4-flash:cloud (syntax check only)
Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
pr-validator — APPROVED ✅ (supersedes the prior CHANGES-REQUESTED verdict)Head SHA validated: Re-validation of the blocking findingThe gofmt finding is fixed. The fix commit
Full checklist (unchanged from the prior verdict, all PASS)Security screen clean; description complete; change-class gate correct; attribution evidence supports Comments considered: none. Cross-PR interactions: none open. Decision — PASSThe PR is in full compliance. CalVer Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
… seam (#579) The namespace-qualified (git-linked) entity reference seam (the RCA'd divergence between the load-time validator and the runtime resolver): - sdk v0.2026251.531 → v0.2026253.1714 (ResolveEntityRef #246 + the namespace-aware runtime resolution #247) - spec v0.2026251.1735 → v0.2026253.1700 (the deploy from: regex allows the ns.entity form, #127) - plugin-vm v0.2026253.830 → v0.2026253.1802 (the namespace-qualified vm entity resolution #31 + the clone-drive leaf #32 + the entity-keyed leaf paths #33) Effect: EVERYTHING in charly is referenceable — locally AND via git-linked imports (ns.entity) — validated once, resolved everywhere. The X3 spike (from: omarchy.check-charly-omarchy-vm:golden) proves it end to end.
Summary of changes
The main-repo leg of the three-repo fix (spec → sdk → main, B6 producer→consumer order) for the AgentTeams manager container crash-loop, landing Unit 3 of the AgentTeams integration: the controller candy, the top composition, the manager image, and the
check-agentteams-podbed. Consumes the opt-inentrypoint:/cmd:box wire fields (spec v0.2026224.403, PR opencharly/spec#23) and the sdk's OCI ENTRYPOINT/CMD emission + quadletHostName=parity (sdk v0.2026224.422, PR opencharly/sdk#129).Root cause being fixed: the AgentTeams controller spawns child manager/worker containers directly from their baked OCI config (
dockerCreatePayloadsends no Cmd/Entrypoint), with no charly deploy in the loop to inject the init command — and charly images baked none. The spawned manager therefore ran barebash(the base image's default/usr/bin/bash), exited 0, and restarted forever. The fix lands the box-authored OCI packaging end to end: theagentteams-managerbox declaresentrypoint: [supervisord, -n, -c, /etc/supervisord.conf], the sdk emitter bakes it into the image's OCI config, and the controller's spawn now boots supervisord.Concrete edits (all 15 files accounted for):
candy/agentteams-controller/charly.yml(new): buildsagentteams-controller+agtfrom the pinned AgentTeams v1.2.2 source tarball, downloads kube-apiserver v1.31.3, installs the CRD manifests + builtin agent trees, and runs the controller as a rootless supervisord service on :8090 with the kine-backed embedded kube-apiserver. The charly-ownedstart-controller.shresolves the shared credentials from the/datavolume and execs the controller — no upstream install script, no root.candy/agentteams/charly.yml(new): the top composition — the five foundation candies (minio, matrix, element, higress, controller) into one box.candy/agentteams-manager/charly.yml(new): the manager image (tag: manager) — the openclaw gateway runtime built from the pinned upstream source commit, plus mc and the agt REST client, with the box-levelentrypoint:that fixes the crash-loop.charly.yml: theagentteamsbox +agentteams-managerbox + thecheck-agentteams-podbed (replacescheck-agentteams-core-pod): binds the host rootless podman socket into the box, pinsAGENTTEAMS_MANAGER_IMAGEto the pre-built manager image, and adds the manager-spawn check — the controller creates the default Manager CR and the check polls/api/v1/managersuntil the manager reaches"phase":"Running".candy/plugin-deploy-pod/config_setup_helpers.go: the direct-runcharly startargv now emits--hostname <name>— parity with the quadletHostName=key (the sdk leg's fix), so the in-container hostname = the charly-network DNS name on BOTH deploy paths.candy/plugin-box/inspect_list.go+ test: thelistServicesroot-cause fix — the predicate now readsinit_systems(non-empty = at least one init system triggers) instead of the deadhas_initaggregate the resolution pipeline never populates.candy/agentteams-minio/charly.yml+candy/agentteams-matrix/charly.yml: small fixes surfaced during the Unit-3 bed runs (minio health-check path, matrix env).charly/go.mod+candy/plugin-deploy-pod/go.mod:require github.com/opencharly/specbumped tov0.2026224.403(the merged spec tag).sdk+specsubmodule gitlinks: pinned to the merged SHAs (b49946e,9e52340).CHANGELOG/2026.223.2215.md(new): staged (placeholder CalVer, finalized at merge).Change class
charly-or-sdk Go + candy/config (wire/contract consumer repo), cross-repo:
opencharly/spec(LANDED, v0.2026224.403) →opencharly/sdk(LANDED, v0.2026224.422) →opencharly/charly(this PR — the manager boxentrypoint:+${HOSTNAME}+--hostnameparity + submodule gitlink pins).How R10-tested — exact gate, commands, and pasted output
charly check run check-agentteams-pod(this repo,disposable: true) — the R10-gate-by-change-class matrix maps a wire-shape contract change onto the bed that composes it, because the sdk emitter only has observable behavior through the main box that consumes it.check-agentteams-pod | pod | ok | 13 steps | ~400s(run calver2026.224.0436, binary2026.224.0428— the worktree-localbin/charlyrebuilt with the full three-repo tree, so the sdk emission code reached the emitter). Theupdatestep ran a freshcharly updateandcheck-live-rebuild+feature-run-rebuildre-verified the fresh deployment.task build:binaryrebuilt the worktreebin/charly(charly version=2026.224.0428) from the three-repo tree including this commit's emission code; the bed ran on it, then on a freshcharly update— ZERO warnings across every log.entrypoint: [supervisord, -n, -c, /etc/supervisord.conf], the sdk emitter (landed in the sdk leg) baked it into the manager image's OCI config (ENTRYPOINT ["supervisord","-n","-c","/etc/supervisord.conf"]+CMD [], verified viacharly box inspect), the controller spawned the manager from that image through the bound rootless podman socket, and the manager reached"phase":"Running"— the exact failure mode this fix addresses. Two earlier runs show the pre-fix state:2026.224.0211(ok: false— manager REST API unreachable, the crash-loop symptom) and2026.224.0302(startstepok: false— the quadletHostname=unsupported-key unit-skip, root-caused and fixed in the sdk leg). The--hostnamedirect-run argv ran live in everystartstep of the final bed.N/A— the emission is pure render (no shared-state path); the bed ran on the combined tree with no surfaced failure.Attribution tier
fully tested and validated — the cutover's NEW code path executed live against the fresh rebuild: the manager box's
entrypoint:reached the emitter, the controller spawned the manager from the baked OCI config through the bound rootless podman socket, andagentteams-manager-runningPASSed (exit 0) on thecheck-agentteams-podbed — 13 steps, zero warnings, ondisposable: true, plus a freshcharly updatere-verification leg. Output pasted above.Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)/charly-internals:plugin(the boxentrypoint:/cmd:fields arrive via the spec wire types; the emitter is the sdk leg's deploykit pure render);/charly-check:checkR10-gate-by-change-class;/charly-internals:git-workflowtwo-step landing.dockerCreatePayload+ charly images baking none). The bed shows zero warnings; the two earlier failed runs (2026.224.0211,2026.224.0302) are the documented pre-fix states. The quadletHostname=→HostName=unsupported-key unit-skip was root-caused and fixed in the sdk leg (golden test pinned byte-exact). ThelistServiceshas_initdead-aggregate was root-caused and fixed in this leg (regression test added).deploykit/generate.go); the auto-CMD []guard lives beside it; no<name>-host/<name>-podsiblings.N/A— no destructive git action; the branch advanced by adding commits only (no force-push).charly check run check-agentteams-pod, 13 steps, exit 0) — not justgo test.charly box inspectverified the real manager image carriesENTRYPOINT ["supervisord",...]+CMD []; the--hostnamedirect-run argv is pinned bycandy/plugin-deploy-pod/hostname_parity_test.go.charly version=2026.224.0428) and ran the bed; the spec pin bump is mandatory for standalone consumers and verified underGOWORK=off(no new runtime OS deps).disposable: true(check-agentteams-pod), fresh rebuild, zero warnings; the new tests (hostname_parity_test.go,inspect_list_test.go) FAIL without the change.TestGenReproduciblegreen there); the sdk consumes them via the pinned module, no hand-typed wire struct. RDD: the composition-at-latest-versions assumption was bed-proven (check-agentteams-pod). ADE: every candy shipsversion:/description:/plan:with deterministiccheck:steps.--hostnameargv lives incandy/plugin-deploy-pod(a plugin candy); the boxentrypoint:/cmd:fields are spec wire types consumed by the sdk emitter. Correct layer.disposable: truebed.gofmt -l .empty,go vet ./...clean,golangci-lint run ./...= 0 issues,go test ./...green (workspace +GOWORK=off).CHANGELOG/2026.223.2215.mdstaged (placeholder CalVer, finalized by the pr-validator at merge).Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)