Repository navigation
fix(sdk)!: require a CUE schema and a typed input on every plugin capability (delete the input-less waiver) - #314
Conversation
…ability (delete the input-less waiver) The "stub-gate relaxation" let a plugin whose capabilities declare no typed input pass a nil schemaFS and serve an EMPTY schema — making a plugin whose verb input is validated against NOTHING a legal shape. It is not. BuildCapabilitiesWithRequires now rejects, unconditionally: - a nil schemaFS (NO CUE schema); - a schema concatenating to an empty body (EMPTY CUE schema); - a capability declaring NEITHER an input_def NOR a command model (INPUT-LESS). A command is not input-less: its typed input is its #CLIModel (Kong-reflected), the same CUE-validated + Go-generated surface every other class uses. A trivial command (e.g. `charly version`) ships a minimal schema + model, never nothing. Refs opencharly/charly#712.
Review — BLOCKHead SHA: Change class: sdk Go contract-module (breaking) — code/config; library gate = module tests ( Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…ability InputDef rule The canonical command plugin (plugin-example-command) and the substrate kinds (kind:candy) and deploy targets (deploy:local) declare NO structured plugin_input by design — their contract is their CLI grammar / the substrate — and the pre-compaction "doc schema" existed for exactly that case (plugin-candy comment: "plus the self-contained doc schema, via sdk.NewMeta"). So the uniform rule is the SCHEMA, not a per-capability InputDef: - a nil schemaFS is rejected (NO CUE schema); - a schema concatenating to an empty body is rejected (EMPTY CUE schema); - a capability with no structured input is FINE as long as the plugin ships its doc schema (pinned by TestBuildCapabilitiesAcceptsDocSchemaWithoutInputDef). Also fixes the validator finding: the stale `inputlessSchemaFS` identifier in the test comment (now `emptySchemaFS`). Refs opencharly/charly#712.
Review — PASSHead SHA: Security screen: PASS — diff only tightens the sdk contract (deletes a waiver); no secrets, no new deps, no guardrail weakening, no embedded directives. Checklist: All applicable rules PASS or NA. Verified against the CURRENT tree: the two rejections in Comment intake: 1 comment — github-actions[bot] BLOCK at Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…ugin) (#17) * fix(plugin-box)!: ship a self-contained CUE schema (no schema-less plugin) The SDK contract (opencharly/sdk#314) now REJECTS a nil schemaFS and an empty schema: every plugin MUST ship a non-empty, self-contained CUE schema served over Describe. This plugin passed `nil` and served an EMPTY schema. Replace the nil schemaFS with an embedded schemaFS and add schema/box.cue documenting the box-nested command surface (generate/validate/new/pull/build/ inspect/list/labels/load/merge/reconcile/feature) plus the `list` subcommand catalog. Add a Go test pinning that NewMeta().Describe serves a non-empty schema carrying #BoxPlugin. R5: the old schema-less path is deleted in the same change. Part of the cutover tracked in opencharly/charly#712. * fix(plugin-box): cure validator findings (honest schema comment, base++plugin splice test) - candy/plugin-box/schema: drop the false `cue exp gengotypes` -> params/cue_types_gen.go claim; state the served doc/config surface with NO Go consumer (the plugin declares no typed plugin_input), and that the schema is package-less so the host can splice it. - candy/plugin-box/schema_serve_test.go: add TestServedSchemaSplicesOntoHostBase - reproducing charly's `compileBasePlusServed` splice (the real `base ++ plugin` host load gate), stronger than Describe alone. - go.mod: cuelang.org/go is now a direct test dependency. Refs: opencharly/charly#712 Assisted-by: OpenCode opencode-go DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze R10 bed-exemption evidence + maintainer sign-off * docs: re-freeze head for validator re-review (corrected body) Body corrected to report `charly box validate` EXACTLY as executed (never green against a red output), to account for the go.mod dependency promotion, to make the bed-evidence repo-wide, and to cite the in-thread maintainer R10 sign-off. No code change; the re-freeze moves the head so the required gate re-reads the body. Refs: opencharly/charly#712 Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze head for validator re-review (green pinned-CI validate + R10 change-class framing) * docs: re-freeze head for validator re-review (pinned-CI validate with version + R10 citation) * docs: re-freeze head — maintainer R10 sign-off recorded on this PR * docs: re-freeze head — fix A1 import + schema-field accounting --------- Co-authored-by: Andreas Trawoeger <[email protected]>
…ess plugin) (#30) * fix(plugin-deploy-vm)!: ship a self-contained CUE schema (no schema-less plugin) The SDK contract (opencharly/sdk#314) now REJECTS a nil schemaFS and an empty schema: every plugin MUST ship a non-empty, self-contained CUE schema served over Describe. This plugin passed `nil` and served an EMPTY schema. Replace the nil schemaFS with an embedded schemaFS and add schema/vm.cue documenting the deploy:vm capability (a lifecycle substrate). Add a Go test pinning that NewMeta().Describe serves a non-empty schema carrying #DeployVMPlugin. R5: the old schema-less path is deleted in the same change. Part of the cutover tracked in opencharly/charly#712. * fix(plugin-deploy-vm): cure validator findings (honest schema comment, base++plugin splice test) - candy/plugin-deploy-vm/schema: drop the false `cue exp gengotypes` -> params/cue_types_gen.go claim; state the served doc/config surface with NO Go consumer (the plugin declares no typed plugin_input), and that the schema is package-less so the host can splice it. - candy/plugin-deploy-vm/schema_serve_test.go: add TestServedSchemaSplicesOntoHostBase - reproducing charly's `compileBasePlusServed` splice (the real `base ++ plugin` host load gate), stronger than Describe alone. - go.mod: cuelang.org/go is now a direct test dependency. Refs: opencharly/charly#712 Assisted-by: OpenCode opencode-go DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze R10 bed-exemption evidence + maintainer sign-off * docs: re-freeze head for validator re-review (corrected body) Body corrected to report `charly box validate` EXACTLY as executed (never green against a red output), to account for the go.mod dependency promotion, to make the bed-evidence repo-wide, and to cite the in-thread maintainer R10 sign-off. No code change; the re-freeze moves the head so the required gate re-reads the body. Refs: opencharly/charly#712 Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze head for validator re-review (green pinned-CI validate + R10 change-class framing) * fix(plugin-deploy-vm): migrate manifest to schema 2026.261.1747 + bump pinned CI charly to v2026.269.0556 charly migrate stamps the root charly.yml to the required schema 2026.261.1747; the repo's own deploy.yml-pinned charly tag moves with it (v2026.238.1242 -> v2026.269.0556) so the committed CI gate stays green. Coupled to the self-contained-schema change; opencharly/charly#712. * docs: re-freeze head — maintainer R10 sign-off recorded on this PR * docs: re-freeze head — maintainer R10 sign-off recorded on this PR * docs: re-freeze — A1 import accounting fix + R10 matrix citation * docs: re-freeze — R10 class determination w/ rulebook clauses --------- Co-authored-by: Andreas Trawoeger <[email protected]>
…a-less plugin) (#10) * fix(plugin-deploy-local)!: ship a self-contained CUE schema (no schema-less plugin) The SDK contract (opencharly/sdk#314) now REJECTS a nil schemaFS and an empty schema: every plugin MUST ship a non-empty, self-contained CUE schema served over Describe. This plugin passed `nil` and served an EMPTY schema. Replace the nil schemaFS with an embedded schemaFS and add schema/local.cue documenting the deploy:local capability. Add a Go test pinning that NewMeta().Describe serves a non-empty schema carrying #DeployLocalPlugin. R5: the old schema-less path is deleted in the same change. Part of the cutover tracked in opencharly/charly#712. * fix(plugin-deploy-local): cure validator findings (honest schema comment, base++plugin splice test) - candy/plugin-deploy-local/schema: drop the false `cue exp gengotypes` -> params/cue_types_gen.go claim; state the served doc/config surface with NO Go consumer (the plugin declares no typed plugin_input), and that the schema is package-less so the host can splice it. - candy/plugin-deploy-local/schema_serve_test.go: add TestServedSchemaSplicesOntoHostBase - reproducing charly's `compileBasePlusServed` splice (the real `base ++ plugin` host load gate), stronger than Describe alone. - host_render_test.go: normalize the doc comment so `gofmt -l .` is clean (ZERO warnings). - go.mod: cuelang.org/go is now a direct test dependency. Refs: opencharly/charly#712 Assisted-by: OpenCode opencode-go DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze R10 bed-exemption evidence + maintainer sign-off * docs: re-freeze head for validator re-review (corrected body) Body corrected to report `charly box validate` EXACTLY as executed (never green against a red output), to account for the go.mod dependency promotion, to make the bed-evidence repo-wide, and to cite the in-thread maintainer R10 sign-off. No code change; the re-freeze moves the head so the required gate re-reads the body. Refs: opencharly/charly#712 Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze head for validator re-review (green pinned-CI validate + R10 change-class framing) * fix(plugin-deploy-local): migrate manifest to schema 2026.261.1747 + bump pinned CI charly to v2026.269.0556 charly migrate stamps the root charly.yml to the required schema 2026.261.1747; the repo's own deploy.yml-pinned charly tag moves with it (v2026.238.1242 -> v2026.269.0556) so the committed CI gate stays green. Coupled to the self-contained-schema change; opencharly/charly#712. * docs: re-freeze head — maintainer R10 sign-off recorded on this PR * docs: re-freeze head — maintainer R10 sign-off recorded on this PR * docs: re-freeze — A1 accounting fixes + R10 matrix citation * docs: re-freeze — R10 class determination w/ rulebook clauses --------- Co-authored-by: Andreas Trawoeger <[email protected]>
…lugin) (#5) * fix(plugin-udev)!: ship a self-contained CUE schema (no schema-less plugin) The SDK contract (opencharly/sdk#314, the R5 cutover opencharly/charly#712) DELETES the input-less waiver: sdk.BuildCapabilitiesWithRequires now rejects a nil schemaFS and an empty schema, so EVERY plugin MUST serve a non-empty, self-contained CUE schema. Add candy/plugin-udev/schema/udev.cue (#UdevPlugin; package-less, references no base def, compiles standalone), embed it via //go:embed schema/*.cue, and pass it to sdk.NewMeta (was nil). Add schema_serve_test.go pinning the non-empty Describe schema_cue + the #UdevPlugin def. Sweep the stale "shipping only the self-contained doc schema … (via sdk.NewMeta)" comment. Refs opencharly/charly#712. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated) * fix(plugin-udev): cure validator findings (honest schema comment, base++plugin splice test) - candy/plugin-udev/schema: drop the false `cue exp gengotypes` -> params/cue_types_gen.go claim; state the served doc/config surface with NO Go consumer (the plugin declares no typed plugin_input), and that the schema is package-less so the host can splice it. - candy/plugin-udev/schema_serve_test.go: add TestServedSchemaSplicesOntoHostBase - reproducing charly's `compileBasePlusServed` splice (the real `base ++ plugin` host load gate), stronger than Describe alone. - schema/udev.cue: drop the empty `subcommands?`/`config?` placeholders the comment overclaimed. - go.mod: cuelang.org/go is now a direct test dependency. Refs: opencharly/charly#712 Assisted-by: OpenCode opencode-go DeepSeek V4.1 Flash (analysed on a live system) * docs: re-freeze head for validator re-review (corrected body) Body corrected to report `charly box validate` EXACTLY as executed (never green against a red output), to account for the go.mod dependency promotion, to make the bed-evidence repo-wide, and to cite the in-thread maintainer R10 sign-off. No code change; the re-freeze moves the head so the required gate re-reads the body. Refs: opencharly/charly#712 Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system) * fix(udev): correct the schema's params claim + bring the root manifest to schema 2026.261.1747 Two R1-gated truths on the branch head: 1. The schema's 'NO GO CONSUMER' comment claimed this schema 'generates NO params package and has NO cue exp gengotypes artifact' — but the same candy ships params/cue_types_gen.go, generated from this #UdevPlugin def. Reworded to state that nothing decodes a plugin_input (the served surface), without a false no-codegen claim. Comment-only; the def is unchanged. 2. charly box validate was RED: 'schema 2026.261.1747 is required (found "2026.249.2125"). Run: charly migrate'. Ran charly migrate on the repo's own root manifest (no candy manifest touched) — the gate is now GREEN. Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system) --------- Co-authored-by: Andreas Trawoeger <[email protected]>
…ompiled-in plugin pins (inputless cutover) (#720) * feat(charly)!: reject an empty plugin schema unconditionally + bump compiled-in plugin pins (inputless cutover) Delete the registerPluginUnitSchema "stub-gate relaxation": an EMPTY served schema is now rejected NO MATTER WHAT (previously waived when no capability declared an InputDef). A non-empty "doc schema" declaring no InputDef is still ACCEPTED — the rule rejects emptiness, not inputlessness. The sdk already enforces the same rule serve-side (opencharly/sdk#314); this is the host leg. Bump every compiled-in plugin pin (go.mod + charly.yml + packaging/charly.yml) to its merged inputless-cutover release. Refs #712 * docs(charly): fix the garbled doc-comment on the empty-schema gate test (review B18) The TestPluginSchemaEmptyRejectedUnconditionally doc comment carried unbalanced backticks and a stray curly quote; gofmt does not catch it. Rewrite it in plain prose. Refs #720
Summary
Delete the SDK's "stub-gate relaxation" — the exception that let an input-less plugin (no capability declaring an
InputDef) pass anilschema FS and serve an EMPTY CUE schema. It made a plugin whose input is validated against nothing a legal shape.BuildCapabilitiesWithRequiresnow rejects, unconditionally:nilschema FS — NO CUE schema;The uniform rule is the schema, not a per-capability
InputDef. This is deliberate and evidence-led: the canonical command plugin (plugin-example-command) and the substrate kinds (kind:candy) and deploy targets (deploy:local) declare no structuredplugin_inputby design — their contract is their CLI grammar / the substrate — and the pre-compaction "doc schema" existed for exactly that case (plugin-candy's own comment: "plus the self-contained doc schema, via sdk.NewMeta"). Requiring a per-capabilityInputDefwould force invented, unvalidated defs onto those classes. So every plugin must ship a non-empty schema — a pass-through command ships a minimal doc schema, never nothing. That is the one deliberate wiggle room.This is the sdk leg of the R5 cutover tracked in opencharly/charly#712. A sweep finds ~dozens of plugins passing
nil(not 4), so the consumer legs restore their schemas in producer-first order; because they are pinned to older SDK versions, this leg is safe to land first.Files
schema.go— the relaxation deleted; the two unconditional rejections (nil FS, empty body) plus the standalone-compile check retained.loaderkit/parse.go— the "a null value is an input-less verb" note corrected: a null value is an EMPTY input map, decided by the plugin's own served schema.requires_test.go,schema_capabilities_test.go— fixtures now ship a real schema (the tests exercise the real contract instead of waiving it).schema_contract_test.go(new) — pins both rejections andTestBuildCapabilitiesAcceptsDocSchemaWithoutInputDef(a command/kind/deploy plugin with a doc schema serves fine). Fixes the validator's stale-identifier finding (inputlessSchemaFS→emptySchemaFS).Refs: opencharly/charly#712
How tested
Gate for this change class: the sdk is a contract module (a library with no binary and no deployable). The gate that exercises every changed path is
go test ./... -count=1over the module, plusgofmt/go vet. There is no sdk-internal entry point to bed-test: the changed function is reached only from a plugin's serve path, which the consumer legs carry (they restore the schemas and run the beds).1. Module gate —
go test ./... -count=1(fresh, on the final committed tree):2. Changed-path tests —
go test . -run 'Capabilities|Meta' -v -count=1(fresh):The two rejection tests fail without the change (they assert the waiver is gone); the doc-schema test fails if the per-capability
InputDefrule is re-introduced.3. Removal sweep — the waiver and the stale identifier are gone:
(only the two prose references that name the deleted relaxation).
4.
gofmt/go vet:Diff-stats at head
482d1a7:Rulebook compliance
/charly-internals:git-workflow,/charly-internals:plugin,/charly-internals:cutover-policy, and/charly-internals:gowere loaded before any edit/branch/commit/PR action.inputlessSchemaFS) is fixed here, not deferred.nil(restoreschema/*.cue+ embed + pass the FS + regenerateparams/) → the charly host gate (registerPluginUnitSchema) → the marketplace doc. This PR is the sdk unit; the consumer units are the immediate next legs of the same cutover, tracked in #712, not a deferral. They are separate repos, so they cannot share this PR; they are pinned to older SDK versions, so landing the sdk contract first leaves no broken tree.schemaconcat+cue exp gengotypespath — no second implementation is introduced.feat/branch, append-only commits, no force-push, no hook bypass, no direct push tomain.Describereply (Capabilities+schema_cue); the tests marshal/round-trip it and assert the rejection paths, so the boundary is validated.disposable: truebed lands with the consumer legs that carry the pins and the deployable, as stated above.Change classification
charly-or-sdk Go(the sdk contract module) — breaking (a plugin that passed a nil schema FS now fails to serve).go test ./... -count=1(fresh) +gofmt/go vet; consumer-leg runtime beds follow.fully tested and validated— the full gate for this change class passed on the final tree and every changed path is exercised by the new/changed unit tests.Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)