Repository navigation
feat(build)!: #67 render α-fold — move the Containerfile render DRIVE out of core into sdk/deploykit + candy/plugin-build - #119
Conversation
… out of core into sdk/deploykit + candy/plugin-build
The Containerfile render DRIVE — Generate / generateContainerfile / generateDataImageContainerfile
(the orchestration emitting the Containerfile from the resolved Candy graph) — moves OUT of charly/
core INTO sdk/deploykit (deploykit.Generator), driven by the compiled-in candy/plugin-build over the
resolved-project envelope + a new HostBuild("render-seam") reverse leg. The host box-build render-leg
is DELETED (~16 methods + their tests, ~1019 LOC out of charly/generate.go); charly box build/generate
now route through the plugin render path. Render is byte-identical to the pre-move core render.
- DELETED charly/generate.go: Generate, generateContainerfile, generateDataImageContainerfile,
writeContainerfile, writeLabels, writeJSONLabel, emitBaseBootstrap, emitExtractedFiles,
emitInitAssembly, emitTraefikRouteStage, emitInitFragmentStages, resolveBaseImage,
builderRefForFormat, writeCandyEnv, writeExpose, writeDataStaging, generateTraefikRoutes,
writeCandySteps (+ generate_cascade_test.go + 5 obsolete generate_test.go funcs).
- NEW charly/render_prep.go + render_baked_metadata.go — the host render-prep (fills build-render
caches on ResolvedBox) + the RESOLVE-side label gather (buildBakedMetadata to spec.BakedLabelSet).
- NEW charly/host_build_render_seam.go — HostBuild("render-seam"): dispatches the render host-coupled
seams to the EXACT core funcs (RenderService, builder resolves, ValidateEgress, EmitPluginOp,
localpkg, header-copy, ensure-builders) via a per-dir cached live Generator (renderGenCache,
populated by build-prep). byte-parity by construction.
- NEW charly/host_build_bake_plugins.go — HostBuild("bake-plugins").
- charly/build_resolve_host.go — HostBuild("build-resolve") renamed to HostBuild("build-prep"); it
no longer renders — it runs build PREP + render-prep + projects the resolved-project envelope
(with caches + auto-intermediates), returning the envelope + the drive-model (NO Containerfile).
- charly/resolved_project_host.go — the projector includes auto-intermediates (the build order
includes them); R3: extracted projectBoxAggregates. projectCandyModel carries host-precomputed
HasContent/HasInstallFiles.
- candy/plugin-build drive.go + render.go — runBoxBuild/runBoxGenerate call HostBuild("build-prep")
for the envelope, then renderContainerfiles builds the deploykit.Generator from the envelope +
wires the seams (9 via HostBuild("render-seam"), EmitBakedPlugins via HostBuild("bake-plugins"),
CollectBoxPorts/CollectBoxVolume from the envelope) + runs dg.Generate(order); the podman drive
pipes dg.Containerfiles to podman build -f -.
- charly/labels.go — the label consts alias spec.Label* (single source in sdk/spec/label_consts.go).
- submodule bumps: sdk to feat/67-render-drive-deploykit (PR #48), plugins to feat/67-render-doc-sweep (PR #62).
R10: charly check run check-pod PASS (11/11 steps; image-build via the plugin render + a fresh-rebuild
update step). Byte-parity: charly-fedora chain + check-pod + immich byte-identical to origin/main
(modulo the per-build CalVer ARG). go test ./... + golangci-lint clean.
Assisted-by: Claude (fully tested and validated)
…rulebook + narrowed gates) # Conflicts: # plugins
pr-validator — CHANGES REQUESTEDChange class: charly/sdk Go (runtime) — the #67 render α-fold Decision: FAIL — one blocking finding. The PR is NOT merged; it is left open for a one-byte fix. Blocking finding (R17 — gofmt-dirty file introduced by the PR)
Fix: append a single trailing newline to Everything else PASSED (independently re-derived, not the author's word)
Status
Assisted-by: Claude (analysed on a live system) |
…e (R17 fix for #119) gofmt flagged candy/plugin-build/render.go as missing a trailing newline at EOF (val-plugs119 R17 finding). One-byte whitespace fix; AST-identical, compiled binary unchanged, so the R10 check-pod PASS (steps=11, ok:true) against the cutover still covers this final state. Assisted-by: Claude (fully tested and validated)
….2253 Assisted-by: Claude (documentation reviewed)
pr-validator — APPROVED ✅ (re-run on the R17 fix)Change class: charly/sdk Go (runtime) — the #67 render α-fold Decision: PASS — merged (squash) + tagged. R17 re-check (the only prior FAIL)
All prior PASS findings re-confirmed (substantive cutover unchanged)
Landing
Assisted-by: Claude (fully tested and validated) |
…s) (#558) Consume the config:-verb wave: spec v0.2026250.957 (#117 config?/validate? contract, #118, #119 VerbCatalog, #120 InstallVerbs), sdk v0.2026250.948 (#237 emitter), plugin-box v0.2026250.1030 (#11 config rules), plugin-egress v0.2026250.951 (#3 crabbox-yaml egress schema). Add validate to the uniform-API genericConceptCollisions with justification (ops.OpValidate selector vs the config modifier — the venue precedent). Co-authored-by: atrawog <[email protected]>
#67 render α-fold — the Containerfile render DRIVE moves out of core into sdk/deploykit + candy/plugin-build
Summary
The render-half continuation of the landed P8 render→sdk/deploykit move. The Containerfile render
DRIVE —
Generate/generateContainerfile/generateDataImageContainerfile(the orchestrationthat emits the Containerfile from the resolved Candy graph) — moves OUT of
charly/core INTOsdk/deploykit(deploykit.Generator), driven by the compiled-incandy/plugin-buildcandy over theresolved-project envelope + a single new
HostBuild("render-seam")reverse leg. The host box-buildrender-leg is DELETED (~16 methods + their tests, ~1019 LOC out of
charly/generate.go);charly box build/
charly box generatenow route through the plugin render path. Render is byte-identical to thepre-move core render (golden Containerfile diff + a committed byte-golden test).
This is a core-minimization cutover (the kernel/plugin boundary law, R-item): the render DRIVE was a
kind-blind MECHANISM living in core that belongs in an sdk kit consumed by the
buildplugin candy. Corekeeps only the kind-AGNOSTIC host-builder dispatch seam (
HostBuild("render-seam")+HostBuild("build-prep")HostBuild("bake-plugins")).Change class
Code / config (runtime). Touches
charly/*.go(render-leg deleted),sdk/deploykit/*.go(render DRIVErelocated),
candy/plugin-build/*.go(plugin render drive), CUE wire types, thesdk+pluginssubmodule gitlinks. R10 gate = the bed that exercises the build→render→Containerfile path.
What moved / what stayed
charly/generate.go(the box-build render DRIVE, now dead):Generate,generateContainerfile,generateDataImageContainerfile,writeContainerfile,writeLabels,writeJSONLabel,emitBaseBootstrap,emitExtractedFiles,emitInitAssembly,emitTraefikRouteStage,emitInitFragmentStages,resolveBaseImage,builderRefForFormat,writeCandyEnv,writeExpose,writeDataStaging,generateTraefikRoutes,writeCandySteps(+generate_cascade_test.go+ 5 obsoletegenerate_test.gofuncs). The pod-overlay path keeps its shared builder seams — UNCHANGED.sdk/deploykit(the render DRIVE, homed there):deploykit.Generator.Generate/generateContainerfile/generateDataImageContainerfile,WriteLabels,writeContainerfile,render_seam.go, and thespecCandyAdapter/NewSpecResolvedBoxenvelope→render adapters.HostBuild("build-prep")(renamed frombuild-resolve) — runs build PREP + render-prep +projects the resolved-project envelope (with caches + auto-intermediates), returning the envelope +
drive-model (NO Containerfile content).
HostBuild("render-seam")— dispatches the render's host-coupled seams to the EXACT core funcs(RenderService, ResolveDetectionBuilderStage, ResolveExternalBuilderStage, ResolveInlineBuilder,
RenderLocalPkgImageInstall, RewriteHeaderCopyForRemote, EnsureBuildersConnected, EmitPluginOp,
ValidateEgress) — byte-parity by construction.
candy/plugin-build—runBoxBuild/runBoxGeneratecallHostBuild("build-prep")for theenvelope, then
renderContainerfilesbuilds the deploykit Generator + wires the seams + runsdg.Generate(order), pipingdg.Containerfiles[name]topodman build -f -.Wire types (SDD, CUE-sourced)
#RenderSeamRequest/#RenderSeamReply+#BakePluginsRequest/#BakePluginsReply— added tosdk/schema/buildresolve.cue, generated bytask cue:gen.#CandyModel.has_content/has_install_files(computed HOST-SIDE, carried on the CandyModel for byte-exact adapter matching).
#BuildResolveBox.containerfileremoved;
#BuildResolveReply.resolved_projectadded (the envelope).RDD byte-parity fixes (found via the origin/main-vs-new-binary diff)
dg.Generate(order)hit a box notin
dg.Boxes→ panic. Fixed: the projector now includes intermediates. R3: extractedprojectBoxAggregatesinto a shared helper.ValidateEgress— the deploykitwriteContainerfilecalledValidateEgress("text",…)(bytes mode);origin/main used
validateTextEgress. Added aValidateTextEgressseam + aModefield.HasContent—agent-forwardingis a pure-composition candy; the live*Candy.HasContent()excludesthe
plan:, the envelope adapter wrongly includedlen(Plan)>0→ shifted supervisord init numbering.Fixed by pre-computing
HasContent+HasInstallFileshost-side.R10 evidence (pasted)
R9:
/usr/bin/charlyrebuilt from the final#67code →charly version=2026.195.2159.R10 bed —
charly check run check-pod(run frombox/fedora/, the bed's project dir, against thefinal
#67binary;check-podis the canonical combined-mechanism pod bed exercising build→render→Containerfile→deploy→check-live→fresh-rebuild):
.check/check-pod/2026.195.2221/summary.yml:image-build(418s) executes the NEW plugin render DRIVE path (candy/plugin-build→HostBuild("render-seam")→
deploykit.Generator.Generate);update(56s) is the fresh-rebuild R10 re-verify. Exit code 0.Byte-parity:
charly-fedorachain (6 boxes) byte-identical modulo CalVer;check-pod+immichSTRICTbyte-identical with
--tag vPAR1. Committed byte-golden:sdk/deploykit/render_parity_test.go.Static:
go test ./...+golangci-lint runclean acrosscharly/,sdk/,candy/plugin-build/.Attribution
Assisted-by: Claude (fully tested and validated)— R10 disposable bed PASS (11/11,ok:true), fresh-rebuildupdatestep executed, byte-parity proven, go test + golangci-lint clean.Submodule bumps (already merged)
sdk→b8590fb(sdk PR chore(plugins): bump gitlink to the nesting / remote-surfaces / traps doc sweep #48 — the render DRIVE relocation into sdk/deploykit; tagv0.2026195.1912).plugins→5658737(plugins PR refactor(build)!: the render engine moves to sdk/deploykit; charly keeps the host-side ENGINE (P8 consumer) #62 — the docs(landing): correct CLAUDE.md + plugins to the PROVEN two-gate merge model #67 render-DRIVE doc-sweep; tagv2026.195.2150).R0–R10 checklist
discovers only
candy/; thecheck-podbed entity lives inbox/fedora/charly.ymland resolvesonly from
box/fedora/); fixed by running the gate frombox/fedora/. Not a flake.projectBoxAggregatesextracted; shared builder seams reused)git grepfor deleted ids returns only CHANGELOGcharly check run check-pod→active→check live→ freshupdatecharly version=2026.195.2159check-podbed PASS, fresh-rebuild, pasted; zero warnings