Repository navigation
feat(spec): add opt-in entrypoint/cmd OCI packaging fields to #Box/#ResolvedBox/#ResolvedBoxView - #23
Conversation
…esolvedBox/#ResolvedBoxView The OCI ENTRYPOINT/CMD surface for direct-spawn images: #Box, #ResolvedBox and #ResolvedBoxView (separate CUE defs) gain opt-in entrypoint:/cmd: fields that the Containerfile emitter bakes into the image's OCI config. Empty by default — a normal charly image bakes no command and the deploy-time init is injected instead; declared only when something spawns the image directly from its baked OCI config with no charly deploy in the loop (e.g. the AgentTeams controller spawning child manager/worker containers through a runtime socket). cmd: [] clears a base image's inherited default command; a declared entrypoint with no cmd is auto-cleared at emission so the entrypoint runs bare. Regenerated via task cue:gen (TestGenReproducible no-op); wire round-trip guarded by TestBox_OCIPackagingFields + TestResolvedBox_OCIPackagingWire. Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
pr-validator verdict: FAIL — do not mergeFresh, independent validation of this PR against the active harness rulebook and the org PR template. The technical content is sound and I verified it independently, but the landing ceremony requirements are not met. Two blocking findings. Blocking findings1. PR body does not follow the org PR template (item 1 FAIL).
2. No CHANGELOG entry staged (item 18 FAIL). What I verified independently (PASS)
How to fix
Push the fix commits to the Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
pr-validator — CHANGES REQUESTED ❌Change class: charly-or-sdk Go (contract repo), cross-repo (spec → sdk → main, B6 order) Head SHA validated: Checklist
Comments consideredNone — the PR carried no comments. Cross-PR interactions consideredNone open — DecisionFAIL — not merged. The technical content is sound (all tests green,
Fix on the same Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
…ng fields Placeholder CalVer (2026.224.0344), finalized by the pr-validator at merge. Establishes the per-PR CHANGELOG convention for this cutover (spec → sdk → main). Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
…int/cmd OCI packaging cutover Renames the staged CHANGELOG placeholder to the merge-time CalVer (one stamp for the changelog and the v0.2026224.403 tag). Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
pr-validator — APPROVED ✅Change class: charly-or-sdk Go (wire/contract repo), cross-repo (spec → sdk → main, B6 producer→consumer order) Head SHA validated: This PR was merged by a concurrent pr-validator session (merge commit Checklist
Phase 1b (documentation scrutiny): cold reader skipped with reason — the diff contains no reader-facing narrative page (CHANGELOG history + schema/code only). Comments considered
Cross-PR interactions consideredNone open — DecisionPASS. This PR was merged by a concurrent validator at
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
…nd the pod bed (Unit 3) 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-pod` bed. Consumes the opt-in `entrypoint:`/`cmd:` box wire fields (spec v0.2026224.403, PR opencharly/spec#23) and the sdk's OCI ENTRYPOINT/CMD emission + quadlet `HostName=` 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** (`dockerCreatePayload` sends 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 bare `bash` (the base image's default `/usr/bin/bash`), exited 0, and restarted forever. The fix lands the box-authored OCI packaging end to end: the `agentteams-manager` box declares `entrypoint: [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): builds `agentteams-controller` + `agt` from 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-owned `start-controller.sh` resolves the shared credentials from the `/data` volume 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-level `entrypoint:` that fixes the crash-loop. - `charly.yml`: the `agentteams` box + `agentteams-manager` box + the `check-agentteams-pod` bed (replaces `check-agentteams-core-pod`): 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"`. - `candy/plugin-deploy-pod/config_setup_helpers.go`: the direct-run `charly start` argv now emits `--hostname <name>` — parity with the quadlet `HostName=` 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: 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. - `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/spec` bumped to `v0.2026224.403` (the merged spec tag). - `sdk` + `spec` submodule gitlinks: pinned to the merged SHAs (`b49946e`, `9e52340`). - `CHANGELOG/2026.224.0510.md` (new): the Unit-3 release entry (CalVer stamped at merge). Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
Summary of changes
Adds the opt-in
entrypoint:/cmd:OCI packaging surface to the box wire types — the first repo of the three-repo fix (spec → sdk → main, B6 producer→consumer order) for the AgentTeams manager container crash-loop.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. Two secondary defects compounded it:$(hostname)evaluated empty inside the pod (nohostname(1)binary), and the container's default hex-ID hostname was not resolvable on the charly network.Concrete edits (all 5 files accounted for):
schema/box.cue(#Box): opt-inentrypoint?/cmd?— empty by default (a normal charly image bakes no command; the deploy-time init is injected instead).cmd: []clears a base image's inherited default command; a declared entrypoint with nocmdis auto-cleared at emission so it runs bare.schema/resolvedbox.cue(#ResolvedBox) +schema/resolvedproject.cue(#ResolvedBoxView): the same fields on the resolved forms, so the plugin-build resolve leg re-emits them without the live candy graph.spec/cue_types_gen.go: regenerated viatask cue:gen(re-run on the committed tree is a no-op;TestGenReproduciblegreen). CUE-sourced per SDD — no hand-written wire struct.spec/box_oci_packaging_test.go:TestBox_OCIPackagingFields(YAML unmarshal) +TestResolvedBox_OCIPackagingWire(JSON wire round-trip) — both fail without the new fields.CHANGELOG/2026.224.0344.md: staged (placeholder CalVer, finalized at merge).Change class
charly-or-sdk Go (wire/contract repo), cross-repo:
opencharly/spec→opencharly/sdk→opencharly/charly(B6 producer→consumer landing order). The sdk PR (OCI ENTRYPOINT/CMD emission + quadletHostName=parity) and the main PR (manager boxentrypoint:+${HOSTNAME}+--hostnameparity + submodule gitlink pins) are NOT yet open — they depend on this merge + tag.How R10-tested — exact gate, commands, and pasted output
charly check run check-agentteams-pod(main repo,disposable: true) — the R10-gate-by-change-class matrix maps a wire-shape contract change onto the bed that composes it, because the schema only has observable behavior through the sdk emitter + the main box that consumes it.check-agentteams-pod | pod | ok | 13 steps | 399s(run calver2026.224.0319, binary2026.223.2215— the worktree-localbin/charlyrebuilt with the full three-repo tree, so the spec schema fields 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.223.2215) from this tree; 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 (consuming these fields) 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 schema fixes. 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).N/A— this change touches no shared-state path in the spec repo (pure wire fields); 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 schema fields reached the sdk emitter, the manager image carried the baked
ENTRYPOINT+CMD [], the controller spawned it through the bound rootless 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:go+/charly-internals:plugin(CUE is the single source;@go(Entrypoint, type=[]string)/@go(Cmd, type=[]string)consistent with sibling slice annotations;[...(string & !="")]matches theenabled_pluginspattern);/charly-check:checkR10-gate-by-change-class;/charly-internals:git-workflowtwo-step landing.dockerCreatePayload+ charly images baking none;$(hostname)empty; unresolvable hex-ID hostname). The bed shows zero warnings; the two earlier failed runs (2026.224.0211,2026.224.0302) are the documented pre-fix states, each RCA'd in the sdk/main legs.#Box,#ResolvedBox,#ResolvedBoxView) that each legitimately carry them (the resolved view needs them for the plugin-build resolve leg); doc comments are tailored per def; 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.N/Afor this repo (wire/contract — emits no Containerfile/labels); the emitted-artifact assertion lives in the sdk leg (ENTRYPOINT/CMDContainerfile sections +charly box inspect).charly version=2026.223.2215) and ran the bed; no new runtime OS deps.disposable: true(check-agentteams-pod), fresh rebuild, zero warnings; the new tests (TestBox_OCIPackagingFields,TestResolvedBox_OCIPackagingWire) FAIL without the change.spec/cue_types_gen.goregenerated,task cue:genre-run is a no-op on the committed tree,TestGenReproduciblePASS (re-runs the full concat→gengotypes→retag pipeline, not skipped). RDD: the composition-at-latest-versions assumption was bed-proven (check-agentteams-pod). ADE:N/A— no candies in the spec repo.N/Afor this repo — the spec repo is the wire-shape layer (CUE-first); adding opt-in fields to the box defs is the correct layer, no kernel/concrete-kind placement involved.disposable: truebed.gofmt -l .empty,go vet ./...clean,golangci-lint run ./...= 0 issues,go test ./...green (re-run independently).CHANGELOG/2026.224.0344.mdstaged (placeholder CalVer, finalized by the pr-validator at merge).Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)