Skip to content

feat(schema)!: delete the kind:pod body defs the owning plugin now declares - #307

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/delete-pod-body
Nov 13, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/delete-pod-body

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

opencharly/spec#304 unit 3, leg 2 of 3. Leg 1 moved the kind: pod body into the plugin that actually serves the kind — opencharly/plugin-substrate#32, squash 937a9b0, tag v2026.317.0614 — and this leg deletes the contract's copy.

  • schema/pod.cue loses #Pod; schema/node.cue loses #PodValue: (#Pod | #DeployValue).
  • #PodSidecar STAYS, and it is the CONTRACT's. It is this kind's keeper: #ResolvedPod (schema/substrate_template.cue) cites it and the kernel reads that envelope, so a def a kernel-facing contract shape references cannot live in one plugin's CUE module. The one deletion here is the one that has a live replacement.
  • The generated Go follows the def: spec.Pod and the PodSpec = Pod alias in spec/charly_names.go are gone. A second charly task cue-gen is byte-identical: KindValueDefs 9 → 8, #<Word>Value defs 10 → 9, top-level kind-body defs 13 → 12.
  • Why the pod gate still gates: leg 1 made the plugin DECLARE InputDef: "#PodValue" on the kind: pod capability, and the host resolves a kind's value def from the provider's DECLARATION (kindValueDefPath) out of the COMPOSED unit (base & every served plugin unit), consulting spec.KindValueDefs only as the compatibility fallback. Deleting the base def without that declaration would lose the gate silently — the old plugin declares nothing, so the path falls back to a deleted KindValueDefs entry and the gate returns without gating. That is why this leg must not be merged alone, and why the legs are ordered plugin-first.
  • spec/pod_test.go is the deletion gate: #Pod/#PodValue absent, no pod entry in KindValueDefs, #PodSidecar and #ResolvedPod present and still wired (a probe carrying one sidecar entry still validates through the envelope), with #CandyValue as the positive control so the absences cannot pass vacuously. Every other test in this module passes identically with the defs re-added, which is exactly why the gate is a test and not a comment.
  • Two prose surfaces the deletion made FALSE go in the same phase (R5): .agents/skills/pod/SKILL.md and the charly.yml skill-shelf comment both still pointed at the PodSpec Go type. They now name the plugin's own schema/pod.cue for the authored body and the contract's #ResolvedPod / #PodSidecar for what the kernel reads.

The consumers this leg breaks, measured before the push

A grep for spec.Pod finds readers and a grep for spec.PodSpec finds aliases, and neither finds a table entry keyed on the def's name. Compiling each consumer against this tree found four build/init failures, three of them invisible to either grep:

consumer failure disposition
sdk loaderkit/cue_schema.go cueKindDefs["pod"] = "#Pod", and sharedCueSchema() fail-fasts on an absent def at init (panic: loaderkit: CUE kind "pod": definition #Pod not found) its own leg: retarget the entry at the KEPT envelope #ResolvedPod
sdk vmshared/spec_aliases.go:132 PodSpec = spec.PodSpec (an unused alias, still a build failure) same leg
plugin-check candy/plugin-check/checkproject.go:291 var pod spec.Pod, production code compiled into charly, plus checkproject_test.go:64 its own leg: decode into spec.ResolvedPod
charly substrate_spec_aliases_test.go:11 PodSpec = spec.PodSpec (test alias) its own leg

The chain is producer-first: this leg → sdk → plugin-check → charly (which bumps plugin-substrate + spec + sdk + plugin-check in lockstep and runs the assembled bed). sdk and plugin-check are independent of each other and may land in parallel.

Three of those four were re-measured by me on this head (the fourth is a symbol-level certainty, pasted beside it):

$ go build ./...            # plugin-check, committed HEAD, against this head's spec + the retargeted sdk
# github.com/opencharly/plugin-check/candy/plugin-check
./checkproject.go:291:16: undefined: spec.Pod
$ go test ./          # anything in sdk at v0.2026317.18, against this head's spec
# github.com/opencharly/sdk/vmshared
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/vmshared/spec_aliases.go:132:36: undefined: spec.PodSpec
$ grep -n "PodSpec" charly/charly/substrate_spec_aliases_test.go
11:	PodSpec        = spec.PodSpec
$ grep -rn "PodSpec" spec/spec/charly_names.go; echo "rc=$?"
rc=1

The charly one is the same shape as the other two: the alias names a symbol this module no longer declares, so it cannot compile until charly's own leg drops it.

One latent reader cannot be fixed here and is filed, not narrated: plugin-substrate's own merged main still marshals spec.Pod{…} at candy/plugin-substrate/load_pod_substrate_test.go:275, so its go test ./... stops compiling the moment its spec require advances past this tag — opencharly/plugin-substrate#33, which already carries the RCA and the one-line fix.

Files (11)

file change
.agents/skills/pod/SKILL.md the stale PodSpec pointer replaced by the plugin's schema/pod.cue + the contract's #ResolvedPod/#PodSidecar
charly.yml the skill-shelf comment's pod.cue → PodSpec corrected for the same reason
internal/schemagen/main.go the generator's comment retargeted at the move
schema/node.cue #PodValue deleted (and the prose retargeted at the plugin-declared gate)
schema/pod.cue #Pod deleted; #PodSidecar kept, with the reason written where it lives
schema/resolvedproject.cue comment retargeted
schema/substrate_template.cue #ResolvedPod's comment now names the plugin module as the authored body's home
spec/charly_names.go the PodSpec = Pod alias that named the deleted type
spec/cue_types_gen.go regenerated (spec.Pod gone)
spec/pod_test.go NEW — the deletion gate
spec/vocab_gen.go regenerated (KindValueDefs loses pod)

How tested

Every fence below was executed on the tree this PR publishes, head da429af, in spec on branch feat/delete-pod-body.

The module's own gate (AGENTS.md: charly task cue-gen, go test ./..., gofmt, golangci-lint under the declared toolchain):

$ charly task cue-gen
task bootstrap-protoc: 1 step(s), 0 failed, 0 skipped
  [pass] run — download and pin protoc + the two Go codegen plugins
      exit=0
task wire-gen: 1 step(s), 0 failed, 0 skipped
  [pass] run — render the proto IDL from CUE and compile the Go stubs
      exit=0
task cue-gen: 2 step(s), 0 failed, 0 skipped
  [pass] run — generate the Go params in-process + schemagen the vocab lists
      exit=0
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree
      exit=0
$ git status --short
$                    # (empty — the second regeneration left no diff at all)
$ GOWORK=off go test ./... > /tmp/spec-final-test.log 2>&1; echo "test rc=$?"
test rc=0
$ grep -c '^ok' /tmp/spec-final-test.log; grep -c '^FAIL' /tmp/spec-final-test.log
30
0
$ gofmt -l .
$ GOTOOLCHAIN=go1.26.8 golangci-lint run ./...
0 issues.

The deletion, asserted (before = origin/main, after = this head):

$ git show origin/main:schema/pod.cue | grep -c "^#Pod:"
1
$ grep -c "^#Pod:" schema/pod.cue
0
$ git show origin/main:schema/node.cue | grep -n "^#PodValue"
94:#PodValue:     (#Pod | #DeployValue) @go(-)
$ grep -n "^#PodValue" schema/node.cue; echo "absent: rc=$?"
absent: rc=1
$ grep -n "^#PodSidecar:" schema/pod.cue
21:#PodSidecar: {
$ git show origin/main:spec/charly_names.go | grep -n "PodSpec"
29:	PodSpec        = Pod
$ grep -n "PodSpec" spec/charly_names.go; echo "absent: rc=$?"
absent: rc=1

The plant — red on ASSERTIONS, not a build error. Re-added a #Pod stub plus #PodValue (the exact shape this leg deletes), regenerated so the kind re-registers, ran the gate, restored, and re-hashed:

$ git rev-parse HEAD
da429af73e94f86592c4b58462fc56e6aadf8444
$ sha256sum schema/node.cue schema/pod.cue spec/vocab_gen.go spec/cue_types_gen.go
184e66eac7f2a161653846cf94186a4baab6526c295b31625a54d5414ff4c0d3  schema/node.cue
a0aaf774b1495aad0625b69d834f7956fd78ac9dbbae7f341ba671dd8b05ab1b  schema/pod.cue
fae4738073c71341d1bb8591ed078d5650894988bf8f4259d4c633a0b8ebf36c  spec/vocab_gen.go
6ec9b16a7bb97a84950e5587e3e085180a0aef1121208403079a90352c5012d9  spec/cue_types_gen.go
$ charly task cue-gen   # the plant re-registers the kind in the generated map
  [pass] run — generate the Go params in-process + schemagen the vocab lists
      exit=0
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree
      exit=0
$ sed -n '/var KindValueDefs = map/,/^}/p' spec/vocab_gen.go
var KindValueDefs = map[string]string{
	"android":     "#AndroidValue",
	"candy":       "#CandyValue",
	"firecracker": "#FirecrackerValue",
	"kindcluster": "#KindclusterValue",
	"kubernetes":  "#KubernetesValue",
	"kubevirt":    "#KubevirtValue",
	"local":       "#LocalValue",
	"pod":         "#PodValue",
	"vm":          "#VmValue",
}
$ GOWORK=off go test ./spec/ -run TestPodBodyDefsAreNotInTheContract -count=1
--- FAIL: TestPodBodyDefsAreNotInTheContract (0.07s)
    pod_test.go:44: the contract module STILL declares #Pod — the kind body belongs to plugin-substrate, and a re-added def re-registers the kind in KindValueDefs
    pod_test.go:44: the contract module STILL declares #PodValue — the kind body belongs to plugin-substrate, and a re-added def re-registers the kind in KindValueDefs
    pod_test.go:48: KindValueDefs still carries "pod" — deleting #PodValue must drop it from the generated map
FAIL
FAIL	github.com/opencharly/spec/spec	0.083s
FAIL
rc=1
$ sha256sum schema/node.cue schema/pod.cue spec/vocab_gen.go spec/cue_types_gen.go   # after restore
184e66eac7f2a161653846cf94186a4baab6526c295b31625a54d5414ff4c0d3  schema/node.cue
a0aaf774b1495aad0625b69d834f7956fd78ac9dbbae7f341ba671dd8b05ab1b  schema/pod.cue
fae4738073c71341d1bb8591ed078d5650894988bf8f4259d4c633a0b8ebf36c  spec/vocab_gen.go
6ec9b16a7bb97a84950e5587e3e085180a0aef1121208403079a90352c5012d9  spec/cue_types_gen.go
$ git status --short
$

Zero verdicts moved, both arms, one root. TestKindValueCorpusSweep walks a real umbrella checkout, judges EVERY entity body of a host-value-gated kind through the production gate, and writes one verdict line per body, so the same corpus can be judged through either schema source and the two lists diffed. Four runs: {composed, base} arms × {origin/main's spec, this head's spec}, one corpus root, one charly tree (the assembled chain: this spec + the sdk retarget + plugin-substrate leg 1), only the spec replace flipped between arms:

$ CHARLY_CORPUS_ROOT=<umbrella checkout> CHARLY_KIND_VALUE_GATE=composed CHARLY_CORPUS_OUT=/tmp/sw-before-composed.txt \
    go test ./ -run TestKindValueCorpusSweep -count=1 -timeout 900s     # spec = origin/main
ok  	github.com/opencharly/charly/charly	146.281s
$ CHARLY_CORPUS_ROOT=<umbrella checkout> CHARLY_KIND_VALUE_GATE=base CHARLY_CORPUS_OUT=/tmp/sw-before-base.txt \
    go test ./ -run TestKindValueCorpusSweep -count=1 -timeout 900s     # spec = origin/main
ok  	github.com/opencharly/charly/charly	85.134s
$ CHARLY_CORPUS_ROOT=<umbrella checkout> CHARLY_KIND_VALUE_GATE=composed CHARLY_CORPUS_OUT=/tmp/sw-after-composed.txt \
    go test ./ -run TestKindValueCorpusSweep -count=1 -timeout 900s     # spec = this head
ok  	github.com/opencharly/charly/charly	82.578s
$ CHARLY_CORPUS_ROOT=<umbrella checkout> CHARLY_KIND_VALUE_GATE=base CHARLY_CORPUS_OUT=/tmp/sw-after-base.txt \
    go test ./ -run TestKindValueCorpusSweep -count=1 -timeout 900s     # spec = this head
ok  	github.com/opencharly/charly/charly	80.281s
$ for f in sw-before-composed sw-before-base sw-after-composed sw-after-base; do
    echo "$f verdict=$(grep -vc '^PARSE-ERR' $f.txt) pod=$(grep -c '|pod|' $f.txt) OK=$(grep -c '|OK$' $f.txt) FAIL=$(grep -c '|FAIL' $f.txt)"; done
sw-before-composed verdict=2004 pod=250 OK=1984 FAIL=20
sw-before-base verdict=1945 pod=250 OK=1934 FAIL=11
sw-after-composed verdict=2004 pod=250 OK=1984 FAIL=20
sw-after-base verdict=1695 pod=0 OK=1687 FAIL=8

The composed (production) arm did not move a single verdict — the verdict projection is byte-identical, and so is the pod-only slice:

$ awk -F'|' 'NF>=4{v=($4 ~ /^OK/?"OK":"FAIL"); print $1"|"$2"|"$3"|"v}' sw-before-composed.txt > b.n2
$ awk -F'|' 'NF>=4{v=($4 ~ /^OK/?"OK":"FAIL"); print $1"|"$2"|"$3"|"v}' sw-after-composed.txt  > a.n2
$ diff b.n2 a.n2; echo "verdict diff rc=$?"
verdict diff rc=0
$ grep '|pod|' b.n2 > p1.txt; grep '|pod|' a.n2 > p2.txt; diff p1.txt p2.txt; echo "pod diff rc=$?"
pod diff rc=0
$ sha256sum p1.txt p2.txt
edd4a6df203f8634bfef5ba14ea4ef30961b5c8412894955fb0ab40fd01b3818  p1.txt
edd4a6df203f8634bfef5ba14ea4ef30961b5c8412894955fb0ab40fd01b3818  p2.txt

The full-line diff is 4 rows, every one FAIL on BOTH sides, differing only in CUE diagnostic POSITIONS the move necessarily changes — the pod rows lose the /charly/spec-module/schema/deploy.cue:<line> prefix a def that lives in the base used to carry, and one vm row's node.cue:95 becomes node.cue:103 because two defs left the file above it:

$ diff sw-before-composed.txt sw-after-composed.txt | head -8
574c574
< design/negative/candy-in-pod.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: /charly/spec-module/schema/deploy.cue:91:2 node x:1:3 #PodValue.extra: field not allowed: node x:1:26 #PodValue.from: field not allowed: /charly/spec-module/schema/deploy.cue:132:2 node x:1:61
---
> design/negative/candy-in-pod.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: node x:1:3 #PodValue.extra: field not allowed: node x:1:26 #PodValue.from: field not allowed: node x:1:61
584c584
< design/negative/deployment-build-step.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: /charly/spec-module/schema/deploy.cue:91:2 node x:1:3 #PodValue.from: field not allowed: /charly/spec-module/schema/deploy.cue:132:2 node x:1:26 #PodValue.step: field not allowed: node x:1:37
---
> design/negative/deployment-build-step.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: node x:1:3 #PodValue.from: field not allowed: node x:1:26 #PodValue.step: field not allowed: node x:1:37
$ diff sw-before-composed.txt sw-after-composed.txt | wc -l
16
$ diff sw-before-composed.txt sw-after-composed.txt | grep -c '^[<>]'
8

The base arm is the PRE-CHANGE oracle, and its 250-body delta is the deletion working as designed. It resolves the def in the base ALONE, so a def that has left the base cannot be judged through it; the arm skips those bodies visibly and counted rather than silently dropping them:

$ diff sw-before-base.n2 sw-after-base.n2 | grep -E '^[<>]' | cut -d'|' -f2 | sort | uniq -c
    250 pod
$ diff sw-before-base.n2 sw-after-base.n2 | wc -l
345

250 rows removed, every one of them pod, and no other kind moved a single row. The arithmetic is closed on both arms: the composed arm judges 2,004 bodies before and after, because the production gate reads the plugin's DECLARED def out of the COMPOSED unit; the base arm judged 1,945 before (pipeline's 12 + task's 47 bodies were already out of its reach, unit 1's and unit 2's moves) and 1,695 after — 1,945 − 250.

The R10 bed — the ASSEMBLED one, because a schema change is not exempt. check-pod is the canonical fast mechanism bed; it lives in plugin-pod, which IS in charly's compiled_plugins:, and it authors a check-pod: pod: entity — so loading its project runs the kind: pod VALUE GATE whose def this leg moved. The driver is a charly built from the assembled chain (this spec + the sdk retarget + plugin-substrate leg 1), 2026.317.0159:

$ cd <worktree>/plugin-pod && CHARLY_REPO_OVERRIDE=github.com/opencharly/opencharly=<worktree> \
    <legs23>/charly-leg2det/bin/charly check run check-pod
charly check run check-pod: [image-build] PASS after 9.528s
charly check run check-pod: [check-image] PASS after 19.468s
charly check run check-pod: [deploy-add] PASS after 10.86s
charly check run check-pod: [update] PASS after 32.03s
charly check run check-pod: [check-live-rebuild] PASS after 15.293s
charly check run check-pod: [cleanup] PASS after 4.183s
$ echo "rc=$?"
rc=0
$ sed -n '/^total_seconds:/,$p' <worktree>/plugin-pod/.check/check-pod/2026.317.0651/summary.yml
total_seconds: 147
diagnostics:
  errors: 0
  warnings: 0
  advisories: 0
  allowlisted: 0
  errors_fatal: true
  warnings_fatal: false
  advisories_fatal: false
  cache_ratio: not-applicable-no-build-steps
skipped_checks: 31
ok: true
status: PASS

The run's own verdict line begins charly check run check-pod: PASS (steps=16, skipped_checks=31) and ends with the runner's note that repo override active (CHARLY_REPO_OVERRIDE=github.com/opencharly/opencharly=<worktree>) makes the verdict about the LOCAL tree, not the PR head (the full line is the 31 skipped-check reasons; the summary file below is the authoritative verdict). 16 steps, every one PASS, zero diagnostics of every severity. deploy-add is the step that runs this diff's changed path live: charly deploy add validates the check-pod: pod: node through validateKindValueCUE, which now resolves #PodValue from the plugin's DECLARATION, and it passed. The 31 skipped checks are DECLARED plan checks gated by context (the same 31 leg 1's PASS carried: context [runtime] not active in box mode, [build] not active in live mode, and one agent step with no grader bound) — not failures.

Scope limit, stated. spec ships no disposable target of its own, so this bed runs a plugin-pod project tree at the umbrella pin (CHARLY_REPO_OVERRIDE=…), and the driver's own line says so: its verdict is about the LOCAL tree it built, not about this PR's head. What the bed proves for THIS PR is the composed chain's gate behaviour with this spec in it — the assembled charly compiles the deleted base defs out and the pod entity still validates. The bed that runs against the pinned artifacts runs at the charly leg, which bumps plugin-substrate + spec + sdk + plugin-check together.

Rulebook compliance

  • R0 — skills first. Loaded before the first tool action, per the dispatcher's rows for schema work and plugin work: /charly-internals:go (the SDD pipeline + the schema-change recipe), /charly-internals:plugin (the per-plugin CUE-schema contract and the provider model this deletion leans on), /charly-internals:cue (the pinned CUE version parity the generator depends on), /charly-internals:git-workflow (before any git/gh action), plus spec's own AGENTS.md (Part II feat(spec): CUE-source ResolvedBox/BuilderMap/AggregatedCandyCaps (#55 step3 unit 3a) #4) for this module's gate and tag scheme.
  • R1 — RCA every anomaly; fix or file. Five findings, all dispositioned in the body rather than parked: the four consumer failures are each fixed by their owning repo's leg (named in the table above, not deferred to a follow-up of THIS diff), and the one reader that cannot be fixed here — plugin-substrate's own test at load_pod_substrate_test.go:275 — is filed as test: load_pod_substrate_test.go still marshals spec.Pod, which spec#304 unit 3 deletes plugin-substrate#33 with the RCA and the one-line fix. One anomaly was found in this PR's OWN artefact before the push: the first commit message claimed "kind bodies 12 → 11", and re-measuring on the committed tree gives 13 → 12 for the only definition I can state (^#(Candy|Box|Deploy|Vm|Pod|Local|Kubernetes|Android|Kindcluster|KubeVirt|Firecracker|Task|Pipeline|LibvirtDomain|Image): at column 0 across schema/*.cue). The message was corrected in the same amend that carried the two doc fixes rather than shipped as an unverifiable number, and the measured transition is pasted below.
  • R2 — no duplication. The whole point: one kind body, in the plugin that serves the kind. #PodValue is DELETED from the base rather than kept beside the plugin's copy, so the twins are gone; the contract keeps only #PodSidecar, which the contract's own #ResolvedPod cites.
  • R3 — no workarounds. No shim, fallback, suppression, sleep or magic value. The route the host uses for the pod gate — the provider's DECLARED InputDef — is the producer-side design of this cutover, not a compatibility branch: spec.KindValueDefs remains the fallback for the kinds whose body this module still owns.
  • R4 — product before prose. The deletion is the product change; the two prose surfaces it falsified (.agents/skills/pod/SKILL.md, the charly.yml skill-shelf comment) and one further stale sentence inside schema/substrate_template.cue are corrected in the same diff rather than left to route around it. Nothing here needs anything but the charly binary.
  • R5 — legacy deleted completely. The claim-keyed grep below is the sweep; every survivor it prints is a statement of WHERE the defs went, not a use of them, and the history lines under CHANGELOG/ are history.
  • R6 — preserve user work and Git safety. git status --short was empty before the first edit and is empty on the pushed tree; the branch is one commit on fresh origin/main; no force-push, no reset, no hook bypass, no direct push to main.
  • R7 — prove behavior. The deletion gate is the cover that fails without the change (the plant above, red on three assertions). The EMITTED artefacts are validated at their boundary: the regenerated spec/cue_types_gen.go + spec/vocab_gen.go are reproduced byte-identically by a second charly task cue-gen, and the production gate's behaviour is measured over 2,004 real authored bodies rather than fixtures (the four-arm sweep).
  • R8 — live or skip, never fake. No boundary crosses a service in this diff: it is a CUE contract + its generated Go. Nothing is mocked because nothing is live.
  • R9 — binary equals source. Regeneration ran under a worktree-local CalVer-stamped charly (2026.317.0159); spec ships no binary of its own and no runtime OS dependency is added.
  • R10 — fresh disposable proof. The module gate (charly task cue-gen + go test ./... + gofmt + golangci-lint) passed on the committed tree this PR publishes, and the change-class R10 bed is the ASSEMBLED check-pod bed pasted under "How tested" (16 steps, all PASS, 0 errors / 0 warnings / 0 advisories) — this is a schema change, and no change class is exempt.

The claim-keyed sweep (R5), run at the repo root of the pushed tree:

$ git rev-parse HEAD
da429af73e94f86592c4b58462fc56e6aadf8444
$ grep -rn "PodSpec\|#PodValue\|spec\.Pod\b" --include='*.go' --include='*.cue' --include='*.md' --include='*.yml' . | grep -v "^./CHANGELOG/"
./.agents/skills/pod/SKILL.md:20:- `plugin-substrate`'s own CUE module (`candy/plugin-substrate/schema/pod.cue`) — `#Pod`, the AUTHORED `kind: pod` body, and `#PodValue`, the closed value def a `pod:` body is gated against. The plugin that serves the kind owns the body (opencharly/spec#304 unit 3) and declares `InputDef: "#PodValue"`, so the host resolves the gate def from the declaration instead of this module's map.
./schema/substrate_template.cue:11:// `spec.Pod` type it used to generate — are plugin-substrate's since spec#304 unit 3),
./schema/substrate_template.cue:52:// since spec#304 unit 3, so there is no spec.Pod to read either.
./schema/node.cue:97:// `pod` HAS MOVED OUT (spec#304 unit 3): its body and its gate def `#PodValue` live in
./schema/node.cue:99:// `InputDef: "#PodValue"`, so `kindValueDefPath` resolves the def from the provider's
./schema/pod.cue:5:// THE KIND BODY IS NOT HERE. `#Pod` and its host-side value-gate def `#PodValue` live with
./schema/pod.cue:9:// `InputDef: "#PodValue"`, so the host resolves the gate def from the provider's declaration
./schema/pod.cue:11:// no longer in `spec.KindValueDefs` and the generated `spec.Pod` type is gone.
./spec/cue_types_gen.go:11015:// since spec#304 unit 3, so there is no spec.Pod to read either.
./spec/pod_test.go:6:// opencharly/spec#304 unit 3 moved `#Pod` / `#PodValue` into the plugin that serves the kind
./spec/pod_test.go:9:// `InputDef: "#PodValue"`. Every other test in this repo passes identically with the defs
./spec/pod_test.go:11:// without this gate the deletion would be unproven: a re-added `#PodValue` would silently
./spec/pod_test.go:42:	for _, def := range []string{"#Pod", "#PodValue"} {
./spec/pod_test.go:48:		t.Errorf("KindValueDefs still carries %q — deleting #PodValue must drop it from the generated map", "pod")

Zero PodSpec hits: the alias is gone from spec/charly_names.go, and the two prose surfaces that pointed at it now point at the plugin's module instead. The one non-generated code reference to the deleted defs is the deletion gate itself (spec/pod_test.go, which asserts their ABSENCE).

Change classification

Breaking change + rollback: kind: pod bodies are no longer validated against a def in this module — the host gates them against the plugin's DECLARED #PodValue, resolved from the composed unit. For a consumer of this module the break is at BUILD time, not at runtime: spec.Pod and spec.PodSpec no longer exist, so any Go code naming them stops compiling, and the four consumers are named above with their own legs in the producer-first order (sdk → plugin-check → charly). Until those land, this tag must not be pinned by a consumer. Rollback is a revert of this one squash: the defs come back, KindValueDefs regains pod, and the plugin's declaration simply stops being consulted (the base map is still the fallback), so a revert restores the pre-leg-2 gate exactly — with the caveat that the revert must land WITH the consumers' pins going back, because a reverted base def beside a bumped plugin-substrate would re-introduce the twins that leg 1 removed.

Consumers checked: the four build/init failures were found by COMPILING the consumers against this tree, not by reading them; the whole-org census for spec.Pod/spec.PodSpec is in the table above, and the two charly checkouts that a PodSpec = spec.PodSpec grep also finds (plugin-herdr, pod-herdr) are their own nested charly submodules at pre-cutover pins — they carry charly's OLD file, are not consumers of this module, and move when those repos bump charly.

Filed issues

  • test: load_pod_substrate_test.go still marshals spec.Pod, which spec#304 unit 3 deletes plugin-substrate#33 — candy/plugin-substrate/load_pod_substrate_test.go:275 still marshals spec.Pod{…}, so that repo's go test ./... stops compiling the moment its own spec require advances past this tag. Test-only: its build, its served schema and its kind capability are clean, which is why the consumer legs do not depend on it. The issue carries the RCA and the one-line fix (decode into spec.ResolvedPod, the same target its resolve.go already uses).

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

…clares

#304 unit 3, leg 2. `#Pod` and its host-side value-gate def
`#PodValue` moved into plugin-substrate's own CUE module in leg 1
(opencharly/plugin-substrate#32, tag v2026.317.0614), and the plugin's `kind`
capability DECLARES `InputDef: "#PodValue"`, so the host resolves the gate def
from the provider's declaration instead of this module's map.

- delete `#Pod` (schema/pod.cue) and `#PodValue` (schema/node.cue): the
  generated `spec.Pod` type goes with them and `KindValueDefs` drops the `pod`
  entry (9 -> 8).
- KEEP `#PodSidecar`. The contract's own `#ResolvedPod`
  (schema/substrate_template.cue) cites it and the kernel reads that envelope,
  so this kind's keeper lives in the contract's envelope, not in a plugin.
- spec/pod_test.go: the deletion gate. `#Pod`/`#PodValue` absent, no `pod`
  entry in KindValueDefs, `#PodSidecar` and `#ResolvedPod` present and still
  wired, with `#CandyValue` as the positive control so the absences cannot
  pass vacuously.
- comments in node.cue, substrate_template.cue, resolvedproject.cue and
  internal/schemagen retargeted to the move; spec/charly_names.go loses the
  `PodSpec = Pod` alias that named the deleted type.
- the two prose surfaces the deletion made FALSE go in the same phase (R5):
  `.agents/skills/pod/SKILL.md` and the `charly.yml` skill-shelf comment both
  still pointed at a `PodSpec` Go type that no longer exists. They now name the
  plugin's own `schema/pod.cue` for the authored body and the contract's
  `#ResolvedPod` / `#PodSidecar` for what the kernel reads.

Regenerated with `charly task cue-gen` (a second run is byte-identical):
KindValueDefs 9 -> 8, `#<Word>Value` defs 10 -> 9, and the top-level
kind-body defs 13 -> 12 (`#Pod` was one of them).

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — unit 3 (pod) leg 2 (spec) is in review: #307.

Agent: dsh-unit3-legs (DeepSeek Harness, ollama-cloud/deepseek-v4.1-flash)

Head da429af73e94f86592c4b58462fc56e6aadf8444, 11 files, branch feat/delete-pod-body off origin/main 64f85a3. This is leg 2 of the three the CLAIM above measures: #Pod + #PodValue deleted, #PodSidecar KEPT (the contract's own #ResolvedPod cites it), spec.Pod/PodSpec gone, KindValueDefs 9 → 8.

Gates on the pushed tree: charly task cue-gen pass + second run byte-identical; GOWORK=off go test ./... 30 ok / 0 FAIL; gofmt -l . empty; GOTOOLCHAIN=go1.26.8 golangci-lint run ./... 0 issues. Plant (re-added #PodValue + a #Pod stub, regen so KindValueDefs re-registers the kind) reds the deletion gate on three ASSERTIONS and restores byte-identical.

Zero verdicts moved, one root, both arms: composed 2,004 bodies / pod 250 / 1,984 OK / 20 FAIL before AND after, verdict projection diff rc=0, pod slice sha256 identical; the base-arm delta is exactly the 250 pod rows it can no longer judge (by design, counted). The full-line diff is 4 rows, all FAIL on both sides, differing only in CUE diagnostic positions.

The assembled R10 bed check-pod PASSED on the chain (driver 2026.317.0159): PASS (steps=16, skipped_checks=31), total_seconds: 147, errors: 0 / warnings: 0 / advisories: 0. Scope limit stated in the body: the bed's project tree is the umbrella-pin worktree under CHARLY_REPO_OVERRIDE, not this repo's head — spec ships no disposable target.

Facts for whichever leg lands next: three of the four consumer breaks are re-measured in the body (plugin-check ./checkproject.go:291:16: undefined: spec.Pod; sdk v0.2026317.18's vmshared/spec_aliases.go:132:36: undefined: spec.PodSpec; charly's test alias names the same deleted symbol), and opencharly/plugin-substrate#33 reproduces live (./load_pod_substrate_test.go:275:33: undefined: spec.Pod). This tag must not be pinned by a consumer before sdk lands — an old sdk beside this spec panics at init (loaderkit: CUE kind "pod": definition #Pod not found).

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: da429af73e94f86592c4b58462fc56e6aadf8444 (branch: feat/delete-pod-body)

Security screen: PASS — no embedded directives, no secrets/egress, no weakened gate, no supply-chain change; the schema deletion matches the stated intent (T1–T4).
Checklist: All applicable rules PASS or NA — A1 (all 11 files accounted; Assisted-by: footer present and consistent), A2 (schema-change gate = module go test + assembled check-pod bed, which exercises the changed validateKindValueCUE path via deploy-add), A3 (fully tested and validated justified — changed gate executed live), R0–R10, SDD (CUE source + regenerated cue_types_gen.go/vocab_gen.go in same commit), QUAL, CONC (no forbidden framing; the one orphan is filed as plugin-substrate#33, the rest are producer-first cross-repo legs). ARCH placement: CORRECT — the kind body moves OUT of the contract into the serving plugin; #PodSidecar retention is justified by the contract's own #ResolvedPod.
Comments: @aitrawog's STATUS comment — verified-non-blocking (consistent with current body/diff; coordination metadata).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 13, 2026 07:00
@github-actions
github-actions Bot merged commit 8cceca6 into main Nov 13, 2026
4 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 13, 2026
github-actions Bot pushed a commit to opencharly/sdk that referenced this pull request Nov 13, 2026
…e, not the moved #Pod (#504)

opencharly/spec#304 unit 3, leg 3. The contract module deleted `#Pod` and
`#PodValue` (opencharly/spec#307, tag v0.2026317.703), and this module named them
in two places.

`vmshared/spec_aliases.go`: `PodSpec = spec.PodSpec` was an UNUSED zero-churn
alias (the only `PodSpec` occurrence in this module is its own definition), so it
goes with the type it named.

`loaderkit/cue_schema.go`: `cueKindDefs["pod"] = "#Pod"` indexes the EMBEDDED
contract schema, and `sharedCueSchema()` fail-fasts on an absent def, so with the
moved def the parse panicked at init — `loaderkit: CUE kind "pod": definition
#Pod not found`. The entry now names `#ResolvedPod`, the resolve-to-envelope form
the contract KEEPS: the same def the contract keeps `#PodSidecar` for.

Dropping the entry instead is the silent option, and it is the one this repo's
own gate forbids. That table is the source of the declared-fields CONTRACT FLOOR
(loaderkit/declared_fields_floor.go), whose header records the live repro it
exists to prevent — distro-arch check-agent-live's pod body, an `iterate:` key
carrying an `agent:` kind-word key, failing `charly deploy add` with `expected a
mapping value` (sdk#221/#223/#225) — and TestContractDeclaredFields_Floor pins
`pod` as a non-empty floor. A nil floor would re-arm exactly that bug.

Two consequences are deliberate, bounded, and written beside the table rather
than discovered later: the floor for `pod` gains the resolved-only `raw` (which
the pod value gate still rejects as `field not allowed`, so the extra name cannot
admit a document), and `env_default`'s type differs between the authored
`#StrVal` and the envelope's `string` — which would matter only to a CONCRETE
unify (`ValidateEntityClosedCUE("pod", ...)` / `ApplyCueDefaults("pod")`), and no
caller in the tree passes "pod" to either.

`require github.com/opencharly/spec` advances to v0.2026317.703.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
github-actions Bot pushed a commit to opencharly/plugin-check that referenced this pull request Nov 13, 2026
…e, not the moved spec.Pod (#144)

opencharly/spec#304 unit 3, leg 4. The contract module deleted `#Pod`/`#PodValue`
(opencharly/spec#307, tag v0.2026317.703) and moved the authored `kind: pod` body
into plugin-substrate's own CUE module, so `spec.Pod` is gone. This plugin's
include-splicer decoded a `pod:` template into it to read the template's `plan:`
for `- include: pod:<name>`:

	var pod spec.Pod        ->        var pod spec.ResolvedPod

`spec.ResolvedPod` is the contract's resolve-to-envelope form for the kind — the
same target plugin-substrate's own `resolve.go` projects an authored `pod:` body
into, and the reason the contract keeps `#PodSidecar` — and its `plan:` field is
what the splicer reads. The header comment said "decoded into spec.Pod/spec.Vm";
it now says where the authored body lives and why the envelope is the decode
target.

The unit test that exercises the arm follows the same type, and it is the
assertion-level witness: with the arm's splice removed the test fails on its own
expectation, not on a build error.

`require github.com/opencharly/spec` and `require github.com/opencharly/sdk`
advance to the merged tags (sdk v0.2026317.712), in lockstep, because the
new spec cannot be built beside an sdk that still aliases `spec.PodSpec`.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

Co-authored-by: aitrawog <[email protected]>
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