Skip to content

feat(spec)!: grow the resolved-project envelope for the S-CM keystone (Collection A sdk leg) - #40

Merged
atrawog merged 2 commits into
mainfrom
feat/k5-collection-a
Jul 13, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/k5-collection-a

Conversation

@atrawog

@atrawog atrawog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What & why

Collection A — sdk leg (the S-CM keystone). Grows the #ResolvedProject envelope so the superproject can KILL the check-config host seam and move charly box inspect/list into candy/plugin-box, and lands the full-width spec.CandyModel build model the next unit (#60 / K3-D validate) consumes. This is the producer half of a two-repo cutover; the superproject consumer PR follows on merge (it bumps the sdk gitlink + charly/go.mod require to this merged commit).

Part of the K5 core→plugin migration wave (task #54).

Change class

Code / schema (sdk contract). Runtime tier — proven end-to-end by the superproject consumer's R10 roster (this envelope has no standalone runtime; its consumer exercises every field).

Added

  • schema/candymodel.cue — the serializable candy BUILD model. Four sub-defs CUE-sourced from their former hand homes (SDD — wire-types-are-CUE-sourced): #PackageSection/#TagPkgConfig (were deploykit/layer_model.go), #EnvConfig (was kit/env.go), #RouteConfig — composed by #CandyModel (identity + plan + lowered ops + resolved package/env/route/shell sections + the validate read-surface).
  • schema/resolvedproject.cue grows #ResolvedProject: candy_models, the build vocabulary distro/builder/init (the distro/init maps PIN the existing hand wire structs ResolvedDistro/ResolvedInit via @go(type=map[string]*…) — the candy.cue env/apk pattern, no new hand types; #Builder is a clean ref), templates (#ProjectTemplates — OPAQUE map[string]RawBody per kind: the host stays kind-blind, the consuming plugin decodes), agent_bodies, build_targets, box_plans. Grows #ResolvedBoxView with box-AGGREGATES (ports/volumes/aliases/engine) and #CandyView with per-candy route/volumes/aliases/has_init/port_relay.

Changed

  • deploykit/layer_model.go + kit/env.go: the four hand structs DELETED → type X = spec.X aliases (R3 — one CUE source; the projector fills without conversion). Every existing consumer compiles unchanged.

Removed

  • schema/seam.cue: #CheckConfigReply/#CheckConfigRequest (the check-config seam — now dead; plugin-check computes the projection off #ResolvedProject) + the reply's dead readiness_json. Added #PodDisposableRequest/#PodDisposableReply (the thin per-host-overlay pod-disposability seam).

! BREAKING (surfaces in the consumer)

charly box inspect <box> default JSON becomes snake_case (the wire-safe spec.ResolvedBoxView, already the K5U0 wire type with existing consumers — retagging/duplicating it was rejected per R3). Per---format outputs unchanged. In-tree mixed-case consumers were swept; external-facing only. The break lands in the superproject consumer PR; noted here because the enabling View growth is in this leg.

R10 evidence — 12/12 beds GREEN (corroborated on disk)

The superproject consumer tree (built against this envelope via replace => ../sdk) passed the full acceptance roster:

  • 12/12 beds PASS, all corroborated on disk (ok:true with real durations 145–536s — no prereq-skip masking). The k3s pair was phased (check-k8s-deploy passed solo at 392s) to avoid the pre-existing 16443 collision (see finding feat(spec): RetentionReply DanglingIDs + StagingDirs reclaim fields #2).
  • go build ./... OK · go test ./... PASS · golangci-lint 0 issues · gofmt silent · task cue:gen reproducible no-op (TestGenReproducible PASS) · TestNoConcreteKindInKernel PASS (the templates field is opaque RawBody, kind-blind).

Box-arm resolution identity (proven statically)

The relocated include-splicer's box arm resolves via the host-flattened BoxPlans (ScanAllCandy), proven byte-identical to the former core ScanCandy: fedora.jupyter → 0 steps, composition-source → 2 steps — matching pre-cutover.

Diagnostic round (2 findings, both RCA'd)

Per-surface enabler tiers (honest)

Deferred (named-exit rows)

Checklist

Assisted-by: Claude (fully tested and validated)

… (Collection A sdk leg)

The spec half of the K3-D+ program, absorbed into Collection A. Grows #ResolvedProject so the
check-config host seam can die and inspect/list can move to plugin-box, and lands the full-width
spec.CandyModel build model the next unit (#60 validate/K3-D) consumes.

- candymodel.cue (new): #PackageSection/#TagPkgConfig/#EnvConfig/#RouteConfig (CUE-sourced from
  their former deploykit/kit hand structs, SDD) + full-width #CandyModel.
- resolvedproject.cue: #ResolvedProject += candy_models, build vocab (distro/init pin the existing
  ResolvedDistro/ResolvedInit hand wire structs via @go; #Builder clean), templates (#ProjectTemplates,
  OPAQUE map[string]RawBody — kernel stays kind-blind), agent_bodies, build_targets, box_plans;
  #ResolvedBoxView += box-aggregates (ports/volumes/aliases/engine); #CandyView += route/volumes/
  aliases/has_init/port_relay.
- deploykit/layer_model.go + kit/env.go: the 4 hand structs deleted -> type X = spec.X aliases (R3).
- seam.cue: #CheckConfigReply/#CheckConfigRequest removed (the seam dies) + the dead readiness_json
  field; #PodDisposableRequest/Reply added.

BREAKING: spec.CheckConfigReply/CheckConfigRequest removed (internal host-plugin seam). No authored
wire-key change -> no schema version bump. task cue:gen reproducible (TestGenReproducible PASS).

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

atrawog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly/sdk Go (sdk contract — CUE schema + generated wire types)

Independently re-validated on a fresh worktree at head cb76bf95 (base 7a58ff2, exactly ONE commit, up-to-date with main).

# Rule Verdict
0 security & anti-tampering (T1–T4) PASS — diff = the 7 body-described files; go.mod unchanged (no supply-chain); no guardrail weakened; no validator manipulation
1 description complete (template + pasted evidence) PASS
2 change-class gate matches evidence (R7/R10) PASS — sdk producer gate: build/test/cue:gen + consumer roster
3 attribution tier justified PASS — fully tested and validated honest; #60-enablers transparently sub-tiered analysed on a live system (under-claim)
4 R0 skills honored PASS — plugin boundary-law, go/SDD, check, strict-policy, cutover
5 R1 RCA / ZERO warnings / no flake framing PASS — golangci 0, gofmt silent, cue:gen no-op; both diagnostic findings RCA'd
6 R2 no pre-existing split PASS — 16443 collision → own cutover #65 (separability proven; roster passes without it)
7 R3 no duplication PASS — 4 hand structs → 1 CUE source; ResolvedBoxView reused, not retagged
8 R4 no ad-hoc workaround PASS
9 R5 hard cutover + grep PASS — CheckConfigReply/Request/ReadinessJSON only in CHANGELOG; no transitional path in sdk
10 R6/R8/R9 artifact integrity PASS/N/A — no generation/labels; R9 via consumer rebuilt binary
11 R10 disposable-only, fresh-rebuild, zero-warning, coverage PASS — 12/12 beds ok:true, 145–536s, corroborated on disk against sdk cb76bf95
12 RDD / ADE / SDD @100% PASS — task cue:gen NO-OP + TestGenReproducible PASS; no hand-edited *_gen.go; @go map-pins reference PRE-EXISTING types; no new @go(-)/hand wire type
13 concurrency + anti-cheat PASS — 11 beds concurrent on one binary/launch-window; k8s-deploy phased solo for a pre-existing hardcoded-port collision (not serialize-to-hide)
14 hard cutover — one atomic commit PASS — 1 commit; no Phase-2; scope-ruling escalated to lead
15 ARCHITECTURE GATE — placement PASS — placement: CORRECT
16 disposable-only autonomy PASS — destroy only on disposable check beds
17 clean architecture + go gates PASS — gofmt/golangci-0/vet/test all re-run green
18 CHANGELOG present PASS — CHANGELOG/2026.194.2100.md (placeholder; finalized at merge)

Verified myself (fresh worktree /tmp/sdk-pr40 @ cb76bf9): go build/go vet exit 0 · gofmt -l clean · go test ./... all PASS · golangci-lint (v2.12.2) 0 issues · TestGenReproducible PASS · task cue:gen → git status clean (definitive no-op, cue v0.16.1) · @go map-pins (ResolvedDistro/ResolvedInit/Builder/ApkPackageSpec/RawBody) all pre-exist on base — no new hand-written wire type · R5 grep clean.

R10 corroboration: the consumer worktree builds against this exact envelope (replace => ../sdk, sdk @ cb76bf95) and consumes the new fields; the final disposable roster is 12/12 ok:true on disk (calver 2026.194.2158, k8s-deploy solo 2207) with real build→deploy→check-live→update→cleanup steps — no prereq-skip. check-k8s-deploy phased solo per the documented pre-existing 16443 collision (#65).

Placement: the envelope grows in sdk/spec (its E-envelope home); #ProjectTemplates stays opaque RawBody so the kernel remains kind-blind; #PodDisposableRequest/Reply is the thin class-generic reverse-leg for the one irreducible per-host-overlay fact Mode Purity excludes (named exit K5-U2/3). Advances the end-state envelope spine; no capability code enters core.

Decision: APPROVED. Producer-first landing (B2/B6) — the sdk contract merges first; the superproject consumer PR (leg 2) re-validates the assembled tree with its own full R10.

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

Merge-time version stamp applied by the fresh pr-validator (V-K5CHAIN):
CHANGELOG placeholder 2026.194.2100 → 2026.194.2234 (file + H1).

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01QsyQki2W7wiSbyrPtF25h1
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