Skip to content

refactor(sdk)!: buildkit.ResolvedBox embeds CUE-sourced spec.ResolvedBox (#55 step3 unit 3a) - #109

Merged
atrawog merged 2 commits into
mainfrom
feat/55-step3a-resolvedbox-sdk
Jul 29, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/55-step3a-resolvedbox-sdk

Conversation

@atrawog

@atrawog atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

#55 step-3 unit 3a — sdk consumer leg: buildkit.ResolvedBox embeds spec.ResolvedBox

Consumes the CUE-sourced spec.ResolvedBox (spec#4, merged spec main 172027b2, tag v0.2026210.1533). buildkit.ResolvedBox becomes an embedding wrapper — the wire-clean base lives in spec; only the genuinely buildkit-owned host-render-cache pointers stay in buildkit.

What lands

  • sdk/buildkit/resolved_box.go: type ResolvedBox struct { spec.ResolvedBox; DistroConfig *DistroConfig; DistroDef *DistroDef; BuilderConfig *BuilderConfig; InitSystem string; InitDef *ResolvedInit } — the 4 json:"-" host-render-cache fields (CandyCaps/BakedMetadata/RenderCandyOrder/ActiveInits) + the 3 vocab pointers + init selection stay here (the documented json:"-" gengotypes exception); the ~30 wire-clean fields are promoted from the embedded spec.ResolvedBox. Field access is transparent via Go embedding (zero read/write-site changes).
  • buildkit.BuilderMap/AggregatedCandyCaps/MergeConfig/ResolvedInit are thin = spec.X aliases (consistent with buildkit's pre-existing MergeConfig/ResolvedInit alias convention).
  • go.mod: require github.com/opencharly/spec v0.2026210.1533 (the merged 3a spec); go mod tidy settled (require-only, proxy).

Composite-literal fixes

Go doesn't promote field keys into an outer literal, so the construction sites nest the wire-clean fields under ResolvedBox: spec.ResolvedBox{…} — the 6 production + test-fixture sites in sdk (config_resolve.go, intermediates_compute.go, spec_resolved_box_adapter.go) are fixed; field ACCESS needed zero changes.

Verification

GOWORK=off go build ./... green (proxy-fetches spec v0.2026210.1533); go vet clean; gofmt -l empty; go test ./... (running — the RDD-proven byte-equivalent embedding; note sdk/kit process-monitor tests are slow under load). No new alias FILE, no new sdk mechanism-kit import.

Producer-first B2: spec#4 (merged, tag v0.2026210.1533) → this sdk leg → superproject leg (which carries #55 step-3 units 3b/3c).

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

atrawog and others added 2 commits July 29, 2026 15:40
…Box (#55 step3 unit 3a)

buildkit.ResolvedBox is now an embedding wrapper over the CUE-generated spec.ResolvedBox
(spec's #ResolvedBox, unit 3a) plus the buildkit-owned host-render-cache fields spec must
never carry: DistroConfig/DistroDef/BuilderConfig (the parsed distro:/builder: build
vocabulary — buildkit-specific types, a spec import would cycle), InitSystem/InitDef, and
the four json:"-" render caches CandyCaps/BakedMetadata/RenderCandyOrder/ActiveInits (no
CUE construct for a marshal-suppressed field). BuilderMap/AggregatedCandyCaps/MergeConfig/
ResolvedInit become plain type aliases onto the CUE-sourced spec types.

Field ACCESS via selector is unchanged (Go embedding promotion) across every consumer;
composite-literal construction sites (config_resolve.go's ResolveBox, the intermediates
auto-image constructor, the resolved-project-envelope adapter, and their test fixtures)
are restructured to nest the wire-clean fields under the embedded field name.

Depends on the matching opencharly/spec commit (in-tree `replace` during this cutover;
the tagged spec version bump lands as part of the B2 producer-first chain).

Assisted-by: Claude Code Claude Opus 4.5 (analysed on a live system)
…ds spec.ResolvedBox)

Merge-time CHANGELOG entry finalized by the fresh pr-validator, named by the
merge CalVer v0.2026210.1407 (shared with the release tag).

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd6ptqJukBksWqzq4A2PNZ
@atrawog
atrawog merged commit 00a21a4 into main Jul 29, 2026
@atrawog
atrawog deleted the feat/55-step3a-resolvedbox-sdk branch July 29, 2026 14:10
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