Skip to content

fix(deploykit): namespace-aware box collectors — imported boxes had no EXPOSE and no baked plan - #137

Merged
atrawog merged 8 commits into
mainfrom
feat/namespace-aware-box-collectors
Aug 15, 2026
Merged

atrawog merged 8 commits into
mainfrom
feat/namespace-aware-box-collectors

Conversation

@atrawog

@atrawog atrawog commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

Every box the superproject builds shipped with no EXPOSE directives. That is the functional headline: since the box inversion moved boxes into the box/<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 through cfg.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-level env. The missing description is ADE's baked plan: — with the label absent, charly check box <image> answered No plan steps defined for this image and exited 0 for the entire imported catalog: a gate that could not fail. charly box validate did not catch it either, because the plan is authored correctly; it just never reached the image.

Concrete edits:

  • deploykit/config_candy_chain.go — new BoxOwner(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 authored BoxConfig. It is a thin composition of the EXISTING spec.ResolveBoxRef + spec.LeafName — no new resolution mechanism. BoxCandyChain and BoxDirectCandies both enter through it.
  • deploykit/description_collect.go, shell_collect.go, security.go, box_build_resolve.go (CollectBoxAlias + ResolveBoxEngine), render_prep.go (the env label), resolved_project.go (ProjectBoxAggregates) — the box-level authored reads go through BoxOwner instead of the flat cfg.BoxConfig.
  • deploykit/generate.go — WriteExpose is keyed by boxName, not img.Name (see "the second bug" below).
  • deploykit/render_prep.go — collectChainDataEntries (the data label) replaces its hand-rolled base-chain walk with the shared BoxCandyChain (see "the eleventh site" below).
  • deploykit/resolved_project.go, loaderkit/resolve_project.go — two comments swept that still described the flat cfg.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 deploykit and NOT in spec

spec is 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.
  • BoxConfig must stay a flat lookup because WalkBaseChain uses 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.port came back but EXPOSE still did not — precisely the label/EXPOSE divergence that deriving both from one collected set exists to prevent. Finding it that way is the architecture working as designed.

Root cause: pullNamespacedBox stores an imported box under its fully-qualified key, while ResolveBox sets ResolvedBox.Name to the leaf (which must stay bare — the registry ref ghcr.io/opencharly/charly-fedora is built from it). generateContainerfile read the port seam by img.Name and missed the envelope entry. It now reads boxName, the qualified key every other seam in that function already uses. ResolvedBox.Name is left alone.

The eleventh site, and the sweep key that missed it

collectChainDataEntries had the same root cause and sat two lines below one of the fixed calls. It emitted no ai.opencharly.data entries 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 lookup BoxConfig(current) — inside a hand-rolled copy of the base-chain walk:

current := boxName
for {
    imgDef, ok := g.Config.BoxConfig(current)   // same miss, different spelling
    …
    current = imgDef.Base
}

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 BoxCandyChain that 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: BoxCandyChain already 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/ + loaderkit/, each argued:

Site Verdict
render_prep.go collectChainDataEntries (×2) was wrong — fixed
init_depends.go:83 correct — iterates AllBoxNames() inside the owning config
loaderkit/resolve_project.go:91 correct — same, bare names in their own config
spec_box_resolve.go:70 correct — sub.BoxConfig(name) where sub IS the namespace
loaderkit/refs_collect.go:269 correct — receives owner + leaf via ResolveBoxRef/LeafName
loaderkit/refs_collect.go:308 correct — iterates AllBoxNames() in the owning config

A widened sweep for other hand-rolled base-chain walks (current = <x>.Base) and for direct .Namespaces[ access found no further site: the only remaining WalkBaseChain caller is BoxCandyChain itself, and the buildkit namespace descents are ResolveBox's own, correct by design.

Proven live on cachyos.jupyter-ml, an imported box composing the notebook-templates data candy:

=== PRE-FIX (11th site broken) ai.opencharly.data ===
(label ABSENT — no data entries collected)

=== POST-FIX ai.opencharly.data ===
ai.opencharly.data='[{"volume":"workspace","staging":"/data/workspace/","candy":"github.com/opencharly/charly/candy/notebook-templates"}]'

Which collectors were affected, and which were not

Collector Label(s) Entry used Affected
CollectDescriptions description WalkBaseChain + BoxConfig yes
CollectBoxPorts port + EXPOSE BoxCandyChain yes
CollectBoxVolume volume BoxCandyChain yes
CollectShell shell BoxCandyChain + BoxConfig yes
CollectHooks hook BoxCandyChain yes
CollectSkills skill BoxCandyChain yes
CollectSecurity security BoxDirectCandies yes
CollectBoxAlias alias BoxDirectCandies yes
ResolveBoxEngine (engine) BoxConfig yes
ProjectBoxAggregates envelope plan/desc/env/security BoxConfig yes
collectChainDataEntries data hand-rolled walk + BoxConfig(current) yes
services service, service.supervisord GlobalOrderForBox no
init init, init_def GlobalOrderForBox no
candy env env_candy, port_proto, path_append GlobalOrderForBox no

The negative result is what makes this reviewable: the unaffected labels are built by iterating candyOrder from GlobalOrderForBox(img.Candy) on the already-resolved *ResolvedBox, where buildkit.ResolveBox has 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-module go 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.yml carry ok: 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 version is 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-pod ran on the binary built from sdk 15b89ea while the superproject was still at cd255d79 (stamp 2026.227.1259); check-feature-local was then re-run on the final tree (stamp 2026.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-pkg image builds compile from the working tree, which was final and clean for both runs (git status empty in both repos).

  • Fresh rebuild: yes. task build:binary → charly version 2026.227.1349, matching the committed tree (git status clean in both repos). check-sidecar-pod includes a full charly update rebuild leg ([update] PASS), then re-runs check-live and feature-run against 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.security on fedora.charly-fedora).
    • CollectBoxAlias: live, non-empty on cachyos.ollama → ai.opencharly.alias='[{"name":"ollama","command":"ollama"}]'.
    • render_prep.go meta.Env: live, non-empty on cachyos.android-emulator (a doubly-nested namespace) → ai.opencharly.env='{"EMULATOR_API_LEVEL":"36","EMULATOR_DEVICE":"pixel_9a","EMULATOR_NAME":"charly_avd_36"}'.
    • generate.go WriteExpose(boxName): live — EXPOSE 2222 on fedora.charly-fedora, 6 EXPOSE lines on cachyos.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 in ProjectBoxAggregates) but returned the global default, because no candy in this corpus declares an engine: — so its non-default result is not observable from the current corpus. The qualified-name lookup itself is unit-covered via BoxOwner. 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 EXPOSE claim — no images required

This is a charly box generate result, not a built-image result, so it reproduces in seconds with an empty image store. No pruned tag can hide it.

# On this branch (fix present):
task build:binary
rm -rf .build/fedora.charly-fedora
./bin/charly box generate fedora.charly-fedora
grep -c '^EXPOSE' .build/fedora.charly-fedora/Containerfile                                   # -> 1
grep -o 'ai\.opencharly\.[a-z_.]*' .build/fedora.charly-fedora/Containerfile | sort -u | wc -l # -> 27

# Revert ONLY the sdk fix, rebuild, regenerate:
git -C sdk checkout HEAD~1 -- deploykit loaderkit
task build:binary
rm -rf .build/fedora.charly-fedora
./bin/charly box generate fedora.charly-fedora
grep -c '^EXPOSE' .build/fedora.charly-fedora/Containerfile                                   # -> 0
grep -o 'ai\.opencharly\.[a-z_.]*' .build/fedora.charly-fedora/Containerfile | sort -u | wc -l # -> 21

# Restore:
git -C sdk checkout HEAD -- deploykit loaderkit && task build:binary

That is exactly how the diff below was produced (363 → 372 lines):

--- pre-fix  .build/fedora.charly-fedora/Containerfile
+++ post-fix .build/fedora.charly-fedora/Containerfile
@@ -1 +1,2 @@
-(no EXPOSE lines at all)
+64:# Exposed ports
+65:EXPOSE 2222

# structural diff over EXPOSE + LABEL ai.opencharly.* lines only:
0a1
> EXPOSE 2222
10a12
> LABEL ai.opencharly.port
11a14,17
> LABEL ai.opencharly.volume
> LABEL ai.opencharly.security
> LABEL ai.opencharly.description
> LABEL ai.opencharly.shell
17a24
> LABEL ai.opencharly.skill

A richer second case, same recipe with cachyos.android-emulator (doubly-nested namespace): 6 EXPOSE lines and a non-empty ai.opencharly.env post-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, because CollectDescriptions returns nil on IsEmpty() and the writer is guarded by if 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.

--- FAIL: TestBoxCandyChain_ImportedBoxWalksItsBaseChain (0.00s)
    BoxCandyChain(distro.app) = [], want [redis sshd] (own candies then the base's)
--- FAIL: TestBoxDirectCandies_ImportedBoxResolvesOwnCandies (0.00s)
    BoxDirectCandies() error = box "distro.app" not found in charly.yml
--- FAIL: TestCollectDescriptions_ImportedBoxBakesNonEmptyLabel (0.00s)
    CollectDescriptions(distro.app) = empty — an imported box must bake its plan into ai.opencharly.description
--- FAIL: TestCollectBoxPorts_ImportedBoxInheritsChainPorts (0.00s)
    CollectBoxPorts(distro.app) = [], want [2222 6379] — no ports means no ai.opencharly.port AND no EXPOSE
--- FAIL: TestCollectBoxVolume_ImportedBoxCollectsCandyVolumes (0.00s)
    CollectBoxVolume(distro.app) = [], want the redis candy's /var/lib/redis volume
--- FAIL: TestCollectSecurity_ImportedBoxMergesCandyAndBox (0.00s)
    CapAdd = [], want the redis candy's IPC_LOCK
    CapAdd = [], want the imported box's own SYS_PTRACE override
--- FAIL: TestCollectShell_ImportedBoxCollectsCandyAndBoxSections (0.00s)
    CollectShell(distro.app) = nil — an imported box must bake ai.opencharly.shell
--- FAIL: TestCollectBoxAlias_ImportedBoxCollectsCandyAndBoxAliases (0.00s)
    CollectBoxAlias() error = box "distro.app" not found in charly.yml
--- FAIL: TestCollectHooks_ImportedBoxWalksChain (0.00s)
    BoxCandyChain(distro.app) = [], <nil> — CollectHooks/CollectSkills read the same walk
FAIL	github.com/opencharly/sdk/deploykit	0.004s

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. CollectBoxVolume and CollectBoxAlias returned empty because my fixture put Volumes/Aliases on spec.CandyModel, while the adapter reads them off spec.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

=== NEW image (built with the fix) ===
$ charly box labels ghcr.io/opencharly/fedora-nonfree:2026.227.1225 --format ai.opencharly.description
{"candy":[{"origin":"candy:github.com/opencharly/charly/candy/rpmfusion","description":"Enables the RPM Fusion free and nonfree Fedora repositories. …

=== OLD image (built before the fix, same box) ===
$ charly box labels ghcr.io/opencharly/fedora-nonfree:2026.227.0836 --format ai.opencharly.description
charly: error: command "labels": label "ai.opencharly.description" not present on
ghcr.io/opencharly/fedora-nonfree:2026.227.0836 — an empty or missing capability label is a failure (CLAUDE.md R8)

The ADE gate, same box before and after

########## BEFORE (image built pre-fix) ##########
$ charly check box ghcr.io/opencharly/fedora-nonfree:2026.227.0836
No plan steps defined for this image.
exit=0

########## AFTER (image built with the fix) ##########
$ charly check box ghcr.io/opencharly/fedora-nonfree:2026.227.1225
Image: ghcr.io/opencharly/fedora-nonfree:2026.227.1225
  SKIP  run import the RPM Fusion keys … skipped — verify-only mode (mutating step)
  PASS  check the RPM Fusion free signing key is in the rpm database …  [rpmfusion-key-imported]  exit=0
  PASS  check the RPM Fusion free repo definition file is present on disk
  PASS  check the rpmfusion-free-release package is recorded in the rpm database  installed
  PASS  check the RPM Fusion nonfree repo definition file is present on disk
  PASS  check the rpmfusion-nonfree-release package is recorded in the rpm database  installed
  PASS  check the free repo file declares the rpmfusion-free repository section header

7 steps: 6 passed, 0 failed, 1 skipped
exit=0

Both tags are pinned <box>:<calver>, because charly check box can otherwise resolve a published image rather than the one just built (fix in flight at spec#29 / sdk#136 / charly#278).

charly check box prints no artifact identity when it fails — read this before re-deriving the A/B

The standing guard for the published-image trap is "read the Image: line before believing a verdict". On a broken image there is no Image: line to read. Compare the two runs above: the AFTER run opens with Image: ghcr.io/opencharly/fedora-nonfree:2026.227.1225; the BEFORE run prints No 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:

$ charly box labels ghcr.io/opencharly/fedora-nonfree:2026.227.0836
ai.opencharly.box=fedora.fedora-nonfree
ai.opencharly.version=2026.227.0830

Same box, locally present, description label absent — which is what makes the A/B sound rather than merely plausible. Filed for the check box cutover (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

charly check run check-feature-local: PASS (steps=6)
FEATURE_EXIT=0

charly check run check-sidecar-pod: [update] PASS after 1m41.622s (log: .check/check-sidecar-pod/2026.227.1308/update.log)
charly check run check-sidecar-pod: [check-live-rebuild] START (charly check live; log: .check/check-sidecar-pod/2026.227.1308/check-live-rebuild.log)
charly check run check-sidecar-pod: [check-live-rebuild] PASS after 2m40.534s (log: .check/check-sidecar-pod/2026.227.1308/check-live-rebuild.log)
charly check run check-sidecar-pod: [feature-run-rebuild] START (charly check feature; log: .check/check-sidecar-pod/2026.227.1308/feature-run-rebuild.log)
charly check run check-sidecar-pod: [feature-run-rebuild] PASS after 20.667s (log: .check/check-sidecar-pod/2026.227.1308/feature-run-rebuild.log)
charly check run check-sidecar-pod: [cleanup] START (charly remove; log: .check/check-sidecar-pod/2026.227.1308/cleanup.log)
charly check run check-sidecar-pod: [cleanup] PASS after 8.273s (log: .check/check-sidecar-pod/2026.227.1308/cleanup.log)
charly check run check-sidecar-pod: PASS (steps=17)

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 full charly update rebuild 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.data on cachyos.jupyter-ml). The eleventh, ResolveBoxEngine, executed but returned the global default because no candy in this corpus declares an engine: — 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.yml is 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

  • R0 skills: loaded /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.
  • R1 RCA + zero warnings: two anomalies, both root-caused before remediation. (1) EXPOSE still missing after the collectors were fixed → traced to ResolvedBox.Name being the leaf while g.Boxes is keyed qualified, fixed at the call site rather than by mutating Name (which would corrupt the registry ref). (2) Two new tests failing on the FIXED tree → traced to the adapter reading Volumes/Aliases off CandyView, not CandyModel; the fixture was wrong, so I corrected the fixture rather than the expectation. Gate output has zero warnings; no "flake/transient/environmental" anywhere.
  • R2 no out-of-scope: the blast radius was measured before a seam was chosen, and all eleven affected sites are fixed here — not just the reported one. The eleventh (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.go staging localpkg by leaf name (self-consistent today; collides only if two namespaces share a leaf box name), and FillNamespaceBoxViews filling namespaced envelope views without ProjectBoxAggregates (every box the build renders is covered by the preResolvedBoxes path). Neither is parked as "pre-existing".
  • R3 no duplication: ten call sites that each re-resolved a box by name now share ONE entry, BoxOwner — the explicit alternative to ten patches. BoxOwner itself composes existing spec primitives rather than reimplementing descent.
  • R4 no workaround: no sleeps, retries, magic numbers, or env shims. Every operation against charly-managed resources went through the charly CLI (box build, box generate, box labels, check box, check run, box list tags).
  • R5 hard cutover + grep: no identifier was removed, so the grep self-test is the claim-keyed variant: the two comments that still described the flat cfg.BoxConfig(name) entry were swept in the same commit (deploykit/resolved_project.go, loaderkit/resolve_project.go). git grep 'BoxConfig(boxName)' in deploykit/ now returns only the three legitimately-flat sites (init_depends.go and spec_box_resolve.go, which iterate AllBoxNames() inside the owning config and recurse namespaces themselves — correct as-is). No transitional or dual-mode path exists in the final code.
  • R6 git safety: git status + git stash list checked 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 to main.
  • R7 runtime gate: two beds run end to end, not just go test.
  • R8 artifact invariants: the emitted Containerfile's EXPOSE and LABEL ai.opencharly.* sections asserted directly, plus charly box labels on real built images (a missing label is a hard error, which is how the BEFORE case proves itself).
  • R9 binary == source: task build:binary, charly version 2026.227.1349, both beds re-run on that exact binary after the final commit. No new runtime OS dependency.
  • R10 disposable + coverage: both beds are disposable: true; fresh rebuild; zero warnings; ships coverage that fails without the change (pasted above).
  • RDD / ADE / SDD: RDD — the high-risk assumption (that entry-descent plus the flat shared candy map yields correct labels) was proven empirically on real generated artifacts before the seam was settled, and the blast radius was measured rather than inferred from the brief. ADE — no candy added or changed; this restores the baked plan: the whole ADE contract depends on. SDD — N/A, no .cue edit, no generated type touched.
  • Hard cutover: one atomic commit in this repo; no TODO, phase 2, or deferred work in scope.
  • Kernel/plugin boundary law: N/A for the kernel — this is sdk/deploykit, not charly/. No concrete-kind schema, kind-word switch, or per-kind map introduced; BoxOwner is a generic by-name resolution mechanism over spec.Config. spec gains nothing.
  • Disposable-only autonomy: both beds carry disposable: true; no non-disposable target was destroyed or rebuilt.
  • Clean architecture + Go gates: gofmt clean, golangci-lint run ./... = 0 issues (run from sdk/, not the workspace root, where a root run checks nothing and exits 7), go vet clean, go test ./... green in sdk, charly, and spec.
  • CHANGELOG: CHANGELOG/<CalVer>.md staged (placeholder — the pr-validator finalizes the merge-time version).

Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)

…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)
@atrawog

atrawog commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

charly/pr-validator: CHANGES REQUESTED

Fresh independent validation. The headline claim reproduces exactly and the seam choice is endorsed — but the blast radius was measured one site short, and the missed site is in the same file, the same function's call tree, two lines below this PR's own BoxOwner call.


PRIORITY 1 — the headline claim reproduces (independently measured)

Ran the PR body's recipe from the committed heads (sdk 5d78311, charly cd255d79), binary charly version 2026.227.1259:

=== POST-FIX (committed head) ===
EXPOSE count: 1
unique ai.opencharly.* labels: 27
EXPOSE lines:
65:EXPOSE 2222

=== PRE-FIX (git -C sdk checkout HEAD~1 -- deploykit loaderkit; rebuilt) ===
EXPOSE count: 0
unique ai.opencharly.* labels: 21

=== label-set diff (pre-fix -> post-fix) ===
> ai.opencharly.description
> ai.opencharly.port
> ai.opencharly.security
> ai.opencharly.shell
> ai.opencharly.skill
> ai.opencharly.volume

21 → 27 and 0 → 1 confirmed. Tree restored afterwards; both heads unchanged and git status clean in both repos.

The blast-radius table's NEGATIVE result holds — and my measurement proves it directly

The pre-fix 21-label set already contained service, service.supervisord, init, init_def, env_candy, port_proto — exactly the "no" rows. Structurally confirmed in render_prep.go: those are built by iterating candyOrder (img.RenderCandyOrder, off the already-resolved *ResolvedBox) against the flat shared g.Candies map, so they never reach a by-name config lookup. The "reads the resolved box" vs "re-resolves from config by name" distinction is real and is what justifies one shared entry over N patches.

Seam choice — endorsed, deploykit is right and spec would have been wrong

Both stated reasons check out against the code:

  • WalkBaseChain (spec/spec/config.go:220) uses c.BoxConfig(img.Base) as its is-this-base-internal predicate (line 231). Making BoxConfig descend would silently reclassify a foreign namespaced box as an internal base and let the walk continue into a config where the next Base ref is meaningless. Keeping it flat is correct.
  • The bug was the entry, not the walk. Walking in the owner's config, where base refs are relative, is the right repair. TestConfig_WalkBaseChain_StopsAtNamespaceBoundary still passes.
  • BoxOwner's ResolveBoxRef + LeafName + descend-into-owner shape is the established in-repo pattern — spec.WalkBaseChainDistro already does exactly this (config.go:253-266).

The second bug — confirmed, and ResolvedBox.Name is genuinely untouched

WriteExpose → dg.CollectBoxPorts → rp.Boxes[boxName], an envelope keyed by the qualified name (render_generator_from_project.go:220), while img.Name is the leaf. Passing boxName is correct and matches meta.Port's own CollectBoxPorts(g.Config, g.Candies, boxName) two files over. The commit touches only deploykit/ and loaderkit/ — buildkit is untouched, so ResolvedBox.Name is left alone structurally, not just by assertion.

Coverage — re-derived, and it cannot pass vacuously

Reverted the nine changed non-test files to HEAD~1, kept the new test file, and added a throwaway shim defining BoxOwner verbatim so the file compiles against pre-fix call sites (TestBoxOwner_DescendsIntoImportNamespace needs the symbol; it correctly still PASSes, since the shim is the fixed entry — only the call sites are reverted):

--- PASS: TestBoxOwner_DescendsIntoImportNamespace (0.00s)
--- FAIL: TestBoxCandyChain_ImportedBoxWalksItsBaseChain (0.00s)
--- FAIL: TestBoxDirectCandies_ImportedBoxResolvesOwnCandies (0.00s)
--- FAIL: TestCollectDescriptions_ImportedBoxBakesNonEmptyLabel (0.00s)
--- FAIL: TestCollectBoxPorts_ImportedBoxInheritsChainPorts (0.00s)
--- FAIL: TestCollectBoxVolume_ImportedBoxCollectsCandyVolumes (0.00s)
--- FAIL: TestCollectSecurity_ImportedBoxMergesCandyAndBox (0.00s)
--- FAIL: TestCollectShell_ImportedBoxCollectsCandyAndBoxSections (0.00s)
--- FAIL: TestCollectBoxAlias_ImportedBoxCollectsCandyAndBoxAliases (0.00s)
--- FAIL: TestCollectHooks_ImportedBoxWalksChain (0.00s)
FAIL	github.com/opencharly/sdk/deploykit	0.006s

Byte-matching the PR's reported output. On vacuity: the PR undersells its own tests. The = empty / = nil fatals are only the first guard — every one of them is followed by exact-content assertions (want [redis sshd], want [2222 6379], /var/lib/redis, IPC_LOCK and SYS_PTRACE, "the app box", r→redis-cli, app→/usr/bin/app, exact section and step counts). An empty result trips the fatal; a wrong-content result trips the assertion. Neither can pass vacuously. Good tests.

Shim removed, tree restored clean.


The blocking defect: an 11th affected site, same file, still flat

collectChainDataEntries (deploykit/render_prep.go:428) is called by buildBakedMetadata at line 416 — two lines below this PR's own BoxOwner(g.Config, boxName) edit at line 418, from the same boxName parameter — and it still walks flat:

current := boxName
for {
    imgDef, ok := g.Config.BoxConfig(current)   // qualified name -> !ok -> break immediately
    if !ok {
        break
    }
    ...
    if baseImg, isInternal := g.Config.BoxConfig(imgDef.Base); isInternal && ...

For a qualified boxName this returns nil on the first iteration, so meta.DataEntries is empty and ai.opencharly.data (spec.LabelDataEntries, a CapabilityLabelMap member) is never written. Identical root cause, identical symptom, unfixed.

Reproduced on the committed heads, unpatched:

binary: 2026.227.1259  sdk=5d78311  super=cd255d79  status=''
$ charly box generate cachyos.jupyter-ml
=== COMMITTED HEAD, cachyos.jupyter-ml (imported box) ===
data-candy staged into the image (COPY): 1
ai.opencharly.data label emitted:        0

The candy is composed — COPY --from=notebook-templates --chown=1000:1000 /data/notebooks/ /data/workspace/ is emitted, because WriteDataStaging walks candyOrder off the resolved box (a "no" row). Only the label is missing. That is the same label/artifact divergence the PR celebrates catching for port/EXPOSE, one collector over.

Causally proven by applying this PR's own remedy to that one function (BoxOwner → walk in the owner from the leaf) and regenerating, unchanged otherwise:

ai.opencharly.data='[{"volume":"workspace","staging":"/data/workspace/","candy":"github.com/opencharly/charly/candy/notebook-templates"}]'

Experiment reverted; tree clean.

Runtime impact, not cosmetic. candy/plugin-deploy-pod/config_setup_helpers.go:653:

if len(dataMeta.DataEntries) == 0 {
    return nil
}

Deploy-time data provisioning silently no-ops for every imported box. cachyos.jupyter-ml, cachyos.unsloth-studio and every sibling deploy with their notebook payloads never seeded into the workspace volume, and no error. Another silent green of exactly the class this PR exists to remove.

Why this is blocking, not a next-batch item

The PR's own non-blocking test is "this cutover's claim holds and its R10 verdict is unchanged without them." It does not hold here. The PR asserts completeness over precisely this set — "the blast radius was measured before a seam was chosen, and all ten affected sites are fixed here — not just the reported one" — and the blast-radius table omits collectChainDataEntries entirely. An 11th site with the identical root cause falsifies that claim directly. R3 (a fix applies to every surface it logically covers), R8 (an empty or missing capability label is a failure), and R2's "unsure → blocking" all land the same way. The two observations the PR did classify non-blocking (candy_steps.go leaf staging, FillNamespaceBoxViews) are correctly classified — neither is an empty capability label.

What is needed

  1. Route collectChainDataEntries through BoxOwner (walk in the owner from the leaf, base predicate against the owner's config).
  2. Add it to the blast-radius table as an affected row.
  3. Add coverage that fails without it, in the style of the existing eight — a data-candy in the nsFixture chain asserting the collected LabelDataEntry volume/staging/candy, not merely non-emptiness.
  4. Re-audit the remaining flat lookups and record the result. I checked all seven .BoxConfig( sites in deploykit/ + loaderkit/: init_depends.go:83, loaderkit/resolve_project.go:91, spec_box_resolve.go:70 iterate AllBoxNames() inside the owning config, and refs_collect.go:269,308 receive the owner + leaf via ResolveBoxRef/LeafName — all five correct as-is. Only render_prep.go:433 and :458 are wrong. Note the PR's grep was keyed on the literal token BoxConfig(boxName), which is what let BoxConfig(current) through; the sweep should be keyed on .BoxConfig( and each hit argued.
  5. Re-run the R10 gate on the fixed tree.

Everything else verified clean

  • go test ./... green in sdk (and the new tests pass on the fixed tree).
  • Both bed run dirs exist with ok: true: .check/check-feature-local/2026.227.1306/, .check/check-sidecar-pod/2026.227.1308/. Binary 2026.227.1259 rebuilds reproducibly from the committed tree — the R9 binary-equals-source claim holds.
  • The stated bed-coverage limit is accurate: no bed deploys a namespace-qualified box, and the PR says so plainly and warns against inferring otherwise. That disclosure is exactly right and I would not want it softened.
  • CHANGELOG placeholder present.

On the tier

fully tested and validated is not sustainable as the PR stands — not because the pasted proof is weak (it is unusually strong, and the ResolveBoxEngine caveat is exactly the kind of precision this project wants), but because the completeness claim it rests on is falsified by a site the gate never covered. Re-judgeable once the 11th site is fixed and re-gated; on the evidence quality shown here I expect it to earn the tier then.

Not merged. opencharly/charly#282 is blocked behind this one and has been marked accordingly; its gitlink is correctly at 5d78311 today and will need re-pointing to this PR's squash SHA at merge.


Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)

atrawog and others added 6 commits August 15, 2026 15:47
…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)
Reconciles the remote refresh (533c7a1, which merged sdk main 2f6a3a7) with the
two commits that were authored locally and never pushed: the origin/main merge
1bdf25b and the H1 rewrite 77a1fc0 that the CalVer rename in 6a4dde3 left
unstaged. Add-only; no history rewritten.
@atrawog

atrawog commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

charly/pr-validator — APPROVED ✅

Fresh, independent re-validation at head c7f511994993f9cba0ef26b810880703432cc45a. The earlier SUCCESS on this PR was posted against a different tree and is not inherited — this head carried zero statuses when I started (gh api .../status → state: pending, statuses: []). Every figure below is re-derived at this head, not read from the body.

Change class: sdk Go (plugin-contract module) — producer half of the sdk#137 → charly#282 chain.


The headline claim reproduces — measured, not accepted

I did not take "imported boxes had no EXPOSE" on trust, and I did not inherit the prior round's measurement. I drove the real collector on the shipped namespace fixture:

CollectBoxPorts(LEAF  "app")        = []            len=0  err=<nil>
CollectBoxPorts(QUAL  "distro.app") = [2222 6379]   len=2  err=<nil>
EXPOSE block from QUAL: "EXPOSE 2222\nEXPOSE 6379\n" ; from LEAF: 0 lines

That is the whole causal chain of the second bug in two lines. WriteExpose → g.CollectBoxPorts(...); pre-fix it was handed img.Name, and buildkit.ResolveBox sets ResolvedBox.Name to the leaf (config_resolve.go:86, after the cfg.Namespaces[ns] descent at :70), while the envelope is keyed qualified (render_generator_from_project.go:220 — rp.Boxes[boxName]). Leaf key → zero ports → no EXPOSE. Confirmed structurally and by execution.

Coverage genuinely fails without the change

Reverted all nine non-test source files to origin/main in an isolated worktree, kept the new test file, added only the BoxOwner definition as a shim so the pre-fix call sites are what is under test:

--- FAIL: TestBoxCandyChain_ImportedBoxWalksItsBaseChain
--- FAIL: TestBoxDirectCandies_ImportedBoxResolvesOwnCandies
--- FAIL: TestCollectDescriptions_ImportedBoxBakesNonEmptyLabel
--- FAIL: TestCollectBoxPorts_ImportedBoxInheritsChainPorts
--- FAIL: TestCollectBoxVolume_ImportedBoxCollectsCandyVolumes
--- FAIL: TestCollectSecurity_ImportedBoxMergesCandyAndBox
--- FAIL: TestCollectShell_ImportedBoxCollectsCandyAndBoxSections
--- FAIL: TestCollectBoxAlias_ImportedBoxCollectsCandyAndBoxAliases
--- FAIL: TestCollectChainDataEntries_ImportedBoxCollectsChainData
--- FAIL: TestCollectHooks_ImportedBoxWalksChain
FAIL	github.com/opencharly/sdk/deploykit	0.006s

Ten now, not nine — the eleventh-site test is present and it fails without the fix. TestBoxOwner_DescendsIntoImportNamespace correctly still passes, since the shim is the fixed entry. The new data test asserts Volume/Candy/Dest/Staging content (/data/sshconf/keys/, trailing slash included), not mere non-emptiness — which is precisely what the prior round asked for.

Module boundary — the gate that matters for a repo with no CI

sdk is the contract module out-of-tree plugins import through the proxy, and go.work's use ./spec makes any in-workspace result non-probative. Run standalone in a clean worktree at this head:

GOWORK=off go build ./...        -> BUILD_EXIT=0
GOWORK=off go vet   ./...        -> VET_EXIT=0
GOWORK=off go test  ./...        -> ok: sdk, agentkit, buildkit, candywalk, deploykit,
                                        enginekit, kit, loaderkit, packagekit, vmshared
GOWORK=off golangci-lint run ./...  -> 0 issues.   (v2.12.2, isolated GOLANGCI_LINT_CACHE)

spec pin verified by ancestry, not resolution. git rev-parse --is-shallow-repository → false first (a shallow clone produced a false orphan finding earlier today). Then v0.2026227.1854 → bbb3c6a2c8428a98a55c3acd919b11b7f921b3a1, and merge-base --is-ancestor against spec's origin/main → YES. The local-time CalVer stamp on that tag is immutable and correct as written; go.mod is untouched by this PR.

The prior round's five required items — each verified independently

# 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. Its sdk gitlink is at 15b89eac, 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#278 pins sdk at 2f6a3a76 (current sdk main), charly#280/#281 at 7a814726. All three merely go stale-behind as sdk main advances — no gitlink conflict, no file overlap. No other open PR touches sdk sources.
  • spec#30 — different repo, no interaction with this diff (go.mod untouched).

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)
@atrawog
atrawog merged commit c1c41b0 into main Aug 15, 2026
@atrawog
atrawog deleted the feat/namespace-aware-box-collectors branch August 15, 2026 19:25
@atrawog

atrawog commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Landed ✅ — merge, tag, and post-merge verification

Following the APPROVED verdict above, all gated actions completed. Every step ALLOWED; no denials.

squash merge sha c1c41b068ea5f08f9ce1cb67cd8db16cafa556bb
tag v0.2026227.1923 → verified on remote, dereferences to the merge commit
CHANGELOG CHANGELOG/2026.227.1923.md
status charly/pr-validator = success on 04b697e4

CalVer regenerated at merge, deliberately. The branch arrived carrying a finalized 2026.227.1443 from the earlier, now-void round — earlier than sdk main's then-latest entry 2026.227.1713. Landing it would have put the release history out of order, which is the whole reason CalVer is generated at merge rather than by the author. Regenerated to 2026.227.1923 (date -u), collision-guarded against both CHANGELOG/ and the tag list.

The rename carries the H1 rewrite, checked rather than assumed — git mv renames the file and never touches its first line:

 CHANGELOG/{2026.227.1443.md => 2026.227.1923.md} | 2 +-
# 2026.227.1923 — namespace-aware box collectors: imported boxes bake their full label contract

2 +-, not | 0 — the tell that the content edit actually landed with the rename. Post-commit git status clean, no leftover M.

Trailer verified on both sides of the merge, on the emitted object rather than the submitted input:

pre-merge  parse:  Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
merged c1c41b06 parse:  Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)

sdk main is now c1c41b06; the tag form is the Go-module scheme v0.<YYYYDDD>.<HHMM> — a semver requirement, since v2026.227.1923 is not a parseable module version.

Consumer chain: opencharly/charly#282 pins the sdk gitlink at 15b89eac, the pre-squash branch head, now orphaned by the squash and branch deletion. Coordination comment posted there with the merged sha and the re-pin command.

Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)

@atrawog

atrawog commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

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.

  • Merge commit: c1c41b068ea5f08f9ce1cb67cd8db16cafa556bb, single parent 2f6a3a76b — exactly the protected base named in this round's handoff envelope.
  • Squash fidelity: git diff --stat between the finalized PR head 04b697e and the merge commit is empty — the squash landed byte-identical content.
  • Required status: charly/pr-validator = success was posted on 04b697e at 2026-08-15T19:24:29Z, before the merge.
  • Tag: v0.2026227.1923 (peeled → c1c41b0) — the sdk Go-module scheme (HHMM=1923, no leading zeros to strip).
  • CHANGELOG: CHANGELOG/2026.227.1923.md on the merged tree; H1 # 2026.227.1923 — namespace-aware box collectors: imported boxes bake their full label contract — filename↔H1↔tag consistent.
  • Merge-message trailer: ends Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated).
  • Health: GOWORK=off go test ./... re-run on the merged head — green across all 10 packages, incl. deploykit and loaderkit.

Cross-PR check: the only other open sdk PR, #138 (feat/alpine-sshd-and-bootstrap-fixes), shares no file with this change (this PR: deploykit/ collectors + loaderkik; #138: deploykit/bootstrap.go, vmshared/cloud_init_render*, a golden testdata) — verified-non-blocking, no interaction.

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)

atrawog added a commit to opencharly/charly that referenced this pull request Aug 15, 2026
… 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant