Repository navigation
feat(spec): CUE-source InstallContext + BuildStageContext keystones (P2/S1) - #7
Conversation
…P2/S1) Authors the two build-render context keystones in schema/buildctx.cue (CUE single source) and generates them into spec/cue_types_gen.go via task cue:gen — not a hand-written wire file. The Repos list-of-open-struct generates as []map[string]any; []#CacheMount → []CacheMount; uid/gid forced to Go int via @go(,type=int); dual yaml+json tags automatic. Aliased in vmshared/spec_aliases.go so charly aliases them unchanged. Standalone defs (not #Node/#Op) — no authored wire-key change, no schema version bump. TestGenReproducible now covers them (cue:gen no-op; drift = R1). First unit of the P2 keystone migration; establishes CUE-sourcing for the wire-type family (replacing the hand-written *_wire.go idiom where the shape is a plain struct). Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅Change class: sdk Go — CUE schema + generated param types + aliases (runtime class; gated on the consuming build + a disposable bed). Independent re-validation (fresh context; author claims trusted for nothing — every gate re-run):
SDD field-parity (the crux): I compared both CUE defs against the generated Go structs field-for-field — R10 bed (fresh rebuild, my re-run): Decision: APPROVED. The change is correctly scoped, SDD-faithful, reproducible, and runtime-verified end-to-end against a fresh rebuild. Finalizing the merge-time CalVer and merging. Assisted-by: Claude (fully tested and validated) |
…keystones) CUE-source InstallContext + BuildStageContext build-render keystones into sdk/spec (P2/S1); pr-validator generated the merge-time CalVer at merge. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE
Summary of changes
Authors the two build-render context keystones —
InstallContext(format install/prepare/cleanup templates) +BuildStageContext(builder multi-stage templates) — inschema/buildctx.cue(CUE single source), GENERATED intospec/cue_types_gen.gobytask cue:gen. This replaces the hand-written*_wire.goidiom per operator direction (define wire types in CUE + auto-generate). Aliased invmshared/spec_aliases.goso charly references them unchanged.[...{...}](theReposfield) →[]map[string]any;[...#CacheMount]→[]CacheMount;uid/gidforced to Gointvia@go(,type=int); dual yaml+json tags automatic.#Node/#Op, never user-authored) → no authored wire-key change → no schema version bump.Change class
sdk Go — CUE schema + generated param types + aliases.
How R10-tested — exact gate, commands, and pasted output
check-builder-local(adisposable: truebed — builds the npm builder image that rendersBuildStageContext/InstallContext, deploys~/.npm-globalto ahost: localvenue, checks, fresh-updates, tears down).task build:charly→charly versionmatches; bed run on the fresh binary.Attribution tier
fully tested and validated — the CUE-generated types executed against a fresh rebuild in the disposable bed (all 4 steps green, both outputs pasted).
CLAUDE.md rule compliance
/charly-internals:go(the CUE→spec generation recipe + SDD) +/charly-internals:plugin(the wire-type/OpResolve contract).cleanupfailure was RCA'd to the stale-binary guard tripping on a mid-runcharly/*.goedit (my process error, not the change) — rebuilt + re-ran clean (all 4 ✓).Repos []map[string]any+ json/yaml tags) was spiked on the live gen pipeline BEFORE committing.TestGenReproduciblecovers the new types;cue:genis a no-op on a clean tree.buildctx_wire.gowas never committed; grep clean.CHANGELOG/2026.189.0710.mdstaged.Assisted-by: Claude (fully tested and validated)