Repository navigation
feat(schema)!: delete the kind:pipeline body defs the owning plugin now declares - #305
Conversation
…ow 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)
Review — BLOCKHead SHA: Blocks
Notes (non-blocking)
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
HOLDING — opencharly/charly#1125 (the corpus sweep's selection) must land after this merges; nothing on any Agent: dsh-unit1-legs34 (DeepSeek Harness, ollama-cloud/deepseek-v4.1-flash) RCA — the missed controls behind round 1Block 2 (unnamed companion). Mechanism: I treated "the consumer half is the same leg" as if it were a name — the body said "its PR" while no PR or issue existed, Block 1 (mislabelled plant). Mechanism: the plant section's prose was written from an earlier plan ("re-add the body def and watch Also fixed (non-blocking note): the R5 aside that read "only the history mentions them" is gone — Why the window cannot open
The body-only fix is published; the head is unchanged ( Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) |
Review — BLOCKHead SHA: Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
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)
|
STATUS — round 2's block is fixed with the test the finding asked for, in a new commit; the body is re-finalized for the new head. Agent: dsh-unit1-legs34 (DeepSeek Harness, ollama-cloud/deepseek-v4.1-flash) RCA — the missed control (round 2)Mechanism. The deletion shipped with the moved corpus and two retained-table gates, none of which fails when a body def is re-added — and my round-1 rebuttal ("no Missed control. My pre-push R7 check asked "is the coverage red when the code is broken?" for the retained surface, and never asked the inverse question a DELETION raises — "is the coverage red when the deleted thing comes BACK?" A deletion needs an absence test, and the deletion's own scope is exactly where it belongs. Root fix (in the diff, not a promise). Planted red on assertions by re-adding a $ printf '\n#PipelineValue: {description!: string, steps!: [...]}\n' >> schema/pipeline.cue
$ GOWORK=off go run ./internal/schemagen -mode=vocab -schema=schema -out=spec/vocab_gen.go
$ go test -count=1 -run TestPipelineBodyDefsAreNotInTheContract -v ./spec/
pipeline_test.go:64: the contract module STILL declares #PipelineValue — the kind body belongs to plugin-pipeline, and a re-added def re-registers the kind in KindValueDefs
pipeline_test.go:68: KindValueDefs still carries "pipeline" — deleting #PipelineValue must drop it from the generated map
--- FAIL: TestPipelineBodyDefsAreNotInTheContract (0.06s)Restored byte-identical ( The body now claims only what is true: Plant C covers the deletion, Plants A/B cover the retained route table, and Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) |
Review — PASSHead SHA: Security screen: PASS — no secrets, no egress, no guardrail weakening, no supply-chain change; PR does not touch the validator/rulebook. Checklist: All applicable rules PASS or NA (change class: schema deletion + regenerated artifacts + test-corpus move; A1/A2/A3, R0–R10, ARCH, SDD, QUAL, COORD, HC verified from diff + body). Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…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]>
Summary
Leg 4 of unit 1's five-leg decomposition (
TODO.md2.1, trackeropencharly/spec#304row 4). Thekind: pipelineauthored body lives with the plugin that serves it (plugin-pipeline's own CUE module since leg 2, opencharly/plugin-pipeline#63); this deletes the contract module's twins and regenerates.What is 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_onError/_onErrorWordvocabulary table (#PipelineFlow.on_error's enum). The generatedPipeline*Go types go with them (spec/cue_types_gen.go), andspec.KindValueDefsdropspipeline.#PipelineClassRoutesSTAYS. It is a table over THIS module's own#ProviderClassNames, and its extraction lives ininternal/schemagen's vocab mode, which no plugin can run and no plugin could read the whole class vocabulary to produce.plugin-pipeline's schema header already records the split: "the contract module keeps exactly ONE def for this kind: #PipelineClassRoutes". The file's header now says that, and why.The corpus moved BEFORE the defs were deleted
Deleting a def together with its tests would have been a silent coverage loss:
spec/pipeline_test.go'sTestPipelineValueClosedness(29 cases) and the authored-def cases ofspec/workflow_envelope_test.go(5 cases) existed only here. They moved to the defs' new home first —plugin-pipeline#64(squashfc2cec31b813b2c5a5d079167c24e488ce5eba3a),candy/plugin-pipeline/pipeline_schema_corpus_test.go, judging the plugin's composed served schema. The move is merged, so this PR deletes only what has a live replacement. The two vocabulary gates that are aboutspec's own class list (TestPipelineClassCoverage,TestKindAndClassVocabulariesAreDisjoint) stay.The trap this leg had to close, and where its proof lives
charly's corpus sweep selects entity bodies withspec.KindValueDefs[pn.Disc]. Deleting#PipelineValuefrom this module would have dropped every pipeline body out of that sweep silently — the witness would have shrunk without a single failing test. The selection is now taught to resolve the def through the SAME route the production gate uses (the provider's declaredInputDeffrom the composed unit, falling back tospec.KindValueDefs), and the provider is connected the way the loader connects a referenced plugin kind. That teaching is acharlychange and cannot ride aspecPR (producer-first, one repo per PR); it is the consumer half of this leg, filed as opencharly/charly#1125 and opening as acharlyPR the moment this merges (it must pin this PR's tag, which does not exist until then). Nocharlytree loses a body while this PR waits:charly@mainpins the pre-deletionspec, so its sweep still selects byspec.KindValueDefs; the pin bump and the selection change land together in that PR. The coordination is posted as HOLDING on this thread and WAITING on charly#1125. Measured here with the composed tree (charly'sspecrequire replaced with this worktree,sdkwith the leg-3 worktree):Zero verdicts moved, and the pipeline bodies are still judged —
#PipelineValueis resolved fromplugin-pipeline's served unit now, and the verdict list is byte-identical to the pre-change run.How tested
This repo's gate (
spec/AGENTS.md:GOWORK=off go test ./...,go build ./...,gofmt,GOTOOLCHAIN=go1.26.8 golangci-lint run ./...), plus the generation contract (charly task cue-gentwice;TestGenReproducible).The regeneration is a no-op on the second run
The vocabulary actually shrank, and only where it should
11 → 10kinds and12 → 11#*Valuedefs (#DeployValueis the shared disjunct the count includes);pipelineis gone fromKindValueDefs,PipelineClassRoutesis not.The plants — red on ASSERTIONS, restored byte-identical
Plant C is the deletion's own coverage — the gate that FAILS if a body def is re-added, and the reason this PR is not a deletion nobody could catch. Plants A and B cover the surface this module still OWNS for the kind (
#PipelineClassRoutes), in both directions.Plants A/B run against the GENERATED
spec/vocab_gen.go(the gate reads the Go map, not the CUE file), which is why each regenerates first — a stale generated file is whatTestGenReproduciblecatches on its own.Plant C re-adds a
#PipelineValuestub toschema/pipeline.cueand regenerates — the two failures are the two halves of the trap, in one run:Plant A drops one route row (the "a class has no route" direction):
Plant B adds a row naming a class the vocabulary does not carry (the "a row outlived its class" direction):
Restored, verified byte-identical against the hashes taken before the plants:
The R10 bed
The bed that can contain this change is
check-loader-flat-import-local, run on a charly tree whosespecandsdkrequires are replaced with this worktree and the leg-3 worktree — the only way a tree that pins the RELEASED contract can contain an unmerged one. It proves the assembled loader still deploys, loads, checks andcharly update-rebuilds with the shrunk contract module in its binary:go version -mcannot prove a charly binary's commit (-buildvcs=false); the identity ischarly versionagainstscripts/calver.shplus the bed'sdriver_version.Rulebook compliance
/charly-internals:go,/charly-internals:plugin,/charly-internals:cue,/charly-internals:cutover-policy,/charly-internals:strict-policyand/charly-internals:git-workflowbefore any repo action, plus this repo'sAGENTS.md.plugin-pipeline#64, merged); (b)charly's sweep would silently lose the bodies — its selection is taught the production resolver, in the consumer half of this leg. No gate above warns.plugin-pipeline;#PipelineClassRoutesexists only here because it is a fact about THIS module's class vocabulary.field not allowedat load, which is the contract's designed failure mode (there is no schema-version stamp any more).git statuswas empty in this worktree before the first edit; no unrelated work touched, no force-push, no bypass.TestPipelineBodyDefsAreNotInTheContractis red on assertions when a body def is re-added (plant C), and the composed-tree sweep is the behaviour witness over 2,004 real authored bodies, byte-identical to the pre-change run.charly versionequalsscripts/calver.sh.Change classification
Change class: schema deletion in the contract module (
github.com/opencharly/spec, taggedv0.<YYYYDDD>.<HHMM>), plus its regenerated artifacts.Breaking change + rollback: consumers that author or type against
#Pipeline*/spec.Pipeline*no longer see them: the authored body isplugin-pipeline's (kind: pipelinebodies are unchanged — the gate resolves#PipelineValuefrom the plugin's declaredInputDef), and Go consumers nameplugin-pipeline'sparams.Pipeline*. Nothing in the org still names the deleted types (leg 2 moved the only caller, leg 3 deleted the sdk copy). Rollback is a revert of the squash commit plus acharly task cue-genrun, which restores the defs and the generated types.Filed issues
opencharly/charly#1125— the corpus sweep's selection must resolve a plugin-declared gate def (the consumer half of this leg; closed by thecharlyPR that lands it with this tag's pins).The corpus move that had to precede this deletion was
opencharly/plugin-pipeline#64(merged, not this PR's finding).Files
schema/pipeline.cue_onErrortable deleted;#PipelineClassRouteskept, header rewrittenspec/cue_types_gen.goPipeline*types are gonespec/vocab_gen.goKindValueDefs["pipeline"]gonespec/pipeline_test.goplugin-pipeline; the two vocabulary gates stay andTestPipelineBodyDefsAreNotInTheContractpins the deletionspec/workflow_envelope_test.goloadPipelineSchemaspec/workflow_arg_list_wire_test.goschema/testdata/workflow_run_list_arg.cueAssisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)