Repository navigation
feat(deploy)!: K4-B — move the bundle-add compile slice out of core into candy/plugin-bundle (re-hydrator + OpCompile seam) - #120
Conversation
…nto candy/plugin-bundle (re-hydrator + OpCompile seam)
K4-B (the deploy-compile continuation of the K4 deploy-resolution wave): the
charly bundle add deploy COMPILE slice — the BuildDeployPlan loop that turns each
candy + the resolved box + HostContext into an InstallPlan — moves OUT of charly/
core INTO the candy/plugin-bundle plugin candy (the command:bundle provider's new
OpCompile leg). The host now ONLY computes the per-node SELECTION (the resolved
box — authored OR synthetic — projected to a spec.ResolvedBoxView, the FINAL
pruned candy order, the host-side deploykit.HostContext incl. the preresolved
BuilderContext) and Invokes the plugin's OpCompile with a spec.DeployCompileRequest;
the plugin re-hydrates the resolved-project envelope ITSELF via
HostBuild("resolved-project") (the established #67 seam), re-hydrates the box vocab
via deploykit.NewSpecResolvedBox and each candy model via deploykit.NewSpecCandyModel,
loops deploykit.BuildDeployPlan over the host-provided order, projects each plan to
its InstallPlanView wire form, returns []InstallPlanView; the host re-materializes
[]*InstallPlan via deploykit.PlanFromView. The compile CALL SITE no longer lives in
core (the kernel/plugin boundary law: a kind-blind mechanism that is NOT one of the
four in-core M's is a plugin). IMPORT-PURITY preserved (candy/plugin-bundle/compile.go
imports ONLY github.com/opencharly/sdk); ZERO-ALIASES preserved (the BuildDeployPlan +
MergePlan aliases deleted from charly/deploykit_compiler_aliases.go).
What moved / what stayed:
- DELETED from charly/bundle_add_cmd.go (~162 LOC): the old compilePlans /
compileBoxPlans / compileCandyPlans / compileCandyPlansWithContext loop bodies.
Call sites now use compileRefSelection / compileCandySelection / compileBoxSelection
-> compileViaPlugin (the new seam).
- DELETED from charly/deploykit_compiler_aliases.go: BuildDeployPlan + MergePlan
aliases (R5). Surviving: HostContext / DescribePlan / computeDeployID.
- NEW charly/bundle_compile_seam.go: compileViaPlugin (in-proc reverse channel +
OpCompile + PlanFromView re-materialization) + the per-unit selection helpers
that replaced the deleted loop bodies.
- NEW candy/plugin-bundle/compile.go: the plugin OpCompile leg (re-hydrate envelope
via HostBuild("resolved-project") + loop BuildDeployPlan + project []InstallPlanView).
- candy/plugin-bundle/command.go: Invoke dispatches case sdk.OpCompile.
- charly/install_build_test.go + charly/localpkg_test.go: BuildDeployPlan(...) ->
deploykit.BuildDeployPlan(...) + MergePlan -> deploykit.MergePlan (deleted alias
forced explicit sdk refs).
- charly/layers.go: setRaw nil-slice guard (a nil []string in the RawInstallContext
carry-through, surfaced by the envelope re-hydration round-trip).
- NEW charly/bundle_compile_parity_test.go: the K4-B compile-parity golden (WireView
parity + PlanFromView fidelity + can-fail RIDER + non-vacuity guards) + the
isolateProviderRegistry helper (full-suite test-isolation fix).
sdk gitlink bump: b8590fb -> 2ee0808 (sdk PR #52 — OpCompile + PlanFromView + the
deploy-compile seam types).
R10: go test ./... ok (101.526s, ZERO warnings); parity golden byte-faithful (3
candies, 3 classes pkg/op/builder, can-fail RIDER OK); gofmt/vet/golangci-lint
clean; task cue:gen reproducible; bed check-sidecar-pod FRESH PASS (11/11 steps,
exit 0, ZERO warnings, verified twice). R5 grep self-test clean.
Assisted-by: Claude (fully tested and validated)
…gelog (only DeployCompileRequest/Reply are new) R5 claim-keyed sweep (sibling doc in the same cutover): the superproject CHANGELOG repeated the false claim that the sdk half adds CUE defs for THREE seam types incl. ResolvedProjectRequest. The actual sdk diff adds only TWO (DeployCompileRequest / DeployCompileReply); #ResolvedProjectRequest already exists in schema/resolvedproject.cue from the K5-Unit-0 cutover (CHANGELOG/2026.194.1655.md) and is NOT re-added (resolvedproject.cue diff empty). Corrected the sdk-contract-surface bullet. Doc-only; no code or gate impact. Assisted-by: Claude (documentation reviewed)
…v0.2026196.208) B2: the super gitlink references the MERGED sdk main commit (654940bb, tag v0.2026196.208, PR opencharly/sdk#52), not the feat branch. go.mod require bumps v0.2026195.742 -> v0.2026196.208 (replace => ../sdk keeps in-tree resolution). go build + go vet green against the repointed submodule. Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅Change class: charly/sdk Go (K4-B — bundle-add deploy-compile slice → Head: Checklist (every rule)
R10 evidence (fresh, exit 0)summary.yml (run-calver 2026.196.0224): 11 steps, 350s, all ok:true, zero warnings. DecisionAll 18 rules PASS. The K4-B deploy-compile slice move is architecturally CORRECT (kind-blind mechanism → plugin, IMPORT-PURE, ZERO-ALIASES shrank), R10-proven on a fresh disposable bed (exit 0, zero warnings, compile path executed live at deploy-add + fresh-rebuild update), SDD-reproducible, and R5-clean. Approved — proceeding to finalize the merge-time CalVer, squash-merge, and tag. Assisted-by: Claude (fully tested and validated) |
Finalizes the merge-time CalVer for the K4-B deploy-compile slice cutover (the bundle-add compile loop moved out of core into candy/plugin-bundle). 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]>
K4-B — move the deploy COMPILE slice (BuildDeployPlan loop) out of
charly/core intocandy/plugin-bundleK4-B (the deploy-compile continuation of the K4 deploy-resolution wave): the
charly bundle adddeploy COMPILE slice — theBuildDeployPlanloop that turns each candy + the resolved box + HostContext into anInstallPlan— moves OUT ofcharly/core INTO thecandy/plugin-bundleplugin candy (thecommand:bundleprovider's newOpCompileleg). The host now ONLY computes the per-node SELECTION (the resolved box — authored OR synthetic — projected to aspec.ResolvedBoxView, the FINAL pruned candy order, the host-sidedeploykit.HostContextincl. the preresolvedBuilderContext) and Invokes the plugin'sOpCompilewith aspec.DeployCompileRequest; the plugin re-hydrates the resolved-project envelope ITSELF viaHostBuild("resolved-project")(the established #67 seam), re-hydrates the box vocab viadeploykit.NewSpecResolvedBoxand each candy model viadeploykit.NewSpecCandyModel, loopsdeploykit.BuildDeployPlanover the host-provided order, projects each plan to itsInstallPlanViewwire form, returns[]InstallPlanView; the host re-materializes[]*InstallPlanviadeploykit.PlanFromView. The compile CALL SITE no longer lives in core.The pure compiler (
BuildDeployPlan) is a kind-blind MECHANISM already insdk/deploykit; this cutover moves the LOOP + the per-node glue out ofcharly/core into the plugin, per the kernel/plugin boundary law: a kind-blind mechanism that is NOT one of the four in-core M's (plugin loading, prescan-dispatch, the kind-decode materialize, the wire broker) is a PLUGIN. IMPORT-PURITY preserved (candy/plugin-bundle/compile.goimports ONLYgithub.com/opencharly/sdk); ZERO-ALIASES preserved (theBuildDeployPlan+MergePlanaliases deleted fromcharly/deploykit_compiler_aliases.go).What moved / what stayed
charly/bundle_add_cmd.go(~162 LOC): the oldcompilePlans/compileBoxPlans/compileCandyPlans/compileCandyPlansWithContextloop bodies (which calledBuildDeployPlandirectly in core). Call sites now usecompileRefSelection/compileCandySelection/compileBoxSelection→compileViaPlugin.charly/deploykit_compiler_aliases.go: theBuildDeployPlan+MergePlanaliases (R5). Surviving:HostContext/DescribePlan/computeDeployID.charly/bundle_compile_seam.go— the host-side seam:compileViaPlugin(in-proc reverse channel +OpCompile+PlanFromViewre-materialization) + the per-unit selection helpers that replaced the deleted loop bodies.candy/plugin-bundle/compile.go— the pluginOpCompileleg: re-hydrate envelope viaHostBuild("resolved-project")+ loopBuildDeployPlan+ project[]InstallPlanView. IMPORT-PURITY: imports ONLYgithub.com/opencharly/sdk.candy/plugin-bundle/command.go—Invokedispatchescase sdk.OpCompile.charly/install_build_test.go+charly/localpkg_test.go—BuildDeployPlan(...)→deploykit.BuildDeployPlan(...)+MergePlan→deploykit.MergePlan(deleted alias forced explicit sdk refs).charly/layers.go—setRawnil-slice guard (surfaced by the envelope re-hydration round-trip).charly/bundle_compile_parity_test.go— the K4-B compile-parity golden + theisolateProviderRegistryfull-suite test-isolation fix.Change class
charlyGo runtime +candy/plugin-bundleGo runtime +sdkgitlink bump (→ sdk PR #52).R10 evidence
go test ./...(full suite):ok github.com/opencharly/charly/charly 101.526s(green, ZERO warnings).gofmt -lempty;go vet ./...clean;golangci-lint run0 issues.task cue:genreproducible;TestPluginsGenReproduciblePASS;task build:binarybuilt.charly check run check-sidecar-pod(SHORT pod+peer-member bed, the R10 composition gate for the deploy compile slice): FRESH PASS (steps=11, exit 0, ZERO warnings) — verified twice on a fresh destroy+rebuild.git grepfor the deleted compile-loop funcs + the deleted charly-aliases returns clean (no stale references).Parity
Byte-faithful, proven by
TestBundleCompileParity_PluginRoundTrip: (1) WireView parity — the plugin-compiled + re-materialized plan projects to the SAME wire JSON as the former live host-compile; (2)PlanFromViewfidelity — the WireView→PlanFromView round-trip is the identity on a re-materialized plan. Across 3 fixture candies spanning 3 step classes (pkg/op/builder). A can-fail RIDER perturbs the box Home and asserts the plans DIFFER (not vacuous). Non-vacuity guarded: ≥3 candies AND ≥2 step classes.Multi-repo (B2)
OpCompile+PlanFromView+ the deploy-compile seam types. This super PR bumps thesdkgitlink →2ee0808(the sdk feat commit).pr-validatorfor each; merge in dependency order (sdk first, then super).Non-blocking findings (collected for the next thematic batch)
LoadUnified(rootDir), populating the globalproviderRegistry.byKey+ the additive prescan globals; a later test'sproviderRegistry.Close()closes connections but does NOT clearbyKey, so subsequent tests find stale closed providers → "grpc: the client connection is closing" +validateCheckBedsaccepts k8s. Fixed withisolateProviderRegistry(t)(snapshot+restore). The deeper registry-has-no-Unregister design is a non-blocking finding for the next test-infra batch.--add-candyenvelope gap. The resolved-project envelope currently carries only root-project boxes/candies; a--add-candyref to a candy NOT in the root discover would miss. Not exercised by the R10 bed; tracked for the next deploy-resolution batch (docs(landing): correct CLAUDE.md + plugins to the PROVEN two-gate merge model #67-gated cone).TestBuildDeployPlan*. Pre-existing vacuous-skip (fedora-coder not in the root discover on a worktree checkout), NOT a regression; the parity golden covers the compile slice non-vacuously via a hand-builtimgOld.Attribution
Assisted-by: Claude (fully tested and validated)— full suite green + fresh-rebuild R10 bed (check-sidecar-pod) PASS (11/11 steps, ZERO warnings) + the parity golden exercised the new compile seam end-to-end over the full plugin round-trip.Assisted-by: Claude (fully tested and validated)