Repository navigation
Description
What breaks
charly box build emits both init systems' enable templates into one Containerfile, and the build dies on whichever the image does not have.
STEP 24/47: RUN rc-update add virtqemud.socket default && \
rc-update add virtnetworkd.socket default
/bin/sh: line 1: rc-update: command not found exit status 127
charly: error: command "build": building agentteams-worker: podman build failed: exit status 127
rc-update is OpenRC. The base is Arch (systemd), the container runs supervisord, and it has neither OpenRC nor systemd.
Verified against the emitted artifact, not the failure message
.build/agentteams-worker/Containerfile
rc-update lines: 2 (lines 181-182)
systemctl lines: 1
Both init forms are emitted into a single Containerfile. The service being enabled is declared in candy/virtualization/charly.yml:141 as:
- name: virtqemud
use_packaged: virtqemud.socket # a SYSTEMD unit
distro: [fedora, arch]
enable: true
scope: systemvirtualization deliberately carries mixed service: entries — a use_packaged: form and a sibling exec: form, both scoped distro: [fedora, arch] — which is the init-polymorphism pattern the rulebook mandates ("Init-system polymorphism via mixed service: entries — never <name>-host/<name>-pod sibling candies"). For a supervisord container target the correct arm is the exec: entry. The generator is instead rendering the packaged-unit arm through OpenRC's system_enable_template (charly/charly.yml:1132).
Why nobody has hit this: it is LATENT, not a regression
Measured, not assumed:
files composing "- charly" in the superproject: 15
of those that are DEPLOYABLE boxes (have base:): 0
composing it in any box/<distro> submodule: 0
virtualization reaches an image only through the charly candy, and charly has never been composed into a built container image. Nothing on main builds it, so nothing on main exercises this path.
It surfaced because candy/agentteams-snapshot (new, unlanded — Factory Unit 6) is the first thing to compose charly into a real image build.
Consequence worth stating plainly: agentteams-snapshot's own premise — "the charly toolchain carried into a deployment" — has never been built by anyone, and cannot be until this is fixed.
Blast radius
Any box that composes charly (and therefore virtualization) into a container that is not systemd-init. That is currently zero boxes on main, and every box that would want the toolchain in-venue.
Where the fix lives
Init assembly is driven by the embedded init: vocabulary (charly/charly.yml, three entries: supervisord-conf at ~997, openrc-services at ~1098, systemd-services at ~1191) and rendered through sdk/deploykit (WriteCandySteps / compile_service_steps.go), with candy/plugin-init/resolve.go projecting the chosen init. The selection of which init's enable template applies to a given target is the thing that is wrong — it should resolve to one arm per target, and for a supervisord container that is the exec: entry.
This spans sdk and charly, so it is its own cutover with its own R10, not a fix to bolt onto the Unit 6 branch.
Reproduction
# on a branch where agentteams-worker composes agentteams-snapshot
charly box generate agentteams-worker
grep -c rc-update .build/agentteams-worker/Containerfile # -> 2
grep -c systemctl .build/agentteams-worker/Containerfile # -> 1
charly box build agentteams-worker # -> exit 1 at STEP 24/47Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Activity
atrawog commentedon Aug 18, 2026
Correcting two claims in the issue body above, before the fix lands.
The defect is real and the root cause holds, but I overstated the evidence. Tracing the emitter and then generating every box twice from one tree (guard neutralized, then in place) contradicts two things I wrote:
systemdwas never in this box's active set.rc-update: 2 / systemctl: 1offered as evidence of both armssystemctlhit is prose inside aLABEL(a skilldescription:), not an emitted command. It is still there after the fix.I read a grep count as a command count without opening the line. The
rc-updatefigure was right; thesystemctlfigure never measured what I said it did.What is actually true.
EmitInitAssemblyrendered the shareduse_packaged:unit list through every active init, andactiveInitsis a set. Foragentteams-workerthat set is{supervisord, openrc}:virtualization'suse_packaged:entries pull in openrc, while the box resolves to supervisord, which declares nosystem_enable_templateat all. So the box's own init correctly emitted nothing and openrc's template emittedrc-update add— one wrong arm, not two.That also corrects the body's closing suggestion. I wrote that the right emission was
virtualization's siblingexec:entry; for this code path the right emission is nothing — supervisord consumes no distro units, and theexec:sibling is already handled by the fragment/service path, which was never broken.Blast radius, now measured instead of argued —
1 of 15generated boxes before,0after. The completediff -rof the two generated trees carries exactly one semantic change (the four-linerc-updateblock leavingagentteams-worker); every other differing line isARG BASE_IMAGE's CalVer tag moving…1130→…1131because the runs were a minute apart. Nothing was silently dropped.Fix + discriminating test: opencharly/sdk#143.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
feat(check,agentteams): Factory Unit 6 — the snapshot round-trip bed