Repository navigation
Conversation
The emitted step asked whether uid 1000 was taken and answered by creating a name. On a base whose uid 1000 belongs to another account (ubuntu, a builder image, a distro whose base_user differs) the guard short-circuited, so "user" was never created while the image still declared USER user — and every exec failed with: Error: unable to find user user: no matching entries in passwd file (opencharly/charly#1309, #655). Now: guard on the declared name; when the uid is taken, create the name at that uid via useradd -o (--non-unique), with a uid-less fallback for a userland that rejects it. The busybox leg gets the same guard and fallback. Red arm: the new test fails on the pre-fix emitter. Live: the rendered block, pasted verbatim into a Containerfile over a uid-1000-owned-by-other base, creates "user" and the image runs. *Agent: `jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5` · OpenCode session `ses_de3fa473bffeFiBo62whHxDPE5`* *Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)*
Review — BLOCKHead SHA: Change class: code (Go emitter in Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Measured on Alpine: busybox adduser -G takes a GROUP NAME (-G 1000 dies
"unknown group 1000"), it creates its own same-named group, and a PRECREATED
group makes the group-free fallback die "group user in use". So the busybox
leg now passes no group at all:
{ adduser -D -h DIR -u UID -s SHELL user ||
adduser -D -h DIR -s SHELL user; }
On a base whose uid 1000 is another account that yields user:x:1001:1001 and
the image RUNS as uid=1001(user) - the declared NAME resolves, which is the
contract (a busybox userland has no --non-unique to hold uid 1000).
Also: the name-guard test's doc comment now matches its three real assertions,
and the busybox leg has its own test that fails on the previous emitter.
*Agent: `jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5` · OpenCode session `ses_de3fa473bffeFiBo62whHxDPE5`*
*Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)*
Review — BLOCKHead SHA: Change class: code — Go emitter in Security screen: PASS (no secrets, no network egress, no weakened guardrail, no instruction-bearing PR content). Comment intake
Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…x form Measured on Alpine, three refusals and the form that survives each: 1. adduser -D -h DIR -u UID -s SHELL user uid free (creates the group) 2. adduser -D -h DIR -s SHELL user uid taken, group absent 3. adduser -D -h DIR -G user -s SHELL user group `user` exists, uid taken The third case was the residual hole: with group `user` already present and uid 1000 taken, form 1 dies "uid '1000' in use" AND form 2 dies "group 'user' in use", so the declared NAME was still not created. Live proof: the build log shows both refusals and then user:x:1001:1001, and the image runs as uid=1001. Also corrects the busybox test's comment to match its five real assertions and the two measured red arms, and names candidate E (three ordered forms) as the spike winner in the body. *Agent: `jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5` · OpenCode session `ses_de3fa473bffeFiBo62whHxDPE5`* *Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)*
Review — BLOCKHead SHA: Change class: code — Go emitter in Security screen: PASS (no secrets, no network egress, no weakened guardrail, no instruction-bearing PR content). Blocks
Non-blocking notes
Comment intake
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…ately The busybox test's doc comment called the round-1 emitter "one -G user attempt", but that emitter had TWO adduser forms and both passed -G user; the group-named assertion (4) therefore passed on it, which only the accurate wording explains. No behavior change. *Agent: `jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5` · OpenCode session `ses_de3fa473bffeFiBo62whHxDPE5`* *Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)*
Review — BLOCKHead SHA: Change class: code — Go emitter in Comment intake
Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Measured on a fedora base: useradd -g 9999 ... -> "group '9999' does not exist" (no group at that gid) useradd -g grp ... -> creates the account with gid 2000 (the group exists BY NAME) A base can ship a group of the DECLARED NAME at another gid, in which case there is no group at img.GID: the old gid-only guard short-circuited the && and both -g GID forms failed. Now the guard also accepts an existing NAME and the chain is four measured forms (gid / -o / name / -o+name). Live: on a base with group `user` at gid 2000 and no group 1000, the block logs "group '1000' does not exist" and then creates user:x:1000:2000; the image runs as uid=1000(user) gid=2000(user). Red arm: TestWriteBootstrap_ShadowUtilsFallsBackToTheGroupName fails all three assertions on 79ce454 (gid-only guard, two forms). *Agent: `jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5` · OpenCode session `ses_de3fa473bffeFiBo62whHxDPE5`* *Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)*
Review — BLOCKHead SHA: Change class: code — Go emitter in Comment intake
Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Auto-closed: 5 counting verdict(s) on this thread — open a clean PR from scratchClosed after 5 counting verdict(s) reached AI_REVIEW_AUTO_CLOSE_AFTER=5. Verdicts: 5 BLOCK, 0 engine/eval INCONCLUSIVE. 0 INCONCLUSIVE verdict(s) excluded as clear provider/GitHub infrastructure failures. The rule: fix every BLOCK finding and resolve any engine condition, then open a clean pull request from a fresh branch and thread. Never push, re-run, or reopen this closed thread. This is a policy action, not a code finding; the validator verdict on this run stands. |
|
RESOLVED RESOLVED — superseded by #657, a clean branch ( Everything the five rounds built travels with it: the name-guarded creation, the four shadow-utils forms (including the Gate on the successor tree: Field confirmation that this is the right defect — a Agent: |
Summary
The bootstrap's account creation was guarded on the UID while everything downstream consumes the NAME. On a base whose uid 1000 already belongs to another account (
ubuntu, a builder image, a distro whosebase_userdiffers), the guard short-circuited,userwas never created — and the image went on declaringUSER user, so everypodman execfailed with:Field evidence: opencharly/charly#1309 (post-
charly updateoverlay step) and the same container-level shape on the agent channel'sterminal:tmuxround-trip (opencharly/distro-arch#85).This makes the emitted creation match the emitted contract, on both userlands, by trying the measured forms in order:
shadow-utils leg — the guard is the declared name; the group guard accepts an existing group of that NAME at any gid; then:
useradd -m -u UID -g GID …(the normal case),useradd -o -m -u UID -g GID …(uid 1000 taken by another account, group at GID present),useradd -m -u UID -g <user> …(group<user>exists at another gid —-g GIDwould fail),useradd -o -m -u UID -g <user> …(both unusual cases at once).Every shadow-utils form keeps
-u %d: this userland can hold the uid, so it never needs a uid-less form.busybox leg —
addusercreates its own same-named group and takes-Gby NAME; three forms:adduser -D -h DIR -u UID -s SHELL user(uid free),adduser -D -h DIR -s SHELL user(uid taken, group absent),adduser -D -h DIR -G user -s SHELL user(groupuserpre-exists, uid taken).A busybox userland has no
--non-unique, so the uid may move; the contract is the declared NAME resolving, which every form guarantees.Closes #655How tested
Red arms — each new assertion fails on an emitter without its form
All three arms use explicit SHAs (no
HEAD~N, which moves as rounds stack) and were run at this head:Restored:
ok github.com/opencharly/sdk/deploykit 0.006s.The name-guard test (three assertions) fails on the pre-fix emitter too:
The emitted block, executed live — shadow-utils, normal and uid-taken
The emitted block, executed live — shadow-utils, group
<user>at ANOTHER gidBase: no group at gid 1000, group
userat gid 2000, no accountuser:The emitted block, executed live — busybox, uid taken + group absent
The emitted block, executed live — busybox, group
userPRE-EXISTS + uid takenMeasured facts the emission rests on (each command, its real output)
Gate
Spike
userabsent and bothadduser -G userforms dieunknown group user; the shadow-utils gid-keyed guard short-circuits on a base that ships groupuserat another gid.-G/-g GID. Rejected on measurement: busybox's pre-created group makes the group-free form diegroup 'user' in use; anduseradd -g GIDstill fails when no group has that gid.USER <uid>instead and stop resolving names. Rejected:ai.opencharly.user,HOMEandWORKDIRare name-based and the overlay restoresUSER <label>, so a numeric-only fix leaves the overlay and the agent channel resolving a name, and does not fix an image whose declared name is absent.-g GID,-o -g GID,-g NAME,-o -g NAME; busybox:-u UID, group-free,-G NAME. The diff implements exactly E; its proof is the four live executions and the three red arms above.Rulebook compliance
deploykitemitter area was worked with/charly-internals:go,/charly-internals:strict-policy(R1/R12),/charly-internals:root-cause-analyzerand/charly-internals:git-workflowloaded; the change is confined to that mechanism.uid '1000' in use,group 'user' in use,group '1000' does not exist,unknown group 1000), and a real creation failure still fails the build loudly.git statusclean before the branch; each round is an appended commit on the pushed branch (no amend, no force-push, no direct push tomain).ai.opencharly.*label, so the label-after-build assertion is N/A.podman build/podman runlocally.RUN; binary/source pair isgo build ./...from this worktree.podman build/podman runexecutions above, from this tree's emitted text.Review-round RCA (the missed controls, named against the ACTUAL prior block)
The prior review (
e1c6df7) blocked on two things, neither of them the busybox leg:useraddfallback" the diff does not emit. My gate compared the body against the fix I intended, not against the emitted bytes. Missed control: re-read the body's every verb and adjective against the rendered Containerfile fragment before the push — a claim about what the shell does is verifiable text, not prose.HEAD~N-relative, so they stopped reproducing as rounds stacked. My gate ran each command once, at the head where it was written. Missed control: a pasted command must name an immutable rev (<sha>, neverHEAD~N) and be re-executed at the head being pushed.This round applies both: every pasted command names a SHA and was re-run at this head, and the body's claims were re-derived from the rendered fragment (which is quoted verbatim in
### Spike-adjacent form above). The earlier round's RCA (that the busybox leg was asserted as text rather than executed on each refusal path) is also applied: all four scenarios now show the refusal line immediately before the form that resolved it.Change classification
Behavior fix in the emitted build bootstrap. No schema, no wire type, no API rename. Consumers get it on their next pin bump (opencharly/charly#1309 tracks the field impact; opencharly/distro-arch#85's bed is re-run on the consumer build).
Agent:
jolly-comet-ses_de3fa473bffeFiBo62whHxDPE5· OpenCode sessionses_de3fa473bffeFiBo62whHxDPE5Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)