Skip to content

feat(schema)!: declare the kind:pipeline body here and move the lowering into this repo - #63

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

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

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Leg 2 of unit 1's five-leg decomposition (TODO.md 2.1, tracker opencharly/spec#304, row 1). A kind body belongs with the plugin that serves the kind, so the kind: pipeline entity body moves out of the contract module into this repo's own CUE module — and the pipeline-kind machinery (ValidatePipeline, Lower, the graph renderers) moves into a repo-local workflowkit.

The five legs, and where they stand: 1 opencharly/sdk#501 (export the plan-ref steps) landed → 1.5 opencharly/charly#1124 (the kind-value gate unifies with the def as receiver, so a schema.#… reference inside a SERVED def resolves; merge-time tag v2026.316.1711) landed → 2 this PR → 3 sdk deletes the moved lowering → 4 spec deletes the #Pipeline* body defs. #PipelineClassRoutes deliberately STAYS in spec: it is a table over that module's own #ProviderClassNames and only its vocabulary generator can extract it.

The branch base is already current origin/main, and no pin bump was needed for charly — measured, not assumed:

$ git rev-list --left-right --count origin/main...HEAD
0	1
$ grep -c 'opencharly/charly' candy/plugin-pipeline/go.mod
0

This repo declares no charly dependency anywhere (no go.mod require, no gitlink; the root charly.yml is its own project manifest, not a pin), so "carries charly v2026.316.1711" is not a pinning question for it: v2026.316.1711 is the driver the witness and the bed ran on, built worktree-locally from origin/main. The umbrella's charly gitlink is untouched (c3f4769, v2026.316.1207) — nothing in this diff needs it, and a pin is not this PR's to move.

The two pins this repo DOES declare are both at the content their upstream serves:

$ git -C <sdk checkout> rev-parse 'v0.2026316.1524^{commit}'
e91e784332ae4e33b375891deae6b2d5cc84e565
$ git -C <sdk checkout> rev-parse origin/main
bbafb5fa91103c2282a0996849a37d9f025b3777

The sdk pin had to move: the lowering calls PlanRefs/RewritePlanRefs, which opencharly/sdk#501 exported. The spec pin was already v0.2026315.2118 and did not move — the parked draft's commit message said it moved; that clause was false and is corrected in this head.

Head of this PR:

$ git rev-parse HEAD
fcf98fa719d9b789f5535956e11b30eef313c651

What changed

  • schema/pipeline.cue now declares #Pipeline, #PipelineValue and the step/trigger/flow helpers, plus _onError/_onErrorWord (they travel with #PipelineFlow). External references stay the contract module's and become schema.-prefixed — #StrVal, #Step, #TaskParamSpec, #WorkflowArgVal — shared with kind: task, a candy plan and the workflow wire, so a pipeline body and the plan it lowers to cannot disagree. This is the same one-name-one-home rule opencharly/plugin-pipeline#60 applied to the six LLM defs.
  • The kind capability already declared InputDef: "#PipelineValue" (plugin.go), so the host resolves the gate through the provider's declaration and carries no knowledge of the kind.
  • workflowkit/ now holds validate.go, lower.go, graph.go, their tests and testdata/, moved from sdk/workflowkit with a mechanical retype: spec.Pipeline* → params.Pipeline*, the kind-blind helpers called as sdkworkflowkit.*, and no logic touched — which the byte-identical goldens below prove.
  • params/cue_types_gen.go is regenerated in process by spec/schemaparams.Generate (the same function charly candy params calls); TestGeneratedParamsAreCurrentAndReproducible proves the committed file reproduces and that a second run is byte-identical.
  • The docs follow the code: AGENTS.md, README.md, the repo's own pipeline-skill: source, the candy description, the root charly.yml, and every code comment that named the old home or sdk/workflowkit. Two comments the move made stale (spec/schema/pipeline.cue named as #PipelineInput's home) are corrected here — that is this diff's own R1 finding, fixed rather than filed.

Files (exactly the diff)

$ git diff --name-only origin/main...HEAD
.agents/skills/pipeline/SKILL.md
AGENTS.md
README.md
candy/plugin-pipeline/charly.yml
candy/plugin-pipeline/cli.go
candy/plugin-pipeline/cli_workflow_test.go
candy/plugin-pipeline/entity.go
candy/plugin-pipeline/go.mod
candy/plugin-pipeline/go.sum
candy/plugin-pipeline/params/cue_types_gen.go
candy/plugin-pipeline/plugin.go
candy/plugin-pipeline/schema/pipeline.cue
candy/plugin-pipeline/workflowkit/graph.go
candy/plugin-pipeline/workflowkit/graph_test.go
candy/plugin-pipeline/workflowkit/lower.go
candy/plugin-pipeline/workflowkit/lower_test.go
candy/plugin-pipeline/workflowkit/testdata/charly-step.charly.yml.golden
candy/plugin-pipeline/workflowkit/testdata/charly-step.workflow.lobster.golden
candy/plugin-pipeline/workflowkit/testdata/e2e.charly.yml.golden
candy/plugin-pipeline/workflowkit/testdata/e2e.workflow.lobster.golden
candy/plugin-pipeline/workflowkit/testdata/nested.charly.yml.golden
candy/plugin-pipeline/workflowkit/testdata/nested.workflow.lobster.golden
candy/plugin-pipeline/workflowkit/testdata/redo.charly.yml.golden
candy/plugin-pipeline/workflowkit/testdata/redo.workflow.lobster.golden
candy/plugin-pipeline/workflowkit/validate.go
candy/plugin-pipeline/workflowkit/validate_test.go
charly.yml
File Change
.agents/skills/pipeline/SKILL.md the skill's run-leg prose names this repo's #Pipeline and workflowkit
AGENTS.md states the kind body lives here and workflowkit/ is the pipeline-kind machinery, still calling the contract's kind-blind helpers
README.md provider table + run leg follow the new home
candy/plugin-pipeline/charly.yml candy description names this repo's #Pipeline and workflowkit
candy/plugin-pipeline/cli.go writeScheduleDescriptor takes params.PipelineTrigger; comments name workflowkit
candy/plugin-pipeline/cli_workflow_test.go run-leg test comments name params.Pipeline
candy/plugin-pipeline/entity.go resolves/decodes the entity as params.Pipeline, validates with this repo's workflowkit
candy/plugin-pipeline/go.mod sdk → v0.2026316.1524; emicklei/dot becomes a direct dependency
candy/plugin-pipeline/go.sum the two sdk lines follow the pin
candy/plugin-pipeline/params/cue_types_gen.go regenerated: the 12 body types now come from this repo's schema
candy/plugin-pipeline/plugin.go OpLoad decodes params.Pipeline; package comment names workflowkit
candy/plugin-pipeline/schema/pipeline.cue declares #Pipeline, #PipelineValue, the step/trigger/flow helpers, _onError/_onErrorWord
candy/plugin-pipeline/workflowkit/graph.go moved from sdk/workflowkit, retyped to params.*
candy/plugin-pipeline/workflowkit/graph_test.go moved, retyped
candy/plugin-pipeline/workflowkit/lower.go moved, retyped; stale #PipelineInput home comment corrected
candy/plugin-pipeline/workflowkit/lower_test.go moved, retyped; same comment corrected
candy/plugin-pipeline/workflowkit/testdata/charly-step.charly.yml.golden moved byte-identically (sha256 below)
candy/plugin-pipeline/workflowkit/testdata/charly-step.workflow.lobster.golden moved byte-identically
candy/plugin-pipeline/workflowkit/testdata/e2e.charly.yml.golden moved byte-identically
candy/plugin-pipeline/workflowkit/testdata/e2e.workflow.lobster.golden moved byte-identically
candy/plugin-pipeline/workflowkit/testdata/nested.charly.yml.golden moved byte-identically
candy/plugin-pipeline/workflowkit/testdata/nested.workflow.lobster.golden moved byte-identically
candy/plugin-pipeline/workflowkit/testdata/redo.charly.yml.golden moved byte-identically
candy/plugin-pipeline/workflowkit/testdata/redo.workflow.lobster.golden moved byte-identically
candy/plugin-pipeline/workflowkit/validate.go moved, retyped; the ref grammar is called, never forked
candy/plugin-pipeline/workflowkit/validate_test.go moved, retyped
charly.yml the bed's doc block names this repo's #Pipeline and workflowkit

How tested

Every number below comes from the committed tree, with a worktree-local driver built from charly origin/main (never a shared install).

0. The driver's honest identity

go version -m cannot prove a charly binary's commit — the binary is built with -buildvcs=false, so its build info carries no VCS revision. The honest chain is charly version against scripts/calver.sh, plus the bed's driver_version:

$ bash scripts/calver.sh && ./bin/charly version
2026.316.1711
2026.316.1711
$ git -C <charly worktree> log --oneline -1 origin/main
bcba8f96 docs: add CHANGELOG 2026.316.1711 for PR #1124
$ grep -c 'buildvcs' scripts/bootstrap-charly.sh
2

1. Zero verdicts moved — the corpus witness, both arms, diff pasted

charly/charly/kind_value_corpus_sweep_test.go judges every authored entity body of a host-value-gated kind through the production gate and writes one deterministic verdict line per body. A throwaway spike (charly/charly/zz_leg2_spike_test.go, untracked, never committed) registers THIS branch's served schema through the production registerPluginUnitSchema and then runs that same sweep, so the arms differ only in where the def is resolved.

The corpus root is a fresh umbrella worktree at origin/main (139898d) with the submodules the bodies live in materialized. It holds 13 kind: pipeline bodies, not the 12 the campaign's older 2026.306 tree carried — design/negative/ask-no-answer.yaml is new since, and it is a negative fixture (FAIL in every arm). So the fresh-tree numbers are 3 OK / 10 FAIL, and the pre-flip arm is 1 OK / 12 FAIL: the phenomenon is exactly the campaign's, one fixture wider. (2,004-body parity is leg 4's job, not this leg's.)

$ CHARLY_CORPUS_ROOT=<fresh origin/main worktree> CHARLY_KIND_VALUE_GATE=base \
  CHARLY_CORPUS_OUT=/tmp/leg2-r3-base.txt go test ./charly/ -run TestKindValueCorpusSweep -count=1 -v
    kind_value_corpus_sweep_test.go:202: gate=base: judged 431 entity bodies (101 files unparsable) -> /tmp/leg2-r3-base.txt
    kind_value_corpus_sweep_test.go:204:   pipeline     13
$ grep '|pipeline|' /tmp/leg2-r3-base.txt | awk -F'|' '{print $4}' | awk '{print $1}' | sort | uniq -c
     10 FAIL
      3 OK

$ PIPELINE_PLUGIN_DIR=<this branch>/candy/plugin-pipeline CHARLY_CORPUS_ROOT=<fresh origin/main worktree> \
  CHARLY_CORPUS_OUT=/tmp/leg2-r3-flip.txt go test ./charly/ -run TestLeg2Spike -count=1 -v
    zz_leg2_spike_test.go:31: served schema files: [pipeline.cue] (19389 bytes)
    zz_leg2_spike_test.go:64: SPLICE OK: base & plugin-pipeline unit unified; composed #PipelineValue err=<nil>
    kind_value_corpus_sweep_test.go:202: gate=composed: judged 431 entity bodies (101 files unparsable) -> /tmp/leg2-r3-flip.txt
    kind_value_corpus_sweep_test.go:204:   pipeline     13
$ grep '|pipeline|' /tmp/leg2-r3-flip.txt | awk -F'|' '{print $4}' | awk '{print $1}' | sort | uniq -c
     10 FAIL
      3 OK

The verdict column is identical, and that is the claim:

$ diff <(grep '|pipeline|' /tmp/leg2-r3-base.txt | awk -F'|' '{print $1"|"$2"|"$3"|"$4}' | sed 's/: .*//') \
       <(grep '|pipeline|' /tmp/leg2-r3-flip.txt | awk -F'|' '{print $1"|"$2"|"$3"|"$4}' | sed 's/: .*//'); echo "rc=$?"
rc=0

The full-line diff is not empty, and must not be: a body that FAILS now names its fields through the SERVED def (#PipelineValue.concurrency: field not allowed) instead of the base's (concurrency: field not allowed). That is the def's new home showing in the diagnostic — the path changed, the verdict did not:

$ diff <(grep '|pipeline|' /tmp/leg2-r3-base.txt) <(grep '|pipeline|' /tmp/leg2-r3-flip.txt)
1,4c1,4
< charly/charly/testdata/migrate-retired-pipeline/charly.yml|pipeline|check-migrate-sample|FAIL pipeline: concurrency: field not allowed: node check-migrate-sample:1:3 stages: field not allowed: node check-migrate-sample:1:232
< design/negative/ask-no-answer.yaml|pipeline|p|FAIL pipeline: stage: field not allowed: node p:1:77
< design/negative/stage-attempt-zero.yaml|pipeline|p|FAIL pipeline: stage: field not allowed: node p:1:62
< design/negative/stage-two-arms.yaml|pipeline|x|FAIL pipeline: stage: field not allowed: node x:1:59
---
> charly/charly/testdata/migrate-retired-pipeline/charly.yml|pipeline|check-migrate-sample|FAIL pipeline: #PipelineValue.concurrency: field not allowed: node check-migrate-sample:1:3 #PipelineValue.stages: field not allowed: node check-migrate-sample:1:232
> design/negative/ask-no-answer.yaml|pipeline|p|FAIL pipeline: #PipelineValue.stage: field not allowed: node p:1:77
> design/negative/stage-attempt-zero.yaml|pipeline|p|FAIL pipeline: #PipelineValue.stage: field not allowed: node p:1:62
> design/negative/stage-two-arms.yaml|pipeline|x|FAIL pipeline: #PipelineValue.stage: field not allowed: node x:1:59
8,13c8,13
< plugin-herdr/charly/charly/testdata/migrate-retired-pipeline/charly.yml|pipeline|check-migrate-sample|FAIL pipeline: concurrency: field not allowed: node check-migrate-sample:1:3 stages: field not allowed: node check-migrate-sample:1:232
< plugin-migrate/candy/plugin-migrate/testdata/eval-pr-plan.yml|pipeline|check-omarchy-accept-matrix|FAIL pipeline: concurrency: field not allowed: node check-omarchy-accept-matrix:1:3 stages: field not allowed: node check-omarchy-accept-matrix:1:30
< plugin-migrate/candy/plugin-migrate/testdata/eval-pr-plan.yml|pipeline|check-omarchy-accept-suite|FAIL pipeline: stages: field not allowed: node check-omarchy-accept-suite:1:3
< plugin-migrate/candy/plugin-migrate/testdata/eval-pr-plan.yml|pipeline|eval-pr-plan|FAIL pipeline: concurrency: field not allowed: node eval-pr-plan:1:3 media: field not allowed: node eval-pr-plan:1:30 repo: field not allowed: node eval-pr-plan:1:173 report: field not allowed: node eval-pr-plan:1:197 skills: field not allowed: node eval-pr-plan:1:4599 stages: field not allowed: node eval-pr-plan:1:4667
< plugin-migrate/candy/plugin-migrate/testdata/lanes-matrix.yml|pipeline|check-omarchy-accept-matrix|FAIL pipeline: concurrency: field not allowed: node check-omarchy-accept-matrix:1:3 stages: field not allowed: node check-omarchy-accept-matrix:1:30
< pod-herdr/charly/charly/testdata/migrate-retired-pipeline/charly.yml|pipeline|check-migrate-sample|FAIL pipeline: concurrency: field not allowed: node check-migrate-sample:1:3 stages: field not allowed: node check-migrate-sample:1:232
---
> plugin-herdr/charly/charly/testdata/migrate-retired-pipeline/charly.yml|pipeline|check-migrate-sample|FAIL pipeline: #PipelineValue.concurrency: field not allowed: node check-migrate-sample:1:3 #PipelineValue.stages: field not allowed: node check-migrate-sample:1:232
> plugin-migrate/candy/plugin-migrate/testdata/eval-pr-plan.yml|pipeline|check-omarchy-accept-matrix|FAIL pipeline: #PipelineValue.concurrency: field not allowed: node check-omarchy-accept-matrix:1:3 #PipelineValue.stages: field not allowed: node check-omarchy-accept-matrix:1:30
> plugin-migrate/candy/plugin-migrate/testdata/eval-pr-plan.yml|pipeline|check-omarchy-accept-suite|FAIL pipeline: #PipelineValue.stages: field not allowed: node check-omarchy-accept-suite:1:3
> plugin-migrate/candy/plugin-migrate/testdata/eval-pr-plan.yml|pipeline|eval-pr-plan|FAIL pipeline: #PipelineValue.concurrency: field not allowed: node eval-pr-plan:1:3 #PipelineValue.media: field not allowed: node eval-pr-plan:1:30 #PipelineValue.repo: field not allowed: node eval-pr-plan:1:173 #PipelineValue.report: field not allowed: node eval-pr-plan:1:197 #PipelineValue.skills: field not allowed: node eval-pr-plan:1:4599 #PipelineValue.stages: field not allowed: node eval-pr-plan:1:4667
> plugin-migrate/candy/plugin-migrate/testdata/lanes-matrix.yml|pipeline|check-omarchy-accept-matrix|FAIL pipeline: #PipelineValue.concurrency: field not allowed: node check-omarchy-accept-matrix:1:3 #PipelineValue.stages: field not allowed: node check-omarchy-accept-matrix:1:30
> pod-herdr/charly/charly/testdata/migrate-retired-pipeline/charly.yml|pipeline|check-migrate-sample|FAIL pipeline: #PipelineValue.concurrency: field not allowed: node check-migrate-sample:1:3 #PipelineValue.stages: field not allowed: node check-migrate-sample:1:232

Those two eval-omarchy bodies are the ones that MOVE without opencharly/charly#1124. Planting the old gate order (reverting merged := def.Unify(entity) to entity.Unify(def)) on the same tree, same corpus, same branch schema:

$ grep -n 'merged :=' <charly worktree>/charly/provider_kind_invoke.go
557:	merged := entity.Unify(def)
$ PIPELINE_PLUGIN_DIR=<this branch>/candy/plugin-pipeline CHARLY_CORPUS_ROOT=<fresh origin/main worktree> \
  CHARLY_CORPUS_OUT=/tmp/leg2-r2-shipped.txt go test ./charly/ -run TestLeg2Spike -count=1 -v
$ grep '|pipeline|' /tmp/leg2-r2-shipped.txt | awk -F'|' '{print $4}' | awk '{print $1}' | sort | uniq -c
     12 FAIL
      1 OK
$ grep -m1 'eval-omarchy/charly.yml|pipeline|check-omarchy-accept-matrix' /tmp/leg2-r2-shipped.txt
eval-omarchy/charly.yml|pipeline|check-omarchy-accept-matrix|FAIL pipeline: args.prs: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:356:26
$ grep -m1 'eval-omarchy/charly.yml|pipeline|eval-pr-plan' /tmp/leg2-r2-shipped.txt
eval-omarchy/charly.yml|pipeline|eval-pr-plan|FAIL pipeline: steps.0.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.1.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.10.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.11.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.2.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.3.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.4.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.5.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.6.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.7.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.8.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 steps.9.plan.0: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:267:15 args.pr: cannot find package "github.com/opencharly/spec/schema": /opencharly/plugin-schema/schema/plugin.cue:356:26
$ cp /tmp/leg2-r2-pki.pristine <charly worktree>/charly/provider_kind_invoke.go
$ sha256sum -c /tmp/leg2-r2-pki.sha256
charly/provider_kind_invoke.go: OK
$ git -C <charly worktree> status --short
?? charly/zz_leg2_spike_test.go

So: 3 OK / 10 FAIL (base) = 3 OK / 10 FAIL (served def, merged flip) ≠ 1 OK / 12 FAIL (served def, pre-flip). Zero verdicts moved by the flip; two moved by this branch's schema without it.

2. All 8 lowering goldens byte-identical to sdk origin/main

$ cd candy/plugin-pipeline/workflowkit && for f in $(ls testdata | sort); do \
    printf "%s  %s\n" "$(sha256sum testdata/$f | cut -d' ' -f1)" "$f"; done | tee /tmp/leg2-goldens2-plugin.sha256
e9876274b212520c2a2411eb493fa76e3e9793a203749d5614a5d43d80d46bea  charly-step.charly.yml.golden
0a1d379934033c6e1033ac76a9c4abaebcae69f82086559a55918afef6a9e46f  charly-step.workflow.lobster.golden
724d4a06c7e89d782de60cbb0ddec1247440bc2153125b665b8647955ea7c732  e2e.charly.yml.golden
b9e070f5475f97f3f8c84b828e6046bb0d0c0ebc31ca3d31847971af4bebc950  e2e.workflow.lobster.golden
06be52db3e98e54ffe0687014ff29a29e7e98c4e9e3dd70eb4abb1b36e932450  nested.charly.yml.golden
3bd2729ffa4d54c83c21c5be799ef3405d158d8cc13f13e982fc44752479080a  nested.workflow.lobster.golden
b4d22f69ef16aa54bb5b74337273186969ee19c4c090d0173508f677824f52c7  redo.charly.yml.golden
8928bd13119794d330b3e42a1aac8f05dc329a9cfae49b9967765fbe5bed1205  redo.workflow.lobster.golden

$ cd <sdk checkout> && for f in $(git ls-tree --name-only origin/main workflowkit/testdata/ | sed 's|workflowkit/testdata/||' | sort); do \
    printf "%s  %s\n" "$(git show origin/main:workflowkit/testdata/$f | sha256sum | cut -d' ' -f1)" "$f"; done > /tmp/leg2-goldens-sdk.sha256
$ diff /tmp/leg2-goldens2-plugin.sha256 /tmp/leg2-goldens-sdk.sha256; echo "rc=$?"
rc=0

Eight files, eight identical digests, diff empty.

3. Tests — 153 green, all nine TestLower*

$ cd candy/plugin-pipeline
$ go test ./... -count=1
ok  	github.com/opencharly/plugin-pipeline/candy/plugin-pipeline	6.675s
?   	github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/cmd/serve	[no test files]
?   	github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/params	[no test files]
ok  	github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/workflowkit	0.026s
$ go test ./... -count=1 -v | grep -c '^--- PASS'
153
$ go test ./workflowkit/ -count=1 -v | grep -c '^--- PASS'
24
$ go test . -count=1 -v | grep -c '^--- PASS'
129
$ go test ./... -count=1 -v | grep -c '^--- FAIL'
0
$ go test ./... -count=1 -v | grep -E '^--- PASS: TestLower'
--- PASS: TestLowerCarriesLanesStep (0.00s)
--- PASS: TestLowerGolden (0.00s)
--- PASS: TestLowerRefsBraceForm (0.00s)
--- PASS: TestLowerInputSchemaKey (0.00s)
--- PASS: TestLowerRedoCarry (0.00s)
--- PASS: TestLowerNoRedoEmitsNoKey (0.00s)
--- PASS: TestLowerCharlyStep (0.00s)
--- PASS: TestLowerNestedPlan (0.00s)
--- PASS: TestLowerRejectsInvalid (0.00s)

workflowkit holds 24 test functions (TestMain is a harness, not a test — the campaign's earlier "25" counted it); the same 25 func Test* names exist in sdk origin/main's three moved test files, so nothing was dropped:

$ cd <sdk checkout> && for f in graph_test.go lower_test.go validate_test.go; do git show origin/main:workflowkit/$f; done | grep -cE '^func Test'
25
$ cat graph_test.go lower_test.go validate_test.go | grep -cE '^func Test'
25

4. The plant — red on assertions, restored byte-identical

A lowering defect on the committed tree (the emitted workflow name):

$ sha256sum candy/plugin-pipeline/workflowkit/lower.go
27090af27b00f19b589dcbe9a68d235177b1320078ce6d0aeb9cb7b8d44dd8b8  candy/plugin-pipeline/workflowkit/lower.go
$ # setKey(flow, "name", scalarNode(name))  ->  setKey(flow, "name", scalarNode(name+"-plant"))
$ git diff --stat
 candy/plugin-pipeline/workflowkit/lower.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
$ grep -n 'setKey(flow, "name"' candy/plugin-pipeline/workflowkit/lower.go
73:	setKey(flow, "name", scalarNode(name+"-plant"))
$ go test ./workflowkit/ -count=1; echo "rc=$?"
--- FAIL: TestLowerGolden (0.00s)
    lower_test.go:99: e2e.workflow.lobster.golden mismatch:
--- FAIL: TestLowerRedoCarry (0.00s)
    lower_test.go:238: redo.workflow.lobster.golden mismatch:
--- FAIL: TestLowerCharlyStep (0.00s)
    lower_test.go:292: charly-step.workflow.lobster.golden mismatch:
--- FAIL: TestLowerNestedPlan (0.00s)
    lower_test.go:316: nested.workflow.lobster.golden mismatch:
FAIL
FAIL	github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/workflowkit	0.017s
rc=1
$ cp /tmp/leg2-lower.pristine3 candy/plugin-pipeline/workflowkit/lower.go
$ sha256sum -c /tmp/leg2-plant3.sha256
candy/plugin-pipeline/workflowkit/lower.go: OK
$ git status --short | wc -l
0

Four tests red on mismatch: assertions (not a compile error), restored byte-identically, sha256sum -c OK, tree clean.

5. The bed — check-pipeline-local PASS on the final tree, and the red it replaces, reported

check-pipeline-local is this repo's R10 bed (local, host: local, disposable: true). As declared it does not run on a source-built driver — and that is pre-existing, not this diff's: run from the BASE tree (origin/main 2f435c7, before this diff) with the same driver, it is 15 steps: 0 passed, 15 failed, every step dying at load on the welded pin

$ charly check run check-pipeline-local > /tmp/leg2-bed-base2.log 2>&1; echo "rc=$?"
rc=2
$ tail -4 /tmp/leg2-bed-base2.log
charly check run check-pipeline-local: [cleanup-members] START
charly check run check-pipeline-local: [cleanup-members] PASS after 0s
charly check run check-pipeline-local: FAIL (steps=5)
command "check": charly check run check-pipeline-local: checks failed
$ tail -3 .check/check-pipeline-local/2026.316.1734/check-live.log
15 steps: 0 passed, 15 failed, 0 skipped
command "check": 15 check(s) failed
charly subcommand exited 2
$ grep -E '^(bed|calver|driver_version):|^  (errors|warnings|advisories):|^skipped_checks:|^status:' .check/check-pipeline-local/2026.316.1734/summary.yml
bed: check-pipeline-local
calver: 2026.316.1734
driver_version: 2026.316.1711
  errors: 0
  warnings: 0
  advisories: 0
skipped_checks: 0
status: FAIL

and a driver built 2026-11-02 — before unit 0 and before opencharly/charly#1124 — fails the same authored body identically. Filed as opencharly/plugin-pipeline#62 with the full RCA: the welded [email protected] entry in charly/scripts/host-command-plugins.txt answers only the COMMAND word, so on a source build with no baked .providers manifest the temp project's kind: pipeline word is never registered before parse. That is the one thing this leg's own gate cannot do unaided, and it is filed with its control rather than papered over.

What DOES run — the deployment shape a native package install provides, i.e. the artifact under test realized on the driver. Build this branch's candy/plugin-pipeline/cmd/serve, generate its .providers manifest with the documented charly __plugin-providers, and add the engine (plugin-lobster's workflow:lobster) the bed's own doc says the gate host supplies. Then the full bed:

$ go build -o /tmp/leg2-baked/plugin-pipeline ./cmd/serve && sha256sum /tmp/leg2-baked/plugin-pipeline
417db1273b7062473709517df1b6b39b5b292dad89c755f0c34f15bf8ce7d5ca  /tmp/leg2-baked/plugin-pipeline
$ charly __plugin-providers candy/plugin-pipeline 2>/dev/null
command:pipeline
verb:pipeline
kind:pipeline
verb:agent
verb:probe
verb:ade
verb:generate
verb:emit
verb:media
verb:gate
$ charly __plugin-providers candy/plugin-lobster 2>/dev/null
workflow:lobster
command:lobster
$ CHARLY_PLUGIN_DIR=/tmp/leg2-baked charly check run check-pipeline-local > /tmp/leg2-bed-final.log 2>&1; echo "rc=$?"
rc=0
$ grep -E '\[(deploy-add|check-live|update)\]' /tmp/leg2-bed-final.log | sed -E 's/ \(log: [^)]*\)//'
charly check run check-pipeline-local: [deploy-add] START (charly deploy add; log: .check/check-pipeline-local/2026.316.1731/deploy-add.log)
charly check run check-pipeline-local: [deploy-add] PASS after 4.561s
charly check run check-pipeline-local: [check-live] START (charly check live; log: .check/check-pipeline-local/2026.316.1731/check-live.log)
charly check run check-pipeline-local: [check-live] PASS after 1m9.913s
charly check run check-pipeline-local: [update] START (charly update; log: .check/check-pipeline-local/2026.316.1731/update.log)
charly check run check-pipeline-local: [update] PASS after 4.174s
$ tail -1 /tmp/leg2-bed-final.log
charly check run check-pipeline-local: PASS (steps=6)

The run's own record:

$ sed -n '1,11p' .check/check-pipeline-local/2026.316.1731/summary.yml
bed: check-pipeline-local
calver: 2026.316.1731
driver: /home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/dsh-unit1-leg2/charly/bin/charly
driver_version: 2026.316.1711
driver_size: 56557503
driver_mtime: 2026-11-12T17:17:23Z
runner_stderr: runner.stderr.log
steps:
  - name: deploy-add
    duration_seconds: 5
    ok: true
$ grep -E '^  (errors|warnings|advisories|allowlisted):|^skipped_checks:|^ok:|^status:|^total_seconds:' .check/check-pipeline-local/2026.316.1731/summary.yml
total_seconds: 83
  errors: 0
  warnings: 0
  advisories: 0
  allowlisted: 0
skipped_checks: 0
ok: true
status: PASS
$ grep -c 'status: PASS' .check/check-pipeline-local/2026.316.1731/summary.yml
22
$ grep -E '^  - name:|^    status:' .check/check-pipeline-local/2026.316.1731/summary.yml | paste - -
  - name: deploy-add	    status: PASS
  - name: bring-up-members	    status: PASS
  - name: check-live	    status: PASS
  - name: update	    status: PASS
  - name: cleanup	    status: PASS
  - name: cleanup-members	    status: PASS

22 status: PASS = 6 steps + 15 checks + the bed's own line. skipped_checks: 0, errors 0 / warnings 0 / advisories 0, driver_version 2026.316.1711 = scripts/calver.sh. The 15 checks include the ones this diff must not break: an authored kind: pipeline entity validating through the SERVED def, the exec-arm XOR named (not a silent pass), the lowering writing both halves of the pair, the authored verb sugar surviving into the generated task, --args-json/--mode accepted and refused by name, three lifted verbs running through the engine with a negative control, the approval/input resume legs, and the schedule unit round-trip.

What this does NOT prove: that a release packaging path bakes this plugin (that is the release workflow's own test), or anything about the welded pin — both tracked in #62. The .check/ artifacts were removed after the run and the tree left clean.

6. Structural + quality gates

$ charly box validate
charly box validate: OK — checked 3 candies, 1 deploy, 7 distros, 7 builders; 0 warnings, 0 errors
$ gofmt -l . ; echo "rc=$?"
rc=0
$ go vet ./... ; echo "rc=$?"
rc=0
$ GOTOOLCHAIN=go1.26.8 golangci-lint run ./... ; echo "rc=$?"
0 issues.
rc=0

gofmt -l printed nothing (clean). golangci-lint needed GOTOOLCHAIN=go1.26.8 on this host (the installed binary is 2.13.2 built with go1.27); run with it, 0 issues. The repo's own ci.yml gate (gofmt/vet/test + the in-process params reproducibility test) is the same commands above.

Rulebook compliance

  • R0 — skills first. Read the umbrella AGENTS.md, this repo's AGENTS.md, and the charly repo's AGENTS.md before the first action, and loaded git-workflow, plugin, go and cue from the dispatcher (git/PR action, plugin authoring, Go source, SDD/schema). Disclosure, not a claim: this repo's own rule ("load /charly-pipeline:pipeline before changing the CLI run leg") was met LATE — the pipeline skill was loaded while writing this body, after the CLI-surface edits. RCA: the miss's control is the repo AGENTS.md's first bullet, and I read the file but acted only on its code-map, not its skill list. Re-deriving the change against the loaded skill changed nothing (ValidatePipeline/Lower are the same entry points, the run leg is the same lowering+dispatch, and the skill's own prose is the file this diff corrects), but the order was wrong and I am recording it rather than dressing it up.
  • R1 — RCA every anomaly, then fix it or file it. Three anomalies, all resolved: (a) the move made two comments stale (spec/schema/pipeline.cue named as #PipelineInput's home) — an R5 claim-keyed grep found them, and they are fixed in this diff; (b) the bed does not run on a source-built driver — RCA'd, controlled against the base tree and an older driver, filed as #62 with the fix candidates; (c) the parked draft's commit message claimed the spec pin moved when it did not — the claim is removed from the head. The gates paste zero warnings.
  • R2 — no duplication. The ref grammar (refRe) stays in sdk/workflowkit's expr.go; this repo calls RefNames/Validate/RefIDs and PlanRefs/RewritePlanRefs instead of forking them. params/cue_types_gen.go is generated, never hand-transcribed, and #StrVal/#Step/#TaskParamSpec/#WorkflowArgVal stay single-homed in the contract module. The byte-identical goldens are the proof that the lowering was moved, not rewritten.
  • R3 — no workarounds. No sleep, retry, suppression, fallback or magic fixture was added. The bed's venue realization is not a workaround: it is the package-install shape of the artifact under test (a plugin binary plus its generated .providers manifest), and the red it works around is filed, not hidden.
  • R4 — product before prose. The docs name what the code now does; the documented commands work with only charly (charly box validate OK; charly __plugin-providers is the documented manifest source; charly candy params is the documented regeneration path). No documented command needs a second tool.
  • R5 — legacy deleted. Claim-keyed sweep over the committed tree (CHANGELOG/ excluded as history):
$ git grep -n 'sdk/workflowkit' -- . ':!CHANGELOG'
AGENTS.md:79:  helpers rather than restating them — `sdk/workflowkit.RefNames`/`Validate`/`RefIDs`
AGENTS.md:80:  (the expression grammar) and `sdk/workflowkit.PlanRefs`/`RewritePlanRefs` (the plan
candy/plugin-pipeline/workflowkit/graph.go:10:	sdkworkflowkit "github.com/opencharly/sdk/workflowkit"
candy/plugin-pipeline/workflowkit/lower.go:11:	sdkworkflowkit "github.com/opencharly/sdk/workflowkit"
candy/plugin-pipeline/workflowkit/validate.go:9:	sdkworkflowkit "github.com/opencharly/sdk/workflowkit"
$ git grep -nE 'spec\.Pipeline\b' -- . ':!CHANGELOG' | wc -l
0
$ git grep -n 'spec/schema/pipeline' -- . ':!CHANGELOG' | wc -l
0

Every remaining sdk/workflowkit hit is the kind-blind helper the repo is supposed to call (R2's single home); no spec.Pipeline type and no stale spec/schema/pipeline.cue claim survives.

  • R6 — preserve user work and Git safety. git status --short empty before staging; one commit, amended locally before the first push (legal); no force-push, no --no-verify, no core.hooksPath override, no direct push to main. No pin, gitlink, design/*.tsv or TODO.md path is in the diff.
  • R7 — prove behaviour. The coverage fails without the change: the plant turns 4 lowering tests red on assertions, the pre-flip corpus arm moves 2 of 13 verdicts, and the changed path (charly pipeline validate|run against an entity authored with this repo's grammar) executed live in the bed's 15 checks. Emitted artifacts are judged at their boundary — the lowered workflow.lobster + generated charly.yml are the goldens, byte-identical to the SDK's.
  • R8 — live or skip, never fake. No live-service boundary is crossed by this diff; nothing is mocked, and the bed's engine leg ran against the real plugin-lobster binary rather than a stub.
  • R9 — binary equals source. The driver was built worktree-locally by scripts/bootstrap-charly.sh at this campaign's origin/main; charly version = scripts/calver.sh = 2026.316.1711, and the bed's driver_version reports the same. go version -m is not usable as proof here (-buildvcs=false), which is why the chain is version-vs-calver plus the bed's record. No new runtime OS dependency is added.
  • R10 — fresh disposable proof. charly check run check-pipeline-local on the committed tree: disposable: true local target only, fresh build + charly update rebuild, 6 steps / 15 checks PASS, skipped_checks: 0, errors 0 / warnings 0 / advisories 0, driver_version 2026.316.1711; the run's .check/ artifacts were removed afterwards and the tree left clean. The stock-driver red is reported above and filed (#62) rather than papered over.

Change classification

Breaking change + rollback: breaking for a Go importer of this module, not for an authored config. workflowkit now lives at github.com/opencharly/plugin-pipeline/candy/plugin-pipeline/workflowkit, and its entry points take params.Pipeline* instead of spec.Pipeline*. Importing the old sdk/workflowkit lowering still compiles (sdk keeps it until leg 3), but it is no longer the one this repo uses, and the two would drift from here on — which is exactly why leg 3 deletes it. Nothing an operator writes in charly.yml changes: the kind: pipeline grammar (steps:, the step arms, the triggers) is the same definitions, schema.-prefixed only where they are the contract's, and the 13-body witness judges every authored body to the same verdict. No provider class, word or wire shape changes. Rollback: revert this squash commit (it also returns the sdk pin to v0.2026315.2134); the contract module was never cut, so spec.Pipeline is still there and a revert leaves both sides consistent. The new import path is created by this commit, so no consumer can have pinned it before this merge.

Filed issues

  • opencharly/plugin-pipeline#61 — this leg's own issue (the parked work's number): the kind: pipeline body and its lowering move here. Closes #61.
  • opencharly/plugin-pipeline#62 — check-pipeline-local cannot run on a source-built charly (the welded command:[email protected] pin leaves the bed's temp projects without the kind word; 15/15 fail on the base tree too). Carries the RCA, the control and the two fix candidates. Non-blocking for this diff, whose schema is proven through the realized venue above.
  • opencharly/charly#1123 — related context, not filed by this PR: charly.yml's bed-to-verb coverage map names seven beds that do not exist (check-pod, check-local, …), so that roster is not where this leg's gate comes from; the gate is this repo's own check-pipeline-local.

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

…ing into this repo

A `kind` body belongs with the plugin that serves the kind, so the `kind: pipeline`
entity body moves out of the contract module (spec/schema/pipeline.cue's
`#Pipeline`/`#PipelineValue`) and into this repo's own CUE module, and the
pipeline-kind machinery moves into a repo-local `workflowkit`:

- schema/pipeline.cue declares #Pipeline, #PipelineValue and the
  step/trigger/flow helpers, plus _onError/_onErrorWord (which travel with
  #PipelineFlow). External references stay the contract module's and become
  schema.-prefixed: #StrVal, #Step, #TaskParamSpec, #WorkflowArgVal — shared with
  kind: task, a candy plan and the workflow wire, so a pipeline body and the plan it
  lowers to cannot disagree.
- #PipelineClassRoutes deliberately STAYS in the contract module: it is a table over
  its own #ProviderClassNames and only its vocabulary generator can extract it.
- params/cue_types_gen.go is regenerated in process from schemaparams.Generate (the
  SAME function `charly candy params` calls); the 12 body types it emits are
  field-identical to spec.Pipeline* after stripping the package qualifier, and a
  second run is byte-identical (TestGeneratedParamsAreCurrentAndReproducible).
- workflowkit/ takes validate.go, lower.go, graph.go and their tests and testdata/,
  moved from sdk/workflowkit with a mechanical retype (spec.Pipeline*) ->
  (params.Pipeline*) and the kind-blind helpers called as sdkworkflowkit.*. It keeps
  using the contract's helpers rather than forking them — RefNames/Validate/RefIDs
  for the expression grammar, PlanRefs/RewritePlanRefs (sdk#501) for the plan-ref
  steps — so the ref grammar stays in its one home (R2).
- the sdk pin moves to v0.2026316.1524, the tag on sdk#501's squash, because the
  lowering calls the newly exported PlanRefs/RewritePlanRefs; the spec pin was
  already v0.2026315.2118 and does not move. go mod tidy -diff is empty and
  emicklei/dot is now a direct dependency (graph.go imports it).
- the docs follow the code: AGENTS.md, README.md, the repo's own pipeline-skill:
  source, the candy description, the root charly.yml and every code comment that
  named the old home or sdk/workflowkit. Two comments the move made stale
  (spec/schema/pipeline.cue named as #PipelineInput's home) are corrected here.

The kind capability already declared `InputDef: "#PipelineValue"`, so the host
resolves the gate through the provider's declaration; the load gate itself needed
charly#1124 (the def-as-receiver unification) so a `schema.#...` reference inside the
SERVED def resolves. That landed first, at tag v2026.316.1711.

Measured on the fresh origin/main corpus (13 authored kind: pipeline bodies): the
base arm and the served-def arm agree on every verdict (3 OK / 10 FAIL; the verdict
column diff is empty), while the pre-flip gate moved two eval-omarchy bodies OK to
FAIL. The 8 lowering goldens are byte-identical to sdk origin/main's, and the R10 bed
check-pipeline-local passes with this branch's plugin realized on the driver (6 steps,
15 checks, 0 skipped, 0 warnings).

This is leg 2 of five; sdk#501 (export) and charly#1124 (the gate flip) landed first,
and the sdk/spec deletions are their own later legs.

Refs opencharly/spec#304

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

Copy link
Copy Markdown

Review — PASS

Head SHA: fcf98fa719d9b789f5535956e11b30eef313c651 (branch: feat/pipeline-kind-body)

Security screen: PASS — no scope mismatch (diff matches the stated body/lowering/docs move), no secrets/exfiltration, no guardrail weakening, no dependency surprise (emicklei/dot promoted indirect→direct for the moved graph.go; sdk pin bumped for PlanRefs/RewritePlanRefs). No embedded instructions to the validator.
Checklist: All applicable rules PASS or NA — SDD source↔gen (schema/pipeline.cue + params/cue_types_gen.go changed together), R5 sweep pasted (spec.Pipeline=0, spec/schema/pipeline=0, remaining sdk/workflowkit are the intended kind-blind helpers), R10 bed is disposable: true/fresh update/0 warnings/0 advisories with the pre-existing source-build limitation honestly controlled and filed (#62), placement is correct (kind body + kind-aware lowering move out of the contract module into the plugin; kind-blind ref grammar stays in sdk), attribution fully tested and validated is justified by the executed changed paths, Assisted-by: footer present and well-formed.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 12, 2026 17:40
@github-actions
github-actions Bot merged commit 75e5fc9 into main Nov 12, 2026
4 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 12, 2026
github-actions Bot pushed a commit to opencharly/spec that referenced this pull request Nov 12, 2026
…ow declares (#305)

* feat(schema)!: delete the kind:pipeline body defs the owning plugin now declares

Leg 4 of unit 1's five-leg decomposition (TODO.md 2.1, tracker
#304 row 4). The authored kind: pipeline body belongs with the
plugin that serves it, and plugin-pipeline declares it in its own CUE module
since leg 2 (opencharly/plugin-pipeline#63). This deletes the contract module's
twins and regenerates.

Deleted from schema/pipeline.cue: #Pipeline, #PipelineValue, and the defs they
are built from (#PipelineRetry, #PipelineApproval, #PipelineFlow, #PipelineArms,
#PipelineInput, #PipelineSubStep, #PipelineParallel, #PipelineStepBase,
#PipelineStep, #PipelineSchedule, #PipelineTrigger), plus the on_error
vocabulary table. The generated Pipeline* Go types go with them and
spec.KindValueDefs drops pipeline (11 -> 10 kinds; 12 -> 11 #*Value defs).

KEPT: #PipelineClassRoutes. It is a table over THIS module's own
#ProviderClassNames and its extraction lives in internal/schemagen's vocab mode,
which no plugin can run and no plugin could read the whole class vocabulary to
produce. The file header now states the split.

The defs' closedness corpus moved BEFORE the deletion, to plugin-pipeline's
pipeline_schema_corpus_test.go (plugin-pipeline#64, merged); this repo keeps
only the two gates that are about its own class list.

charly's corpus sweep selected with spec.KindValueDefs, so this deletion would
have dropped every pipeline body out of the witness silently; its selection is
taught the production resolver (provider-declared InputDef from the composed
unit) in the consumer half of this leg. Measured on the composed tree with this
module linked in: 2004 bodies, 12 pipeline bodies, verdict list byte-identical
to the pre-change run (sha256 c99e948b...).

Cue-gen is a no-op on a second run (TestGenReproducible).

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

* test(schema): pin the pipeline body's ABSENCE from the contract module

Round-2 review finding (real): the deletion shipped no spec-side coverage that
fails when a body def is re-added, and the body's claim that no such test could
exist was false. `TestPipelineBodyDefsAreNotInTheContract` is that test: it looks
each of the 13 deleted defs up in the concatenated schema and asserts the lookup
FAILS, and it asserts `KindValueDefs` no longer carries `pipeline`.

The absence is controlled the way an absence claim has to be: the same value is
asked for a def the base still keeps (`#TaskValue` present in the schema and in
the generated map), so a schema that failed to concatenate — or a generator that
stopped emitting — cannot make the absence checks pass for the wrong reason.

Planted red on assertions by re-adding a `#PipelineValue` stub and regenerating:
the test reports BOTH halves of the trap (the def is back; `KindValueDefs` has
re-registered `pipeline`). Restored byte-identical (schema + generated vocab).

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
github-actions Bot pushed a commit to opencharly/charly that referenced this pull request Nov 12, 2026
…oved body stays judged (#1126)

* fix(plugin): resolve a kind's value def the way the gate does, so a moved body stays judged

The consumer half of unit 1's leg 4 (tracker opencharly/spec#304). opencharly/spec#305
deleted the #Pipeline* body defs (they are plugin-pipeline's CUE since
opencharly/plugin-pipeline#63) and opencharly/sdk#502 deleted the kind-aware
workflowkit machinery; this PR pins both merges and teaches the corpus sweep's
selection to resolve a kind's value def the way the production gate does.

THE TRAP. charly/kind_value_corpus_sweep_test.go selected bodies with
spec.KindValueDefs[pn.Disc]. With #PipelineValue gone from the base, that
predicate judges ZERO pipeline bodies and still PASSES: on the fresh-origin/main
corpus the witness drops 431 -> 418 with 13 pipeline bodies -> 0, and the
full-corpus arm drops 2,004 -> 1,992.

THE FIX. Selection now goes through kindValueDefPath(prov, disc) - the gate's
own resolver: the provider's declared InputDef first, spec.KindValueDefs as the
compatibility fallback - and the provider is resolved by gatedKindProvider,
which asks the registry and, on a miss, the loader's on-demand connect
(connectPluginByWord) for a kind whose body lives in a plugin. That is what makes
plugin-pipeline's `InputDef: "#PipelineValue"` visible to the witness. The
connect is bounded: cached per word, attempted once, and OFF for the
default-suite corpus test (a plain `go test ./...` must never build a plugin or
hit the network). The `base` arm stays the pre-change oracle and now skips,
visibly and counted, a def the base no longer declares.

MEASURED. 2,004 bodies / 12 pipeline bodies on the full-corpus arm and 431 / 13
on the fresh-origin/main arm, with the full arm's verdict list byte-identical to
the pre-change run (sha256 c99e948b...). (The campaign's "2,004" and "13 pipeline
bodies" come from two different corpus roots - the full checkout is one fixture
behind origin/main - so both arms are reported rather than one fitted to the
other.)

PINS. sdk -> v0.2026316.1848, spec -> v0.2026316.1928, in charly/go.mod and every
lockstep tools/* module (charly task mods-tidy); tools/gomod-canonical's
TestContractPinsMatchShared is green.

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

* test(plugin): guard the sweep's LOOP, not only its resolver

Round-1 review findings on #1126, all three fixed here.

1. `TestSweepLoopJudgesAPluginDeclaredGateDef` drives `runCorpusSweep` (the loop
   itself, now extracted from the test body) over a fixture corpus that authors
   one body of a kind whose `#<Kind>Value` def exists only in a served unit, and
   asserts the body is JUDGED. Reverting the loop's selection to
   `spec.KindValueDefs[pn.Disc]` is red on assertions; the previous witness
   exercised only the helper and passed with the loop reverted.

2. The `gatedKindProvider` doc comment named the wrong `connect=false` caller: it
   is the default-suite witness, not "the default-suite corpus test". Corrected.

3. The `base` arm's "skips visibly, counted" claim now has an executed run in the
   PR body: `gate=base: judged 1992 entity bodies (…, 12 bodies the base arm
   cannot judge)` on the full corpus.

No production code changed: `charly/provider_kind_invoke.go` is untouched.

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

---------

Co-authored-by: aitrawog <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant