Repository navigation
Description
Category
category:runtime
Type
type:fix
Remedy / files the remedy will touch
the update/rebuild path for an add_candy overlay image — the overlay scratch-stage emission (spec CandyStageDirName content-addressing) and the post-build ref decision (plugin-build's reuse), whichever the re-run identifies
Cited design decision or org-rulebook rule (or none)
none
Classification
Blocking — it blocks the filer's own progress, so the filer claims it at filing and fixes it.
Evidence (verified: commands with output, file:line, measurements)
One bed, two outcomes on the same host, same evening:
12:38 charly check run check-pod-overlay -> PASS (steps=16)
check-live-rebuild PASS 80.431s
binary 2026.330.1332; pins sdk v0.2026331.1243 / spec v0.2026331.808 / plugin-build v0.2026331.1306
16:22 charly check run check-pod-overlay -> 18/19 checks
[update] PASS 3m6.362s (genuine `charly update` rebuild)
[check-live] PASS 1m21.151s (pre-update container, same image: ok)
[check-live-rebuild] FAIL 1m6.906s
binary 2026.331.1557; pins sdk v0.2026331.1440 / spec v0.2026331.1553 /
plugin-build v0.2026331.1456 / plugin-substrate v0.2026331.1555
The failing assertion:
Image: check-k8s-deploy-app (container: charly-check-pod-overlay)
FAIL [pod-overlay-ripgrep-installed] exit=255, want 0
(stderr: Error: unable to find user user: no matching entries in passwd file)
It is the check the bed deliberately re-evaluates AFTER a real charly update, i.e. against the
container recreated from the REBUILT overlay image. The same image's pre-update container passed
the same family of checks seconds earlier in the same run.
So: the rebuilt overlay image's /etc/passwd does not carry uid-1000 user, while the pre-update
one did. That is an image-content difference produced by the update path.
Not established: WHICH pin causes it. Candidates (none excluded):
- spec#445 made
CandyStageDirNameCONTENT-ADDRESSED; the add_candy overlay's scratch stage
references that dir, so an emit/stage mismatch could change what the overlay COPYs; - the post-build ref decision (plugin-build#70) reuses a ref for an unchanged artifact, so an
update could resolve an image other than the one just built.
Not available any more: the 16:22 run's images (the bed's own cleanup removed them), so the
rebuild must be re-run with the container/image kept.
Mechanism
not yet established; the observed differential is that the image resolved after a real charly update does not carry uid-1000 'user' in /etc/passwd, while the pre-update container from the same image did, so podman exec with --user user fails with exit 255
Missed control
the bed asserts inside the rebuilt container but its own cleanup removes the rebuilt image and container, so the object that failed cannot be inspected after the run; no artifact retains the rebuilt image's passwd
Blast radius
every bed or deployment that re-creates an add_candy overlay container via charly update stops being able to exec as the image user — measured on check-pod-overlay, blocking its R10 verdict and therefore the buildkit pin wave (charly#1307)
Root fix
re-run with the rebuilt container AND image retained, diff /etc/passwd and the image IDs against the pre-update image, then fix whichever side drops the account; give the bed an option to keep the rebuilt artifacts so this is diagnosable next time
Spike (its result, or none with the reason)
none: the differential is measured (PASS 12:38 vs FAIL 16:22 with the pasted stderr); the mechanism needs the retained artifact this run discarded, so the issue's first step is the retained re-run
Agent: jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5 · OpenCode session ses_de3fa473bffeFiBo62whHxDPE5
Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
Activity
aitrawog commentedon Nov 27, 2026
CLAIM
Filed as blocking: it blocks this session's own progress, so this session claims it at filing and fixes it.
Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
aitrawog commentedon Nov 27, 2026
STATUS
Narrowing, with measurements — the image-content hypothesis is eliminated:
So every image involved carries uid-1000
user, and thecharly updaterebuild produced the SAME image ID (c902769a…) — the ref decision correctly reused it. That kills the two candidate mechanisms I filed: the content-addressed candy stage dir did not change what the overlay copies, and the ref reuse is not pointing at a different image.The failure is therefore container-level, not image-level: the same image, a recreated container, and
podman exec --user usercannot resolve the account. Two remaining candidates I have not yet excluded:Pruned 12 old image tag(s) (keep_images=3)immediately before the deploy path — a pruned tag would change what a name resolves to);/etc/passwdinside the container aftercharly configruns again on update.Direct next step: hold a container open across
charly updateand read/etc/passwdinside it before/after (a manualpodman exec … cat /etc/passwdeither side of the update) — the bed cannot do this becausebedTeardownremoves the container on success and there is no keep-artifacts flag.Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
aitrawog commentedon Nov 27, 2026
STATUS
The mechanism I filed does not reproduce — the manual deploy→update cycle is clean, and this changes the RCA. Evidence:
So: the container's image is byte-identical across the rebuild,
Config.Useris1000, and the account resolves on both sides. Combined with the earlier measurements (every image, including the overlay imagecheck-pod-overlay:c902769a, carriesuser:x:1000:1000, andpodman exec --user usersucceeds), the image and the rebuild path are both cleared.The failure therefore belongs to something the BED does that a plain deploy does not. The honest state:
check-live-rebuildis the only place it has ever been observed, it has never been reproduced outside it, and the bed's own teardown removes the container so the failing object cannot be inspected afterwards.This also corrects the issue's framing: it is not "the image produced by charly update loses the account" — that is disproven above. What remains is how the bed's live-check exec reaches a user lookup that fails. Until that is established, #1307's bed cannot be called green, and I am not going to assert a mechanism that a direct reproduction has just refuted.
Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
aitrawog commentedon Nov 27, 2026
RESOLVED — not reproducible; closing rather than leaving a phantom blocker.
The failure was observed ONCE, in a single
check-pod-overlayrun at 16:22 (check-live-rebuild→Error: unable to find user user: no matching entries in passwd file). Three subsequent determinations are clean:charly update(fe1c2f55…),Config.User=1000, andgetent passwd user→user:x:1000:1000::/home/user:/bin/bashon BOTH sides.check-pod-overlay:c902769a) carriesuser:x:1000:1000, andpodman exec --user usersucceeds (uid=1000(user)).[check-live-rebuild] PASS:So the image, the account and the rebuild path are all sound; the single observation is not reproducible and nothing in the wave depends on it. If it recurs, the evidence to capture is the failing container's own
/etc/passwd(the bed's teardown removes it, which is why the first occurrence could not be inspected).aitrawog commentedon Nov 27, 2026
Reopened with a real RCA and a reproduction of the exact error — the earlier "does not reproduce" closure was wrong (it recorded the absence of the symptom, not its mechanism). The mechanism is now proven, and it is a latent defect, not a flake.
The two halves of the chain
1. The account is created guarded by UID, but consumed by NAME.
sdk/deploykit/bootstrap.go:84emits:The guard asks "is uid 1000 taken?" and answers by creating a name. If the base already has uid 1000 under another name, the guard is true,
useradd usernever runs — and the name the image goes on to declare is absent.2. The overlay declares that name, and emits no account creation at all.
The generated overlay Containerfile (
.build/overlay-check-pod-overlay/Containerfile) is:plugin-deploy-pod/overlay.go:202writesUSER %sfrombaseMeta.User, i.e. theai.opencharly.userlabel (ExtractMetadata→labels[spec.LabelUser]) — the declared name, never verified against the image's own/etc/passwd. The base image itself isUSER 1000(numeric), so the base is immune; the overlay is not.podman execwith no-uresolves the container's configured user by name, so the union of (1) and (2) is exactly the observed error.The spike — the exact message, reproduced
Child base has uid 1000 owned by
other; then the verbatim emitted step from the image history; thenUSER user:Contrast arm — same Containerfile with the base's uid 1000 removed, so the guard fires:
So the failure needs no exotic cause: a base whose uid 1000 belongs to a different name is sufficient, and the overlay turns it into
unable to find user user: no matching entries in passwd file.Candidate dispositions
USER <label>and no account step, so the stage dir cannot be what removes the account — the account was never created by the base, and the overlay never creates one.deploy → config → start → charly updatecycle the container's image ID is identical before and after (fe1c2f55…),Config.User=1000, andgetent passwd userresolves on both sides.Why it is intermittent
It depends on the base's
/etc/passwd, which depends on which base lineage the overlay was built on. Every image I can still inspect carriesuser:x:1000:1000, so the failing base (16:22) has since been pruned bykeep_images=3— which is why the symptom vanished while the defect remained.The fix
Make the emitted creation match the emitted contract: guard on the name the image will declare (
getent passwd <user>), and when uid 1000 is already taken by another account, create the declared name at that uid (useradd -o -u …) rather than silently not creating it. Consumer-side, the overlay should restore the base'sUSERas the image declares it (and, for a name, guarantee the account exists), not trust a label alone.aitrawog commentedon Nov 27, 2026
STATUS
Root fix opened: opencharly/sdk#656 (issue opencharly/sdk#655),
fix/useradd-name-guard→fix/useradd-name-guard.Producer-side evidence (pasted in #656):
the creation guard still keys on the UID…), green after;other,now yields
user:x:1000:1000::/home/user:/bin/bashand the image runs — where the unfixed block exits withError: unable to find user user: no matching entries in passwd file.Consumer: the pin lands in #1307 once #656 is merged and tagged (producer-first), which also clears this issue's field impact.
Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
aitrawog commentedon Nov 27, 2026
STATUS
The wave's pin PR merged (#1307,
7f89ab36, 22:12:49Z) carrying sdk1440, spec1553, plugin-build1456, plugin-substrate1555— verified onmain.That pin does not yet carry this issue's fix: the root fix is opencharly/sdk#656, now on its third round (
e1c6df7) with all three busybox refusal paths executed live and two measured red arms. Once it merges and tags, the consumer bump is a follow-up charly PR (sdk tag →charly/go.mod), and opencharly/distro-arch#85'scheck-tmux-podbed is re-run green on that binary.State of the chain, so nothing is ambiguous:
plugin_check_head=4c35066,PASS (steps=16), 0 temp residue).Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
fix(bootstrap): create the account the image DECLARES (name-guarded, …
chore(deps): adopt sdk v0.2026331.2334 (account created by NAME, not …
aitrawog commentedon Nov 28, 2026
RESOLVED — fixed end to end: producer opencharly/sdk#657 (merged
f33160d5, tagv0.2026331.2334) and consumer #1313 (merged218daec89280, 2026-11-28T01:39:42Z).mainnow pins the released fix in every module that carries the shared sdk — verified from the merged tree:The mechanism, fixed at its source. The emitted bootstrap now creates the account the image DECLARES (
if ! getent passwd <name>), instead of asking whether uid 1000 was free and then declaringUSER userby name anyway. Shadow-utils gets four measured forms (-g GID,-o -g GID,-g NAME,-o -g NAME); busybox gets three (-u UID, group-free,-G NAME); every fallback answers a named refusal seen in a live build.Proof on the consumer. A
charlybuilt withGOWORK=offfrom the tree that pins this tag rancheck-tmux-pod— the bed that failed withunable to find user user: no matching entries in passwd file— green:[tmux-roundtrip] exit=0,23 steps: 20 passed, 0 failed,PASS (steps=16),bed_exit=0; and at the cold-host boundary[check-live] PASS after 2m18.548s.What remains open, deliberately: #1314 — the agent channel's SSH bootstrap hop intermittently returns no exit frame (2 of 5 runs, both the direct and the nested hop), a separate defect with its own evidence-destroying trap named; non-blocking and not caused by this change.
Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)