Repository navigation
fix(bed): assert the keep-id CDI contract, and pin a base tag the registry has - #105
Conversation
…istry has check-pod-cdi-userns failed twice over. Its subject pinned ghcr.io/opencharly/arch:2026.323.1515, a tag the registry answers with MANIFEST_UNKNOWN, so charly config died at ensure-image before the bed exercised anything (#103). The base is now the tag the repo actually carries, 2026.307.1828. And its assertions still described the RETIRED shape: userns=host with User=0:0, failing on any unit carrying UserNS=keep-id - while the merged contract (feat/keepid-cdi-spec-v2, D-HW-10, layer-cdi's rule that a bind-mounting unit runs as the image user under keep-id) emits keep-id with the IMAGE USER against a derived devices-only CDI spec. The bed was green on a shape the plugin no longer emits. The assertions now read the emitted quadlet for the contract's own lines: UserNS=keep-id:uid=1000,gid=1000, PodmanArgs=... --cdi-spec-dir, and no User=0:0. The header comment and the "no keep-id" aside are rewritten with them, so the file states one contract instead of two. One more, measured: a bounded readiness probe before the bind write. On a RESTARTED unit charly start returns before the container's mounts are visible, so an immediate "charly cmd ... test -d /data" fails (opencharly/charly#1301). The loop is a deadline, not a fixed sleep, and a bind that never appears still fails the step - it narrows nothing. Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Review — BLOCKHead SHA: Change class: test-bed / check-definition change ( Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — T1–T4 clear: test-bed assertion change ( Checklist: All applicable rules PASS or NA. A1 (body complete, footer Comments considered:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
check-pod-cdi-usernswas red for two independent reasons, and both live in this one file.1. Its subject could not be created.
pod-cdi-keepid-bindpinnedghcr.io/opencharly/arch:2026.323.1515, which the registry answers withMANIFEST_UNKNOWN(
opencharly/plugin-deploy-pod#103), socharly configdied at ensure-image before the bed exercisedanything. The base is now
2026.307.1828, the tag the repo actually carries.2. Its assertions described a retired contract. The bed required
UserNS=hostandUser=0:0, and FAILED on any unit carryingUserNS=keep-id— while the mergedcontract (
feat/keepid-cdi-spec-v2, D-HW-10, andlayer-cdi's rule that a bind-mounting unit runs asthe image user under
keep-id) emits keep-id with the image user against a derived devices-only CDIspec. The bed was green on the shape the plugin no longer emits, and red on the shape it does — it
asserted the wrong world in both directions.
The assertions now read the contract's own lines out of the emitted quadlet:
The step's prose, its
id:(pc-userns-host-root→pc-userns-keepid-user), the bed's header commentand the "no keep-id" aside inside the step are rewritten with them, so the file states ONE contract
instead of two (R5's claim sweep: the aside asserted the opposite of the assertion beneath it).
One addition, measured, bounded. A readiness probe before the bind write. On a RESTARTED unit
charly startreturns before the container's mounts are visible, so an immediatecharly cmd … test -d /datafails (opencharly/charly#1301); the loop polls to a 60 s deadline, nevera fixed sleep, and a bind that never appears still fails the step.
Head:
15d2fd224cad26e176e0da12eb956f150cfbbe83Diff: 1 file changed, 43 insertions(+), 15 deletions(-) —
charly.ymlHow tested
The change class is a bed's own assertions, so its gate is the bed, run on the committed tree through
the worktree-local binary and the plugin built from this worktree (
plugin-deploy-pod: served from …/.worktrees/cdi-audit/plugin-deploy-pod-pin/candy/plugin-deploy-pod):summary.yml(2026.331.1556, driver2026.330.2135): every phaseskipped: 0, and the check itselfpc-userns-keepid-user … status: PASS, reason: exit=0.The emitted artefact, from the step's own log — before AND after the fresh rebuild:
The proof this change DISCRIMINATES — the RETIRED assertions, evaluated against exactly that
artefact:
So the old bed was red on the current plugin and the new bed is green on it — the assertion changed
with the contract, not around it.
One warning in the run, dispositioned, not silenced.
charly removeprintsrc=0, and the run ended PASS. It is the same mechanism asopencharly/plugin-preempt#15(a SHAREDGPU claim's release attempts a device-wide vfio flip), on this host's live desktop session; the measured
occurrence and the fact that it is fatal in a roster bed but only a stray line here are added to that
issue, which is listed under
## Filed issues.Spike
R12 applies here in its spike-equivalent form, which is the exemption I am naming: the change
rewrites a check's assertion set, so the instrument that settles it is the artefact the bed itself
emits, and that measurement is pasted above — the RETIRED assertions (
^UserNS=host$,^User=0:0$)evaluate to 0 matches against the unit the current plugin emits, while the new ones hold twice
(before and after the fresh rebuild), with the live bed run
2026.331.1556(PASS, steps=6, 0 skipped)as the boundary proof. No candidate solution was in dispute: the emitted shape is fixed by D-HW-10 and
the already-merged plugin (
feat/keepid-cdi-spec-v2), and the bed was asserting its predecessor — sothe work is to make the assertion match the measured artefact, and the measurement above is the evidence
that it now does.
Rulebook compliance
/charly-check:check(bed authoring, the R10 gate, the uppercase-token trap),/charly-internals:strict-policy(R1/R3/R5),/charly-internals:git-workflow, and this repo's ownAGENTS.mdloaded before editing.MANIFEST_UNKNOWNfor the tag; the emitted unit'sUserNS=line for the assertions); thepreempt:line is dispositioned ontoopencharly/plugin-preempt#15, not described away.corrected in place.
(
charly#1301) is filed, and the probe narrows no assertion.the "no keep-id" aside that contradicted the grep directly beneath it.
git statusread before staging; work in a session worktree; the base isorigin/main.above proves it would fail without the change.
real quadlet.
/home/atrawog/claude3/opencharly/charly/bin/charly 2026.330.2135,recorded in
summary.ymlasdriver/driver_version, with the plugin host-built from this worktree.disposable: trueonly; the bed's own fresh-rebuild half (remove → config → start) is theR10 rebuild, and
charly check runpassed with 0 skipped steps.already states.
on the emitted artefact, the new ones hold, plus the live bed run).
disposable: trueand the run tears it down.Change classification
No breaking change. A test bed's assertions and its subject's base tag. No candy, plugin, schema,
deploy or documented command changes shape or name. Rollback is a revert of this one squash commit.
Filed issues
opencharly/plugin-deploy-pod#103— filed earlier for the unpublished base tag; fixed hereand closed on merge.
opencharly/charly#1301—charly startreturns before a RESTARTED pod's bind mounts arevisible; filed earlier in this task (not by this diff, and not updated by it). It is listed
because the readiness probe depends on it: the probe is the deadline-bounded replacement for the
sleep R3 forbids, it narrows no assertion, and a bind that never appears still fails the step — the
product fix itself is
charly-side work with its own RCA and is not this PR's scope.opencharly/plugin-preempt#15— UPDATED with this run's occurrence of thepreempt:vfiorefusal (a plain pod deploy,
rc=0, PASS, versus the fatal roster case the issue describes). Not a newissue: it is the same mechanism, so the evidence went onto the one that owns it.
Agent:
cdi-audit· Claude Code sessionf760307f-53b4-4f48-87da-00f95e5300edAssisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)