Skip to content

feat(deploy): K4-B — OpCompile + PlanFromView + the deploy-compile seam types - #52

Merged
atrawog merged 3 commits into
mainfrom
feat/k4b-compile-slice
Jul 15, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/k4b-compile-slice

Conversation

@atrawog

@atrawog atrawog commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

K4-B — sdk contract half: the deploy-compile seam types + OpCompile + PlanFromView

K4-B (the sdk contract half of the deploy-compile-slice move): the wire types + the re-materialization half of the round-trip that move the charly bundle add deploy COMPILE slice out of charly/ core into candy/plugin-bundle. The host computes the per-node selection (resolved box projected to a spec.ResolvedBoxView + the FINAL pruned candy order + the host-side deploykit.HostContext) and Invokes the bundle plugin's new OpCompile with a spec.DeployCompileRequest; the plugin re-hydrates the resolved-project envelope via HostBuild("resolved-project"), re-hydrates the box + each candy model, loops deploykit.BuildDeployPlan over the order, projects each plan to its InstallPlanView wire form, returns []InstallPlanView; the host re-materializes []*InstallPlan via deploykit.PlanFromView.

What landed

  • sdk/ops.go — OpCompile = "compile" (a generic action selector, never a provider word — F11 TestNoSinglePluginAPISurface; command:bundle sole first consumer).
  • sdk/deploykit/plan.go — PlanFromView(v spec.InstallPlanView) (*spec.InstallPlan, error) (reverse of WireView, via stepsFromView) — the re-materialization half of the round-trip.
  • sdk/schema/seam.cue (+39) — CUE defs for DeployCompileRequest / DeployCompileReply (the two new compile-seam wire carriers). resolvedproject.cue UNCHANGED — #ResolvedProjectRequest already exists there from the K5-Unit-0 cutover (CHANGELOG/2026.194.1655.md) and is NOT re-added here.
  • sdk/spec/cue_types_gen.go (+45, generated) — generated Go for the two new seam types. Reproducibility-gated by TestGenReproducible.

Change class

charly/sdk Go runtime (adds a new Op constant, a new exported func, and new CUE-sourced wire types — additive to the sdk contract).

R10 evidence

  • gofmt -l empty; go vet ./... clean; go build ./... OK; golangci-lint run 0 issues (sdk module).
  • task cue:gen reproducible (cue_types_gen.go 45-line seam addition, resolvedproject.cue untouched, no plugin-params drift); TestGenReproducible PASS.
  • Superproject full suite go test ./... green (ok github.com/opencharly/charly/charly 101.526s) — the parity golden TestBundleCompileParity_PluginRoundTrip + the fresh check-sidecar-pod bed exercise the sdk seam types end-to-end (11/11 steps, fresh-rebuild, ZERO warnings).

Parity

Byte-faithful, proven by the superproject's TestBundleCompileParity_PluginRoundTrip golden: WireView parity (plugin-compiled plan projects to the SAME wire JSON as the former live host-compile) + PlanFromView fidelity (WireView→PlanFromView round-trip is the identity on a re-materialized plan), across 3 fixture candies spanning 3 step classes (pkg/op/builder), with a can-fail RIDER (perturbed Home → plans differ).

Attribution

Assisted-by: Claude (fully tested and validated) — full suite green + fresh-rebuild R10 bed (check-sidecar-pod) PASS + the parity golden exercised the new sdk seam types (OpCompile, PlanFromView, DeployCompileRequest/Reply) end-to-end over the full plugin round-trip.

Multi-repo (B2)

This is the sdk producer PR (step 0). The superproject PR (step 3) bumps the sdk gitlink to this branch's commit + carries the charly/ + candy/plugin-bundle/ changes. The orchestrator routes a fresh pr-validator for each; merge in dependency order (sdk first, then super).

Assisted-by: Claude (fully tested and validated)

…am types

K4-B (sdk contract half): the wire types + the re-materialization half of the
round-trip that move the charly bundle add deploy COMPILE slice out of charly/
core into candy/plugin-bundle. The host computes the per-node selection (resolved
box projected to a spec.ResolvedBoxView + the FINAL pruned candy order + the
host-side deploykit.HostContext) and Invokes the bundle plugin's new OpCompile
with a spec.DeployCompileRequest; the plugin re-hydrates the resolved-project
envelope via HostBuild("resolved-project"), re-hydrates the box + each candy
model, loops deploykit.BuildDeployPlan over the order, projects each plan to its
InstallPlanView wire form, returns []InstallPlanView; the host re-materializes
[]*InstallPlan via deploykit.PlanFromView.

- sdk/ops.go: OpCompile = "compile" (generic action selector, never a provider
  word — F11 TestNoSinglePluginAPISurface; command:bundle sole first consumer).
- sdk/deploykit/plan.go: PlanFromView (reverse of WireView, via stepsFromView) —
  the re-materialization half of the round-trip.
- sdk/schema/seam.cue (+39) + spec/cue_types_gen.go (+45, generated): CUE defs
  for DeployCompileRequest/DeployCompileReply/ResolvedProjectRequest + generated
  Go. resolvedproject.cue UNCHANGED. Reproducibility-gated by TestGenReproducible.

Parity byte-faithful (superproject TestBundleCompileParity_PluginRoundTrip
golden + the check-sidecar-pod R10 bed, 11/11 steps, fresh-rebuild, ZERO
warnings). gofmt/vet/golangci-lint clean; task cue:gen reproducible.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly/sdk Go (sdk contract LIBRARY — additive: an Op constant, an exported deploykit func, and new CUE-sourced seam wire types; 158 insertions / 0 deletions)

Live required status context: charly/pr-validator (verified via live branch protection; charly/claude-validation is stale on opencharly repos). Posted failure on 2ee0808.

Per-item checklist

[PASS] 0. security & anti-tampering — all additions; no secrets/egress/guardrail-weakening/new-deps; no manipulation attempt.
[FAIL] 1. description complete — BLOCKING (see below).
[PASS] 2. change-class gate — sdk is a contract library; static gate + cue:gen reproducibility re-run GREEN; no dry-run/rebuild-alone fraud.
[PASS] 3. attribution tier — fully tested and validated supportable on this leg (static + cue:gen + cross-repo build green) once the description is fixed.
[PASS] 4. R0 skills — loaded git-workflow / plugin / go / go-quality; spot-checked SDD + cue:gen + lint/vet.
[PASS] 5. R1 — ZERO warnings in all gate output; the one divergence is the description mismatch (item 1).
[PASS] 6. R2 — no pre-existing/out-of-scope split invoked; InstallPlanView (pre-existing, hand-written) is NOT in this diff — rides as opaque RawBody, no new hand-written wire struct added.
[PASS] 7. R3 — PlanFromView routes through the single pre-existing stepsFromView; no duplication.
[PASS] 8. R4 — no sleep/retry/magic-number; direct field-copy + converter call.
[PASS] 9. R5 — all additions, no transitional/legacy/dual-mode/alias path; no _aliases.go.
[N/A] 10. R6/R8/R9 — sdk contract leg; no destructive git / Containerfile / target-deploy.
[PASS] 11. R10 — static + cue:gen reproducibility GREEN, ZERO warnings; TestStepView_RoundTrip covers PlanFromView's converter; the runtime bed is on super #120.
[PASS] 12. SDD @100% — task cue:gen run TWICE → clean tree (zero drift); TestGenReproducible PASS; new wire types CUE-sourced + generated (NOT hand-written); resolvedproject.cue UNCHANGED (envelope not grown); opaque RawBody fields carry pre-existing non-CUE types (the established idiom), no NEW hand-written wire struct in the diff.
[N/A] 13. concurrency mandate — no shared-state path on this sdk leg.
[PASS] 14. hard cutover — ONE commit, all-additive, no deferred work.
[PASS] 15. ARCHITECTURE GATE — placement CORRECT: OpCompile (sdk contract), PlanFromView (sdk/deploykit kit), seam types (sdk/schema → sdk/spec). Advances the K4-B plugin-host end-state; no core involvement, no new alias, no new core kit import.
[N/A] 16. disposable-only autonomy — no destroy/rebuild on this leg.
[PASS] 17. clean architecture + go gates — gofmt -l EMPTY; golangci-lint 0 issues; go vet clean; go test ./... GREEN.
[PASS] 18. CHANGELOG present (2026.196.0137.md placeholder; minor non-blocking filename↔H1 CalVer mismatch 0137 vs 9999 — evaluator rewrites both at merge).

Blocking finding (item 1 — description↔code mismatch, R1/R2/R5)

The PR body and the CHANGELOG both state:

sdk/schema/seam.cue (+39) — CUE defs for DeployCompileRequest / DeployCompileReply / ResolvedProjectRequest (the wire carriers for the compile seam). resolvedproject.cue UNCHANGED.

But the seam.cue diff adds only TWO new CUE defs: #DeployCompileRequest and #DeployCompileReply. #ResolvedProjectRequest is NOT in this diff — it already exists in schema/resolvedproject.cue (line 267), added in a prior cutover (CHANGELOG/2026.194.1655.md). The body is internally contradictory: it says resolvedproject.cue is UNCHANGED yet lists ResolvedProjectRequest as a seam.cue addition.

This is a false/misleading claim about what the change delivers — a claim-keyed documentation divergence (R1) repeated in the PR body + CHANGELOG (R5), and it is blocking in this cutover (R2). The +39 line count matches only the two new defs.

Required fix (CHANGES-REQUESTED):

  • Correct the PR body and CHANGELOG/2026.196.0137.md to list only the TWO new seam types added to seam.cue (#DeployCompileRequest / #DeployCompileReply), and stop misattributing #ResolvedProjectRequest (which already lives, unchanged, in resolvedproject.cue). Append a fix commit and push fast-forward — the status resets and I re-run. Do NOT close + recreate the PR.

What PASSED (re-verified independently on a fresh checkout)

gofmt -l .                          → (empty)
go vet ./...                        → clean
go build ./...                      → OK
golangci-lint run ./...             → 0 issues
go test ./...                       → all submodules GREEN (sdk, deploykit, enginekit, kit, loaderkit, spec, vmshared)
task cue:gen (run 1) → git status   → CLEAN (no drift)
task cue:gen (run 2) → git status   → CLEAN (no drift) — REPRODUCIBLE
TestGenReproducible                 → PASS
TestStepView_RoundTrip              → PASS (13/13 subtests) — covers PlanFromView's stepsFromView
git diff main..HEAD -- schema/resolvedproject.cue → EMPTY (envelope schema unchanged)

Decision: CHANGES-REQUESTED — the PR is NOT merged. The single blocking finding is the description↔code mismatch (ResolvedProjectRequest listed as a new seam.cue def but pre-existing in resolvedproject.cue). All static gates, SDD reproducibility, and architecture placement are correct. Fix the body + CHANGELOG prose, append a commit, and re-push.

Assisted-by: Claude (analysed on a live system)

…leRequest/Reply are new; ResolvedProjectRequest predates this PR)

R5 claim-keyed sweep: the K4-B CHANGELOG + PR body claimed the sdk half adds
CUE defs for THREE seam types (DeployCompileRequest / DeployCompileReply /
ResolvedProjectRequest). The actual diff adds only TWO — #ResolvedProjectRequest
already exists in schema/resolvedproject.cue from the K5-Unit-0 cutover
(CHANGELOG/2026.194.1655.md) and is NOT re-added here (resolvedproject.cue diff
is empty). Corrected both the seam.cue bullet and the generated-Go bullet
('three' -> 'two'). Doc-only; no code or gate impact.

Assisted-by: Claude (documentation reviewed)
@atrawog

atrawog commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (round 2)

Change class: charly/sdk Go (sdk contract LIBRARY — additive, 159 insertions / 0 deletions)

Head: 71ba80a (round-1 2ee0808 + the doc-fix commit 71ba80a)

Round-1 blocker — re-verified independently: FIXED

Round 1 FAILED on the claim-keyed doc divergence: the body + CHANGELOG claimed seam.cue adds THREE seam types, but the diff adds only TWO (#ResolvedProjectRequest already exists in resolvedproject.cue from K5-Unit-0). Re-derived from the live diff:

  • The fix commit 71ba80a is doc-only (touches only CHANGELOG/2026.196.0137.md, 4+/3-; no code/schema/generated file).
  • R5 grep self-test: git grep -i -E "three (new )?seam|three seam type" -- 'CHANGELOG/*' → ZERO matches.
  • PR body: ZERO "three"; explicitly "two new compile-seam wire carriers"; notes #ResolvedProjectRequest already in resolvedproject.cue, not re-added. No internal contradiction.
  • schema/resolvedproject.cue diff main..HEAD → EMPTY (envelope unchanged).
  • schema/seam.cue adds exactly TWO new defs: #DeployCompileRequest + #DeployCompileReply.

Checklist (every rule)

  • [PASS] 0. security & anti-tampering: no secrets/egress/scope-mismatch/weakened-gate/supply-chain; no manipulation.
  • [PASS] 1. description complete: template filled; round-1 mismatch FIXED; internally consistent.
  • [PASS] 2. change-class gate matches evidence: sdk contract LIBRARY; static gate + cue:gen reproducibility re-run GREEN; no dry-run fraud.
  • [PASS] 3. attribution tier fully tested and validated: sdk leg's gate GREEN; runtime bed on super fix(deploykit)!: the init injection writes the composition source, not a derived view #120; parity golden exercised the seam types. Supportable.
  • [PASS] 4. R0 skills honored (git-workflow, plugin, go, go-quality, cutover-policy).
  • [PASS] 5. R1 RCA + ZERO warnings: round-1 incident root-cause-fixed (claim-keyed sweep), not dismissed.
  • [PASS] 6. R2 no pre-existing/out-of-scope split: pre-existing types ride as opaque RawBody; no hand-written wire struct added.
  • [PASS] 7. R3 no duplication: PlanFromView reverses WireView via the SINGLE stepsFromView (TestStepView_RoundTrip, 12 classes).
  • [PASS] 8. R4 no ad-hoc workaround.
  • [PASS] 9. R5 hard cutover + grep self-test: all additions; no transitional/alias cruft; round-1 false claim swept.
  • [N/A] 10. R6/R8/R9 — sdk contract leg (no destructive git / generation / target deploy); runtime bed is super fix(deploykit)!: the init injection writes the composition source, not a derived view #120.
  • [PASS] 11. R10: sdk leg's gate re-run GREEN, ZERO warnings; TestStepView_RoundTrip PASS.
  • [PASS] 12. SDD CUE-mandate @100%: cue:gen run TWICE → clean both; TestGenReproducible PASS; wire types CUE-sourced (NOT hand-written); no new @go(-); resolvedproject.cue unchanged.
  • [N/A] 13. concurrency mandate: no shared-state path on this sdk leg.
  • [PASS] 14. hard cutover: change commit + sanctioned doc-fix commit (update-in-place); --squash folds them; no Phase-2/TODO.
  • [PASS] 15. ARCHITECTURE GATE: OpCompile (E-envelope vocab), wire SHAPES (→ sdk/spec, CUE-first), PlanFromView (kind-blind M-mechanism in sdk/deploykit) — all belong in the sdk contract; no capability code, no per-kind branch, no alias, no core kit import. OpCompile is a generic action selector, not a provider word (F11). placement: CORRECT
  • [N/A] 16. disposable-only autonomy: no destroy/rebuild on this leg.
  • [PASS] 17. go gates: gofmt -l empty; go vet clean; go test ./... green; golangci-lint 0 issues (clean-cache re-run; the 23 stale cross-checkout cache artifacts touched none of this PR's files).
  • [PASS] 18. CHANGELOG present (2026.196.0137.md, placeholder CalVer; evaluator finalizes at merge).

Static gate re-run (independent, fresh scratch checkout)

  • GOWORK=off go mod verify: all modules verified
  • GOWORK=off go build ./...: exit 0
  • gofmt -l .: empty
  • GOWORK=off go vet ./...: clean
  • GOWORK=off go test ./...: ALL packages green (sdk, deploykit, enginekit, kit, loaderkit, spec, vmshared)
  • golangci-lint run ./... (clean cache): 0 issues
  • task cue:gen run 1 → clean; run 2 → clean (reproducible NO-OP)
  • TestGenReproducible: PASS · TestStepView_RoundTrip (12 subtests): PASS

Decision

PASS. The round-1 claim-keyed doc divergence is independently confirmed FIXED; the diff is in full CLAUDE.md compliance. All static gates + SDD reproducibility GREEN; placement CORRECT. Finalizing the merge-time CalVer, merging --squash, and tagging v0.<…>.

Assisted-by: Claude (analysed on a live system)

pr-validator Phase-3 version stamp: rename CHANGELOG/2026.196.0137.md →
CHANGELOG/2026.196.0208.md and rewrite the H1 to match (repo convention:
H1 = filename CalVer). Doc-only; no code, schema, or generated-file change.

Assisted-by: Claude (fully tested and validated)
@atrawog
atrawog merged commit 654940b into main Jul 15, 2026
@atrawog
atrawog deleted the feat/k4b-compile-slice branch July 15, 2026 02:10
atrawog added a commit to opencharly/charly that referenced this pull request Jul 15, 2026
…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)
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