Repository navigation
feat(schema)!: import the contract's LLM defs instead of restating them - #60
Conversation
## Summary `schema/pipeline.cue` restated the contract's six LLM definitions as local twins — `#LLMSpec`, `#LLMParams`, `#LLMResponseFormat`, `#LLMReasoning`, `#LLMStreamOptions`, `#LLMNamedToolChoice` — and the generated `params` package carried its own `LLMSpec` / `LLMParams` structs beside them. ONE NAME, ONE HOME: the contract module (`github.com/opencharly/spec/schema`) owns that vocabulary — the shapes the `vision:` check verb authors against, and the defs that generate `spec.LLMSpec` / `spec.LLMParams`, the types the shared SDK `llmkit` client consumes. The schema now IMPORTS them and declares only its own authoring shapes; the local copies, the JSON bridge that translated between the two declarations, and the parity test that existed only to keep the copies honest all retire in the same change (R2). WHY THIS IS THE WAVE 0 UNBLOCKER'S FIRST LEG. `TODO.md` 2.1's target column is "Move each schema into its plugin's CUE module; delete the twins and the echo plugins"; opencharly/opencharly#950 states the mechanism it cannot start without: "not one of those rows can be retired from this repository, and none can be retired at all until the schemas compose by import", with the per-repo unit spelled out — "a `cue.mod/module.cue`, an import of the `spec` package, the local copy deleted from the schema, the parity test retired with it". This is that unit for `plugin-pipeline`. The row's KIND-BODY move (`#Pipeline` out of `spec/schema/pipeline.cue`, and the `#PipelineValue` twin with it) is the NEXT unit in the same chain and is deliberately not attempted here: it needs `sdk/workflowkit` to stop consuming `spec.Pipeline` first (measured below). DECOMPOSITION, measured not asserted. `bash scripts/design-dpat.sh` on the umbrella worktree at `origin/main` (`86281d4`) reads: ```console $ bash scripts/design-dpat.sh design-dpat: 121 pinned modules, 204 CUE files in scope, 1 under a vendor/ tree (foreign mirrors, out of scope) design-dpat: 382 known violations (close 62, absence 86, open 68, opaque 0, dup 19, union 147) — tracked by opencharly/opencharly#945 design-dpat: no new violation, and the census matches the tree ``` The 19 `dup` occurrences are 9 names across 4 repos: ```console $ awk -F'\t' '$2=="dup"{split($1,a,"/"); print a[1]}' design/dpat-baseline.tsv | sort | uniq -c 2 plugin-egress 6 plugin-pipeline 1 plugin-tunnel 10 spec ``` This PR makes 12 of them retirable — the six names × the two sites each name is counted at (this repo's copy and `spec/schema/llm.cue`'s declaration): ```console $ awk -F'\t' '$2=="dup" && ($1 ~ /^plugin-pipeline\// || $1 ~ /^spec\/schema\/llm\.cue$/)' design/dpat-baseline.tsv | wc -l 12 ``` The census FILE is not touched here (`design/dpat-baseline.tsv` and every pin are off-limits to this unit: the pin wave holds the umbrella index and a concurrent unit reads the census), so the umbrella leg — pin bump plus row removal, measured by `--emit-census` — belongs to the pin owner. The remaining census after this unit is 7 occurrences: ```console $ awk -F'\t' '$2=="dup" && !($1 ~ /^plugin-pipeline\// || $1 ~ /^spec\/schema\/llm\.cue$/)' design/dpat-baseline.tsv | wc -l 7 ``` `plugin-egress` 2 names (4 rows — #950 says that pair is DIVERGENT and needs a decision before either copy can go) and `plugin-tunnel` 3 (1 plugin site + 2 `schemaparams` testdata fixtures). The IMPORT leg is 2 of 122 schema-bearing modules done at this tree (the gate counts 121 modules with CUE in scope; the sweep counts 122 by the `schema/` directory predicate, and `spec` is one of them) — this PR is the third. The sweep sources the repo's own module-store resolver — the same one the D-PAT gate uses — and reads each pin from its object store, never from a checkout: ```bash #!/usr/bin/env bash set -uo pipefail ROOT="$PWD"; . "$ROOT/scripts/design-module-store.sh" total=0; withcue=0; importing=0 while read -r sha path; do total=$((total+1)) store=$(design_module_store "$ROOT" "$path") || continue git --git-dir="$store" cat-file -e "$sha^{commit}" 2>/dev/null || continue git --git-dir="$store" ls-tree -r --name-only "$sha" 2>/dev/null | grep -qE '(^|/)schema/.*\.cue$' || continue withcue=$((withcue+1)) git --git-dir="$store" grep -l -F 'import "github.com/opencharly/spec/schema"' "$sha" \ -- '*/schema/*.cue' 'schema/*.cue' >/dev/null 2>&1 && importing=$((importing+1)) done < <(git ls-files --stage | awk '$1=="160000"{print $2, $4}') echo "pinned submodules: $total"; echo "with a schema/*.cue dir: $withcue" echo "importing github.com/opencharly/spec/schema: $importing" ``` ```console $ bash /tmp/measure-modules.sh pinned submodules: 409 with a schema/*.cue dir: 122 importing github.com/opencharly/spec/schema: 3 $ cat /tmp/modules-importing.txt plugin-tunnel plugin-vision spec ``` `spec`'s hit is `spec/schemaparams/testdata/import/schema/tunnel.cue` — a fixture, not the schema itself — so the plugin-repo count is 2 (`plugin-tunnel`, `plugin-vision`), and this change makes 3. The KIND leg is 0 of 11 done at this tree — 11 is the host-value-gated set (`spec.KindValueDefs`), and the `#*Value` definitions are 12 because `#DeployValue` is the shared disjunct: ```console $ sed -n '/var KindValueDefs = map/,/^}/p' spec/spec/vocab_gen.go | grep -c '"' 11 $ grep -rhoE '^#[A-Za-z]+Value:' spec/schema/*.cue | sort -u | wc -l 12 ``` A `grep` over every plugin module finds no kind body in any of them, while the same pattern fires in `spec`: ```console $ grep -rl '^#Candy:' --include='*.cue' plugin-*/*/plugin-*/schema/ | wc -l 0 $ grep -rl '^#Candy:' --include='*.cue' spec/schema/ spec/schema/candy.cue ``` | File | What changed | |---|---| | `.github/workflows/ci.yml` | the `cat`+`cue exp gengotypes` reproduction step (impossible over an import) replaced by the in-process test | | `AGENTS.md` | the canonical-files list and the modify rule name the reproduction test and the import | | `README.md` | the SDD paragraph names the import | | `candy/plugin-pipeline/agent.go` | the stage `llm` parameter is `spec.LLMSpec` | | `candy/plugin-pipeline/entity_llm_test.go` | the entity `llm` field is `spec.LLMSpec` | | `candy/plugin-pipeline/go.mod` | `spec` → `v0.2026315.2118`, `sdk` → `v0.2026315.2134` (both merged tags); `cuelang.org/go` direct | | `candy/plugin-pipeline/go.sum` | the hashes for those requirements and their transitive set | | `candy/plugin-pipeline/llm.go` | `resolveLLM` reads `spec.LLMSpec` directly; `toSpecLLM` and its JSON round-trip deleted | | `candy/plugin-pipeline/llm_conformance_test.go` | the same type move; `resolveLLM` no longer returns an error; the bridge's error-path test retires with the bridge | | `candy/plugin-pipeline/llm_live_test.go` | the same type move in the live arm | | `candy/plugin-pipeline/params/cue_types_gen.go` | regenerated by `charly candy params` (in-process): the two local LLM structs gone, `Llm spec.LLMSpec`, canonical yaml+json tags | | `candy/plugin-pipeline/params_repro_test.go` | NEW: the committed params are current, and a second in-process generation is byte-identical | | `candy/plugin-pipeline/schema/pipeline.cue` | imports `github.com/opencharly/spec/schema`; the six `#LLM*` definitions deleted; `#PipelineAgentInput.llm` is `schema.#LLMSpec` | | `candy/plugin-pipeline/schema_parity_test.go` | DELETED: it guarded a copy that no longer exists | | `candy/plugin-pipeline/schema_test.go` | NEW: serve/host composition, the six-names-absent assertion, the 6/10 fixture, the import-is-live proof, the unserved-import anti-experiment, the compile-time type identity | | `candy/plugin-pipeline/verb_env.go` | the run context's `llm` field is `spec.LLMSpec` | | `candy/plugin-pipeline/verb_input_defs_test.go` | keeps the bounded def-field parser the parity test used to own (its frozen-field lock still applies) | ## How tested Evidence fence — session descriptor and harness version: ```console $ dsh --version 0.2.1-rc.2 ``` DeepSeek Harness session `e2ca1e82-6472-45d1-bb3b-55ab1eb5641f` (profile `web`), model `ollama-cloud/deepseek-v4.1-flash`, umbrella worktree `.worktrees/dsh-wave0-21/opencharly` off fresh `origin/main` (`86281d4`), host `lo`, 2026-11-12. The charly binary used for every gate is the worktree-local CalVer build `2026.315.2219` (R9), never a shared install. ### 1. The schema composes at BOTH contract boundaries, and the copies are gone ```console $ cd candy/plugin-pipeline $ go test -run 'TestServedSchema|TestAgentInputFixture|TestImportIsEnforced|TestUnservedImport|TestParamsTypes|TestVerbInputDefs|TestGeneratedParams' -v . === RUN TestGeneratedParamsAreCurrentAndReproducible --- PASS: TestGeneratedParamsAreCurrentAndReproducible (0.19s) === RUN TestServedSchemaLoadsAndCarriesTheImport --- PASS: TestServedSchemaLoadsAndCarriesTheImport (0.12s) === RUN TestAgentInputFixtureJudgedIdenticallyByBothHalves schema_test.go:286: fixture: 6 accepted, 10 rejected, both halves identical --- PASS: TestAgentInputFixtureJudgedIdenticallyByBothHalves (0.15s) === RUN TestImportIsEnforcedByTheImportedDefinition --- PASS: TestImportIsEnforcedByTheImportedDefinition (0.04s) === RUN TestUnservedImportFailsLoudly --- PASS: TestUnservedImportFailsLoudly (0.00s) === RUN TestParamsTypesAreTheContractTypes --- PASS: TestParamsTypesAreTheContractTypes (0.00s) === RUN TestVerbInputDefsFrozenFields --- PASS: TestVerbInputDefsFrozenFields (0.00s) === RUN TestVerbInputDefsArePrefixed --- PASS: TestVerbInputDefsArePrefixed (0.00s) PASS ok github.com/opencharly/plugin-pipeline/candy/plugin-pipeline 0.523s ``` `TestServedSchemaLoadsAndCarriesTheImport` composes the schema the way each half of the contract does — SERVE: `NewMeta().Describe` → `sdk.BuildCapabilities` → `schemacompose.ServedSchema`; HOST: the `Capabilities.schema_cue` body composed by `schemacompose.ServedText` (the same function charly's `registerPluginUnitSchema` runs) — and asserts the plugin's OWN defs are present while the six imported names are DECLARED NOWHERE in either unit. `TestUnservedImportFailsLoudly` is the anti-experiment: an import of a module the contract does not serve fails the compose naming the unresolvable package and the schema file it judged (`import failed: /opencharly/plugin-schema/schema/plugin.cue:3:8: cannot find package "github.com/opencharly/not-a-served-module"`), which is the start-up failure a bad import produces. `go test ./...` (the whole suite, live LLM arm included) ends `ok ... 7.391s`. ### 2. Zero verdicts moved on the authored documents, both directions The fixture is the repo's own authored agent-stage documents (every `llm:` field, the `outputs`/`cache`/`redo`/`skills` blocks) plus the shapes it must reject. The committed test pins it at 6 accepted / 10 rejected, and the SAME fixture was judged against `origin/main`'s schema body and this change's body by one throwaway harness (not committed) that calls the same `schemacompose.ServedText` the host uses: ```go unit, _ := schemacompose.ServedText(nil, string(body)) def := unit.LookupPath(cue.ParsePath("#PipelineAgentInput")) verdict := "ACCEPT" if err := def.Unify(cuecontext.New().CompileBytes([]byte(doc))).Validate(cue.Concrete(true)); err != nil { verdict = "REJECT" } ``` ```console $ git show origin/main:candy/plugin-pipeline/schema/pipeline.cue > /tmp/pipeline-before.cue $ go run . /tmp/pipeline-before.cue > /tmp/verdicts-before.txt $ go run . /tmp/pipeline-after.cue > /tmp/verdicts-after.txt $ diff /tmp/verdicts-before.txt /tmp/verdicts-after.txt && echo "ZERO VERDICTS MOVED" ZERO VERDICTS MOVED $ cat /tmp/verdicts-after.txt minimal agent stage ACCEPT entity llm block ACCEPT full params ACCEPT outputs+tools+skills+cache+redo ACCEPT empty llm block ACCEPT connection knobs ACCEPT missing prompt REJECT unknown input key REJECT unknown llm key REJECT string max_retries REJECT temperature out of range REJECT bad reasoning_effort REJECT string prompt REJECT max_turns zero REJECT unknown output type REJECT string tools REJECT ``` ### 3. The params are the schema's artifact — current, and byte-identical on a second run ```console $ ../charly/bin/charly candy params plugin-pipeline --check charly candy params: /home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/dsh-wave0-21/opencharly/plugin-pipeline/candy/plugin-pipeline/params/cue_types_gen.go is current $ cp candy/plugin-pipeline/params/cue_types_gen.go /tmp/params-run1.go $ ../charly/bin/charly candy params plugin-pipeline $ cmp -s /tmp/params-run1.go candy/plugin-pipeline/params/cue_types_gen.go && echo IDENTICAL IDENTICAL ``` The committed projection is now what the CANONICAL pipeline produces, which resolves #35: the old `ci.yml` step was a `cat` + `cue exp gengotypes` and therefore reproduced the json-only tags, while `spec/schemaparams.Generate` runs the tag-normalization step too. The yaml keys are unchanged (each explicit `yaml:"<snake_case>"` tag equals what yaml.v3's lowercasing of the Go field already produced), so no yaml read path changes behaviour. ### 4. The repo gate, the structural gate, and the R10 bed ```console $ gofmt -l . # empty $ go vet ./... # rc=0, no output $ go test ./... ok github.com/opencharly/plugin-pipeline/candy/plugin-pipeline 7.391s $ ../charly/bin/charly box validate charly box validate: OK — checked 3 candies, 1 deploy, 7 distros, 7 builders; 0 warnings, 0 errors ``` `charly box validate` does NOT compile the served schema (spec#301), which is why the committed contract test above is the proof; the validate run here shows the real binary's load gate composing the importing schema in a live process. ```console $ CHARLY_PLUGIN_DIR=/tmp/pp-baked CHARLY_PLUGIN_ONLY=1 ../charly/bin/charly check run check-pipeline-local charly check run check-pipeline-local: [deploy-add] PASS after 4.854s (log: .check/check-pipeline-local/2026.316.0859/deploy-add.log) charly check run check-pipeline-local: [bring-up-members] PASS after 1ms charly check run check-pipeline-local: [check-live] PASS after 1m11.554s (log: .check/check-pipeline-local/2026.316.0859/check-live.log) charly check run check-pipeline-local: [update] PASS after 3.963s (log: .check/check-pipeline-local/2026.316.0859/update.log) charly check run check-pipeline-local: [cleanup] PASS after 4.047s (log: .check/check-pipeline-local/2026.316.0859/cleanup.log) charly check run check-pipeline-local: [cleanup-members] PASS after 0s charly check run check-pipeline-local: PASS (steps=6) — repo override active (CHARLY_REPO_OVERRIDE=github.com/opencharly/opencharly=/home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/dsh-wave0-21/opencharly): verdict is about the LOCAL tree, not the PR head $ grep -E '^[0-9]+ steps:' /tmp/pp-check-evidence2/2026.316.0859/check-live.log # the run's own log, copied out 15 steps: 15 passed, 0 failed, 0 skipped ``` The `/tmp/pp-baked` directory is the DOCUMENTED baked-plugin shape (`plugin-pipeline` + `plugin-lobster` binaries, each beside a `<name>.providers` manifest). Without it the bed is 0/15 on a from-source driver: its steps each create a bare temp project, so the `pipeline` kind must reach the parse-time kind set through a COMPILED-IN or BAKED provider, and a from-source charly compiles neither in (it resolved `command:pipeline` from the plugin catalog at the released `v2026.251.2226`, which no longer registers `kind:pipeline` against this charly). That is the mechanism #56 already records for the engine half; this run confirms and extends it to the front-end half, and the evidence is added to that issue. ### 5. Blast radius — measured, with a live control ```console $ grep -rn "plugin-pipeline/candy/plugin-pipeline/params" charly sdk spec marketplace --include='*.go' | wc -l 0 $ grep -rn "github.com/opencharly/plugin-candy/candy/plugin-candy" charly sdk --include='*.go' | wc -l 3 $ grep -c "plugin-pipeline" charly/charly/plugins_generated.go 0 ``` ## Rulebook compliance - **R0** — loaded `/charly-internals:plugin`, `/charly-internals:go`, `/charly-pipeline:pipeline` (the candy's own projected skill, per this repo's `AGENTS.md`), `/charly-check:check` and `/charly-internals:git-workflow` before the first edit and before any git/PR action. - **R1** — the first bed run failed 15/15 and was root-caused BEFORE remediation: the mechanism is the one in §4 (no compiled-in/baked provider in a bare temp project), not the diff — the failing dispatch named the released `plugin-pipeline:v2026.251.2226`, a binary this tree does not produce. Missed control: the bed's doc block says the R10 host supplies the plugins, so no local recipe named the bake. Blast radius: anyone running the bed from a from-source driver. Root fix here: run it with the documented bake; the bed's own composition is already filed as #56 and is not this diff's scope. Zero warnings in every gate below. - **R2** — the six restated definitions, their generated structs, the `toSpecLLM` JSON bridge between the two declarations, and the parity test that existed only to keep the copies honest are all DELETED; `params.PipelineAgentInput.Llm` IS `spec.LLMSpec`, asserted at compile time. - **R3** — no workaround: the params are produced by the canonical pipeline (`spec/schemaparams.Generate`, the same function `charly candy params` calls), and the baked-plugin run is the documented `bake_plugin:` shape (`<binary>` + `<binary>.providers` under `CHARLY_PLUGIN_DIR`), not a bypass. The CI step that `cat`+`cue exp gengotypes`'d the schema is deleted because it CANNOT judge an importing schema (the `cue` CLI resolves modules only through an OCI registry). - **R4** — product first: the schema and the Go moved, and `README.md` / `AGENTS.md` were corrected in the same change (the SDD paragraph now names the import; the canonical-files list names the in-process reproduction test). `charly candy params plugin-pipeline` needs nothing but the binary and works. - **R5** — deleted completely, with the grep: the six `#LLM*` defs, the two exported `params` types, `toSpecLLM` + its error-path test, `schema_parity_test.go`, and the `cue`/`gengotypes` CI step. `grep -rn 'params\.LLM' candy/plugin-pipeline/*.go` returns nothing, and `grep -n '^#LLM' schema/pipeline.cue` returns nothing. - **R6** — `git status --short` was clean of foreign work before staging (the bed's untracked `.check/` was removed, not committed); branch off fresh `origin/main` (`6ff0d06`); no force-push, no bypass, no other repo touched. - **R7** — the coverage FAILS without the change: the contract test asserts the six names are declared nowhere and the import is in the wire body (a re-added copy turns it red), the params test fails on a stale projection, and the fixture judges the real composed value at both boundaries. Emitted artifacts are validated at their boundary: the `.cue` composes, the generated `.go` compiles and is byte-identical on a second run, the served `schema_cue` is judged by the host's own compose. - **R8** — no live service is invented: the repo's existing live LLM arm ran LIVE in the suite (the local ollama answered `PONG` / `READY` / `17 × 23 = 391` through the shared `llmkit` client), and nothing was mocked to make it pass. - **R9** — every gate ran on the worktree-local CalVer build `2026.315.2219` (`charly/bin/charly` in this worktree); no OS dependency changed. - **R10** — the repo's own `disposable: true` bed `check-pipeline-local` ran the full sequence (build → check → deploy → check live → fresh `charly update` → teardown) on the committed tree: **15 steps, 15 passed, 0 failed, 0 skipped**. ## Change classification **Code** — a CUE schema, a generated Go file, Go source, three test files (one deleted, two added), the repo's CI reproduction step, and the two docs that describe the schema. Deletes two exported types from `.../candy/plugin-pipeline/params` and the six definitions that produced them. **Breaking change + rollback:** a Go consumer of `github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/params` moves from `params.LLMSpec` / `params.LLMParams` to `spec.LLMSpec` / `spec.LLMParams` — the types the wire and the loader already carried. The scope is measured, not asserted: `grep -rn "plugin-pipeline/candy/plugin-pipeline/params" charly sdk spec marketplace --include='*.go'` returns 0, the same grep for a compiled-in plugin's params (`plugin-candy`) returns 3 as the live control, and this plugin is not in `compiled_plugins:` (`grep -c plugin-pipeline charly/charly/plugins_generated.go` → 0), so the only importer is this repo's own code, updated here. No candy author sees a difference: the accepted/rejected document set is unchanged (6 accept / 10 reject, zero verdicts moved) and the JSON keys are identical. Undoing it means dropping this one squash commit, which brings the copy, the bridge and the parity test back together — there is no partial state, because the params file is regenerated from the schema in one step. ## Filed issues - **#35** — RESOLVED by this change: the committed params now reproduce from the canonical pipeline, which includes the tag-normalization step, so `charly candy params plugin-pipeline --check` is green. This is the issue's option (a); the `@go(...)` name compensations it mentions stay (they are harmless and the yaml keys are unchanged). - **#56** — evidence comment added: the bed's engine leg needs `plugin-lobster` supplied, AND its front-end leg needs `plugin-pipeline` supplied, on a from-source driver; with both baked the same bed is 15/15. *Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)*
Review — BLOCKHead SHA: Change class: code (CUE schema + generated Go + Go source + tests + CI + docs), in the Security screen: PASS — no secrets/egress, no scope mismatch (every diff file is accounted for in the body's table), the CI step is replaced with an equivalent in-process reproduction, not a weakened gate, and this repo is not the validator/rulebook. Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS — round 1 BLOCK read in full; both findings are fixed and they share ONE missed control. RCA (R1). Mechanism — the body ASSERTED two command-backed claims instead of pasting them: R5's removal sweep ("returns nothing") and the R9/R10 fresh-rebuild provenance (no No code change is needed — the tree is unchanged; the body is updated and the failed run re-run on the same head. Agent: dsh-wave0-21 |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no scope mismatch (all 17 diff files accounted for in the body table), the Checklist: All applicable rules PASS or NA. Placement: CORRECT (plugin imports the contract's vocabulary; Comments considered:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
schema/pipeline.cuerestated the contract's six LLM definitions as local twins —#LLMSpec,#LLMParams,#LLMResponseFormat,#LLMReasoning,#LLMStreamOptions,#LLMNamedToolChoice— and the generatedparamspackagecarried its own
LLMSpec/LLMParamsstructs beside them. ONE NAME, ONE HOME: thecontract module (
github.com/opencharly/spec/schema) owns that vocabulary — theshapes the
vision:check verb authors against, and the defs that generatespec.LLMSpec/spec.LLMParams, the types the shared SDKllmkitclient consumes.The schema now IMPORTS them and declares only its own authoring shapes; the local
copies, the JSON bridge that translated between the two declarations, and the parity
test that existed only to keep the copies honest all retire in the same change (R2).
WHY THIS IS THE WAVE 0 UNBLOCKER'S FIRST LEG.
TODO.md2.1's target column is"Move each schema into its plugin's CUE module; delete the twins and the echo
plugins"; opencharly/opencharly#950 states the mechanism it cannot start without:
"not one of those rows can be retired from this repository, and none can be retired
at all until the schemas compose by import", with the per-repo unit spelled out — "a
cue.mod/module.cue, an import of thespecpackage, the local copy deleted fromthe schema, the parity test retired with it". This is that unit for
plugin-pipeline. The row's KIND-BODY move (#Pipelineout ofspec/schema/pipeline.cue, and the#PipelineValuetwin with it) is the NEXT unitin the same chain and is deliberately not attempted here: it needs
sdk/workflowkitto stop consuming
spec.Pipelinefirst, and the host's kind value gate to read thecomposed unit rather than
specalone. Both are measured, and the whole chain iswritten down in opencharly/spec#304 so the next session starts from the list instead
of re-deriving it:
DECOMPOSITION, measured not asserted.
bash scripts/design-dpat.shon the umbrellaworktree at
origin/main(86281d4) reads:The 19
dupoccurrences are 9 names across 4 repos:This PR makes 12 of them retirable — the six names × the two sites each name is
counted at (this repo's copy and
spec/schema/llm.cue's declaration):The census FILE is not touched here (
design/dpat-baseline.tsvand every pin areoff-limits to this unit: the pin wave holds the umbrella index and a concurrent unit
reads the census), so the umbrella leg — pin bump plus row removal, measured by
--emit-census— belongs to the pin owner. The remaining census after this unit is7 occurrences:
plugin-egress2 names (4 rows — #950 says that pair is DIVERGENT and needs adecision before either copy can go) and
plugin-tunnel3 (1 plugin site + 2schemaparamstestdata fixtures). The KIND half of 2.1 — 11 kinds, 0 done — istracked with its per-kind dependency order in opencharly/spec#304; it is a chain of
ordered units, not one change.
The IMPORT leg is 2 of 122 schema-bearing modules done at this tree (the gate counts
121 modules with CUE in scope; the sweep counts 122 by the
schema/directory predicate,and
specis one of them) — this PR is the third. The sweep sources the repo's own module-store resolver — the same one theD-PAT gate uses — and reads each pin from its object store, never from a checkout:
spec's hit isspec/schemaparams/testdata/import/schema/tunnel.cue— a fixture,not the schema itself — so the plugin-repo count is 2 (
plugin-tunnel,plugin-vision), and this change makes 3.The KIND leg is 0 of 11 done at this tree — 11 is the host-value-gated set
(
spec.KindValueDefs), and the#*Valuedefinitions are 12 because#DeployValueis the shared disjunct:
A
grepover every plugin module finds no kind body in any of them, while the same pattern fires inspec:.github/workflows/ci.ymlcat+cue exp gengotypesreproduction step (impossible over an import) replaced by the in-process testAGENTS.mdREADME.mdcandy/plugin-pipeline/agent.gollmparameter isspec.LLMSpeccandy/plugin-pipeline/entity_llm_test.gollmfield isspec.LLMSpeccandy/plugin-pipeline/go.modspec→v0.2026315.2118,sdk→v0.2026315.2134(both merged tags);cuelang.org/godirectcandy/plugin-pipeline/go.sumcandy/plugin-pipeline/llm.goresolveLLMreadsspec.LLMSpecdirectly;toSpecLLMand its JSON round-trip deletedcandy/plugin-pipeline/llm_conformance_test.goresolveLLMno longer returns an error; the bridge's error-path test retires with the bridgecandy/plugin-pipeline/llm_live_test.gocandy/plugin-pipeline/params/cue_types_gen.gocharly candy params(in-process): the two local LLM structs gone,Llm spec.LLMSpec, canonical yaml+json tagscandy/plugin-pipeline/params_repro_test.gocandy/plugin-pipeline/schema/pipeline.cuegithub.com/opencharly/spec/schema; the six#LLM*definitions deleted;#PipelineAgentInput.llmisschema.#LLMSpeccandy/plugin-pipeline/schema_parity_test.gocandy/plugin-pipeline/schema_test.gocandy/plugin-pipeline/verb_env.gollmfield isspec.LLMSpeccandy/plugin-pipeline/verb_input_defs_test.goHow tested
Evidence fence — session descriptor and harness version:
DeepSeek Harness session
e2ca1e82-6472-45d1-bb3b-55ab1eb5641f(profileweb),model
ollama-cloud/deepseek-v4.1-flash, umbrella worktree.worktrees/dsh-wave0-21/opencharlyoff freshorigin/main(86281d4), hostlo,2026-11-12. The charly binary used for every gate is the worktree-local CalVer build
2026.315.2219(R9), never a shared install.1. The schema composes at BOTH contract boundaries, and the copies are gone
TestServedSchemaLoadsAndCarriesTheImportcomposes the schema the way each half ofthe contract does — SERVE:
NewMeta().Describe→sdk.BuildCapabilities→schemacompose.ServedSchema; HOST: theCapabilities.schema_cuebody composed byschemacompose.ServedText(the same function charly'sregisterPluginUnitSchemaruns) — and asserts the plugin's OWN defs are present while the six imported names
are DECLARED NOWHERE in either unit.
TestUnservedImportFailsLoudlyis theanti-experiment: an import of a module the contract does not serve fails the compose
naming the unresolvable package and the schema file it judged
(
import failed: /opencharly/plugin-schema/schema/plugin.cue:3:8: cannot find package "github.com/opencharly/not-a-served-module"), which is the start-up failure a badimport produces.
go test ./...(the whole suite, live LLM arm included) endsok ... 7.391s.2. Zero verdicts moved on the authored documents, both directions
The fixture is the repo's own authored agent-stage documents (every
llm:field, theoutputs/cache/redo/skillsblocks) plus the shapes it must reject. Thecommitted test pins it at 6 accepted / 10 rejected, and the SAME fixture was judged
against
origin/main's schema body and this change's body by one throwaway harness(not committed) that calls the same
schemacompose.ServedTextthe host uses:3. The params are the schema's artifact — current, and byte-identical on a second run
The committed projection is now what the CANONICAL pipeline produces, which resolves
#35: the old
ci.ymlstep was acat+cue exp gengotypesand therefore reproduced the json-only tags, whilespec/schemaparams.Generateruns the tag-normalization step too. The yaml keys areunchanged (each explicit
yaml:"<snake_case>"tag equals what yaml.v3's lowercasingof the Go field already produced), so no yaml read path changes behaviour.
4. The repo gate, the structural gate, and the R10 bed
charly box validatedoes NOT compile the served schema (spec#301), which is why thecommitted contract test above is the proof; the validate run here shows the real
binary's load gate composing the importing schema in a live process.
The
/tmp/pp-bakeddirectory is the DOCUMENTED baked-plugin shape (plugin-pipelineplugin-lobsterbinaries, each beside a<name>.providersmanifest). Without itthe bed is 0/15 on a from-source driver: its steps each create a bare temp project,
so the
pipelinekind must reach the parse-time kind set through a COMPILED-IN orBAKED provider, and a from-source charly compiles neither in (it resolved
command:pipelinefrom the plugin catalog at the releasedv2026.251.2226, which no longer registerskind:pipelineagainst this charly).That is the mechanism test(bed):
check-pipeline-localdoc block defers a plugin-lobster pin that has shipped (three releases), so 7 of 15 steps fail on a merged-charly driver #56 already records for the enginehalf; this run confirms and extends it to the front-end half, and the evidence is
added to that issue.
The REMOVAL SWEEP R5 claims, run on the committed tree (grep's
rc=1IS the emptyresult — there is no output to show, so the exit code is the evidence):
5. Fresh-rebuild provenance (R9) and the bed's run directory (R10)
The driver every gate ran on is the worktree-local build, and its stamp is pasted:
The bed's own
summary.ymlnames that driver, and it also explains the OTHER CalVer inthe evidence paths:
2026.316.0859is the check RUN's directory (a timestamp), not abuild. The two are different things and both are pasted here rather than conflated:
The plugin binary the bed actually exercised is a FRESH build from the committed tree
(
75d6df09b), and its identity matches the line the bed logged when it served it — sothe bed ran this diff's schema, not a cached one:
6. Blast radius — measured, with a live control
Rulebook compliance
/charly-internals:plugin,/charly-internals:go,/charly-pipeline:pipeline(the candy's own projected skill, per this repo'sAGENTS.md),/charly-check:checkand/charly-internals:git-workflowbefore thefirst edit and before any git/PR action.
mechanism is the one in §4 (no compiled-in/baked provider in a bare temp project),
not the diff — the failing dispatch named the released
plugin-pipeline:v2026.251.2226, a binary this tree does not produce. Missedcontrol: the bed's doc block says the R10 host supplies the plugins, so no local
recipe named the bake. Blast radius: anyone running the bed from a from-source
driver. Root fix here: run it with the documented bake; the bed's own composition
is already filed as test(bed):
check-pipeline-localdoc block defers a plugin-lobster pin that has shipped (three releases), so 7 of 15 steps fail on a merged-charly driver #56 and is not this diff's scope. Zero warnings inevery gate below.
toSpecLLMJSONbridge between the two declarations, and the parity test that existed only to keep
the copies honest are all DELETED;
params.PipelineAgentInput.LlmISspec.LLMSpec, asserted at compile time.(
spec/schemaparams.Generate, the same functioncharly candy paramscalls), andthe baked-plugin run is the documented
bake_plugin:shape (<binary>+<binary>.providersunderCHARLY_PLUGIN_DIR), not a bypass. The CI step thatcat+cue exp gengotypes'd the schema is deleted because it CANNOT judge animporting schema (the
cueCLI resolves modules only through an OCI registry).README.md/AGENTS.mdwere corrected in the same change (the SDD paragraph now names the import; the
canonical-files list names the in-process reproduction test).
charly candy params plugin-pipelineneeds nothing but the binary and works.#LLM*defs, the two exportedparamstypes,toSpecLLM+ its error-path test,schema_parity_test.go, and thecue/gengotypesCI step. The claim-keyed sweep is pasted in §4 (both greps exit 1with no output).
git status --shortwas clean of foreign work before staging (the bed'suntracked
.check/was removed, not committed); branch off freshorigin/main(
6ff0d06); no force-push, no bypass, no other repo touched.names are declared nowhere and the import is in the wire body (a re-added copy turns
it red), the params test fails on a stale projection, and the fixture judges the
real composed value at both boundaries. Emitted artifacts are validated at their
boundary: the
.cuecomposes, the generated.gocompiles and is byte-identicalon a second run, the served
schema_cueis judged by the host's own compose.the suite (the local ollama answered
PONG/READY/17 × 23 = 391through theshared
llmkitclient), and nothing was mocked to make it pass.2026.315.2219(
charly/bin/charlyin this worktree); no OS dependency changed.disposable: truebedcheck-pipeline-localran the fullsequence (build → check → deploy → check live → fresh
charly update→ teardown)on the committed tree: 15 steps, 15 passed, 0 failed, 0 skipped.
Change classification
Code — a CUE schema, a generated Go file, Go source, three test files (one deleted,
two added), the repo's CI reproduction step, and the two docs that describe the
schema. Deletes two exported types from
.../candy/plugin-pipeline/paramsand the six definitions that produced them.Breaking change + rollback: a Go consumer of
github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/paramsmoves fromparams.LLMSpec/params.LLMParamstospec.LLMSpec/spec.LLMParams— thetypes the wire and the loader already carried. The scope is measured, not asserted:
grep -rn "plugin-pipeline/candy/plugin-pipeline/params" charly sdk spec marketplace --include='*.go'returns 0, the same grep for a compiled-in plugin's params(
plugin-candy) returns 3 as the live control, and this plugin is not incompiled_plugins:(grep -c plugin-pipeline charly/charly/plugins_generated.go→ 0), so the only importer is this repo's own code, updated here. No candy author
sees a difference: the accepted/rejected document set is unchanged (6 accept / 10
reject, zero verdicts moved) and the JSON keys are identical. Undoing it means
dropping this one squash commit, which brings the copy, the bridge and the parity
test back together — there is no partial state, because the params file is
regenerated from the schema in one step.
Filed issues
now reproduce from the canonical pipeline, which includes the tag-normalization
step, so
charly candy params plugin-pipeline --checkis green. This is theissue's option (a); the
@go(...)name compensations it mentions stay (they areharmless and the yaml keys are unchanged).
check-pipeline-localdoc block defers a plugin-lobster pin that has shipped (three releases), so 7 of 15 steps fail on a merged-charly driver #56 — evidence comment added: the bed's engine legneeds
plugin-lobstersupplied, AND its front-end leg needsplugin-pipelinesupplied, on a from-source driver; with both baked the same bed is 15/15.
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)