You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
quadlet emitter writes AddDevice=nvidia.com/gpu=all twice when security.devices already lists it #643
category:deliveryA build/compose/install/deploy capability, its definitions, or its wire schema.type:fixA named defect in existing behavior; a violated rule of the rulebook or design.
sdk/deploykit/quadlet.go emitContainerSecurity (dedupe the implicit CDI line against Security.Devices)
Cited design decision or org-rulebook rule (or none)
AGENTS.md R2
A generated quadlet can carry the CDI device line twice. Observed on this host in ~/.config/containers/systemd/charly-ollama-cdi.container (generated 2026-11-24 12:09):
Mechanism, from the emitter: emitContainerSecurity writes the implicit line when carriesCDIDevice(cfg) is true (sdk/deploykit/quadlet.go:276) and then unconditionally loops cfg.Security.Devices writing every entry (:287) — so when the merged Security.Devices list already
contains nvidia.com/gpu=all (a box/candy declaring the device explicitly, merged by sdk/deploykit/security.go), the same directive is emitted twice.
Podman tolerates the duplicate, so this is not a functional break — but it is two sources of truth for
one directive, and it hides which one owns it: a future change that stops emitting the implicit line
would look like it removed the device when the explicit list still carries it.
Remedy: dedupe on the emitted value — skip a Security.Devices entry equal to the implicit CDI device
when carriesCDIDevice(cfg), or emit the union once.
Agent: qwen3-tts-vram · Claude Code session 699080d3-3ff0-4337-afa4-94f960590338 Assisted-by: Claude Code deepseek-v4.1-flash (analysed on a live system)
Fixed by #645 (merged): emitContainerSecurity now uses one unexported constant (cdiDevice) for the implicit line and skips a Security.Devices entry that repeats it, so a GPU unit whose caller also lists nvidia.com/gpu=all emits AddDevice exactly once. Non-CDI device entries are unchanged, and the privileged branch is untouched. A regression test fails on the unmodified emitter (CDI device emitted 2 times, want exactly 1) and passes with the fix.
Agent: qwen3-tts-vram · Claude Code session 699080d3-3ff0-4337-afa4-94f960590338 Assisted-by: Claude Code deepseek-v4.1-flash (fully tested and validated)
category:deliveryA build/compose/install/deploy capability, its definitions, or its wire schema.type:fixA named defect in existing behavior; a violated rule of the rulebook or design.
Activity
fix(quadlet): emit the CDI device once when security.devices repeats it
fix(quadlet): emit the CDI device once when security.devices repeats …
aitrawog commentedon Nov 25, 2026
RESOLVED
Fixed by #645 (merged): emitContainerSecurity now uses one unexported constant (cdiDevice) for the implicit line and skips a Security.Devices entry that repeats it, so a GPU unit whose caller also lists nvidia.com/gpu=all emits AddDevice exactly once. Non-CDI device entries are unchanged, and the privileged branch is untouched. A regression test fails on the unmodified emitter (CDI device emitted 2 times, want exactly 1) and passes with the fix.
Agent:
qwen3-tts-vram· Claude Code session699080d3-3ff0-4337-afa4-94f960590338Assisted-by: Claude Code deepseek-v4.1-flash (fully tested and validated)