Repository navigation
feat(schema)!: delete the kind:pod body defs the owning plugin now declares - #307
Conversation
…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)
|
STATUS — unit 3 ( Agent: dsh-unit3-legs (DeepSeek Harness, ollama-cloud/deepseek-v4.1-flash) Head Gates on the pushed tree: Zero verdicts moved, one root, both arms: composed 2,004 bodies / pod 250 / 1,984 OK / 20 FAIL before AND after, verdict projection The assembled R10 bed Facts for whichever leg lands next: three of the four consumer breaks are re-measured in the body (plugin-check Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) |
Review — PASSHead SHA: 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). Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…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)
…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]>
Summary
opencharly/spec#304unit 3, leg 2 of 3. Leg 1 moved thekind: podbody into the plugin that actually serves the kind —opencharly/plugin-substrate#32, squash937a9b0, tagv2026.317.0614— and this leg deletes the contract's copy.schema/pod.cueloses#Pod;schema/node.cueloses#PodValue: (#Pod | #DeployValue).#PodSidecarSTAYS, 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.spec.Podand thePodSpec = Podalias inspec/charly_names.goare gone. A secondcharly task cue-genis byte-identical:KindValueDefs9 → 8,#<Word>Valuedefs 10 → 9, top-level kind-body defs 13 → 12.InputDef: "#PodValue"on thekind: podcapability, 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), consultingspec.KindValueDefsonly 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 deletedKindValueDefsentry 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.gois the deletion gate:#Pod/#PodValueabsent, nopodentry inKindValueDefs,#PodSidecarand#ResolvedPodpresent and still wired (a probe carrying one sidecar entry still validates through the envelope), with#CandyValueas 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..agents/skills/pod/SKILL.mdand thecharly.ymlskill-shelf comment both still pointed at thePodSpecGo type. They now name the plugin's ownschema/pod.cuefor the authored body and the contract's#ResolvedPod/#PodSidecarfor what the kernel reads.The consumers this leg breaks, measured before the push
A grep for
spec.Podfinds readers and a grep forspec.PodSpecfinds 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:sdkloaderkit/cue_schema.gocueKindDefs["pod"] = "#Pod", andsharedCueSchema()fail-fasts on an absent def at init (panic: loaderkit: CUE kind "pod": definition #Pod not found)#ResolvedPodsdkvmshared/spec_aliases.go:132PodSpec = spec.PodSpec(an unused alias, still a build failure)plugin-checkcandy/plugin-check/checkproject.go:291var pod spec.Pod, production code compiled intocharly, pluscheckproject_test.go:64spec.ResolvedPodcharlysubstrate_spec_aliases_test.go:11PodSpec = spec.PodSpec(test alias)The chain is producer-first: this leg →
sdk→plugin-check→charly(which bumpsplugin-substrate+spec+sdk+plugin-checkin lockstep and runs the assembled bed).sdkandplugin-checkare 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):
The
charlyone is the same shape as the other two: the alias names a symbol this module no longer declares, so it cannot compile untilcharly's own leg drops it.One latent reader cannot be fixed here and is filed, not narrated:
plugin-substrate's own mergedmainstill marshalsspec.Pod{…}atcandy/plugin-substrate/load_pod_substrate_test.go:275, so itsgo test ./...stops compiling the moment itsspecrequire advances past this tag — opencharly/plugin-substrate#33, which already carries the RCA and the one-line fix.Files (11)
.agents/skills/pod/SKILL.mdPodSpecpointer replaced by the plugin'sschema/pod.cue+ the contract's#ResolvedPod/#PodSidecarcharly.ymlpod.cue → PodSpeccorrected for the same reasoninternal/schemagen/main.goschema/node.cue#PodValuedeleted (and the prose retargeted at the plugin-declared gate)schema/pod.cue#Poddeleted;#PodSidecarkept, with the reason written where it livesschema/resolvedproject.cueschema/substrate_template.cue#ResolvedPod's comment now names the plugin module as the authored body's homespec/charly_names.goPodSpec = Podalias that named the deleted typespec/cue_types_gen.gospec.Podgone)spec/pod_test.gospec/vocab_gen.goKindValueDefslosespod)How tested
Every fence below was executed on the tree this PR publishes, head
da429af, inspecon branchfeat/delete-pod-body.The module's own gate (
AGENTS.md:charly task cue-gen,go test ./..., gofmt, golangci-lint under the declared toolchain):The deletion, asserted (before =
origin/main, after = this head):The plant — red on ASSERTIONS, not a build error. Re-added a
#Podstub plus#PodValue(the exact shape this leg deletes), regenerated so the kind re-registers, ran the gate, restored, and re-hashed:Zero verdicts moved, both arms, one root.
TestKindValueCorpusSweepwalks 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, onecharlytree (the assembled chain: this spec + thesdkretarget +plugin-substrateleg 1), only thespecreplace flipped between arms:The composed (production) arm did not move a single verdict — the verdict projection is byte-identical, and so is the pod-only slice:
The full-line diff is 4 rows, every one
FAILon 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 onevmrow'snode.cue:95becomesnode.cue:103because two defs left the file above it:The
basearm 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: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-podis the canonical fast mechanism bed; it lives inplugin-pod, which IS incharly'scompiled_plugins:, and it authors acheck-pod: pod:entity — so loading its project runs thekind: podVALUE GATE whose def this leg moved. The driver is acharlybuilt from the assembled chain (this spec + thesdkretarget +plugin-substrateleg 1),2026.317.0159: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 thatrepo 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-addis the step that runs this diff's changed path live:charly deploy addvalidates thecheck-pod: pod:node throughvalidateKindValueCUE, which now resolves#PodValuefrom the plugin's DECLARATION, and it passed. The31skipped 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.
specships no disposable target of its own, so this bed runs aplugin-podproject 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 assembledcharlycompiles the deleted base defs out and the pod entity still validates. The bed that runs against the pinned artifacts runs at thecharlyleg, which bumpsplugin-substrate+spec+sdk+plugin-checktogether.Rulebook compliance
/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), plusspec's ownAGENTS.md(Part II feat(spec): CUE-source ResolvedBox/BuilderMap/AggregatedCandyCaps (#55 step3 unit 3a) #4) for this module's gate and tag scheme.plugin-substrate's own test atload_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 acrossschema/*.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.#PodValueis 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#ResolvedPodcites.InputDef— is the producer-side design of this cutover, not a compatibility branch:spec.KindValueDefsremains the fallback for the kinds whose body this module still owns..agents/skills/pod/SKILL.md, thecharly.ymlskill-shelf comment) and one further stale sentence insideschema/substrate_template.cueare corrected in the same diff rather than left to route around it. Nothing here needs anything but thecharlybinary.CHANGELOG/are history.git status --shortwas empty before the first edit and is empty on the pushed tree; the branch is one commit on freshorigin/main; no force-push, no reset, no hook bypass, no direct push tomain.spec/cue_types_gen.go+spec/vocab_gen.goare reproduced byte-identically by a secondcharly task cue-gen, and the production gate's behaviour is measured over 2,004 real authored bodies rather than fixtures (the four-arm sweep).charly(2026.317.0159);specships no binary of its own and no runtime OS dependency is added.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 ASSEMBLEDcheck-podbed 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:
Zero
PodSpechits: the alias is gone fromspec/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: podbodies 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.Podandspec.PodSpecno 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,KindValueDefsregainspod, 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 bumpedplugin-substratewould 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.PodSpecis in the table above, and the twocharlycheckouts that aPodSpec = spec.PodSpecgrep 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
candy/plugin-substrate/load_pod_substrate_test.go:275still marshalsspec.Pod{…}, so that repo'sgo test ./...stops compiling the moment its ownspecrequire advances past this tag. Test-only: its build, its served schema and itskindcapability are clean, which is why the consumer legs do not depend on it. The issue carries the RCA and the one-line fix (decode intospec.ResolvedPod, the same target itsresolve.goalready uses).Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)