Skip to content

refactor(core)!: #55 step 3-III — build-vocabulary value types off sdk/buildkit onto spec - #197

Merged
atrawog merged 2 commits into
mainfrom
feat/55-step3-III-buildkit-valuetypes
Jul 29, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/55-step3-III-buildkit-valuetypes

Conversation

@atrawog

@atrawog atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

#55 step 3-III — superproject leg (import-purity, B2)

charly core + build plugins now reference the build value-type containers DistroConfig/BuilderConfig (+ BuilderMap, WrapDistroDef, DistroTagChain, and the DistroDef/FormatDef/BuilderDef payload aliases) from the CUE-sourced spec contract instead of importing sdk/buildkit — the import-purity lever for the kernel M/B build files. Consumes merged spec v0.2026210.2052 + sdk v0.2026210.2103 (producer-first B2).

What lands

  • 20 charly + 12 candy files repoint buildkit.{DistroConfig,BuilderConfig,BuilderMap,WrapDistroDef,DistroTagChain}→spec.X + DistroDef→spec.ResolvedDistro/FormatDef→spec.Format/BuilderDef→spec.Builder; goimports drops the now-unused sdk/buildkit import where no behaviour symbol remains.
  • Import-purity win: charly files importing sdk/buildkit 51 → 42 (8 fully drop it: bundle_add_cmd, deploy_target_unified, layers, validate + 4 tests). The 42 remaining keep buildkit for build-engine BEHAVIOUR (ResolveBox/ResolvedBox/ResolveAllBox/ResolveStatus/phase-templates) or InitConfig → feat(hooks): golangci-lint pre-commit criterion (cutover B) #65/feat(bundle)!: charly bundle CLI → compiled-in command:bundle plugin (P13) #71.
  • Gitlinks: spec→ec22fa8e (v0.2026210.2052), sdk→5f08d64b (v0.2026210.2103). Requires: charly (spec→2052, sdk→2103) + 85 candies (spec→2052).

Boundary law — InitConfig stays in buildkit

InitConfig's ResolveInitSystem/ActiveInit aggregate the whole candy set via AggregateCandyCapabilities = init-composition POLICY, not a contract accessor → stays in sdk/buildkit, relocates with the build engine (#65/#71). DistroConfig/BuilderConfig methods are intrinsic map lookups → contract accessors → spec (the producer legs).

Verification (final assembled tree)

  • go build ./... 0 · go test ./charly/... ok (196s) · all 85 candies GOWORK=off vet 0 fails (out-of-process swept, refactor(core)!: charly + plugins consume opencharly/spec fabric slices, drop sdk kits (#55 step1) #194 lesson) · charly box validate 0 · gofmt clean · go.work canonical regen NO-OP · no go.sum/go.work.sum churn.
  • Gates: TestPluginsGenReproducible / TestNoSinglePluginAPISurface / TestKernelManifest_CoreIsPinnedToTheFabricFloor pass.
  • R5 whole-tree both directions: zero live buildkit.{value-type} refs in charly/candy; no stale "buildkit-specific / spec must never import" comments.
  • R10 build-engine beds, fresh-rebuild (runtime .go byte-identical to this tree — the merged spec/sdk squashes' only delta vs the bed-tested feat commits was CHANGELOG rename/prose; the super leg's runtime change = the repoints, exactly what the beds built): check-pod-overlay 13/13 (713s — overlay renders dnf install/fedora → DistroConfig resolution correct through the spec types) + check-builder-vm 10/10 (358s). Delta since tested state = CHANGELOG/gitlink/require-bump only → runtime-neutral, no bed re-run owed.

Non-blocking (NOT folded — route to a thematic batch)

Producer-first B2: spec (v0.2026210.2052) → sdk (v0.2026210.2103) → this superproject leg.

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

…k/buildkit onto spec

charly core + build plugins reference DistroConfig/BuilderConfig (+ BuilderMap,
WrapDistroDef, DistroTagChain, DistroDef/FormatDef/BuilderDef aliases) from the
CUE-sourced spec contract instead of importing sdk/buildkit. charly files
importing sdk/buildkit: 51 → 42 (the rest keep it for build-engine behaviour /
InitConfig → #65/#71). Consumes merged spec v0.2026210.2052 + sdk v0.2026210.2103.
InitConfig stays in buildkit (composition policy → #65/#71).

Gitlinks: spec→ec22fa8e, sdk→5f08d64b. Requires: charly spec→2052/sdk→2103, 85
candies spec→2052.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
@atrawog

atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly Go type-repoint + candy repoints + go.mod require-bumps + submodule gitlink bumps (runtime).

Independently re-derived from the PR at head 5bfa6e5d; trusted no author claim. This is #55 step 3-III, the final (superproject) B2 leg: charly core + build plugins repoint the build-vocabulary value-type containers buildkit.{DistroConfig,BuilderConfig,BuilderMap,WrapDistroDef,DistroTagChain} → spec.X (+ DistroDef→spec.ResolvedDistro/FormatDef→spec.Format/BuilderDef→spec.Builder) and drop the now-unused sdk/buildkit import where no behaviour symbol remains. Consumes merged spec v0.2026210.2052 + sdk v0.2026210.2103.

Checklist (each independently verified)

# Rule Verdict
0 Security / anti-tampering (T1–T4) PASS — no security machinery touched (no hooks/branch-protection/spec/CLAUDE.md); no secrets/exfiltration/network; description↔diff match exact; no embedded directives (comments empty)
1 Description complete (template + pasted evidence) PASS — full summary, R10 evidence, tier justified, rule section
2 Change-class gate matches evidence (R7/R10) PASS — build-engine beds are the correct class; no dry-run/rebuild-alone fraud
3 Attribution tier justified PASS — fully tested and validated; changed DistroConfig/BuilderConfig resolution paths executed live in check-pod-overlay
4 R0 skills honored PASS — go / plugin / strict-policy / git-workflow spot-checked
5 R1 RCA / ZERO warnings PASS — box validate 0 warnings; no flake framing
6 R2 no pre-existing/out-of-scope split PASS — sole lint finding routed to named batch (task #14) with a genuine separability proof
7 R3 no duplication PASS (N/A) — mechanical rename, no new surface
8 R4 no ad-hoc workaround PASS (N/A)
9 R5 hard cutover + grep self-test PASS — whole-tree git grep 'buildkit.{value-type}' over charly/candy = EMPTY; no stale comments; no dual-mode
10 R6/R8/R9 artifact + binary integrity PASS — gitlinks verified; binary rebuilt + stamped for box validate
11 R10 disposable-only, fresh-rebuild, coverage PASS — beds genuine on disk, ok: true, run-calver 2026.210.1939, 713s + 358s, 0 failed steps
12 RDD / ADE / SDD CUE-mandate PASS — task cue:gen-equivalent pluginsgen regen NO-OP; Reproducible/NoSinglePluginAPISurface/KernelManifest gates pass; no hand-edited *_gen.go; no new @go(-)/hand-written wire type
13 Concurrency + anti-cheat PASS — no idle/serial dodge; no dead-code-in-touched-module; parked finding names a real advancing batch; no touched-non-compliant-surface left extended; grep evidence re-run at real head
14 Hard cutover — one atomic commit; plan=contract PASS — one change commit; no Phase-2/TODO
15 ARCHITECTURE GATE — placement PASS — see trace below
16 Disposable-only autonomy PASS (N/A) — no destroy in evidence
17 Clean architecture + Go gates PASS — go build ./... 0; go test ./... (charly) 0; gofmt -l empty; golangci-lint 0 on charly + touched candies; all 85 candies GOWORK=off go vet 0-fail
18 CHANGELOG present PASS — CHANGELOG/2026.210.2115.md, valid CalVer, H1 byte-matches filename, not on main

Architecture gate — placement: CORRECT. The change advances core toward the spec+proto-only end-state: charly files importing sdk/buildkit 51 → 42 (buildkit dropped from 9 core files). The repointed containers are CUE-sourced build-vocabulary value types belonging in the spec contract (D-data / E-envelope fabric). InitConfig correctly STAYS in sdk/buildkit (init-composition policy via AggregateCandyCapabilities, relocates with the build engine → #65/#71).
Per-item trace (staged charly/*.go): every change is a buildkit.X→spec.X type reference + dropped unused import; no new/grown charly/*_aliases.go (none exist in core); zero new sdk-mechanism-kit imports in core (only the allowed spec contract import added to 2 files); boundary-law placement = D-data vocab types → spec (no spec.<Kind> field-read, kind-word switch, or per-kind map leaked into core); no *Legacy* relocation smell.

R10 runtime-neutrality (independently established, not taken on the author's word): sdk/buildkit at 5f08d64b declares these as type aliases to spec — DistroConfig = spec.DistroConfig, BuilderConfig = spec.BuilderConfig, BuilderMap = spec.BuilderMap, DistroDef = spec.ResolvedDistro, FormatDef = spec.Format, BuilderDef = spec.Builder; WrapDistroDef/DistroTagChain are canonical in spec/spec/distro_config_methods.go. So buildkit.X→spec.X is a pure source rename producing byte-identical compiled code — the beds (check-pod-overlay 13/13 rendering dnf/fedora through DistroConfig resolution, check-builder-vm 10/10) exercised these exact runtime types via the alias and validly gate the final code. The delta since the bed-tested state is CHANGELOG/go.mod-require/gitlink/comments only. No bed re-run owed.

Producers verified merged: spec tag v0.2026210.2052 → ec22fa8e = tip of spec origin/main; sdk tag v0.2026210.2103 → 5f08d64b = tip of sdk origin/main. charly go.mod requires spec 2052 + sdk 2103; all 85 candy go.mod at spec 2052.

Comments considered: none (PR carried no comments).
Cross-PR interactions considered: none-found — #197 is the only open PR on opencharly/charly; the spec + sdk producer legs are already merged (their main tips = the consumed tags). feat is up to date with origin/main (347be9e3), not BEHIND.

Decision: PASS. Every applicable R0–R10 rule + pillar verified from the diff and my own live re-run (build/test/vet/lint/box-validate/reproducibility) plus provable R10 runtime-neutrality via type-alias identity. Proceeding to finalize the merge-time CalVer, merge (squash), and tag.

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

Merge-time CalVer stamp applied by pr-validator.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
@atrawog
atrawog merged commit c497f3d into main Jul 29, 2026
@atrawog
atrawog deleted the feat/55-step3-III-buildkit-valuetypes branch July 29, 2026 21:30
@atrawog

atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — landed ✅

  • charly/pr-validator = success posted on version-stamp head e5d0b412 (zero denials).
  • Merge-time CalVer finalized: CHANGELOG/2026.210.2115.md → CHANGELOG/2026.210.2129.md (H1 rewritten, byte-matches filename).
  • Squash-merged to main as c497f3d2ff4d767c50d48b04b14c247992d1928b (one commit).
  • Tagged v2026.210.2129 (annotated) on the merged HEAD, pushed + verified on remote.
  • feat/55-step3-III-buildkit-valuetypes deleted.

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

atrawog added a commit that referenced this pull request Aug 17, 2026
…— round 2

A validator failed round 1 on the sharpest possible finding: this change's thesis
is that prose naming non-existent symbols is a defect, and its replacement prose
named non-existent symbols.

  "tasks.go is a thin shim to deploykit.Generator.EmitTasks"
      -> 64 lines, ONE function (invokeOpEmitFragmentOpt), and architecturally
         impossible: P16 import purity forbids charly/ importing the sdk
  emitPluginFragment      -> zero declarations; real: invokeOpEmitFragmentOpt
  case "command": emitCmd -> the retracted `bash -c` form, 45 lines above its
                             own retraction, in the file this change edits
  emitDownload "curl | extractor"
                          -> no pipe; a content-addressed cache file
  write row COPY --from=  -> EmitWrite emits none (build-context path, not a
                             stage). EmitCopy does, correctly.

Root cause: the greps were pointed at the claims being RETRACTED and never at
those being ASSERTED. Every symbol the corrected prose names is now verified to
exist -- including method receivers, which `func <name>` misses and which briefly
made the real EmitTasks look absent.

Scope: 52 lowercase emitter names -> the exported forms in sdk/deploykit; one
stale test reference -> TestOpActsInBuildDeploy_PlacementAgnosticBuildEmit.

Two stale test refs (TestNsRepoIdentity,
TestImportNamespace_DivergentVersionMutualCycle) are pre-existing, a different
claim family, and routed rather than guessed -- guessing is what failed round 1.

box validate exit 0, zero warnings. Projections regenerated on current
origin/main (plugins caught up to #197 by merge, not rebase) and filtered.

Assisted-by: Claude Code Anthropic Claude Opus 5 (documentation reviewed)
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