Repository navigation
feat(pod): own the kind:pod body — #Pod/#PodValue move into the plugin's CUE module - #32
Conversation
…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)
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no weakened guardrails (the Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…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)
Summary
opencharly/spec#304unit 3, leg 1 (the producer): thekind: podentity 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#PodValuetwin inspec/schema/node.cue, gated host-side through thespec.KindValueDefscompatibility fallback.opencharly/charly#1122established the contract for moving one: a kind whose body lives in its own plugin's CUE module must declareInputDef: "#<Word>Value"on itsclass:kindcapability, 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 namesplugin-deploy-podas the owner. Measured, exactly ONE provider serveskind:pod, and it is this one:plugin-substrate'ssubstrateWordsdeclarespodbeside the seven sibling substrate words andNewMetaemits{Class: "kind", Word: w, Structural: true, DeployTraits: …}for each, whileplugin-deploy-poddeclares only{Class: "deploy", Word: "pod", InputDef: "", Lifecycle: true}. Akindbody 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.
#PodSidecardoes 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 asschema.#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#Podhit,plugin-pod's#PodPlugin, is an unrelated def name). The pinning citation is the contract's own.spec.Podis deleted from this plugin's dependency, not merely unread. Its one and only reader in the whole tree wasresolve.go's OpResolve leg, which copied five fields out ofspec.Podintospec.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#ResolvedPodalready said the kernel "never" reads aspec.Pod.charlyandsdkread 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, soIsStandaloneResourceKindstill sends it downfoldSubstrateKind; the declaration only changes WHICH def the host value gate reads — the provider's declared#PodValueout of the composed unit, instead of the base's fallback.The declaration is data, not a per-word branch.
substrateKindInputDefsis a table besidesubstrateTraits(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.
sdkv0.2026296.1207→v0.2026317.18andspecv0.2026296.1036→v0.2026317.51, becausespec/schemacompose(ServedSchema/ServedText— the offline import resolution both sides of the wire compose with) does not exist at the older spec pin.go mod tidyclean; this module is the repo's only Go module.Files
candy/plugin-substrate/schema/pod.cue#Pod(verbatim; contract defs cited asschema.#…) and#PodValue: (#Pod | schema.#DeployValue). Carries the schema dir's ONEimport, becauseschemaconcat.ConcatSchemasorts the dir and a CUEimportmust precede every declaration.candy/plugin-substrate/schema/substrate.cuecandy/plugin-substrate/plugin.gosubstrateKindInputDefstable; thekindcapability carriesInputDef: substrateKindInputDefs[w]; theNewMetadoc records what moved and why.candy/plugin-substrate/resolve.gospec.ResolvedPod;spec.Podgone; header names the words the switch actually serves.candy/plugin-substrate/resolve_test.goTestResolvePod_Projection— regression coverage for the changed path (fields projected, unknown field dropped,Rawverbatim).candy/plugin-substrate/schema_serve_test.gospec/schemacompose(the pre-compose form concatenated text and could not resolve an import); NEWTestKindPodCapabilityDeclaresItsGateDefandTestServedSchemaDeclaresThePodKindBody(accept a pod body and a deploy-shaped one, reject a typo'd field, from the COMPOSED value).candy/plugin-substrate/go.modcandy/plugin-substrate/go.sumAGENTS.mdHow tested
Every command below was run on the committed tree (
585ccb4), and the outputs are pasted verbatim.Wis the umbrella worktree:$ W=/home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/dsh-unit3-pod/opencharlyThe 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'sTestKindValueCorpusSweep). The two arms differ in exactly one thing — whichplugin-substratethe test links:plugin-substrate(1e97151: no kind InputDef, so the gate reads the base's#PodValue);plugin-substrate(declaredInputDef, def read from the composed unit).The root, described with the sweeper's own prune list:
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.
Per-kind counts, identical on both arms —
podis 250:The verdict-only projection is byte-identical:
1986
OKand 21FAILon both arms. The full-line diff is not empty and saying so is the point: it is 3 rows (12 diff lines), allFAILon 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: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:
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
Both plants fail on a test ASSERtion, never on a build error, and the restored tree is byte-identical (
sha256sum -cabove) with a cleangit status.The changed paths, executed live
plugin-pod's project is the one that authors a realpod:node, so the secondvalidateis 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
(devel)is the whole point:-buildvcs=falsemeansgo version -mcannot prove a charly COMMIT, andcharly versionis 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, andgit status --shortin this repo was empty before it and after the plants were restored.R10 — the bed that can contain this diff
check-podis the canonical fast pod-runtime bed and it authors a realpod:node (check-pod: pod: {image: check-pod, …}), so it is the bed this move must pass. It lives inplugin-pod, whichcharlycompiles in —charly#1123records that it LEFT charly's tree — so it is reachable, and it was run with the dev binary above on this committed tree:check-liveon 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). Thestatus-shows-podstep (charly status --jsoncontaining"kind": "pod") ran and passed, so the pod kind is not only LOADED through the composed#PodValuebut realized and reported live.plugin-substrate's OWN witness bed ischeck-substrate, and it does not author apod:node at all (a barelocal:template plus a nestedlocal: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 (#LocalValueuntouched).Rulebook compliance
/charly-internals:plugin,:go,:cueand:git-workflowwere loaded before the first code change, andplugin-substrate's ownAGENTS.md(Part II refactor(status): enumerate the ledger via kit, not a second YAML parser #4) before acting in it — it names/charly-internals:pluginfirst and requires the candy entity, the Go source and the schema to move together, which is what this diff does.spec#304's row 3 names the wrong owning plugin: root-caused by measuring the provider table (thekind:podword is built in asubstrateWordsloop, which is why a text grep forWord: "pod"found only the deploy word), fixed here, and the correction is recorded on the tracker. (2)--dev-pluginwith a relative path resolves against the generator's CWD and quotes a path the operator never wrote: non-blocking for this diff, filed asbootstrap-charly.sh --dev-pluginresolves 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 (bedwarnings: 0, bothbox validateruns0 warnings).spec.Pod→spec.ResolvedPodfield-by-field copy is DELETED, not relocated. The per-word declaration is one table besidesubstrateTraits, not a branch.<repo-checkout>form is the documented one — the relative form's behaviour is the filed finding, not a workaround.substrate.cue's "self-contained / references no base def / one file" header,plugin.go'sNewMetadoc and itsspec.Podmention,resolve.go's arm list, andAGENTS.md's canonical-file list.charly box validateis green with zero warnings on the repo's own project, so the documented command works with onlycharly.spec.Podhas 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#304unit 3 legs 2–3), stated on the tracker — not a TODO left inside this leg.git status --shortwas 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-wideinit-submodules.shREFUSED 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.sha256sum -cpasted); the changed paths executed live (unit suite,box validateon this repo AND on the one project that authors apod:node, and the bed); the artifact under test is the COMPOSED schema value the host reads, never a file on disk.charly/bin/charly,2026.317.0159, andgo version -mproves it linksgithub.com/opencharly/plugin-substrate/candy/plugin-substrate (devel)— this repo's unmerged source. No new runtime OS dependency, so nothing to add topackaging:.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-membersPASS).opencharly/spec#304; the tracker stays open until unit 11 lands. The scope is the producer leg only, and itsspecdeletion cannot precede it — the consumer cannot lead its producer.gofmt -lis clean on the module;go vetruns insidego test ./..., which is green.R5 claim-keyed sweep
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: thekind:podgate def keeps its NAME (#PodValue) and its MEANING — proven, 0 verdicts moved over 2,007 bodies on one root — so a project authoring apod:node meets exactly the gate it met before; the served schema only GAINS defs, which the host splices onto the base exactly like the#TunnelConfigtwin it already documents; and the OpResolve pod arm produces a byte-equivalent#ResolvedPod(fields projected,Rawverbatim).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
bootstrap-charly.sh --dev-pluginresolves a relative<repo-checkout>against the generator CWD, and the error quotes a path the operator never wrote charly#1129 —scripts/bootstrap-charly.sh --dev-pluginresolves a RELATIVE<repo-checkout>against the generator's CWD (<repo>/charly/charly) instead of the caller's shell, and the error quotes a path the operator never wrote. Non-blocking for this diff (the absolute form works and is what this leg used); filed with the mechanism, the missed control and the root fix.opencharly/spec#304is 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)