Repository navigation
fix(deploykit): namespace-aware box collectors — imported boxes had no EXPOSE and no baked plan - #137
Conversation
…oxes bake their labels Every box the superproject builds is reached under an import namespace (`fedora.charly-fedora`) since the box inversion. The box-collector family entered on that qualified name through `cfg.BoxConfig` / `cfg.WalkBaseChain` — both deliberately FLAT, root-internal lookups — found nothing, and returned an EMPTY result. The whole imported catalog shipped without `ai.opencharly.description` (ADE's baked plan, so `charly check box` answered "No plan steps defined for this image" and exited 0 — a gate that could not fail), `port` (and therefore NO `EXPOSE` directives at all), `volume`, `security`, `shell`, `alias`, `hook`, `skills`, and the box-level `env`. New `deploykit.BoxOwner` is the ONE namespace-aware entry the family shares, composed from the existing `spec.ResolveBoxRef` + `spec.LeafName` — the same single-chokepoint descent `buildkit.ResolveBox` already performs at its entry. `spec` is deliberately untouched: `WalkBaseChain` keeps its documented root-internal contract (it is now walked in the OWNER's config, and still refuses to cross a namespace boundary mid-chain), and `BoxConfig` stays flat because `WalkBaseChain` uses it as the "is this base internal?" predicate. Fixing the collectors surfaced a second bug: `ai.opencharly.port` came back but `EXPOSE` did not — the label/EXPOSE divergence that deriving both from one collected set exists to prevent. `pullNamespacedBox` keys an imported box by its qualified name while `ResolveBox` sets `ResolvedBox.Name` to the LEAF (which must stay bare — the registry ref is built from it), so `generateContainerfile` missed the envelope entry. It now reads the port seam by `boxName`, the qualified key every other seam in that function already uses. Coverage: `deploykit/namespace_collect_test.go` drives the whole family through a namespace-qualified entry; all eight collector tests fail on the pre-fix tree. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
|
…andyChain The eleventh site of the namespace-unaware box lookup, and the one a token-keyed sweep missed. collectChainDataEntries hand-rolled its own copy of the base-chain walk and spelled the lookup `BoxConfig(current)` rather than `BoxConfig(boxName)`, so grepping the literal token did not reach it — the claim being swept was "every by-name config lookup", the string grepped was one spelling of it. The correct sweep key is `.BoxConfig(` plus the hand-rolled-walk shapes, with every hit argued. Consequence: an imported box emitted NO ai.opencharly.data entries at all. Measured on cachyos.jupyter-ml (composing the notebook-templates data candy) the label is absent before this change and present after. The fix replaces the hand-rolled loop with the shared BoxCandyChain every sibling chain collector already uses. Carrying a private copy of that walk is precisely what let this site keep the broken entry after all its siblings were fixed (R3), and the shared walk also brings a cycle guard the hand-rolled loop lacked — a base cycle spun forever. Dedupe semantics are unchanged: BoxCandyChain de-duplicates candy keys first-occurrence-wins across the chain, which is what the local seenDataCandies set did. Re-audit with the corrected key: seven `.BoxConfig(` sites across deploykit/ and loaderkit/; the two in render_prep.go were wrong and are fixed here, the other five are correct (they iterate AllBoxNames() inside the owning config, or receive owner + leaf via ResolveBoxRef/LeafName). A widened sweep for other hand-rolled base-chain walks and direct .Namespaces[ access found no further site. Coverage: TestCollectChainDataEntries_ImportedBoxCollectsChainData puts the data candy on the BASE box so the entry must come through the chain walk, and asserts the entry's content — volume, staging path, owning candy, dest — not mere non-emptiness, since a length check alone would pass on a wrongly-derived staging path. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
Merge-time stamp applied by the pr-validator. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
Brings 0a746cd (packagekit nFPM passphrase env vars) under this branch's R10 gate; disjoint from deploykit/loaderkit. Merged tree re-validated by the pr-validator before landing. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
The rename landed in 6a4dde3 but its H1 rewrite was left unstaged. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
|
| # | Required | Verdict |
|---|---|---|
| 1 | Route collectChainDataEntries through the shared walk |
done — hand-rolled loop replaced by BoxCandyChain, inheriting its cycle guard |
| 2 | Add it to the blast-radius table | done — present as an affected row |
| 3 | Coverage asserting entry content | done — volume/candy/dest/staging, fails pre-fix |
| 4 | Re-audit on the corrected key | done, and re-run by me |
| 5 | Re-run the R10 gate on the fixed tree | done — see below |
My own sweep on the merged tree, keyed .BoxConfig( (the corrected key, not the token BoxConfig(boxName) that let the eleventh site through): the only survivors in deploykit/+loaderkit/ are the five legitimately-flat sites (init_depends.go:83, loaderkit/resolve_project.go:91, spec_box_resolve.go:70, refs_collect.go:269, :308), plus buildkit/config_resolve.go:76,363 — ResolveBox's own entry, which performs the namespace descent itself. A widened grep for surviving hand-rolled base-chain walks (current = …Base) and direct .Namespaces[ access returns only the comment describing the removed loop. Nothing left flat that should not be.
Bed evidence — cross-checked on disk, and it postdates the fix
The cited runs exist and match the claims exactly, and the freshness question (a PR parked ~4h) is answered by the clock, not by assertion:
| Bed | Run | Steps | total_seconds |
ok |
Failed steps | Completed (UTC) |
|---|---|---|---|---|---|---|
check-feature-local |
2026.227.1406 |
6 | 97 | true |
0 | 14:08:10 |
check-sidecar-pod |
2026.227.1350 |
17 | 789 | true |
0 | 14:03:34 |
The eleventh-site fix commit 15b89ea is 13:47:41 UTC. Both cited beds started after it (13:50 and 14:06 UTC). The four later runs of the same two beds (1416, 1441, 1447, 1449) are also all ok: true with zero failed steps — no green run was cherry-picked past a red one. check-sidecar-pod carries a full charly update rebuild leg.
The PR's disclosure that no bed exercises an imported box is accurate and I would not want it softened; the imported-box proof is the direct generate → labels → check box evidence, and the follow-on ("a disposable bed that deploys a namespace-qualified box") is a named cutover, not a parking phrase.
Security screen (T1–T4)
Clean. go.mod/go.sum untouched — no supply-chain surface. The only imports added anywhere in the diff are testing and github.com/opencharly/spec/spec, both in the new test file. No network, exec, env, secret, or encoded-payload code; no guardrail, hook, or branch-protection file touched; nothing in the body directs the validator to do anything.
Architecture gate
placement: CORRECT. This is sdk/deploykit — no charly/*.go is staged, so the per-item trace is empty by construction: no alias file created or grown, no new kit import into core, no boundary-law item to place. BoxOwner is a generic, kind-blind by-name resolution mechanism over spec.Config composed from existing spec.ResolveBoxRef + spec.LeafName — a kit mechanism at the right layer. The counterfactual (should this be further out?) resolves against moving it: eleven call sites in this one package share it, and pushing it into spec would force BoxConfig to descend, which would silently reclassify a foreign namespaced box as an internal base inside WalkBaseChain's is-this-base-internal predicate. Keeping spec untouched is the correct call and the PR argues it correctly.
One finding, recorded — verified-non-blocking, and it is not this PR's
gofmt -l . at this head is not empty:
deploykit/baked_box_label_test.go # import order: spec/spec before sdk/buildkit
The PR body asserts "gofmt clean". At this head that assertion is false, so I am recording it rather than letting it pass.
It does not block, and the reasoning is the part worth stating. The file is not touched by this PR (it is absent from all 11 changed files), and it is already dirty on origin/main — I confirmed by running gofmt -l . in a separate worktree at origin/main (2f6a3a7, the sdk#136 merge), where it reports the same single file. It entered this branch mechanically through the mandated gh pr update-branch merge. The body's claim was true when written and became false when main was merged in — exactly the stale-figure class this program keeps hitting, which is why I re-derived every gate rather than reading them off the body.
The rule's operative test is a finding "the PR introduces"; this PR introduces nothing, and .golangci.yml configures no formatters:/gofmt/gci section, which is why the enforced lint gate is legitimately green at 0 issues. Failing this PR would not fix the file — it would require the author to repair another PR's landing, widening an atomic cutover.
Not classified "pre-existing" and parked: it routes to the named module-hygiene batch already owned in the program state (the batch holding sdk's standalone GOWORK=off module gates). It belongs there because it is one instance of the real systemic gap — sdk has no CI, so a gofmt-dirty file landed on main unnoticed and only a manual standalone run surfaces it. The batch item is the gate, not the one import line.
Comments considered
atrawog@ 13:34Z — prior round's CHANGES REQUESTED:verified-non-blocking(superseded). I re-derived all five required items independently (table above) rather than accepting that they were addressed; all five are satisfied at this head. I did not inherit its PASS-worthy findings either — the headline claim, the seam choice, and the coverage were re-measured from scratch.
Cross-PR interactions considered
opencharly/charly#282(feat/namespace-aware-descriptions) —verified-non-blocking. Itssdkgitlink is at15b89eac, a pre-squash branch head that this squash-merge will orphan. Expected mid-flight; it re-pins to the merged sha. Coordination comment posted.charly#278pins sdk at2f6a3a76(current sdkmain),charly#280/#281at7a814726. All three merely go stale-behind as sdkmainadvances — no gitlink conflict, no file overlap. No other open PR touches sdk sources.spec#30— different repo, no interaction with this diff (go.moduntouched).
Attribution tier
fully tested and validated is earned and certified. Every changed line executed live against a fresh rebuild with emitted artifacts asserted, both beds green at zero warnings including the charly update leg, and the two honest caveats — ResolveBoxEngine's non-default branch unobservable in this corpus, and no bed covering an imported box — are disclosed precisely rather than papered over. Bed dirs, step counts, durations and ok: flags all reconcile against disk.
Documentation scrutiny (Phase 1b)
Skipped, with reason: the diff touches no reader-facing page — eleven files, ten Go sources plus a CHANGELOG entry. No README, no SKILL.md, no docs-site page. That is the narrow CHANGELOG-only exemption, not a risk judgement.
Decision: PASS. The claimed defect is real and I reproduced its mechanism directly; the coverage fails without the change; the standalone module gate — the one with no CI behind it — is green on build, vet, test and lint; the spec pin holds by ancestry; the bed evidence reconciles on disk and postdates the fix. Finalizing the merge-time CalVer and merging.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Rename the CHANGELOG placeholder to the CalVer generated at merge and rewrite its H1 to match. The authored 2026.227.1443 stamp predated sdk main's latest entry (2026.227.1713), so it is regenerated here to keep the release order monotonic with real merge order. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
Landed ✅ — merge, tag, and post-merge verificationFollowing the APPROVED verdict above, all gated actions completed. Every step ALLOWED; no denials.
CalVer regenerated at merge, deliberately. The branch arrived carrying a finalized The rename carries the H1 rewrite, checked rather than assumed —
Trailer verified on both sides of the merge, on the emitted object rather than the submitted input:
Consumer chain: Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
pr-validator — duplicate invocation: PR already merged (landed artifact verified)A fresh validation round was spawned for this PR after landing had already completed. Per the answered-head discipline, this invocation did not re-validate the PR from scratch nor post any status; it independently verified the merged artifact instead. PR state: MERGED 2026-08-15T19:25:09Z via squash; feat branch deleted from the remote.
Cross-PR check: the only other open sdk PR, Nothing was merged, tagged, or re-posted by this invocation. No action required on this PR. Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system) |
… EXPOSE and its plan (#282) Re-pins the sdk gitlink to c1c41b06 (opencharly/sdk#137, tag v0.2026227.1923), which makes the deploykit box-collector family namespace-aware. Since the box inversion every box this superproject builds is reached under an import namespace (fedora.charly-fedora, cachyos.ollama). The collectors entered on that qualified name through flat, root-internal lookups, found nothing, and returned empty — so every box shipped with NO EXPOSE directives and without ai.opencharly.description, port, volume, security, shell, skill, alias, hook, data, or the box-level env. The missing description is ADE's baked plan:, so charly check box answered "No plan steps defined for this image" and exited 0 across the whole catalog — a gate that could not fail. Eleven sites shared the root cause and are fixed behind ONE shared entry (deploykit.BoxOwner) rather than eleven patches; the eleventh also deletes a hand-rolled duplicate of the base-chain walk and inherits its cycle guard. The prior pin 15b89eac was a pre-squash branch head, orphaned by the squash and unreachable from sdk main; the correction was a genuine two-sided gitlink conflict resolved forward, with both merge resolutions read off the merge commits. Verified independently by the validator: against main's own pin (sdk 2f6a3a7) fedora.charly-fedora generates 0 EXPOSE and 21 distinct ai.opencharly.* labels; with this pin it generates 1 EXPOSE (2222) and 27, the difference being exactly description, port, security, shell, skill and volume. cachyos.android-emulator yields 6 EXPOSE, and cachyos.jupyter-ml emits the eleventh site's ai.opencharly.data. Beds check-feature-local (6 steps) and check-sidecar-pod (17 steps) green on disposable targets at zero warnings. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
Summary of changes
Every box the superproject builds shipped with no
EXPOSEdirectives. That is the functional headline: since the box inversion moved boxes into thebox/<distro>submodules, every box is reached under an import namespace (fedora.charly-fedora), and the collectors that produce the image's port set entered on that qualified name throughcfg.BoxConfig/cfg.WalkBaseChain— both deliberately FLAT, root-internal lookups. They found nothing and returned empty, so the emitted Containerfile declared no ports at all.The same flat-lookup miss emptied the rest of the box-label contract:
ai.opencharly.description,port,volume,security,shell,skill,alias,hook,data, and the box-levelenv. The missingdescriptionis ADE's bakedplan:— with the label absent,charly check box <image>answeredNo plan steps defined for this imageand exited 0 for the entire imported catalog: a gate that could not fail.charly box validatedid not catch it either, because the plan is authored correctly; it just never reached the image.Concrete edits:
deploykit/config_candy_chain.go— newBoxOwner(cfg, boxName): the ONE namespace-aware entry the collector family shares. It resolves a possibly-qualified ref to the Config that OWNS it, the leaf name inside that owner, and its authoredBoxConfig. It is a thin composition of the EXISTINGspec.ResolveBoxRef+spec.LeafName— no new resolution mechanism.BoxCandyChainandBoxDirectCandiesboth enter through it.deploykit/description_collect.go,shell_collect.go,security.go,box_build_resolve.go(CollectBoxAlias+ResolveBoxEngine),render_prep.go(theenvlabel),resolved_project.go(ProjectBoxAggregates) — the box-level authored reads go throughBoxOwnerinstead of the flatcfg.BoxConfig.deploykit/generate.go—WriteExposeis keyed byboxName, notimg.Name(see "the second bug" below).deploykit/render_prep.go—collectChainDataEntries(thedatalabel) replaces its hand-rolled base-chain walk with the sharedBoxCandyChain(see "the eleventh site" below).deploykit/resolved_project.go,loaderkit/resolve_project.go— two comments swept that still described the flatcfg.BoxConfig(name)entry (R1: a doc divergence on the changed surface is blocking).deploykit/namespace_collect_test.go— new; drives the whole family through a namespace-qualified entry.CHANGELOG/<CalVer>.md.Why the fix is in
deploykitand NOT inspecspecis deliberately untouched. Two reasons, both load-bearing:WalkBaseChain's refusal to cross a namespace boundary mid-chain is correct and separately tested (TestConfig_WalkBaseChain_StopsAtNamespaceBoundary). The bug was the entry, not the walk. It is now walked in the OWNER's config, where a base ref is relative, so that contract is untouched and that test still passes.BoxConfigmust stay a flat lookup becauseWalkBaseChainuses it as the "is this base internal?" predicate. Making it descend would silently change chain-stop semantics for every consumer.The descent mirrors
buildkit.ResolveBox, which already performs exactly this at its own entry so that every caller becomes namespace-aware through one chokepoint. This is the established in-repo pattern, not a new one.The second bug this surfaced
After the collectors were fixed,
ai.opencharly.portcame back butEXPOSEstill did not — precisely the label/EXPOSEdivergence that deriving both from one collected set exists to prevent. Finding it that way is the architecture working as designed.Root cause:
pullNamespacedBoxstores an imported box under its fully-qualified key, whileResolveBoxsetsResolvedBox.Nameto the leaf (which must stay bare — the registry refghcr.io/opencharly/charly-fedorais built from it).generateContainerfileread the port seam byimg.Nameand missed the envelope entry. It now readsboxName, the qualified key every other seam in that function already uses.ResolvedBox.Nameis left alone.The eleventh site, and the sweep key that missed it
collectChainDataEntrieshad the same root cause and sat two lines below one of the fixed calls. It emitted noai.opencharly.dataentries at all for an imported box.It survived the first sweep because that sweep was keyed on the literal token
BoxConfig(boxName), while this site spells the identical lookupBoxConfig(current)— inside a hand-rolled copy of the base-chain walk:The claim being swept was "every by-name config lookup"; the string grepped was one spelling of it. The correct sweep key is
.BoxConfig(, plus the hand-rolled-walk shapes (current = <x>.Base), with every hit argued rather than a single call form.The fix is not merely a namespace-aware entry: the loop is replaced by the shared
BoxCandyChainthat every sibling chain collector already uses. Carrying a private copy of that walk is exactly what let this site keep the broken entry after all its siblings were fixed (R3) — and the shared walk brings a cycle guard the hand-rolled loop lacked, so a base cycle no longer spins forever. Dedupe is unchanged:BoxCandyChainalready de-duplicates candy keys first-occurrence-wins across the chain, which is what the localseenDataCandiesset did.Re-audit with the corrected key — seven
.BoxConfig(sites acrossdeploykit/+loaderkit/, each argued:render_prep.gocollectChainDataEntries(×2)init_depends.go:83AllBoxNames()inside the owning configloaderkit/resolve_project.go:91spec_box_resolve.go:70sub.BoxConfig(name)wheresubIS the namespaceloaderkit/refs_collect.go:269ResolveBoxRef/LeafNameloaderkit/refs_collect.go:308AllBoxNames()in the owning configA widened sweep for other hand-rolled base-chain walks (
current = <x>.Base) and for direct.Namespaces[access found no further site: the only remainingWalkBaseChaincaller isBoxCandyChainitself, and thebuildkitnamespace descents areResolveBox's own, correct by design.Proven live on
cachyos.jupyter-ml, an imported box composing thenotebook-templatesdata candy:Which collectors were affected, and which were not
CollectDescriptionsdescriptionWalkBaseChain+BoxConfigCollectBoxPortsport+EXPOSEBoxCandyChainCollectBoxVolumevolumeBoxCandyChainCollectShellshellBoxCandyChain+BoxConfigCollectHookshookBoxCandyChainCollectSkillsskillBoxCandyChainCollectSecuritysecurityBoxDirectCandiesCollectBoxAliasaliasBoxDirectCandiesResolveBoxEngineBoxConfigProjectBoxAggregatesBoxConfigcollectChainDataEntriesdataBoxConfig(current)service,service.supervisordGlobalOrderForBoxinit,init_defGlobalOrderForBoxenv_candy,port_proto,path_appendGlobalOrderForBoxThe negative result is what makes this reviewable: the unaffected labels are built by iterating
candyOrderfromGlobalOrderForBox(img.Candy)on the already-resolved*ResolvedBox, wherebuildkit.ResolveBoxhas already descended and the qualification is resolved away. They never touch the flat by-name lookup. The affected eleven all re-resolve from the config by name — which is exactly why the fix is one shared entry rather than eleven patches.Change class
charly-or-sdk Go — cross-repo:
opencharly/sdk→opencharly/charly(this PR is the producer; the superproject PR bumps the gitlink).How R10-tested — exact gate, commands, and pasted output
The gate for this change class:
charly check run <bed>on beds exercising the changed build/generate/label path, plus per-modulego test+golangci-lint, plus R8 emitted-artifact assertions (charly box labels, the generated Containerfile).Eval beds run:
check-feature-local | kind:local | ok | 6 steps | 97s—.check/check-feature-local/2026.227.1406/check-sidecar-pod | pod + ephemeral vm | ok | 17 steps | 789s—.check/check-sidecar-pod/2026.227.1350/Both
summary.ymlcarryok: true. Run sequentially, not concurrently (this is not a shared-state change — see the concurrency line).On the two binary stamps, stated precisely rather than glossed.
charly versionis derived from the SUPERPROJECT HEAD commit date by design (scripts/calver.sh: "the wall clock identifies the MOMENT of a build, not its SOURCE"), so an sdk-only rebuild does not move it.check-sidecar-podran on the binary built from sdk15b89eawhile the superproject was still atcd255d79(stamp2026.227.1259);check-feature-localwas then re-run on the final tree (stamp2026.227.1349). Between those two the superproject commit changed only the gitlink pointer — already pointing at the checked-out sdk content — and a CHANGELOG file, so not one byte of compiled logic differs; only the embedded version string does. The bed's own--dev-local-pkgimage builds compile from the working tree, which was final and clean for both runs (git statusempty in both repos).Fresh rebuild: yes.
task build:binary→charly version2026.227.1349, matching the committed tree (git statusclean in both repos).check-sidecar-podincludes a fullcharly updaterebuild leg ([update] PASS), then re-runscheck-liveandfeature-runagainst the rebuilt deployment. Zero warnings.Did the CHANGED code path execute live? Yes — every changed line executed against the fresh rebuild. Per-path detail, since three of them need a caveat rather than a claim:
BoxOwner+BoxCandyChain(description / port / volume / shell / skill): live, non-empty — see the label diff below.BoxOwner+BoxDirectCandies→CollectSecurity: live, non-empty (ai.opencharly.securityonfedora.charly-fedora).CollectBoxAlias: live, non-empty oncachyos.ollama→ai.opencharly.alias='[{"name":"ollama","command":"ollama"}]'.render_prep.gometa.Env: live, non-empty oncachyos.android-emulator(a doubly-nested namespace) →ai.opencharly.env='{"EMULATOR_API_LEVEL":"36","EMULATOR_DEVICE":"pixel_9a","EMULATOR_NAME":"charly_avd_36"}'.generate.goWriteExpose(boxName): live —EXPOSE 2222onfedora.charly-fedora, 6EXPOSElines oncachyos.android-emulator.ProjectBoxAggregates: live via the build path (it fills the envelope every render reads).ResolveBoxEngine: the changed line executed (it runs for every box inProjectBoxAggregates) but returned the global default, because no candy in this corpus declares anengine:— so its non-default result is not observable from the current corpus. The qualified-name lookup itself is unit-covered viaBoxOwner. Stating this explicitly rather than letting the blanket "executed live" cover it.Concurrency:
N/A— this changes a pure by-name resolution entry with no shared state (no loader walk mutation, no ledger, no store, no arbiter, no lock).Reproducing the
EXPOSEclaim — no images requiredThis is a
charly box generateresult, not a built-image result, so it reproduces in seconds with an empty image store. No pruned tag can hide it.That is exactly how the diff below was produced (363 → 372 lines):
A richer second case, same recipe with
cachyos.android-emulator(doubly-nested namespace): 6EXPOSElines and a non-emptyai.opencharly.envpost-fix.Coverage that FAILS without the change
deploykit/namespace_collect_test.go. Verified by stashing the fix and running it. The assertions discriminate on ABSENCE, not on content mismatch — deliberately, becauseCollectDescriptionsreturnsnilonIsEmpty()and the writer is guarded byif meta.Description != nil, so a broken image has no label to read. A content-comparison test would pass vacuously on exactly the broken case it is meant to catch.Two of those eight initially failed on the fixed tree as well, which is worth recording because it is what makes the coverage real rather than self-confirming.
CollectBoxVolumeandCollectBoxAliasreturned empty because my fixture putVolumes/Aliasesonspec.CandyModel, while the adapter reads them offspec.CandyView(specCandyAdapter.Volume/Alias). I traced that to the adapter and corrected the fixture, rather than relaxing the assertion to match what the test happened to produce. A test bent to fit its fixture proves nothing, and those two would have been exactly that.R8 — the emitted artifact, same box before and after
The ADE gate, same box before and after
Both tags are pinned
<box>:<calver>, becausecharly check boxcan otherwise resolve a published image rather than the one just built (fix in flight at spec#29 / sdk#136 / charly#278).charly check boxprints no artifact identity when it fails — read this before re-deriving the A/BThe standing guard for the published-image trap is "read the
Image:line before believing a verdict". On a broken image there is noImage:line to read. Compare the two runs above: the AFTER run opens withImage: ghcr.io/opencharly/fedora-nonfree:2026.227.1225; the BEFORE run printsNo plan steps defined for this image.and nothing else, because it bails before emitting one.So the guard silently assumes a line that is absent in exactly the case where provenance matters most — a failing verdict with no record of which artifact failed. A reviewer re-deriving this before/after will hit the same wall.
The way around it, and how the BEFORE artifact in this PR was identified, is to establish identity out of band:
Same box, locally present, description label absent — which is what makes the A/B sound rather than merely plausible. Filed for the
check boxcutover (spec#29 / sdk#136 / charly#278): a verdict verb that fails without naming the artifact it failed on is the same family as the defect being fixed there.Bed output
Attribution tier
fully tested and validated. Every changed line executed live against the fresh rebuild, with the emitted artifacts asserted, and both beds green at zero warnings including a fullcharly updaterebuild leg.Pre-empting the "every changed path executed live" clause, since it deserves a precise rather than a blanket answer: all eleven changed sites executed. Ten produced observable non-empty results on real boxes (listed per-path above, plus
ai.opencharly.dataoncachyos.jupyter-ml). The eleventh,ResolveBoxEngine, executed but returned the global default because no candy in this corpus declares anengine:— its non-default branch is unit-covered only. That is a corpus limitation, not an untested path, and it does not gate the tier.Bed coverage limit, stated plainly: no bed exercises an imported box. Every bed image in the superproject's
charly.ymlis a root box with an external base, so the beds prove the bare-name path did not regress — they do not and cannot prove the qualified path. The imported-box proof above is direct build → labels → check-box evidence. Do not read the green beds as covering the namespace path. That inference is precisely the defect this PR fixes, and closing the gap is a separately-named follow-on cutover ("a disposable bed that deploys a namespace-qualified box"), deliberately not widened into this one.Harness rulebook compliance
/charly-internals:capabilities(the OCI label contract this changes),/charly-check:check(ADE + the R10 gate matrix),/charly-internals:go,/charly-image:image(namespaces +import:semantics),/charly-internals:strict-policy. The capabilities skill's "adding a new OCI label" checklist is untouched — no label was added, an existing set was un-broken.EXPOSEstill missing after the collectors were fixed → traced toResolvedBox.Namebeing the leaf whileg.Boxesis keyed qualified, fixed at the call site rather than by mutatingName(which would corrupt the registry ref). (2) Two new tests failing on the FIXED tree → traced to the adapter readingVolumes/AliasesoffCandyView, notCandyModel; the fixture was wrong, so I corrected the fixture rather than the expectation. Gate output has zero warnings; no "flake/transient/environmental" anywhere.collectChainDataEntries) was found by review AFTER the first ten, and taken as BLOCKING rather than routed: this PR asserts completeness over exactly this set, so an eleventh with the same root cause falsifies that claim directly, and an emitted-empty capability label is the defect being fixed. Two same-family observations found and classified NON-blocking against R2's objective test (this cutover's claim holds and its R10 verdict is unchanged without them), routed to a named naming-consistency batch:candy_steps.gostaging localpkg by leaf name (self-consistent today; collides only if two namespaces share a leaf box name), andFillNamespaceBoxViewsfilling namespaced envelope views withoutProjectBoxAggregates(every box the build renders is covered by thepreResolvedBoxespath). Neither is parked as "pre-existing".BoxOwner— the explicit alternative to ten patches.BoxOwneritself composes existingspecprimitives rather than reimplementing descent.charlyCLI (box build,box generate,box labels,check box,check run,box list tags).cfg.BoxConfig(name)entry were swept in the same commit (deploykit/resolved_project.go,loaderkit/resolve_project.go).git grep 'BoxConfig(boxName)'indeploykit/now returns only the three legitimately-flat sites (init_depends.goandspec_box_resolve.go, which iterateAllBoxNames()inside the owning config and recurse namespaces themselves — correct as-is). No transitional or dual-mode path exists in the final code.git status+git stash listchecked before the stash-the-fix coverage experiment and before the revert-rebuild diff experiment; both restored and verified clean afterward. No force-push, no history rewrite, no direct push tomain.go test.EXPOSEandLABEL ai.opencharly.*sections asserted directly, pluscharly box labelson real built images (a missing label is a hard error, which is how the BEFORE case proves itself).task build:binary,charly version2026.227.1349, both beds re-run on that exact binary after the final commit. No new runtime OS dependency.disposable: true; fresh rebuild; zero warnings; ships coverage that fails without the change (pasted above).plan:the whole ADE contract depends on. SDD —N/A, no.cueedit, no generated type touched.N/Afor the kernel — this issdk/deploykit, notcharly/. No concrete-kind schema, kind-word switch, or per-kind map introduced;BoxOwneris a generic by-name resolution mechanism overspec.Config.specgains nothing.disposable: true; no non-disposable target was destroyed or rebuilt.gofmtclean,golangci-lint run ./...= 0 issues (run fromsdk/, not the workspace root, where a root run checks nothing and exits 7),go vetclean,go test ./...green insdk,charly, andspec.CHANGELOG/<CalVer>.mdstaged (placeholder — the pr-validator finalizes the merge-time version).Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)