Skip to content

feat(pod): own the kind:pod body — #Pod/#PodValue move into the plugin's CUE module - #32

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

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

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

opencharly/spec#304 unit 3, leg 1 (the producer): the kind: pod entity body moves from the contract module into the CUE module of the plugin that serves the kind, and that plugin declares the gate def on its capability in the SAME change.

The body lived in spec/schema/pod.cue (#Pod) with a #PodValue twin in spec/schema/node.cue, gated host-side through the spec.KindValueDefs compatibility fallback. opencharly/charly#1122 established the contract for moving one: a kind whose body lives in its own plugin's CUE module must declare InputDef: "#<Word>Value" on its class:kind capability, or the host keeps answering from the base and the base can never drop the def. This change is that pair, plus the deletion of the last Go dependency the body still had.

WHICH plugin, and why it is not plugin-deploy-pod. spec#304's own table names plugin-deploy-pod as the owner. Measured, exactly ONE provider serves kind:pod, and it is this one: plugin-substrate's substrateWords declares pod beside the seven sibling substrate words and NewMeta emits {Class: "kind", Word: w, Structural: true, DeployTraits: …} for each, while plugin-deploy-pod declares only {Class: "deploy", Word: "pod", InputDef: "", Lifecycle: true}. A kind body belongs with the plugin that serves the kind, and a plugin's CUE module may import only the CONTRACT module — so the word's owner is the body's home. Moving the word to the deploy repo instead would split the eight-word substrate table (traits, status collectors, the OpLoad echo) across two plugins and duplicate it: R2 on sight. The recorded plan was corrected on the tracker with the measurement.

What stays in the contract, and why. #PodSidecar does not move. The contract's own #ResolvedPod (spec/schema/substrate_template.cue) cites it, and that envelope is what the kernel reads; the moved def references it as schema.#PodSidecar. This is the shape units 1 and 2 paid for (#PipelineClassRoutes, #TaskParamSpec) with one difference worth stating: there, a SIBLING plugin's schema pinned the def; here nothing in any plugin does — a cross-plugin sweep is EMPTY (grep -rn 'schema\.#Pod' over all 248 opencharly modules in the module cache and over every materialized plugin checkout returns zero citations; the one #Pod hit, plugin-pod's #PodPlugin, is an unrelated def name). The pinning citation is the contract's own.

spec.Pod is deleted from this plugin's dependency, not merely unread. Its one and only reader in the whole tree was resolve.go's OpResolve leg, which copied five fields out of spec.Pod into spec.ResolvedPod. The authored body's fields ARE that envelope's fields, so the arm now decodes the authored bytes straight into #ResolvedPod — and the contract's own note on #ResolvedPod already said the kernel "never" reads a spec.Pod. charly and sdk read it in zero files. The base's CUE def and its generated Go type follow in leg 2, on the tracker.

The routing is unchanged. The pod word still declares DeployTraits, so IsStandaloneResourceKind still sends it down foldSubstrateKind; the declaration only changes WHICH def the host value gate reads — the provider's declared #PodValue out of the composed unit, instead of the base's fallback.

The declaration is data, not a per-word branch. substrateKindInputDefs is a table beside substrateTraits (the file's own idiom), so a word cannot declare a gate def without also declaring its traits, and each sibling kind that moves later adds exactly one row.

Pins. sdk v0.2026296.1207 → v0.2026317.18 and spec v0.2026296.1036 → v0.2026317.51, because spec/schemacompose (ServedSchema/ServedText — the offline import resolution both sides of the wire compose with) does not exist at the older spec pin. go mod tidy clean; this module is the repo's only Go module.

Files

file what changed
candy/plugin-substrate/schema/pod.cue NEW — #Pod (verbatim; contract defs cited as schema.#…) and #PodValue: (#Pod | schema.#DeployValue). Carries the schema dir's ONE import, because schemaconcat.ConcatSchema sorts the dir and a CUE import must precede every declaration.
candy/plugin-substrate/schema/substrate.cue header only — the "self-contained, references no base def, one file" claim is no longer true; it now documents the two-file / one-package compose and says which word declares its gate def.
candy/plugin-substrate/plugin.go the substrateKindInputDefs table; the kind capability carries InputDef: substrateKindInputDefs[w]; the NewMeta doc records what moved and why.
candy/plugin-substrate/resolve.go the pod arm decodes straight into spec.ResolvedPod; spec.Pod gone; header names the words the switch actually serves.
candy/plugin-substrate/resolve_test.go TestResolvePod_Projection — regression coverage for the changed path (fields projected, unknown field dropped, Raw verbatim).
candy/plugin-substrate/schema_serve_test.go the splice test now composes each side with spec/schemacompose (the pre-compose form concatenated text and could not resolve an import); NEW TestKindPodCapabilityDeclaresItsGateDef and TestServedSchemaDeclaresThePodKindBody (accept a pod body and a deploy-shaped one, reject a typo'd field, from the COMPOSED value).
candy/plugin-substrate/go.mod the sdk + spec pin bump above.
candy/plugin-substrate/go.sum the checksums that bump brings.
AGENTS.md the canonical-file list names the new schema file and why its sort position is load-bearing.

How tested

Every command below was run on the committed tree (585ccb4), and the outputs are pasted verbatim. W is the umbrella worktree:

$ W=/home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/dsh-unit3-pod/opencharly

The gate: zero verdicts moved, on ONE root, both arms

One fully materialized umbrella worktree at origin/main (2b6413f, 409 submodules), judged through the production gate (charly's TestKindValueCorpusSweep). The two arms differ in exactly one thing — which plugin-substrate the test links:

  • arm A — the PINNED plugin-substrate (1e97151: no kind InputDef, so the gate reads the base's #PodValue);
  • arm B — the LOCAL, committed plugin-substrate (declared InputDef, def read from the composed unit).

The root, described with the sweeper's own prune list:

$ find "$W" \( -name .git -o -name .build -o -name .worktrees -o -name .check -o -name node_modules -o -name tmp -o -name .cache \) -prune -o \( -name '*.yml' -o -name '*.yaml' \) -print | wc -l
2807

One root, both arms — and the stronger same-root evidence is the arms' own reading: both judged 2007 bodies with identical per-kind counts, which a root that moved under them could not produce.

$ cd "$W/charly/charly"
$ CHARLY_CORPUS_ROOT="$W" CHARLY_KIND_VALUE_GATE=composed \
    CHARLY_CORPUS_OUT=/tmp/u3-armA.txt go test -count=1 -run TestKindValueCorpusSweep -v .
kind_value_corpus_sweep_test.go:223: gate=composed: judged 2007 entity bodies (1624 files unparsable, 0 bodies the base arm cannot judge) -> /tmp/u3-armA.txt
--- PASS: TestKindValueCorpusSweep (97.75s)

$ GOWORK="$W/charly/go.work.dev" CHARLY_CORPUS_ROOT="$W" CHARLY_KIND_VALUE_GATE=composed \
    CHARLY_CORPUS_OUT=/tmp/u3-armB.txt go test -count=1 -run TestKindValueCorpusSweep -v .
kind_value_corpus_sweep_test.go:223: gate=composed: judged 2007 entity bodies (1624 files unparsable, 0 bodies the base arm cannot judge) -> /tmp/u3-armB.txt
--- PASS: TestKindValueCorpusSweep (152.08s)

Per-kind counts, identical on both arms — pod is 250:

$ grep -E '223:  ' /tmp/u3-armB.log | sed 's/.*223: //'
  android      9
  candy        1026
  kindcluster  24
  kubernetes   23
  kubevirt     25
  local        203
  pipeline     13
  pod          250
  task         48
  vm           386

The verdict-only projection is byte-identical:

$ awk -F'|' 'BEGIN{OFS="|"}{v=$4; if (v ~ /^FAIL/) v="FAIL"; $4=v; print}' /tmp/u3-armA.txt > /tmp/u3-armA-verdicts.txt
$ awk -F'|' 'BEGIN{OFS="|"}{v=$4; if (v ~ /^FAIL/) v="FAIL"; $4=v; print}' /tmp/u3-armB.txt > /tmp/u3-armB-verdicts.txt
$ diff /tmp/u3-armA-verdicts.txt /tmp/u3-armB-verdicts.txt; echo "diff rc=$?"
diff rc=0
$ sha256sum /tmp/u3-armA-verdicts.txt /tmp/u3-armB-verdicts.txt
29abf3e180750489bc2e4e05189f069c4b9d7aa666e0719a6f4c0365e67f1350  /tmp/u3-armA-verdicts.txt
29abf3e180750489bc2e4e05189f069c4b9d7aa666e0719a6f4c0365e67f1350  /tmp/u3-armB-verdicts.txt
$ grep '|pod|' /tmp/u3-armA-verdicts.txt > /tmp/u3-podA.txt; grep '|pod|' /tmp/u3-armB-verdicts.txt > /tmp/u3-podB.txt
$ diff /tmp/u3-podA.txt /tmp/u3-podB.txt; echo "pod diff rc=$?"
pod diff rc=0
$ sha256sum /tmp/u3-podA.txt /tmp/u3-podB.txt
3190432ddb7dd9b9543930cdeef645a87c6f6c2a971b951d6fd1c7ab77d3e8f5  /tmp/u3-podA.txt
3190432ddb7dd9b9543930cdeef645a87c6f6c2a971b951d6fd1c7ab77d3e8f5  /tmp/u3-podB.txt

1986 OK and 21 FAIL on both arms. The full-line diff is not empty and saying so is the point: it is 3 rows (12 diff lines), all FAIL on both sides, each differing only by a /charly/spec-module/schema/deploy.cue:<line> position prefix that the composed receiver attaches to the two #DeployValue-arm fields. Same body, same verdict, same disjunction summary — a diagnostic POSITION moved, not a judgement:

$ diff /tmp/u3-armA.txt /tmp/u3-armB.txt | head -4
552c552
< 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
---
> 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

The campaign's own base-only oracle arm on the same root, for the record — it cannot judge a body whose def has moved, and says so visibly rather than dropping it:

$ CHARLY_KIND_VALUE_GATE=base CHARLY_CORPUS_OUT=/tmp/u3-armA-base.txt go test -count=1 -run TestKindValueCorpusSweep -v .
kind_value_corpus_sweep_test.go:223: gate=base: judged 1946 entity bodies (1624 files unparsable, 61 bodies the base arm cannot judge)

Scope limit, stated honestly. 2,807 YAML files / 2,007 judged bodies is a property of THIS root, not a campaign constant: unit 0/1's "2,004 bodies" and unit 2's "1,004 bodies" are two other roots. Both arms here share this one, and the identical per-kind counts across them are what makes the diff meaningful.

The plants: red on ASSERTIONS, restored byte-identical

$ cd "$W/plugin-substrate" && git status --short          # BEFORE any plant — empty
$ sha256sum candy/plugin-substrate/schema/pod.cue | tee /tmp/pod-cue.sha256
44edcedfc787a58301c5931e734dbdf23e4597ebd26e336cff6d5e4b1415435e  candy/plugin-substrate/schema/pod.cue
# plant 1 — open #Pod with `...`
$ cd candy/plugin-substrate && go test -count=1 -run TestServedSchemaDeclaresThePodKindBody -v .
    schema_serve_test.go:166: #PodValue ACCEPTED a typo'd pod field — #Pod is no longer closed
--- FAIL: TestServedSchemaDeclaresThePodKindBody (0.46s)
FAIL	github.com/opencharly/plugin-substrate/candy/plugin-substrate	0.474s
# restore
$ cd "$W/plugin-substrate" && git checkout -- candy/plugin-substrate/schema/pod.cue && sha256sum -c /tmp/pod-cue.sha256
candy/plugin-substrate/schema/pod.cue: OK
$ git status --short          # EMPTY
# plant 2 — drop the InputDef declaration
$ cd candy/plugin-substrate && go test -count=1 -run TestKindPodCapabilityDeclaresItsGateDef -v .
    schema_serve_test.go:99: kind:pod InputDef = "", want "#PodValue" — the body lives in this plugin's CUE module (schema/pod.cue), so the host must be told which def gates it
--- FAIL: TestKindPodCapabilityDeclaresItsGateDef (0.06s)
FAIL	github.com/opencharly/plugin-substrate/candy/plugin-substrate	0.078s
# restore
$ cd "$W/plugin-substrate" && git checkout -- candy/plugin-substrate/plugin.go && git status --short
$ sha256sum candy/plugin-substrate/plugin.go
98882fee0707b453288c19074c1660e0af47e6534a98cc9fff309db4f74a8761  candy/plugin-substrate/plugin.go
$ cd candy/plugin-substrate && go test -count=1 -run 'TestServedSchemaDeclaresThePodKindBody|TestKindPodCapabilityDeclaresItsGateDef' .
ok  	github.com/opencharly/plugin-substrate/candy/plugin-substrate	0.597s

Both plants fail on a test ASSERtion, never on a build error, and the restored tree is byte-identical (sha256sum -c above) with a clean git status.

The changed paths, executed live

$ cd "$W/plugin-substrate/candy/plugin-substrate" && go test -count=1 ./...
ok  	github.com/opencharly/plugin-substrate/candy/plugin-substrate	11.866s
?   	github.com/opencharly/plugin-substrate/candy/plugin-substrate/cmd/serve	[no test files]

$ go test -count=1 -run 'TestNewMetaServesNonEmptySchema|TestServedSchemaSplicesOntoHostBase|TestKindPodCapabilityDeclaresItsGateDef|TestServedSchemaDeclaresThePodKindBody|TestResolvePod_Projection' -v .
--- PASS: TestResolvePod_Projection (0.00s)
--- PASS: TestNewMetaServesNonEmptySchema (0.05s)
--- PASS: TestServedSchemaSplicesOntoHostBase (0.19s)
--- PASS: TestKindPodCapabilityDeclaresItsGateDef (0.03s)
--- PASS: TestServedSchemaDeclaresThePodKindBody (0.39s)
PASS
ok  	github.com/opencharly/plugin-substrate/candy/plugin-substrate	0.673s

$ cd "$W/plugin-substrate" && "$W/charly/bin/charly" box validate
charly box validate: OK — checked 3 candies, 1 deploy, 7 distros, 7 builders; 0 warnings, 0 errors

$ cd "$W/plugin-pod" && "$W/charly/bin/charly" box validate
charly box validate: OK — checked 17 candies, 1 box, 1 deploy, 7 distros, 7 builders; 0 warnings, 0 errors

plugin-pod's project is the one that authors a real pod: node, so the second validate is this gate — provider-declared #PodValue, resolved from the composed unit — running on a live project, not on a fixture.

R9 — the binary, and which source it links

$ "$W/charly/bin/charly" version
2026.317.0159
$ go version -m "$W/charly/bin/charly" | grep -m1 plugin-substrate
	dep	github.com/opencharly/plugin-substrate/candy/plugin-substrate	(devel)

(devel) is the whole point: -buildvcs=false means go version -m cannot prove a charly COMMIT, and charly version is tag-derived here — but the dep line proves the binary links THIS repo's local module (unmerged source) rather than the pinned tag, which is what a bed for a plugin-library change must do (scripts/bootstrap-charly.sh --dev-plugin, opencharly/charly#775). The build was taken from the committed tree, and git status --short in this repo was empty before it and after the plants were restored.

R10 — the bed that can contain this diff

check-pod is the canonical fast pod-runtime bed and it authors a real pod: node (check-pod: pod: {image: check-pod, …}), so it is the bed this move must pass. It lives in plugin-pod, which charly compiles in — charly#1123 records that it LEFT charly's tree — so it is reachable, and it was run with the dev binary above on this committed tree:

$ cd "$W/plugin-pod" && "$W/charly/bin/charly" check run check-pod
charly check run check-pod: [image-build] PASS after 8.634s
charly check run check-pod: [check-image] PASS after 22.007s
charly check run check-pod: [deploy-add] PASS after 12.311s
charly check run check-pod: [config] PASS after 7.281s
charly check run check-pod: [start] PASS after 6.213s
charly check run check-pod: [wait-ready] PASS after 1.826s
charly check run check-pod: [bring-up-members] PASS after 101ms
charly check run check-pod: [check-live] PASS after 16.994s
charly check run check-pod: [feature-run] PASS after 12.114s
charly check run check-pod: [update] PASS after 33.739s
charly check run check-pod: [rebuild-ready] PASS after 1.829s
charly check run check-pod: [check-live-rebuild] PASS after 15.835s
charly check run check-pod: [wait-ready] PASS after 461ms
charly check run check-pod: [feature-run-rebuild] PASS after 12.376s
charly check run check-pod: [cleanup] PASS after 4.493s
charly check run check-pod: [cleanup-members] PASS after 0s
charly check run check-pod: PASS (steps=16, skipped_checks=31)
$ sed -n '/^total_seconds/,$p' "$W/plugin-pod/.check/check-pod/2026.317.0607/summary.yml"
total_seconds: 156
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

check-live on its own: 32 steps: 29 passed, 0 failed, 3 skipped — every skip is the check-context mechanism declining a step whose context is not active, each with its reason recorded in the summary; none is a mocked or silently-passed boundary (R8). The status-shows-pod step (charly status --json containing "kind": "pod") ran and passed, so the pod kind is not only LOADED through the composed #PodValue but realized and reported live.

plugin-substrate's OWN witness bed is check-substrate, and it does not author a pod: node at all (a bare local: template plus a nested local: deploy) — so it cannot be the bed for this diff, and this PR does not claim it as one. It is unaffected by this change (#LocalValue untouched).

Rulebook compliance

  • R0 — skills first. /charly-internals:plugin, :go, :cue and :git-workflow were loaded before the first code change, and plugin-substrate's own AGENTS.md (Part II refactor(status): enumerate the ledger via kit, not a second YAML parser #4) before acting in it — it names /charly-internals:plugin first and requires the candy entity, the Go source and the schema to move together, which is what this diff does.
  • R1 — RCA every anomaly, fix or file. Two findings. (1) spec#304's row 3 names the wrong owning plugin: root-caused by measuring the provider table (the kind:pod word is built in a substrateWords loop, which is why a text grep for Word: "pod" found only the deploy word), fixed here, and the correction is recorded on the tracker. (2) --dev-plugin with a relative path resolves against the generator's CWD and quotes a path the operator never wrote: non-blocking for this diff, filed as bootstrap-charly.sh --dev-plugin resolves a relative <repo-checkout> against the generator CWD, and the error quotes a path the operator never wrote charly#1129 with the mechanism, the missed control and the root fix. The gate output above carries zero warnings (bed warnings: 0, both box validate runs 0 warnings).
  • R2 — no duplication. The body is declared ONCE, here; the base copy is deleted in leg 2 of the tracker, an ordered unit of the same decomposition rather than a deferred clean-up of this leg's scope. The spec.Pod → spec.ResolvedPod field-by-field copy is DELETED, not relocated. The per-word declaration is one table beside substrateTraits, not a branch.
  • R3 — no workarounds. No sleep, retry, suppression, fallback branch or manual infrastructure command. The dev build is the documented mechanism (charly#775), and the absolute <repo-checkout> form is the documented one — the relative form's behaviour is the filed finding, not a workaround.
  • R4 — product before prose. The prose the code invalidated is corrected in this same change: substrate.cue's "self-contained / references no base def / one file" header, plugin.go's NewMeta doc and its spec.Pod mention, resolve.go's arm list, and AGENTS.md's canonical-file list. charly box validate is green with zero warnings on the repo's own project, so the documented command works with only charly.
  • R5 — delete legacy completely. spec.Pod has zero CODE references left in this repo; the two remaining mentions are the negative/historical prose that records the deletion. The sweep is pasted below. The base's copies are the next ordered unit (spec#304 unit 3 legs 2–3), stated on the tracker — not a TODO left inside this leg.
  • R6 — preserve work and git safety. git status --short was run and stated empty before the branch, before each plant, and after each restore; no force-push, no amend after push, no history rewrite, no hook bypass. One deliberate no-op to record: the worktree's umbrella-wide init-submodules.sh REFUSED to roll this repo to its gitlink and said why (plugin-substrate is at 585ccb4…, which is NOT an ancestor of its recorded gitlink 1e97151…; left untouched) — the correct behaviour, quoted so it is not mistaken for an error.
  • R7 — prove behavior. Both plants are red on ASSERTIONS and restored byte-identically (sha256sum -c pasted); the changed paths executed live (unit suite, box validate on this repo AND on the one project that authors a pod: node, and the bed); the artifact under test is the COMPOSED schema value the host reads, never a file on disk.
  • R8 — live or skip. Every boundary in the bed crossed a real service (a real image build and a real container) or was declared SKIP with its reason; nothing was mocked.
  • R9 — binary equals source. The bed's driver is this worktree's charly/bin/charly, 2026.317.0159, and go version -m proves it links github.com/opencharly/plugin-substrate/candy/plugin-substrate (devel) — this repo's unmerged source. No new runtime OS dependency, so nothing to add to packaging:.
  • R10 — fresh disposable proof. check-pod (disposable: true), driven end to end on the committed tree, including the fresh-rebuild leg (update + feature-run-rebuild), zero errors/warnings/advisories, ok: true, removed afterwards (cleanup + cleanup-members PASS).
  • HC — one cutover per PR. This is unit 3 leg 1 of the ordered decomposition tracked at opencharly/spec#304; the tracker stays open until unit 11 lands. The scope is the producer leg only, and its spec deletion cannot precede it — the consumer cannot lead its producer.
  • ARCH — placement. The kind body moves OUT of core into the plugin that serves the kind: the bias outward, which is exactly what the tracker's target column asks for.
  • QUAL — lint/format. gofmt -l is clean on the module; go vet runs inside go test ./..., which is green.

R5 claim-keyed sweep

$ cd "$W/plugin-substrate"
$ grep -rnE '\bspec\.Pod\b' --include='*.go' . | grep -v _test.go | grep -vE ':[0-9]+:[[:space:]]*//'; echo "code-ref rc=$?"
code-ref rc=1
$ grep -rnE '\bspec\.Pod\b' --include='*.go' . | grep -v _test.go
./candy/plugin-substrate/resolve.go:42:		// `var p spec.Pod` plus field-by-field copy existed only because the authored body
./candy/plugin-substrate/resolve.go:45:		// already said the kernel "never" reads a spec.Pod.

Change classification

Kind: a schema def's home moves into the plugin that serves the kind, plus one deleted Go intermediate. Not a breaking change for this repo's consumers, and the subject carries no ! because nothing breaks here: the kind:pod gate def keeps its NAME (#PodValue) and its MEANING — proven, 0 verdicts moved over 2,007 bodies on one root — so a project authoring a pod: node meets exactly the gate it met before; the served schema only GAINS defs, which the host splices onto the base exactly like the #TunnelConfig twin it already documents; and the OpResolve pod arm produces a byte-equivalent #ResolvedPod (fields projected, Raw verbatim).

Breaking change + rollback: none — the pointers here are a schema def's home and a deleted local Go type, the gate def's name and semantics are unchanged (0 verdicts moved), and the package path, module path and all capability words are untouched. Rolling back is reverting this squash; nothing downstream consumed what it removes.

Filed issues

opencharly/spec#304 is the chain tracker and stays open until unit 11 lands; this PR is unit 3 leg 1 and is recorded on it (CLAIM comment, with the decomposition and the correction to its row 3).

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

…n's CUE module

opencharly/spec#304 unit 3, leg 1 (the producer). The `kind: pod` entity body has
lived in the contract module (spec/schema/pod.cue: `#Pod`) with a `#PodValue` twin in
spec/schema/node.cue, gated host-side through the `spec.KindValueDefs` compatibility
fallback. This leg moves the body to the plugin that SERVES the kind, and declares the
gate def on the capability in the SAME change, which is the contract
opencharly/charly#1122 established: a kind whose body lives in its own plugin's CUE
module must declare `InputDef: "#<Word>Value"` on its `class:kind` capability, or the
host keeps answering from the base and the base could never drop the def.

WHY THIS PLUGIN, not plugin-deploy-pod (the owning plugin spec#304's table names).
Measured, not preferred: exactly ONE provider serves `kind:pod`, and it is this one —
`substrateWords` (plugin.go) declares pod alongside the seven sibling substrate words,
and `plugin-deploy-pod` declares only `deploy:pod` (`{Class: "deploy", Word: "pod",
InputDef: "", Lifecycle: true}`). A `kind` body belongs with the plugin that serves the
kind, and a plugin can import only the CONTRACT module, so the word's owner is the
body's home. Moving the word itself would split the substrate table (traits, status
collectors, the OpLoad echo) and duplicate it — R2 on sight.

WHAT STAYS IN THE CONTRACT, and why. `#PodSidecar` does not move: the contract's own
`#ResolvedPod` (spec/schema/substrate_template.cue) cites it, and that envelope is what
the kernel reads. The moved def references it as `schema.#PodSidecar`. This is the same
shape units 1 and 2 paid for (`#PipelineClassRoutes`, `#TaskParamSpec`), except the
citing schema is the contract's rather than a sibling plugin's: a cross-plugin sweep of
all 248 opencharly modules in the module cache and of every materialized plugin checkout
found ZERO `schema.#Pod*` citations, so nothing in a plugin pins a pod def.

THE ROUTING IS UNCHANGED. The pod word still declares `DeployTraits`, so
`IsStandaloneResourceKind` still sends it down `foldSubstrateKind`; the declaration only
changes WHICH def the host value gate reads (from the composed unit instead of the base
fallback). It composes alone, splices onto the base while the base still declares the
same defs (the `#TunnelConfig` twin precedent), and the sweep shows no verdict moved.

spec.Pod is DELETED FROM THE PLUGIN'S DEPENDENCY, not merely unread. The one consumer,
resolve.go's OpResolve leg, copied five fields from `spec.Pod` into the contract's
`#ResolvedPod`; the authored body's fields ARE that envelope's fields, so the arm now
decodes the authored bytes straight into `#ResolvedPod` and the type has zero code
references left in this repo. The contract's own note on `#ResolvedPod` already said the
kernel "never" reads a `spec.Pod`. The base's CUE def and its Go type follow in leg 2.

Pins: sdk v0.2026296.1207 -> v0.2026317.18 and spec v0.2026296.1036 -> v0.2026317.51,
because `spec/schemacompose` (ServedSchema/ServedText, the offline import resolution both
sides of the wire use) does not exist at the older spec pin. `go mod tidy` clean.

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

Copy link
Copy Markdown

Review — PASS

Head SHA: 585ccb45948185c9beee453338efa101142880f5 (branch: feat/kind-pod-body)

Security screen: PASS — no secrets/egress, no weakened guardrails (the AGENTS.md edit updates the canonical-file list only, not the landing/attribution/force-push rules), pins are explicit and checksummed, scope matches the stated move.
Checklist: All applicable rules PASS or NA. Body accounts for all 9 files; spec.Pod sweep pasted (code-ref rc=1, comments only); #Pod/#PodValue move is a tracked ordered unit of spec#304 with the base deletion correctly ordered after the producer (leg 2), not a deferred cleanup of this leg's scope; both plants fail on assertions and restore byte-identically; check-pod (disposable: true, fresh-rebuild leg) ran live at zero warnings and realizes the pod kind; new tests (TestKindPodCapabilityDeclaresItsGateDef, TestServedSchemaDeclaresThePodKindBody, TestResolvePod_Projection) fail without the change; Assisted-by: footer and ## Filed issues (charly#1129) present. No comments to disposition.

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 06:14
@github-actions
github-actions Bot merged commit 937a9b0 into main Nov 13, 2026
3 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/spec that referenced this pull request Nov 13, 2026
…clares (#307)

#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)
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