Skip to content

fix(plugin): unify with the def as receiver so a served def's contract refs resolve - #1124

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/kind-value-unify-order
Nov 12, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/kind-value-unify-order

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

validateKindValueCUE gated every host-value kind with merged := entity.Unify(def) — the authored document as the receiver. cue.Value.Unify resolves every reference it meets through the receiver's runtime, and the two sides carry different runtimes: def comes from the composed unit (pluginSchemas.unified), whose runtime carries the plugin unit's import graph, while entity is built from the authored JSON by the project loader, which has no import clause anywhere in it. So the moment unit 0 (charly#1122) moved the lookup to the composed value and the first corpus field forced a contract reference through the gate, a schema.#… cited by a served def was resolved through the entity's import-less runtime and failed.

Same def value, same authored entity, one process, only the receiver differs:

$ TMPDIR=/tmp/cs GOTMPDIR=/home/atrawog/.cache/go-tmp go test ./charly/ -run TestKindValueGate_ValidatesAServedDefCarryingAContractReference -v -count=1
=== RUN   TestKindValueGate_ValidatesAServedDefCarryingAContractReference
    kind_value_composed_test.go:180: a conforming servedref body must pass the served def (its schema.#LLMSpec reference resolved): servedref: llm: cannot find package "github.com/opencharly/spec/schema":
            /opencharly/plugin-schema/schema/plugin.cue:7:10
--- FAIL: TestKindValueGate_ValidatesAServedDefCarryingAContractReference (0.05s)
FAIL

That failure IS the pair: the committed test asserts entity.Unify(def) fails by import resolution and then that the production gate accepts the same body — so the red line above is the first assertion holding on the un-flipped gate.

validateAuthoredPluginInput (plugin_loader.go) has always done d.Unify(in) — schema as receiver — which is why #PipelineAgentInput.llm: schema.#LLMSpec has worked since plugin-pipeline#60. The kind-value gate never needed it before only because every def it resolved came from the base (one package, no import clause). charly#1122 moved the lookup and left the order.

The change, one line:

$ git rev-list --count origin/main..HEAD
2
$ git diff --stat origin/main...HEAD
 charly/kind_value_composed_test.go | 91 ++++++++++++++++++++++++++++++++++++++
 charly/provider_kind_invoke.go     | 16 +++++++-
 2 files changed, 106 insertions(+), 1 deletion(-)

$ git diff origin/main...HEAD -- charly/provider_kind_invoke.go | grep -E '^[-+][[:space:]]+merged'
-	merged := entity.Unify(def)
+	merged := def.Unify(entity)

Two commits, one cutover: the flip with its witness, and the round-1 comment correction (§9).

What it unblocks. This is the prerequisite the next unit lands on: plugin-pipeline moving #Pipeline/#PipelineValue into its own CUE module (unit 1, leg 2, of spec#304), where the body carries steps[].plan[].llm: schema.#LLMSpec. Measured over the same tree and the same 2,004 gated bodies, with the plugin unit registered and this order left alone, two eval-omarchy bodies that are OK today become FAIL … cannot find package; the corpus arms below are that measurement in its general form, and they move zero verdicts with the flip.

Files

File Change
charly/provider_kind_invoke.go merged := entity.Unify(def) → merged := def.Unify(entity), with the receiver's-runtime mechanism documented in place
charly/kind_value_composed_test.go new TestKindValueGate_ValidatesAServedDefCarryingAContractReference + its servedRefUnit/servedRefNode fixture: a served def whose body cites schema.#LLMSpec

How tested

1. The test that must exist — and why unit 0's tests could not catch this

Unit 0's fixture registered a served unit serving #GateprobeValue, but that def cited no contract reference, so nothing it judged exercised the def's import graph. The new fixture is the shape a moved kind body actually takes: the unit imports github.com/opencharly/spec/schema and its body def cites schema.#LLMSpec through it, exactly as plugin-pipeline's #PipelineValue does for steps[].plan.

  • registers the plugin unit serving that def (through the production load gate registerPluginUnitSchema),
  • asserts the base cannot see the def (so a pass can only come from the composed unit),
  • judges an authored body against it through the production gate (validateKindValueCUE) — ACCEPT, including the field that forces the contract reference,
  • and REJECTS a typo'd field.
$ TMPDIR=/tmp/cs GOTMPDIR=/home/atrawog/.cache/go-tmp go test ./charly/ -run 'TestKindValueGate_|TestKindValueDefPath_|TestCapMeta_|TestKindValueDefs_ComposedEqualsBase' -v -count=1
=== RUN   TestKindValueGate_ReadsAPluginDeclaredDefFromTheComposedUnit
--- PASS: TestKindValueGate_ReadsAPluginDeclaredDefFromTheComposedUnit (0.02s)
=== RUN   TestKindValueGate_ValidatesAServedDefCarryingAContractReference
--- PASS: TestKindValueGate_ValidatesAServedDefCarryingAContractReference (0.05s)
=== RUN   TestKindValueDefPath_FollowsTheProviderDeclaredShape
--- PASS: TestKindValueDefPath_FollowsTheProviderDeclaredShape (0.00s)
=== RUN   TestKindValueDefs_ComposedEqualsBase
    kind_value_composed_test.go:258: android #AndroidValue: composed == base
    kind_value_composed_test.go:258: candy #CandyValue: composed == base
    kind_value_composed_test.go:258: firecracker #FirecrackerValue: composed == base
    kind_value_composed_test.go:258: kindcluster #KindclusterValue: composed == base
    kind_value_composed_test.go:258: kubernetes #KubernetesValue: composed == base
    kind_value_composed_test.go:258: kubevirt #KubevirtValue: composed == base
    kind_value_composed_test.go:258: local #LocalValue: composed == base
    kind_value_composed_test.go:258: pipeline #PipelineValue: composed == base
    kind_value_composed_test.go:258: pod #PodValue: composed == base
    kind_value_composed_test.go:258: task #TaskValue: composed == base
    kind_value_composed_test.go:258: vm #VmValue: composed == base
--- PASS: TestKindValueDefs_ComposedEqualsBase (0.00s)
=== RUN   TestCapMeta_DeclaredKindInputDefLiftedFromTheWireCapability
--- PASS: TestCapMeta_DeclaredKindInputDefLiftedFromTheWireCapability (0.00s)
PASS
ok  	github.com/opencharly/charly/charly	1.818s

2. The plant — red on ASSERTIONS, restored byte-identical

Reverting the one line on the committed tree, with the test in place:

$ sha256sum charly/provider_kind_invoke.go charly/kind_value_composed_test.go | tee /tmp/plant-pristine2.sha256
06e708844c73fbd5b5fb296a6c069380360fd0b3cc2cfdfcf28ac7a3e9790a40  charly/provider_kind_invoke.go
2a9543b08cded2aefcefcc7c31860cde2bb01220263a050400dd73934ac880ab  charly/kind_value_composed_test.go
$ cp charly/provider_kind_invoke.go /tmp/pki.pristine3
$ python3 - <<'PY'
p='charly/provider_kind_invoke.go'; s=open(p).read()
open(p,'w').write(s.replace('\tmerged := def.Unify(entity)\n', '\tmerged := entity.Unify(def)\n'))
PY
$ grep -n "merged :=" charly/provider_kind_invoke.go
557:	merged := entity.Unify(def)
$ TMPDIR=/tmp/cs GOTMPDIR=/home/atrawog/.cache/go-tmp go test ./charly/ -run 'TestKindValueGate_ValidatesAServedDefCarryingAContractReference' -v -count=1
=== RUN   TestKindValueGate_ValidatesAServedDefCarryingAContractReference
    kind_value_composed_test.go:180: a conforming servedref body must pass the served def (its schema.#LLMSpec reference resolved): servedref: llm: cannot find package "github.com/opencharly/spec/schema":
            /opencharly/plugin-schema/schema/plugin.cue:7:10
--- FAIL: TestKindValueGate_ValidatesAServedDefCarryingAContractReference (0.05s)
FAIL
FAIL	github.com/opencharly/charly/charly	1.814s
FAIL
$ cp /tmp/pki.pristine3 charly/provider_kind_invoke.go
$ sha256sum -c /tmp/plant-pristine2.sha256
charly/provider_kind_invoke.go: OK
charly/kind_value_composed_test.go: OK
sha256sum rc=0
$ git status --short | wc -l
0
$ git diff --stat
(empty)

An assertion failure (not a build error), naming the import resolution that is the defect, on the exact tree that is pushed.

3. Zero verdicts moved — the 2,004-body real corpus

charly/kind_value_corpus_sweep_test.go judges every authored entity body of every gated kind through the production gate, with a CHARLY_KIND_VALUE_GATE=base arm that reproduces the pre-change lookup exactly (base schema alone, authored entity as receiver). Both arms were run on this tree, over the pinned umbrella corpus:

$ export TMPDIR=/tmp/cs GOTMPDIR=/home/atrawog/.cache/go-tmp CHARLY_CORPUS_ROOT=/home/atrawog/Sync/Atrapub/lo/dsh/opencharly
$ CHARLY_KIND_VALUE_GATE=base CHARLY_CORPUS_OUT=/tmp/kv-D-base-r1.txt go test ./charly/ -run TestKindValueCorpusSweep -v -count=1
    kind_value_corpus_sweep_test.go:202: gate=base: judged 2004 entity bodies (1646 files unparsable) -> /tmp/kv-D-base-r1.txt
ok  	github.com/opencharly/charly/charly	76.939s
$ CHARLY_KIND_VALUE_GATE=composed CHARLY_CORPUS_OUT=/tmp/kv-E-fixed-r1.txt go test ./charly/ -run TestKindValueCorpusSweep -v -count=1
    kind_value_corpus_sweep_test.go:202: gate=composed: judged 2004 entity bodies (1646 files unparsable) -> /tmp/kv-E-fixed-r1.txt
ok  	github.com/opencharly/charly/charly	78.396s

$ for f in /tmp/kv-D-base-r1.txt /tmp/kv-E-fixed-r1.txt; do
    echo "$f ok=$(grep -c '|OK$' $f) fail=$(grep -c '|FAIL ' $f)"
  done
/tmp/kv-D-base-r1.txt ok=1984 fail=20
/tmp/kv-E-fixed-r1.txt ok=1984 fail=20

$ sha256sum /tmp/kv-D-base-r1.txt /tmp/kv-E-fixed-r1.txt
117afcac27674e333147f86ea91b97c4209ebda545960b2d236ec01baa52029c  /tmp/kv-D-base-r1.txt
c99e948b487120a9ff5b49e26d8f7b9e7d803a2d3fffa024b6d36775c53ea5a6  /tmp/kv-E-fixed-r1.txt

The verdicts are unchanged; only the diagnostic text moves. Stripping each line's diagnostic and comparing the path|kind|name|verdict alone:

$ awk -F'|' '{v=$4; sub(/ .*/,"",v); print $1"|"$2"|"$3"|"v}' /tmp/kv-D-base-r1.txt > /tmp/kv-base-verdicts.txt
$ awk -F'|' '{v=$4; sub(/ .*/,"",v); print $1"|"$2"|"$3"|"v}' /tmp/kv-E-fixed-r1.txt > /tmp/kv-fixed-verdicts.txt
$ diff /tmp/kv-base-verdicts.txt /tmp/kv-fixed-verdicts.txt | wc -l
0

0 accept/reject verdicts moved across all 2,004 bodies. And in the full lists:

$ diff -u /tmp/kv-D-base-r1.txt /tmp/kv-E-fixed-r1.txt > /tmp/kv-final.diff; echo "diff rc=$?"
diff rc=1
$ echo "removed=$(grep -c '^-[^-]' /tmp/kv-final.diff) added=$(grep -c '^+[^+]' /tmp/kv-final.diff)"
removed=20 added=20
$ grep -E '^[+-]' /tmp/kv-final.diff | grep -c '|OK$'
0
$ grep -E '^[+-]' /tmp/kv-final.diff | grep -c '|FAIL '
40

40 changed lines = 20 removed + 20 added, every one of them a line that was already FAIL; not one OK line is touched. The 20 FAILs are the same 20 that failed before this change (design/negative/* fixtures, the retired-pipeline migration testdata, plugin-migrate testdata) — files authored to fail.

The full diff, pasted:

$ diff -u /tmp/kv-D-base-r1.txt /tmp/kv-E-fixed-r1.txt
@@ -467,7 +467,7 @@
 charly/charly/testdata/images.yml|candy|ml-cuda|OK
 charly/charly/testdata/images.yml|candy|ubuntu-dev|OK
 charly/charly/testdata/migrate-retired-pipeline/charly.yml|candy|migrate-pipeline-plugin|OK
-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
+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
 charly/charly/testdata/plugin-buildcache-project/candy/plugin-example-kind/charly.yml|candy|plugin-example-kind|OK
 charly/check/eval-host-project-pkg-uninstall/charly.yml|candy|check-pkg-uninstall-root-candy|OK
 charly/check/eval-host-project-pkg-uninstall/charly.yml|candy|check-pkg-uninstall-fixture|OK
@@ -564,14 +564,14 @@
 design/negative/agent-inner-node.yaml|pod|x|OK
 PARSE-ERR design/negative/alongside-candy.yaml
 design/negative/alongside-local-no-connect.yaml|pod|x|OK
-design/negative/android-create-and-connect.yaml|android|x|FAIL android: 3 errors in empty disjunction: connect: field not allowed: node x:1:3 create: field not allowed: node x:1:51 description: field not allowed: node x:1:96
-design/negative/android-in-kubernetes.yaml|kubernetes|x|FAIL kubernetes: 2 errors in empty disjunction: create: field not allowed: node x:1:3 description: field not allowed: node x:1:19
+design/negative/android-create-and-connect.yaml|android|x|FAIL android: #AndroidValue: 3 errors in empty disjunction: #AndroidValue.connect: field not allowed: node x:1:3 #AndroidValue.create: field not allowed: node x:1:51 #AndroidValue.description: field not allowed: node x:1:96
+design/negative/android-in-kubernetes.yaml|kubernetes|x|FAIL kubernetes: #KubernetesValue: 2 errors in empty disjunction: #KubernetesValue.create: field not allowed: node x:1:3 #KubernetesValue.description: field not allowed: node x:1:19
 PARSE-ERR design/negative/base-key.yaml
 PARSE-ERR design/negative/boxonly-on-candy.yaml
 PARSE-ERR design/negative/build-manager-in-build-with.yaml
 PARSE-ERR design/negative/builder-box-candy.yaml
 PARSE-ERR design/negative/call-no-deadline.yaml
-design/negative/candy-in-pod.yaml|pod|x|FAIL pod: 3 errors in empty disjunction: description: field not allowed: node x:1:3 extra: field not allowed: node x:1:26 from: field not allowed: node x:1:61
+design/negative/candy-in-pod.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: node x:1:3 #PodValue.extra: field not allowed: node x:1:26 #PodValue.from: field not allowed: node x:1:61
 design/negative/candy-key.yaml|candy|x|OK
 PARSE-ERR design/negative/candy-parameter-no-choice.yaml
 PARSE-ERR design/negative/candy-without-check.yaml
@@ -581,7 +581,7 @@
 PARSE-ERR design/negative/check-output-pass.yaml
 PARSE-ERR design/negative/check-phase-verb.yaml
 design/negative/connect-inside-vm.yaml|vm|x|OK
-design/negative/deployment-build-step.yaml|pod|x|FAIL pod: 3 errors in empty disjunction: description: field not allowed: node x:1:3 from: field not allowed: node x:1:26 step: field not allowed: node x:1:37
+design/negative/deployment-build-step.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: node x:1:3 #PodValue.from: field not allowed: node x:1:26 #PodValue.step: field not allowed: node x:1:37
 PARSE-ERR design/negative/describe-wrong-role.yaml
 PARSE-ERR design/negative/disk-no-sha256.yaml
 PARSE-ERR design/negative/double-hyphen-name.yaml
@@ -601,11 +601,11 @@
 design/negative/inner-named-like-field.yaml|pod|x|OK
 PARSE-ERR design/negative/kebab-schema-word.yaml
 PARSE-ERR design/negative/key-uppercase.yaml
-design/negative/kubernetes-both.yaml|kubernetes|x|FAIL kubernetes: 3 errors in empty disjunction: connect: field not allowed: node x:1:3 create: field not allowed: node x:1:41 description: field not allowed: node x:1:53
+design/negative/kubernetes-both.yaml|kubernetes|x|FAIL kubernetes: #KubernetesValue: 3 errors in empty disjunction: #KubernetesValue.connect: field not allowed: node x:1:3 #KubernetesValue.create: field not allowed: node x:1:41 #KubernetesValue.description: field not allowed: node x:1:53
 design/negative/kubernetes-neither.yaml|kubernetes|x|OK
-design/negative/kubernetes-require.yaml|kubernetes|x|FAIL kubernetes: 3 errors in empty disjunction: create: field not allowed: node x:1:3 description: field not allowed: node x:1:19 require: field not allowed: node x:1:46
-design/negative/local-sizing.yaml|local|x|FAIL local: 2 errors in empty disjunction: connect: field not allowed: node x:1:3 cpu: field not allowed: node x:1:26
-design/negative/machine-firmware.yaml|vm|x|FAIL vm: 6 errors in empty disjunction: firmware: 3 errors in empty disjunction: firmware: 4 errors in empty disjunction: firmware: conflicting values "bios" and "uefi": /charly/spec-module/schema/node.cue:95:17 /charly/spec-module/schema/vm.cue:70:13 node x:1:89 firmware: conflicting values "uefi-insecure" and "uefi": /charly/spec-module/schema/node.cue:95:17 /charly/spec-module/schema/vm.cue:1064:19 /charly/spec-module/schema/vm.cue:1064:44 node x:1:89 firmware: conflicting values "uefi-secure" and "uefi": /charly/spec-module/schema/node.cue:95:17 /charly/spec-module/schema/vm.cue:1064:19 /charly/spec-module/schema/vm.cue:1064:44 node x:1:89 firmware: field not allowed: node x:1:79
+design/negative/kubernetes-require.yaml|kubernetes|x|FAIL kubernetes: #KubernetesValue: 3 errors in empty disjunction: #KubernetesValue.create: field not allowed: node x:1:3 #KubernetesValue.description: field not allowed: node x:1:19 #KubernetesValue.require: field not allowed: node x:1:46
+design/negative/local-sizing.yaml|local|x|FAIL local: #LocalValue: 2 errors in empty disjunction: #LocalValue.connect: field not allowed: node x:1:3 #LocalValue.cpu: field not allowed: node x:1:26
+design/negative/machine-firmware.yaml|vm|x|FAIL vm: #VmValue: 6 errors in empty disjunction: #VmValue.firmware: 3 errors in empty disjunction: #VmValue.firmware: 4 errors in empty disjunction: #VmValue.firmware: conflicting values "bios" and "uefi": /charly/spec-module/schema/node.cue:95:17 /charly/spec-module/schema/vm.cue:70:13 node x:1:89 #VmValue.firmware: conflicting values "uefi-insecure" and "uefi": /charly/spec-module/schema/node.cue:95:17 /charly/spec-module/schema/vm.cue:1064:19 /charly/spec-module/schema/vm.cue:1064:44 node x:1:89 #VmValue.firmware: conflicting values "uefi-secure" and "uefi": /charly/spec-module/schema/node.cue:95:17 /charly/spec-module/schema/vm.cue:1064:19 /charly/spec-module/schema/vm.cue:1064:44 node x:1:89 #VmValue.firmware: field not allowed: node x:1:79
 PARSE-ERR design/negative/manager-attributes-as-core-fields.yaml
 PARSE-ERR design/negative/method-schema.yaml
 PARSE-ERR design/negative/method-string.yaml
@@ -622,7 +622,7 @@
 PARSE-ERR design/negative/plugin-method-schema.yaml
 PARSE-ERR design/negative/plugin-string.yaml
 design/negative/pod-names-driver.yaml|pod|x|OK
-design/negative/pod-require.yaml|pod|x|FAIL pod: 3 errors in empty disjunction: description: field not allowed: node x:1:3 from: field not allowed: node x:1:26 require: field not allowed: node x:1:37
+design/negative/pod-require.yaml|pod|x|FAIL pod: #PodValue: 3 errors in empty disjunction: #PodValue.description: field not allowed: node x:1:3 #PodValue.from: field not allowed: node x:1:26 #PodValue.require: field not allowed: node x:1:37
 PARSE-ERR design/negative/privilege-unknown.yaml
 PARSE-ERR design/negative/put-config-read-only.yaml
 PARSE-ERR design/negative/removed-eventually.yaml
@@ -643,13 +643,13 @@
 PARSE-ERR design/negative/snake-node-name.yaml
 PARSE-ERR design/negative/source-no-os.yaml
 PARSE-ERR design/negative/source-two-origins.yaml
-design/negative/stage-attempt-zero.yaml|pipeline|p|FAIL pipeline: stage: field not allowed: node p:1:62
+design/negative/stage-attempt-zero.yaml|pipeline|p|FAIL pipeline: #PipelineValue.stage: field not allowed: node p:1:62
 PARSE-ERR design/negative/stage-deployment-candy.yaml
 PARSE-ERR design/negative/stage-pipeline-candy.yaml
-design/negative/stage-two-arms.yaml|pipeline|x|FAIL pipeline: stage: field not allowed: node x:1:59
+design/negative/stage-two-arms.yaml|pipeline|x|FAIL pipeline: #PipelineValue.stage: field not allowed: node x:1:59
 PARSE-ERR design/negative/state-commit-record-value.yaml
 PARSE-ERR design/negative/stream-unknown.yaml
-design/negative/top-local-no-connect.yaml|local|x|FAIL local: require: field not allowed: node x:1:30
+design/negative/top-local-no-connect.yaml|local|x|FAIL local: #LocalValue.require: field not allowed: node x:1:30
 PARSE-ERR design/negative/transition-unknown-state.yaml
 PARSE-ERR design/negative/two-comparisons.yaml
 PARSE-ERR design/negative/two-intents.yaml
@@ -660,7 +660,7 @@
 PARSE-ERR design/negative/unresolved-namespaced-reference.yaml
 PARSE-ERR design/negative/user-config-secret-backend.yaml
 PARSE-ERR design/negative/venue-no-access.yaml
-design/negative/venue-not-admitted.yaml|local|x|FAIL local: connect: field not allowed: node x:1:3
+design/negative/venue-not-admitted.yaml|local|x|FAIL local: #LocalValue.connect: field not allowed: node x:1:3
 PARSE-ERR distro-arch/.github/workflows/tag-on-merge.yml
 distro-arch/box/arch-builder/charly.yml|candy|arch-builder|OK
 distro-arch/box/arch-coder/charly.yml|candy|arch-coder|OK
@@ -2884,7 +2884,7 @@
 plugin-herdr/charly/charly/testdata/images.yml|candy|ml-cuda|OK
 plugin-herdr/charly/charly/testdata/images.yml|candy|ubuntu-dev|OK
 plugin-herdr/charly/charly/testdata/migrate-retired-pipeline/charly.yml|candy|migrate-pipeline-plugin|OK
-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-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-herdr/charly/charly/testdata/plugin-buildcache-project/candy/plugin-example-kind/charly.yml|candy|plugin-example-kind|OK
 plugin-herdr/charly/check/eval-host-project-pkg-uninstall/charly.yml|candy|check-pkg-uninstall-root-candy|OK
 plugin-herdr/charly/check/eval-host-project-pkg-uninstall/charly.yml|candy|check-pkg-uninstall-fixture|OK
@@ -2956,10 +2956,10 @@
 plugin-media/candy/plugin-media/charly.yml|candy|plugin-media|OK
 PARSE-ERR plugin-migrate/.github/workflows/tag-on-merge.yml
 plugin-migrate/candy/plugin-migrate/charly.yml|candy|plugin-migrate|OK
-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
+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
 plugin-migrate/charly.yml|local|check-migrate-app|OK
 plugin-migrate/charly.yml|local|check-migrate-local|OK
 PARSE-ERR plugin-mise/.github/workflows/tag-on-merge.yml
@@ -3527,7 +3527,7 @@
 pod-herdr/charly/charly/testdata/images.yml|candy|ml-cuda|OK
 pod-herdr/charly/charly/testdata/images.yml|candy|ubuntu-dev|OK
 pod-herdr/charly/charly/testdata/migrate-retired-pipeline/charly.yml|candy|migrate-pipeline-plugin|OK
-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
+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
 pod-herdr/charly/charly/testdata/plugin-buildcache-project/candy/plugin-example-kind/charly.yml|candy|plugin-example-kind|OK
 pod-herdr/charly/check/eval-host-project-pkg-uninstall/charly.yml|candy|check-pkg-uninstall-root-candy|OK
 pod-herdr/charly/check/eval-host-project-pkg-uninstall/charly.yml|candy|check-pkg-uninstall-fixture|OK

4. The diagnostic change — declared, not stripped

A rejection now re-roots its path at the def that rejected it. That is more informative: a reader learns which def refused the body — which is exactly the information a moved kind needs, because the base's #LocalValue and a plugin's #LocalValue no longer look alike. Kept deliberately.

body before (entity.Unify(def)) after (def.Unify(entity))
local: {connect: …} local: connect: field not allowed local: #LocalValue.connect: field not allowed
pod: {description: …} pod: description: field not allowed pod: #PodValue.description: field not allowed
vm: {firmware: …} vm: firmware: … field not allowed vm: #VmValue.firmware: … field not allowed
pipeline: {concurrency: …} pipeline: concurrency: field not allowed pipeline: #PipelineValue.concurrency: field not allowed

0 accept/reject verdicts moved across all 2,004 bodies (§3); the 20 re-rooted lines are all rejections that were already rejections.

5. Gates run — what CI runs, on the final tree

$ TMPDIR=/tmp/cs GOTMPDIR=/home/atrawog/.cache/go-tmp go test ./charly/... -count=1
ok  	github.com/opencharly/charly/charly	288.894s
ok  	github.com/opencharly/charly/charly/internal/pluginsgen	130.719s

$ for d in tools/*/; do ( cd "$d" && GOWORK=off go test -count=1 ./... | tail -1 ); done
ok  	github.com/opencharly/charly/tools/gomod-canonical	0.003s
ok  	github.com/opencharly/charly/tools/ledger-validate	0.014s

$ cd tools/gomod-canonical && GOWORK=off go test -run TestContractPinsMatchShared -v -count=1
=== RUN   TestContractPinsMatchShared
--- PASS: TestContractPinsMatchShared (0.00s)
PASS

$ gofmt -l charly tools
(empty)
$ cd charly && GOTOOLCHAIN=go1.26.8 golangci-lint fmt --diff ./...
(empty)
$ cd charly && GOTOOLCHAIN=go1.26.8 golangci-lint run ./...
0 issues.
$ for d in tools/*/; do ( cd "$d" && GOWORK=off GOTOOLCHAIN=go1.26.8 golangci-lint run ./... ); done
0 issues.   (×5 modules)

$ TMPDIR=/tmp/cs GOTMPDIR=/home/atrawog/.cache/go-tmp go vet ./charly/...
vet rc=0

Live load through the changed gate, the same way unit 0 proved it:

$ ./bin/charly box validate
charly box validate: OK — checked 604 candies, 122 boxes, 49 deploys, 7 distros, 7 builders; 0 warnings, 0 errors

The multi-module tree is what CI sees: charly/ (the binary) plus five tools/* modules, each tested and linted separately with GOWORK=off.

6. R9 — the binary under test IS this source

go version -m cannot prove a charly binary's commit (-buildvcs=false by design), so the honest chain is the CalVer stamp against the source that produces it, plus the bed's own driver_version:

$ ./scripts/bootstrap-charly.sh
bootstrap-charly: built ./bin/charly (2026.316.1635)
$ ./bin/charly version
2026.316.1635
$ bash scripts/calver.sh
2026.316.1635

charly version == scripts/calver.sh == 2026.316.1635, and CalVer is derived only from HEAD's UTC timestamp (scripts/calver.sh), so the stamp identifies the source and not the build clock. No new runtime OS dependency, so packaging: is untouched.

7. R10 — the bed

Change class: charly Go code on the loader/kind-gate path. The A2 matrix routes a cross-cutting loader change to the beds that exercise the loader, and its named check-pod is no longer defined in this repo's tree — it moved to plugin-pod, tracked as charly#1123 (which records that the map names beds that resolve to nothing):

$ grep -rn "^check-pod:" --include=*.yml --include=*.yaml . | grep -v '^./.check' | wc -l
0
$ grep -c '^check-loader-flat-import-local:' charly.yml
1

The bed this class has been proven with — and the one unit 0 used, recorded in spec#304 with its reason — is check-loader-flat-import-local.

Read from the file the run wrote (.check/check-loader-flat-import-local/2026.316.1640/summary.yml), not from the console:

$ ./bin/charly check run check-loader-flat-import-local
charly check run check-loader-flat-import-local: [deploy-add] PASS after 4m15.949s
charly check run check-loader-flat-import-local: [bring-up-members] PASS after 1ms
charly check run check-loader-flat-import-local: [check-live] PASS after 3m17.549s
charly check run check-loader-flat-import-local: [update] PASS after 4m1.148s
charly check run check-loader-flat-import-local: [cleanup] PASS after 3m7.053s
charly check run check-loader-flat-import-local: [cleanup-members] PASS after 0s
charly check run check-loader-flat-import-local: PASS (steps=6)

$ cat .check/check-loader-flat-import-local/2026.316.1640/summary.yml
bed: check-loader-flat-import-local
calver: 2026.316.1640
driver: /home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/dsh-kindvalue-order/charly/bin/charly
driver_version: 2026.316.1635
driver_size: 56558103
driver_mtime: 2026-11-12T16:37:21Z
runner_stderr: runner.stderr.log
steps:
  - name: deploy-add
    duration_seconds: 256
    ok: true
    status: PASS
    skipped: 0
  - name: bring-up-members
    duration_seconds: 0
    ok: true
    status: PASS
    skipped: 0
  - name: check-live
    duration_seconds: 198
    ok: true
    status: PASS
    skipped: 0
    checks:
      - id: loader-flat-import-validates
        status: PASS
        text: "a flat import plus a plugin-provided kind validates (both the decode fix and the flat-file read are exercised)"
        reason: exit=0
  - name: update
    duration_seconds: 241
    ok: true
    status: PASS
    skipped: 0
  - name: cleanup
    duration_seconds: 187
    ok: true
    status: PASS
    skipped: 0
  - name: cleanup-members
    duration_seconds: 0
    ok: true
    status: PASS
    skipped: 0
total_seconds: 882
diagnostics:
  errors: 0
  warnings: 0
  advisories: 0
  allowlisted: 0
  errors_fatal: true
  warnings_fatal: false
  advisories_fatal: false
  cache_ratio: not-applicable-no-build-steps
skipped_checks: 0
ok: true
status: PASS

driver_version: 2026.316.1635 is the R9 build named in §6, so the bed exercised this source. skipped_checks: 0 matters: a bed whose step table reports SKIPs has not proven what it claims. The check-live step's log (.check/check-loader-flat-import-local/2026.316.1640/check-live.log) is where the loader path under change ran live — deploy-add and check-live both load this repo's real project through validateKindValueCUE before the fixture assertion runs, so the changed gate is on the executed path, not merely adjacent to it.

8. Provenance — the exact tree the numbers above describe

Head: 1945d616b3dd1a5ca60708ee2499c387e2da7a86

$ git rev-parse HEAD
1945d616b3dd1a5ca60708ee2499c387e2da7a86
$ git rev-parse HEAD^{tree}
a7fcdedaee62201a23ea1cfd6be3e279e6520b48
$ git status --short | wc -l
0

$ git rev-list --count origin/main..HEAD && git diff --stat origin/main...HEAD
2
 charly/kind_value_composed_test.go | 91 ++++++++++++++++++++++++++++++++++++++
 charly/provider_kind_invoke.go     | 16 +++++++-
 2 files changed, 106 insertions(+), 1 deletion(-)

The pushed head is the commit the evidence was produced on: the tree hash a7fcdedaee62201a23ea1cfd6be3e279e6520b48 is the tree the plant, the corpus arms, the CI gates and the bed all ran against, on a rebuilt driver stamped 2026.316.1635 from this head (scripts/calver.sh). go version -m would report (devel) for this binary (-buildvcs=false by design), which is why the CalVer chain in §6 plus the bed's own driver_version is the provenance, not go version -m.

Evidence fence:

session: 2c99fdd4-d36e-4fd3-b2e1-8571a99f8729 (delegated from session-f8a0eb3b-2677-47a9-8139-49b1ba39440c)
harness: DeepSeek Harness (dsh) 0.2.1-rc.2
model: ollama-cloud/deepseek-v4.1-flash
tier: fully tested and validated

9. Review round 1 — the finding, the fix, the RCA

The fresh validator BLOCKed on one real defect in prose this PR added, and it was correct: the doc comment above the new test quoted

args.prs: cannot find package "github.com/opencharly/spec/schema"

which is the diagnostic the umbrella corpus's pipeline body produced — not what THIS fixture produces. #ServedrefValue has label/llm, so the un-flipped gate fails at servedref: llm: cannot find package …, which is exactly what the §2 red fence (and the fence in §Summary) has always shown. The comment named a diagnostic its own adjacent test cannot print: a false claim in the tree, fixed rather than softened, in a new commit.

$ grep -n "Red without the order flip" -A 2 charly/kind_value_composed_test.go
143:// Red without the order flip, with THIS fixture's own diagnostic (pasted red in the PR):
144:// `servedref: llm: cannot find package "github.com/opencharly/spec/schema"` — the node's
145:// discriminator, the field that forced the reference, and the module it could not resolve.
$ grep -rn "args\.prs" charly/ | wc -l
0
$ git log --oneline -1
1945d616 docs(plugin): quote the witness fixture's own diagnostic, not the corpus one

RCA (missed control). The comment and the PR's red fence were written from different sources — the comment from the defect's diagnosis (where the corpus body's args.prs: … is the correct symptom), the fence from this fixture's actual run — and nothing cross-read the two. The control that would have caught it is the one I applied as the fix: quote the fixture from its own executed output, then sweep the stale string claim-keyed rather than trusting the prose. The root fix landed in the tree (the comment), not in the review thread.

The round-1 delta moves nothing, re-measured on this head: the plant re-run (§2: red on assertions, restored byte-identical), both corpus arms (§3: byte-identical verdict lists to the pre-round hashes, 117afcac… / c99e948b…), the full suite (§5: 288.894s / 130.719s), lint/gofmt/vet (§5: 0 issues, 0 files, rc=0), and a fresh R10 bed on the new tree (§7: 2026.316.1640, PASS, 882 s, driver 2026.316.1635).

Rulebook compliance

  • R0 (skills first). Loaded through the dispatcher before the first edit or git/gh action: plugin (the plugin-host contract this gate lives in), go (charly source/build), check (the R10 bed, its change-class matrix and the bed authoring rules), git-workflow (before any branch/commit/PR), and — for the lint work — go-quality (with strict-policy for the R1 dispositions). Both AGENTS.md files (umbrella and charly/) were read first. Every row the dispatcher selects for core-Go + plugin-host work was loaded.

  • R1 (RCA every anomaly, then fix it or file it). Three anomalies, each RCA'd before remediation, each with its missed control named:

    1. The defect itself, RCA'd before any edit: the mechanism is cue.Value.Unify resolving through the receiver's runtime; the missed control is that unit 0's fixture served a def with no contract reference, so no test ever exercised a served def's import graph; the blast radius is every served def citing schema.#…; the root fix is the receiver flip plus the witness test that fails without it.
    2. My own first version of the test proved nothing. It reused the existing gateProbeNode fixture, which hardcodes Disc: "gateprobe" — so for a node whose discriminator had no gated def the gate returned nil and both assertions would have "passed". RCA: the fixture carried a discriminator I did not control. Missed control: a fixture that makes a negative case look green. Fixed with servedRefNode (the unit's own discriminator) before the flip, which is why the red run in §2 exists at all. This is the "a test that cannot fail is invalid" class (R7).
    3. golangci-lint was not on PATH (it lives in ~/go/bin on this host) — an invocation error, not a code finding; fixed by using it explicitly, after which the configured run reports 0 issues.
      No warnings in any gate. Nothing to file.
  • R2 (no duplication). One gate, one unification site, one resolver: the fix changes the existing expression rather than adding a second gate path, and the new test reuses the existing gateProbeProvider/PluginSchema fixture types instead of a parallel harness.

  • R3 (no workarounds). The fix is the mechanism, not a suppression: no retry, no sleep, no "skip when the def carries an import", no special case for schema. references. A fallback that hid the next served-def failure would have been the workaround, and this is its opposite.

  • R4 (product before prose). No documented command changed and nothing was routed around in prose; the mechanism is documented where the code is, and both the corpus and the live box validate prove the product.

  • R5 (no legacy; claim-keyed sweep). No identifier was deleted or renamed, so there is no removed-name sweep. The claim that changed is the gate's unification order, and it is swept — the production site is the only one, and every other occurrence is deliberately the OLD order kept as a witness:

    $ grep -n "entity.Unify(def)\|def.Unify(entity)" charly/*.go
    charly/kind_value_composed_test.go:139:// entity is built by the project loader (no import clause anywhere in it), so `entity.Unify(def)`
    charly/kind_value_composed_test.go:140:// resolves the def through the ENTITY's runtime and fails; `def.Unify(entity)` resolves it
    charly/kind_value_composed_test.go:169:	if verr := entity.Unify(def).Validate(); verr == nil {
    charly/kind_value_composed_test.go:170:		t.Fatal("entity.Unify(def) resolved a served `schema.#…` reference — the runtime the entity carries is no longer import-less, so re-derive why the gate's order matters")
    charly/kind_value_composed_test.go:172:		t.Fatalf("entity.Unify(def) must fail by IMPORT resolution (the entity's runtime has no module graph); got: %v", verr)
    charly/kind_value_corpus_sweep_test.go:89:	if verr := entity.Unify(def).Validate(); verr != nil {
    charly/provider_kind_invoke.go:548:	// clause anywhere in it. `entity.Unify(def)` therefore resolves a `schema.#…` reference a
    charly/provider_kind_invoke.go:550:	// "github.com/opencharly/spec/schema"`), while `def.Unify(entity)` resolves it through the
    charly/provider_kind_invoke.go:557:	merged := def.Unify(entity)

    provider_kind_invoke.go:557 is the one production site. kind_value_composed_test.go:169/172 are the test's pinned assertion that the OLD order fails (its whole point); kind_value_corpus_sweep_test.go:89 is the sweep's base arm, whose header already documents it as the pre-change oracle. No stale claim survives.

  • R6 (preserve work, git safety). The worktree was created off fresh origin/main (c3f47694) on its own branch, and the tree is clean on the committed head; nothing but the two files of this diff is in the commit, no other session's file was touched (a pre-existing /tmp/pr-body.md from another session was left alone and this body was written to its own path), and there was no force-push, no direct push to main and no hook bypass:

    $ git rev-parse --abbrev-ref HEAD && git status --short | wc -l
    feat/kind-value-unify-order
    0
    $ git log --oneline origin/main..HEAD
    1945d616 docs(plugin): quote the witness fixture's own diagnostic, not the corpus one
    4c366318 fix(plugin): unify with the def as receiver so a served def's contract refs resolve

    One branch off origin/main, clean tree, two commits of one cutover (the fix, then the round-1 correction) — visible in §8 (above) as well.

  • R7 (prove behavior, not compilation). The coverage fails without the change, and it fails as an assertion that names the real diagnostic (§2, restored byte-identically under sha256sum -c). The changed path executed live over 2,004 real authored entity bodies with the output retained (§3) and over this repo's real project load (§5 box validate). No emitted-artifact boundary is involved.

  • R8 (live or skip, never fake). N/A by kind: this diff crosses no external service boundary (no credential, no provider, no network). The CUE module graph the fix needs is the embedded spec overlay — real in every arm above, not mocked.

  • R9 (binary equals source). charly version == scripts/calver.sh == 2026.316.1635 on the committed tree, and the bed's summary.yml records that same driver_version (§7). No new runtime OS dependency; packaging: untouched.

  • R10 (fresh disposable proof). check-loader-flat-import-local on the committed tree, driven by the worktree-local CalVer build, pasted from .check/<bed>/<calver>/summary.yml in §7: ok: true, status: PASS, skipped_checks: 0, diagnostics.errors: 0, warnings: 0. The bed is disposable: true and runs the full deploy → check-live → charly update fresh rebuild → re-check → teardown cycle.

Change classification

  • Class: charly core Go — one production line in the kind-value gate (loader / prescan-dispatch), plus its witness test. No CUE schema, no wire type, no generated artifact, no pin, no gitlink, no design/*.tsv, no TODO.md, no skill prose.
  • Breaking change + rollback: no ! and no authored surface changes — nothing a consumer configures or calls changes, and that is measured rather than asserted: 0 accept/reject verdicts moved over 2,004 real bodies (§3) and the live project load is unchanged (§5). The one observable difference is diagnostic wording: a rejection's path is now rooted at the def (#LocalValue.connect instead of connect), so a consumer matching on the old error string would see a different string. Rollback is a revert of this one commit — it carries no pins, schema or wire contract, so there is nothing to migrate; reverting restores the import-resolution failure for any served def citing schema.#….

Filed issues

  • charly#1123 — pre-existing and already tracked, not filed here: the A2 change-class row (and charly.yml's bed-to-verb coverage map) names check-pod, which is no longer defined in this repo's tree; it moved to plugin-pod. Recorded because it is the reason this PR names a substitute bed instead of the matrix's named one. Its fix does not change this PR's verdict.
  • spec#304 — the chain tracker this unit belongs to (unit 0 = charly#1122; unit 1 leg 2 lands on top of this merge). Not filed here either; it is where the landing STATUS goes.

No new issue was filed: every finding this PR produced was blocking and was fixed in it.

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

…t refs resolve

`validateKindValueCUE` gated an authored kind value with `entity.Unify(def)` — authored document first. `cue.Value.Unify` resolves every reference it meets through the RECEIVER's runtime, and the two sides carry different ones: `def` comes from the composed unit, whose runtime carries the plugin unit's import graph, while `entity` is built from the authored JSON by the project loader, which has no import clause anywhere in it. So the moment unit 0 (#1122) moved the LOOKUP to the composed value and the first served def cited a contract definition (`schema.#LLMSpec`, as plugin-pipeline's `#PipelineValue` does), the gate resolved that reference through the entity's import-less runtime and failed.

Same two values, one process, only the receiver differs:

    entity.Unify(def)  =  args.prs: cannot find package "github.com/opencharly/spec/schema"
    def.Unify(entity)  =  <nil>

The flip is one line. The witness that was missing is a test that judges a body against a def DECLARED BY A SERVED UNIT whose body carries a contract reference: `TestKindValueGate_ValidatesAServedDefCarryingAContractReference`, red on assertions without the flip.

The diagnostic change is kept, not stripped: a rejection now re-roots its path at the def (`local: connect: field not allowed` becomes `local: #LocalValue.connect: field not allowed`), which tells the reader WHICH def rejected the body. Zero accept/reject verdicts moved across the 2,004-body corpus (base arm vs this tree: 1984 OK / 20 FAIL on both sides, verdict-only diff empty); all 20 FAIL diagnostics re-root, and every one was already a FAIL.

The corpus diff, the plant, the CI gates and the R10 bed summary (`check-loader-flat-import-local`, PASS, 884s, 0 errors / 0 warnings / 0 skipped) are in the pull request body.

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

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 4c36631887b7b9f44472c2a58a278532e32d7302 (branch: feat/kind-value-unify-order)
Change class: charly core Go (one-line gate flip + witness test)

Security screen: PASS (no scope mismatch, no secrets, no weakened guardrail — the flip is verdict-preserving per the 2,004-body corpus; no supply-chain/self-mod change).

Blocks

  1. R1 / R5 — the newly added test comment quotes a diagnostic the test does not produce and that contradicts the PR's own pasted red output. charly/kind_value_composed_test.go (the TestKindValueGate_ValidatesAServedDefCarryingAContractReference doc comment) states:

    // Red without the order flip (measured, paste in the PR): "args.prs: cannot find package
    // \"github.com/opencharly/spec/schema\"".
    

    The "paste in the PR" (§2) is actually:
    servedref: llm: cannot find package "github.com/opencharly/spec/schema": ….
    args.prs appears nowhere in the fixture (#ServedrefValue has label/llm), nowhere in the body, and nowhere in the pasted output. This is a stale/false claim introduced by this commit — an R1 comment-divergence-from-reality incident that R5 requires be swept in the same commit. Fix the comment to quote the real diagnostic (servedref: llm: cannot find package "github.com/opencharly/spec/schema"), or drop the parenthetical.

    Non-blocking notes: the check-pod → check-loader-flat-import-local bed substitution is acceptable (the matrix's named bed does not exist in-tree; the substitute loader bed exercises validateKindValueCUE, and the gap is filed as charly#1123 under ## Filed issues). Placement: CORRECT (core plugin-loading/prescan-dispatch path; one-line mechanism fix, no capability moved into core). Attribution fully tested and validated is justified by the corpus run, the witness test red/green, and the bed's driver_version: 2026.316.1603 matching §6.

Verdict: BLOCK


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

View action run

…pus one

Round-1 review finding (real, and fixed here in the same commit that added the comment). The doc
comment above TestKindValueGate_ValidatesAServedDefCarryingAContractReference quoted

    args.prs: cannot find package "github.com/opencharly/spec/schema"

which is the diagnostic the ORIGINAL umbrella-corpus pipeline body produced — the defect's own
symptom. This fixture is `#ServedrefValue` with `label`/`llm`, so the un-flipped gate fails at

    servedref: llm: cannot find package "github.com/opencharly/spec/schema"

The claim travelled from the defect diagnosis into a comment sitting next to a different fixture
and was never re-read against the output that fixture actually prints — even though that output is
pasted in the PR's own red fence. A comment that names a diagnostic the adjacent test cannot
produce is a false claim in the tree, so it is swept here rather than softened.

Missed control: the comment and the PR's §2 red fence were written from different sources and were
not cross-read; the fix is to quote the fixture, and the claim-keyed sweep for the stale string is
now empty.

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

Copy link
Copy Markdown
Contributor Author

R1 — the round-1 finding is real, and this is its RCA plus the fix.

Agent: dsh-kindvalue-order (DeepSeek Harness, ollama-cloud/deepseek-v4.1-flash)

The finding, accepted in full. The doc comment above TestKindValueGate_ValidatesAServedDefCarryingAContractReference quoted args.prs: cannot find package "github.com/opencharly/spec/schema" — the diagnostic the umbrella corpus's pipeline body produces, not one this fixture can produce. #ServedrefValue is {label: string, llm?: schema.#LLMSpec}, so the un-flipped gate fails at servedref: llm: cannot find package …, which is what the red fence in the body has shown since the first push. The comment named a diagnostic its own adjacent test cannot print: a false claim in the tree.

Mechanism. The claim was carried from the defect's diagnosis — where args.prs: cannot find package … is the correct symptom of the original pipeline corpus body — into a comment sitting next to a fixture with a different shape, and the discriminator (servedref) and field (llm) were never re-derived from the fixture.

Missed control. The comment and the body's red fence were written from two different sources (diagnosis vs. this fixture's executed output) and were never cross-read, even though both sit in the same change and the correct line was already pasted two sections above. My own pre-push self-audit checked the code claims against measurement but not the new prose against the fixture it describes.

Root fix (in the tree, not in this thread), and the sweep.

$ grep -n "Red without the order flip" -A 2 charly/kind_value_composed_test.go
143:// Red without the order flip, with THIS fixture's own diagnostic (pasted red in the PR):
144:// `servedref: llm: cannot find package "github.com/opencharly/spec/schema"` — the node's
145:// discriminator, the field that forced the reference, and the module it could not resolve.
$ grep -rn "args\.prs" charly/ | wc -l
0

Committed as 1945d616 (docs(plugin): quote the witness fixture's own diagnostic, not the corpus one).

The round-1 delta moves nothing, re-measured on the new head. Plant re-run: red on assertions, restored byte-identical (sha256sum -c OK, git status empty). Both corpus arms re-run: byte-identical verdict lists to the pre-round hashes (117afcac… base / c99e948b… fixed; 1984 OK / 20 FAIL on both; verdict-only diff empty). Full suite 288.894s + 130.719s, golangci-lint run 0 issues, gofmt -l empty, go vet rc=0. Fresh R10 bed on the committed tree: check-loader-flat-import-local PASS, calver: 2026.316.1640, total_seconds: 882, errors 0 / warnings 0 / advisories 0, skipped_checks 0, driver_version: 2026.316.1635 = scripts/calver.sh at that head.

The PR body has been re-written for the new head (head, tree, corpus, gates, R9 and the bed summary all re-derived on it) and is published before this push.

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

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 1945d616b3dd1a5ca60708ee2499c387e2da7a86 (branch: feat/kind-value-unify-order)

Security screen: PASS — no scope mismatch, no secrets, no weakened guardrail; the receiver flip is verdict-preserving per the 2,004-body corpus, no new deps, no self-mod of the validator/rulebook.
Checklist: All applicable rules PASS or NA (A1/A2/A3, R0–R10, PIL, CONC, HC, ARCH, DISP, QUAL).

Comments considered:

  • #6829552626 (bot, prior BLOCK) — stale-superseded: the only finding (the args.prs doc comment not matching the fixture's real diagnostic) is fixed in the CURRENT diff, which now quotes servedref: llm: cannot find package "github.com/opencharly/spec/schema"; R5 grep shows args\.prs count 0.
  • #6830272476 (@aitrawog, RCA) — verified-non-blocking: it is the author's round-1 RCA/fix, names the missed control ("checked code claims against measurement but not the new prose against the fixture"), and the fix landed in-tree (1945d616), satisfying the review-round-evidence requirement.

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:09
@github-actions
github-actions Bot merged commit b8de0f9 into main Nov 12, 2026
4 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 12, 2026
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