Skip to content

feat(spec)!: adopt CUE-sourced buildctx keystones + wire-type CUE mandate (P2/S1) - #21

Merged
atrawog merged 2 commits into
mainfrom
feat/keystone-buildctx
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/keystone-buildctx

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Closes P2/S1 (the first CUE-sourced keystone) + lands the operator standing order. The paired producer PRs already merged: sdk#7 (buildctx.cue + generated types, tagged v0.2026189.748) + plugins#9 (the go-skill mandate detail).

  • charly: deletes the hand-written InstallContext/BuildStageContext structs from format_template.go; re-exports the generated aliases via vmshared_aliases.go (the ~16 consumers compile against the generated types — the Go compiler is the field-parity check).
  • CLAUDE.md SDD pillar: the wire-type mandate — ALL wire types CUE-sourced (task cue:gen), hand-writing FORBIDDEN; no @go(-) without a full RCA + a live cue exp gengotypes spike. The 3 spike-verified NON-wire exceptions (disjunctions, open-tails, the gRPC transport proto — no cue→proto path) named with evidence.
  • Bumps: sdk gitlink → b693787 (merged main) + go.mod → v0.2026189.748; plugins gitlink → aa4bd1c (merged main).

Change class

charly Go code (build render-context types) + submodule bumps + CLAUDE.md (docs ride).

How R10-tested — exact gate, commands, and pasted output

  • The gate: go test ./... + task build:charly (R9) + a disposable bed exercising the changed render-context types.
  • Disposable target: check-builder-local (disposable: true) — builds the npm builder rendering BuildStageContext + format install rendering InstallContext, deploys host: local, checks, fresh-updates, tears down.
  • Fresh rebuild (R9): task build:charly → charly 2026.189.0707; binary fresh (stale-guard verified clear).
  • Changed path executed live? Yes — the CUE-generated aliased types drove the builder + format install in the bed.
$ (charly) go build/vet/test ./...  →  green (test 38s; 16 consumers compile vs generated types via merged sdk b693787)
$ charly check run check-builder-local  (fresh binary, FINAL code)  →  PASS (steps=4), ok: true
    deploy-add ✓ 22s · check-live ✓ 5s · update ✓ 29s (fresh-rebuild leg) · cleanup ✓ 7s · total 63s · zero warnings

Attribution tier

fully tested and validated — the aliased CUE-generated types executed against a fresh rebuild in the disposable bed (all 4 steps green).

CLAUDE.md rule compliance

  • R0 skills: /charly-internals:go (SDD recipe) + /charly-internals:plugin (wire contract) + /charly-internals:skills (mandate-in-CLAUDE.md / detail-in-go-skill).
  • R1: the mandate's "no exceptions" claim was RDD-verified on a live gengotypes spike (disjunction/open-tail → map[string]any; discriminated → faithful struct), NOT asserted — the operator explicitly rejected unverified exceptions.
  • RDD: the proto CUE-migration question was fully evaluated (no cue→proto generator; CUE has no gRPC-service concept; carries JSON envelopes) — verdict NOT-migratable, proven not assumed.
  • R3: two hand structs → one CUE source. R5: hard cutover — the hand-written structs deleted; git grep buildctx_wire clean; no dual-mode path; the stale "classified candidate for future schema-sourcing" claim swept (only CHANGELOG history retains it).
  • R7/R9/R10: the fresh-rebuild bed is the gate (pasted). Hard cutover: one atomic commit; producer-first cross-repo order (sdk → plugins → superproject).
  • CHANGELOG: CHANGELOG/2026.189.0715.md staged.

Assisted-by: Claude (fully tested and validated)

atrawog added 2 commits July 8, 2026 10:13
…date (P2/S1)

Closes P2/S1 (the first CUE-sourced keystone) + lands the operator standing order.

charly:
- deletes the hand-written InstallContext + BuildStageContext structs from
  format_template.go (they are CUE-sourced in sdk/schema/buildctx.cue now);
- re-exports the generated aliases via vmshared_aliases.go — the ~16 consumers
  compile against the generated types (the Go compiler is the field-parity check);
- bumps sdk → v0.2026189.748 (buildctx.cue + generated) + plugins (the go-skill
  mandate detail).

CLAUDE.md SDD pillar gains the mandate: ALL wire types are CUE-sourced
(task cue:gen), hand-writing a wire struct FORBIDDEN; no @go(-) without a full
RCA + a live cue exp gengotypes spike proving CUE cannot express it. The three
spike-verified NON-wire exceptions (authored-config disjunctions, open-tailed
state, the gRPC transport proto — no cue→proto path) are named with evidence.

Behavior-neutral for the code (identical struct fields); proven by the builder
bed (check-builder-local, all 4 steps green on a fresh rebuild).

Assisted-by: Claude (fully tested and validated)
…eystones + wire-type CUE mandate)

Merge-time version stamp for PR #21 (feat/keystone-buildctx). Renames the
placeholder CHANGELOG to the finalized CalVer 2026.189.0824.

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE
@atrawog

atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly/sdk Go (build render-context types) + submodule bumps + CLAUDE.md (docs ride).

Fresh, independent re-validation against R0–R10 + the pillars. Every gate re-run from scratch; no author claim taken on trust.

# Rule Verdict
0 Security / anti-tampering (T1–T4) PASS — diff matches the description exactly; the CLAUDE.md edit STRENGTHENS the SDD wire-type mandate (no landing/attribution/gate machinery touched); no secrets/exfiltration/supply-chain surprise; both submodule bumps point to MERGED mains; no instructions-to-validator embedded.
1 Description complete PASS — template filled, real per-file summary, exact R10 gate + disposable target + fresh-rebuild + pasted output.
2 Change-class gate matches evidence (R7/R10) PASS — I re-ran go test ./... (green, 42s) + task build:charly + the check-builder-local bed; no dry-run/rebuild-alone fraud.
3 Attribution tier vs proof PASS — fully tested and validated justified: the CUE-generated aliased types executed live against the fresh rebuild (bed update leg green).
4 R0 skills honored PASS — /charly-internals:go (SDD recipe) + /charly-internals:plugin (wire contract); change follows CUE-def-first → generated → aliased.
5 R1 RCA / ZERO warnings PASS — no failure/warning in any gate output.
6 R2 no pre-existing/out-of-scope split PASS — cutover complete in-tree.
7 R3 no duplication PASS — two hand structs → ONE CUE source (removes duplication).
8 R4 no ad-hoc workaround PASS.
9 R5 hard cutover + grep PASS — git grep 'type InstallContext struct|type BuildStageContext struct' -- charly/ = empty; buildctx_wire = empty; stale "classified candidate / future schema-sourcing" swept (superproject side empty); no dual-mode path.
10 R6/R8/R9 artifact + binary integrity PASS — binary rebuilt (charly 2026.189.0813, fresh), behavior-neutral generation (identical struct fields; bed's build+render proves the Containerfile still emits), no new runtime OS deps.
11 R10 disposable-only, fresh-rebuild, coverage PASS — check-builder-local (disposable: true) PASS steps=4, all ok: true incl the update fresh-rebuild leg + cleanup; the bed asserts the built artifact present (exercises the render-context types).
12 RDD / ADE / SDD PASS — RDD: I independently re-verified the mandate's central honesty claim on a live cue exp gengotypes spike (disjunction → type A map[string]any; discriminated struct → faithful Go struct). SDD: schema-first (sdk/schema/buildctx.cue) → generated → aliased; no candy plan touched.
13 Concurrency mandate + anti-cheat PASS — change touches build render-context TYPES only, no shared-state path (loader/ledger/store/arbiter/lifecycle); single-bed gate is correct for the class; no forbidden framing anywhere.
14 Hard cutover — one atomic phase PASS — one author commit; no Phase-2/TODO.
15 Kernel/plugin boundary law PASS — this is DE-typing toward the CUE source (the mandated direction); the diff adds NO per-kind switch / spec.<Kind>{} field-read to core.
16 Disposable-only autonomy PASS — the bed's destroy+rebuild is on disposable: true.
17 Clean architecture + Go gates PASS — gofmt -l . empty, go vet clean, go test green, golangci-lint run ./... (v2.12.2) = 0 issues.
18 CHANGELOG present PASS — CHANGELOG/2026.189.0715.md staged (finalized at merge to the merge-time CalVer).

Submodule bumps verified against merged mains: sdk gitlink b693787 == opencharly/sdk main HEAD (tag v0.2026189.748, matches charly/go.mod require); plugins gitlink aa4bd1c == opencharly/plugins main HEAD. No gitlink to a feat/non-main commit.

gengotypes honesty spot-check (mine, cue v0.16.1): #A: {x!: string} | {y!: string} → type A map[string]any ✓ (disjunction degrades, as the mandate claims); #Thing: {kind!: string, a?: string, b?: int} → a faithful Go struct ✓ (discriminated struct generates). The mandate is honest.

Decision: All 18 checklist items PASS on my independent re-run. Finalizing the merge-time CalVer and merging via --rebase.

Assisted-by: Claude (fully tested and validated)

@atrawog
atrawog merged commit cfd2089 into main Jul 8, 2026
@atrawog
atrawog deleted the feat/keystone-buildctx branch July 8, 2026 08:58
atrawog added a commit that referenced this pull request Jul 10, 2026
… doc sweep (b105a80)

Integrates plugins PR #21 (squash b105a80, CHANGELOG/2026.191.0428.md): the nesting /
three-remote-surfaces / four-traps skill doc sweep. Superproject half — a pure submodule
pointer bump (plugins 76413b5 -> b105a80), diff exclusively a gitlink.

The bumped commit's own diff is all-*.md (6 SKILL.md + 1 CHANGELOG), so this rides at the
documentation-reviewed tier and is CHANGELOG-exempt as an exclusively-gitlink staged diff.

Validated independently by a fresh pr-validator: gitlink target confirmed on plugins' real
main (PR #21 merged, branch deleted); every integrated doc claim reproduced against the code
and the live system; charly box validate rc=0 zero warnings.

Assisted-by: Claude (documentation reviewed)
atrawog added a commit that referenced this pull request Jul 17, 2026
)

* feat(core): K3 wire-to-spec Path 1 — pure import repoint (5 files)

Five charly/*.go files used ONLY deploykit/kit types that a prior wave
(SDK envelope relocation, task #13) already moved to sdk/spec as Go type
aliases (deploykit.InstallPlan/EmitOpts/DeployExecutor = spec.X in
sdk/deploykit/steps.go; kit.LabelDescriptionSet/LabeledDescription = spec.X
in sdk/kit/planrun.go). Repoint each to import spec directly instead of
deploykit/kit — a same-type swap with byte-identical runtime behavior
(these were literal Go type aliases, not distinct types), so no bed
re-run is needed for this change class.

- deploy_preresolve.go: deploykit.InstallPlan -> spec.InstallPlan
- deploy_substrate_lifecycle.go: InstallPlan/EmitOpts/DeployExecutor -> spec.*
- layer_artifacts.go: DeployExecutor/EmitOpts -> spec.*
- plugin_grpc.go: DeployExecutor -> spec.DeployExecutor
- description_collect.go: kit.LabelDescriptionSet/LabeledDescription -> spec.*

Identified via a K1/wire-to-spec classification spike of the remaining 25
type-only files off charly/*.go's kit-import list: these 5 retire for free
(Path 1); ~11-12 need real coordinated type migrations (Path 2, next);
~7-8 hold Go interfaces/function-value hooks structurally excluded from
CUE generation, tracked separately (Path 3, task #21).

Metric: charly/*.go kit-importing files 150 -> 145.

R10 gate for this change class (orchestrator-ruled, per R10's own "run only
the gate that exercises the change" principle): deploykit.X/kit.X here were
literal Go type ALIASES of spec.X, so no runtime path can differ — a bed
gate cannot fail on this change. go build/go vet/go test ./... (88s, full
pass) + golangci-lint (0 issues) is the exhaustive, non-wasteful gate.

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

* chore(changelog): finalize merge-time CalVer 2026.198.0326

Renamed placeholder CHANGELOG/2026.198.0311.md to the actual merge-time
CalVer (evaluator step, computed via `date -u` per the #47 lesson — never
`git show --date=format` in the commit's local TZ).

Assisted-by: Claude Sonnet 5 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 25, 2026
…r-everything part 1 (cone capability out of core, -2,612 LOC)

The first cutover of the "plugins-for-everything, 100%" program. Every cone's
UNBLOCKED capability (the code that needs no loader-keystone refactor to
relocate) moves from charly/ core into its owning plugin candy, importing only
the sdk. Consumes the merged sdk contract leg (sdk PR #102); this PR's sdk
gitlink points at the merged sdk commit (B2 producer-first).

Net core non-test reduction: -2,612 LOC (55 files, +330/-2942; 11 charly/
files deleted).

Cones relocated:
- Build -> candy/plugin-build: privileged builder-bootstrap
  (privileged_runner.go/RunPrivileged -> sdk/buildkit), InitConfig/
  capability-aggregation/envd-removal/7 pure helpers -> sdk/buildkit+sdk/kit,
  FilterBox -> sdk/deploykit.
- Check -> candy/plugin-check: image-preflight discovery, container-network
  probe, resolveCheckApk -> sdk/kit.ResolveCommittedApk; CHARLY_BIN stamping +
  runtime check-var resolution -> sdk/kit.
- Deploy -> candy/plugin-substrate/plugin-deploy-pod/plugin-adb:
  #DeployTraits.bracketed_lifecycle (SDD - the Q1-arbiter-bracket signal is
  now the DECLARED trait resolved by word, not lifecycleStartPlanHooks map
  presence); externalizedDeploySubstrates CUE-derived from spec.ResourceKinds
  (task #21); android google-play creds resolved peer-to-peer in plugin-adb
  via InvokeProvider(verb:credential).
- Credential/enc -> candy/plugin-deploy-pod: pod start/stop enc-ensure/
  enc-unmount/tunnel plan-building ported over InvokeProvider; dead
  credentialAwaiter interface deleted.
- Settings/Config -> candy/plugin-settings: the runtime-config subsystem
  (GetConfigValue/SetConfigValue/ListConfigValues/ResetConfigValue/
  resolveSettingsGet) ports from charly/runtime_config_values.go +
  charly/host_build_settings.go into candy/plugin-settings/config.go (pure
  kit.LoadRuntimeConfig/SaveRuntimeConfig I/O; the 3 credential-store touches
  via verb:credential InvokeProvider). The "settings" HostBuild seam is
  RETIRED - the plugin owns its config I/O.

The regression this PR cleared (R1): the check-pod bed caught a blocking
regression where the new bracketed_lifecycle trait was silently dropped on
the ProvidedCapability proto round-trip because both the sdk encode and the
charly decode copied only the pre-existing DeployTraits fields, producing a
plugin-deploy-pod start decode failure. Fixed by carrying the field through
encode+decode and deriving the bracket signal from the now-propagating
declared trait. New unit test TestPluginDeployTarget_BracketedLifecycle keys
on the word -> registry-resolved trait.

Verification (R10) - the concurrent bed roster across all cones:
- check-pod bed PASS (13 steps, fresh-rebuild) - build/check/deploy-pod
  bracket/credential-enc cones. Zero charly warnings.
- check-k3s-vm bed PASS (8 steps, 326s) - deploy-vm + k8s cone.
- check-commands-local bed PASS (6 steps, 185s, fresh-rebuild) - the
  Settings/Config cone: charly settings list exits 0 and lists the resolved
  runtime-config keys, proving the plugin-owned config I/O end-to-end after
  the seam retirement.
- arch-pacstrap privileged-bootstrap box build SUCCESS - the build cone's
  relocated RunPrivileged/privileged builder-bootstrap.
- All ran concurrently (the concurrency-safety gate for the shared
  deploy-dispatch path) - no cross-bed contention defect.
- go test ./... (charly) green; sdk standalone battery green (see #102).
- go vet clean; gofmt -l clean on every changed file.
- R5 grep self-test: no present-tense reference to a deleted file/symbol
  remains (past-tense/provenance history kept).

Round-2 fix (this merge): resolved the fresh pr-validator's round-1
CHANGES-REQUESTED finding - disclosed the Settings/Config cone in the PR
title/body/CHANGELOG, and rewrote the stale "settings HostBuild seam"
present-tense references in candy/plugin-settings/charly.yml, the root
charly.yml check-commands-local bed plan, and
charly/provider_command_test.go to describe the shipped plugin-owned
architecture. Independently re-verified by a fresh pr-validator round 2:
R5 grep self-test clean, doc-vs-code cross-check confirmed, settings R10
bed evidence confirmed real on disk, build/vet/test/lint/gitlink/aliases/
architecture all re-confirmed.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
atrawog added a commit that referenced this pull request Sep 1, 2026
…ed (#526)

* chore: advance box/omarchy to the omarchy-eval beds + the L3 hybrid bed

Syncs the gitlink to distro-omarchy main (fb7bf64): the omarchy-eval skill
(#21), the snapshot golden policy bed (#22), the L3 dual-GPU hybrid bed
(#23), and the CI pin (#24).

* ci: trigger a fresh validator dispatch
github-actions Bot pushed a commit that referenced this pull request Sep 5, 2026
…#22) (#541)

* fix: plugin-check -> v0.2026248.1439 (the desugared pipeline-pair fix, #22)

charly #540 pinned plugin-check v0.2026248.1222 (the #21 tag), missing the #22
pipeline-pair fix (v0.2026248.1439): parsePipelines now accepts the loader-
desugared plugin/plugin_input pair. Without it every instrument bed with a
pipeline: stage fails at parse (exactly one verb per pipeline stage) - the
check-instrument-cachyos-vm / check-instrument-omarchy-vm blocker.

* fix: plugin-check -> v0.2026248.2113 (the detached-recorder ctx fix + evidence source threading, #23)

* fix(loader): surface each instrument's capture verb for the plugin scan (Cutover A)

An instrument entry's desugared plugin word (e.g. spice for a spice: session
screen capture) is NOT in the plan — it is a separate deploy-node field — so
without this the loader never build-connects the out-of-process plugin candy
serving it, and the instrument live-start fails with 'no provider registered
for plugin verb spice' (the baked search path is empty under
CHARLY_PLUGIN_ONLY=1). Inject the canonical plugin-<word> candy ref, the same
host-side-plugin pattern as vmPluginCandyRef for verb:libvirt.

* fix: drop the DEV-ONLY local plugin-check replace (CI must resolve the proxy pin)

* chore: re-trigger validator on the updated PR body (plugin-vm bump accounted)
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