Repository navigation
refactor(sdk)!: buildkit.ResolvedBox embeds CUE-sourced spec.ResolvedBox (#55 step3 unit 3a) - #109
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#55 step-3 unit 3a — sdk consumer leg: buildkit.ResolvedBox embeds spec.ResolvedBox
Consumes the CUE-sourced
spec.ResolvedBox(spec#4, merged spec main172027b2, tag v0.2026210.1533).buildkit.ResolvedBoxbecomes 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 4json:"-"host-render-cache fields (CandyCaps/BakedMetadata/RenderCandyOrder/ActiveInits) + the 3 vocab pointers + init selection stay here (the documentedjson:"-"gengotypes exception); the ~30 wire-clean fields are promoted from the embeddedspec.ResolvedBox. Field access is transparent via Go embedding (zero read/write-site changes).buildkit.BuilderMap/AggregatedCandyCaps/MergeConfig/ResolvedInitare thin= spec.Xaliases (consistent with buildkit's pre-existing MergeConfig/ResolvedInit alias convention).go.mod: requiregithub.com/opencharly/spec v0.2026210.1533(the merged 3a spec);go mod tidysettled (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 vetclean;gofmt -lempty;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)