Repository navigation
feat(build)!: move the Containerfile render DRIVE into sdk/deploykit (#67) - #48
Conversation
…67) The render DRIVE — Generate / generateContainerfile / generateDataImageContainerfile (the orchestration emitting the Containerfile from the resolved Candy graph) — moves into sdk/deploykit (deploykit.Generator), driven by candy/plugin-build over the resolved-project envelope + a new HostBuild("render-seam") reverse leg. The host box-build render-leg is deleted; charly box build/generate route through the plugin render path. Render is byte-identical to the pre-move core render (golden diff vs origin/main across the charly-fedora chain + check-pod + immich; the check-pod R10 bed PASSES incl. a fresh-rebuild). sdk/deploykit gains the render DRIVE + the WriteLabels formatter + the render-seam param set + the envelope adapters (NewSpecCandyModel / NewSpecResolvedBox). SDD: #RenderSeamRequest/Reply + #BakePluginsRequest/Reply + #CandyModel.has_content/ has_install_files (host-precomputed predicates) added to CUE; cue_types_gen.go regenerated (reproducible). A committed byte-golden (render_parity_test.go) guards the moved DRIVE. Assisted-by: Claude (fully tested and validated)
Add a prove-it-can-fail / non-vacuity sub-test to TestRenderDrive_ByteGolden: a perturbed render (a different EffectiveVersion) MUST produce a different Containerfile (the golden is sensitive to the render, not vacuously passing on a constant) AND the perturbed version MUST reach the LABEL line (the render is wired as the golden assumes). If either invariant ever stops failing, the golden guard is broken. Assisted-by: Claude (fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly/sdk Go (generation/render relocation + SDD CUE wire types) I am the FRESH The one blocking findingItem 17 / R1 — The file also has no trailing newline (the PR diff ends with The repo's Fix the author must apply (one command), then re-pushgofmt -w deploykit/render_parity_test.go
git add deploykit/render_parity_test.go
git commit -m "style(deploykit): gofmt render_parity_test.go Assisted-by: Claude (syntax check only)"
git push origin feat/67-render-drive-deploykitPure formatting change — test logic, golden, and RIDER untouched. After the push, Everything else I verified is PASS
Independent re-runs (all green)
Not merged / not taggedThe PR is left OPEN. The Assisted-by: Claude (analysed on a live system) |
…lly tested and validated)
pr-validator — APPROVED ✅Change class: charly/sdk Go (generation — Containerfile render DRIVE relocation + SDD + byte-golden) Fresh pr-validator, superproject-rooted, re-derived from the diff + my own re-runs. The prior round's sole failure (gofmt-dirty Gates I re-ran (sdk via
|
| # | rule | verdict |
|---|---|---|
| 0 | security & anti-tampering | PASS — no exfiltr/scope-mismatch/weakened-gate/supply-chain; no embedded directive |
| 1 | description complete | PASS — filled template, pasted R10, attribution, R0–R10 checklist with HOWs |
| 2 | change-class gate | PASS — standalone battery + parity (changed path ran live) + check-pod bed named |
| 3 | attribution tier | PASS — fully tested and validated: render DRIVE ran live in parity test; bed PASS named |
| 4 | R0 skills | PASS — go/plugin/generate-source/build/check/git-workflow/disposable |
| 5 | R1 / ZERO warnings | PASS — no warnings/failures; no forbidden framing |
| 6 | R2 no pre-existing split | PASS — byte-parity bugs fixed in this cutover |
| 7 | R3 no duplication | PASS — writeJSONLabel single render-home; renderSeam helpers extracted |
| 8 | R4 no ad-hoc | PASS — cached Generator; no sleep/retry/magic |
| 9 | R5 hard cutover | PASS — removed #BuildResolveBox.containerfile swept clean; no dual-mode |
| 10 | R6/R8/R9 | PASS — git-safety; labels verified (golden + origin/main diff); binary=source |
| 11 | R10 disposable/fresh/coverage | PASS — parity test + RIDER would FAIL without the move (coverage met) |
| 12 | SDD @100% | PASS — cue:gen NO-OP + reproducible; wire types CUE-sourced; render_seam structs ride opaque bytes (F11 pattern); no new @go(-); ResolvedInit pre-existing migration inventory |
| 13 | concurrency | PASS — pure orchestrator over pre-filled caches; no shared-state path |
| 14 | hard cutover | PASS — 3 commits = one cutover + review fixes → squash |
| 15 | ARCHITECTURE GATE | PASS — placement: CORRECT (render DRIVE core→sdk/deploykit K3; kind-blind mechanism) |
| 16 | disposable-only autonomy | PASS — no autonomous destroy in sdk evidence |
| 17 | clean arch + go gates | PASS — gofmt/golangci-0/vet/test green |
| 18 | CHANGELOG present | PASS — placeholder finalized at merge |
SDD note (the one borderline I scrutinized)
deploykit/render_seam.go carries hand-written param/result structs — reviewed and ACCEPTED: they ride inside the opaque #RenderSeamRequest.Params bytes (a CUE-sourced wire contract with params?: bytes), i.e. a deploykit-internal dispatch detail, not a spec/*_wire.go boundary carrier. This is the established F11 Substrate json.RawMessage / opaque-bytes dispatch pattern. The boundary wire types (#RenderSeamRequest/Reply, #BakePluginsRequest/Reply, #BakedLabelSet, #CandyModel, #AggregatedCandyCapsView) are all CUE-sourced and generated. @go(InitDef,type=*ResolvedInit) references ResolvedInit which pre-exists on origin/main (spec/init_wire.go — migration inventory), not a new hand-written schema type. No new @go(-) def.
Decision: PASS — full CLAUDE.md compliance; render DRIVE correctly relocated to sdk/deploykit (K3, outward bias), byte-parity guarded by a committed golden + can-fail RIDER. Proceeding to merge (squash) + tag the sdk v0.<…> Go-module form.
Assisted-by: Claude (fully tested and validated)
#67 render α-fold — the Containerfile render DRIVE moves into sdk/deploykit
The render DRIVE —
Generate/generateContainerfile/generateDataImageContainerfile(the orchestration emitting the Containerfile from the resolved Candy graph) — moves OUT ofcharly/core INTOsdk/deploykit(deploykit.Generator), driven by the compiled-incandy/plugin-buildcandy over the resolved-project envelope + a newHostBuild("render-seam")reverse leg. The host box-build render-leg is DELETED;charly box build/charly box generatenow route through the plugin render path. Render is byte-identical to the pre-move core render.This is the sdk leg of #67 (the superproject leg deletes the core render + wires the plugin; the plugins leg sweeps the skills). Merge this sdk PR first — the superproject gitlink bumps to this merged commit.
Change class
charlyGo code touching generation → SDD (CUE wire types) + the render DRIVE relocation + a committed byte-golden.What this PR adds (sdk)
deploykit/generate.go—Generate/generateContainerfile/generateDataImageContainerfile: a pure orchestrator over PRE-FILLED build-render caches on*buildkit.ResolvedBox+ CandyModel + the host-coupled SEAM fields. NO live*Candyreads.deploykit/write_labels.go—WriteLabels(the formatter half of the splitwriteLabels): emits OCI LABEL lines from a*spec.BakedLabelSetbyte-for-byte.deploykit/render_seam.go— per-method param/result structs for theHostBuild("render-seam")dispatch.deploykit/spec_candy_adapter.go+spec_resolved_box_adapter.go— the envelope→render adapters;HasContent/HasInstallFilesread the host-precomputed CandyModel booleans (the live*Candyverdicts the envelope cannot recompute faithfully).deploykit/render_generator.go— addedEmitBakedPlugins,CollectBoxVolume,ValidateTextEgressseams;ValidateEgresscarries aMode.spec/label_consts.go— theai.opencharly.*label key constants (the single source the deploykit WriteLabels EMITTER + the ExtractMetadata deploy READER share).SDD (CUE → generated)
schema/buildresolve.cue—#RenderSeamRequest/#Reply(method + opaquebytes) +#BakePluginsRequest/#Reply;#BuildResolveBox.containerfileremoved;#BuildResolveReply.resolved_projectadded.schema/candymodel.cue—has_content/has_install_files(host-precomputed predicates).spec/cue_types_gen.go— regenerated viatask cue:gen; reproducible (a second run is a no-op,TestGenReproducible).R10 evidence (pasted)
go test ./...— all green:ok github.com/opencharly/sdk/deploykit 0.004s(+ spec, kit, vmshared, enginekit, loaderkit).golangci-lint run ./...— exit 0 (clean).deploykit/render_parity_test.go— the moved render DRIVE on a minimal envelope fixture →deploykit.Generator.Generate→ golden Containerfile (testdata/render_parity_golden.txt). PASS.check-podR10 bed (PASS, 11/11 steps incl. image-build via the plugin render + a fresh-rebuildupdatestep) — run in the superproject worktree against this sdk.Attribution
Assisted-by: Claude (fully tested and validated)— R10 bed PASS + fresh-rebuild + byte-parity vs origin/main + go test + golangci-lint clean; the new render-DRIVE code path executed live against the fresh rebuild (the check-pod image build).R0–R10 checklist
charly check run check-podPASS (superproject leg) + the committed render byte-goldentask build:binary)task cue:gen); reproducibility green