Skip to content

fix(candy-kind)!: ship a self-contained CUE schema (no schema-less plugin) - #5

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/schema-ver-removal
Sep 27, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/schema-ver-removal

Conversation

@aitrawog

@aitrawog aitrawog commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Eradicate the schema-less plugin exception for plugin-candy-kind: every plugin MUST serve a non-empty, self-contained CUE schema over Describe (opencharly/sdk#314; there is no schema-less plugin). This plugin passed nil as the schemaFS and served an EMPTY schema_cue, which makes charly panic at process start (loadBuiltinPluginUnits) once charly pins the post-sdk#314 contract — the direct blocker of the charly host leg (opencharly/charly#714).

Ordered per-repo unit of the R5 cutover tracked in opencharly/charly#712.

Files (git diff --name-only origin/main...HEAD):

    candy/plugin-candy-kind/go.mod
    candy/plugin-candy-kind/plugin.go
    candy/plugin-candy-kind/schema/candykind.cue
    candy/plugin-candy-kind/schema_serve_test.go

How tested

Module gate — fresh on the committed tree at head d6277e4eb086ff91d9895e6723810f53c1340473 (from candy/plugin-candy-kind):

$ env -u GOFLAGS GOWORK=off go mod tidy && gofmt -l . && go build ./... && go vet ./... && go test ./... -count=1
ok  	github.com/opencharly/plugin-candy-kind/candy/plugin-candy-kind

R10 — real host gate + disposable target (operator bed, opencharly/charly#712, 2026-09-27). A rebuilt charly compiled this plugin FROM SOURCE (worktree) via a go.work, so the real process-start host gate loadBuiltinPluginUnits() gates its served schema; then a target explicitly marked disposable: true ran.

This plugin is compiled into the bed from its worktree — the untruncated provenance line:

    dep	github.com/opencharly/plugin-candy-kind/candy/plugin-candy-kind	(devel)	

The real gate names THIS plugin's unit (per-unit line, 63 compiled-in units gated):

    gated kind:candy                                   schema_bytes=1457
    total compiled-in units gated: 63
$ <bed>/bin/charly version
2026.270.1151
$ <bed>/bin/charly check run check-commands-local
charly check run check-commands-local: [deploy-add] PASS
charly check run check-commands-local: [bring-up-members] PASS
charly check run check-commands-local: [check-live] PASS
charly check run check-commands-local: [update] PASS          <-- FRESH REBUILD
charly check run check-commands-local: [cleanup] PASS
charly check run check-commands-local: PASS (steps=6)
$ cat <bed>/.check/check-commands-local/2026.270.1632/summary.yml
ok: true
total_seconds: 371
diagnostics: {errors: 0, warnings: 0, advisories: 0}

Named disposable target: check-commands-local — a kind: local deploy explicitly marked disposable: true in the bed project's charly.yml (the only target the bed destroys/rebuilds). Negative control: TestServedSchemaSplicesOntoHostBase reproduces the base ++ plugin splice; reverting schemaFS→nil makes both schema tests FAIL.

Rulebook compliance

Change classification

Refs opencharly/charly#712 · opencharly/charly#714.

Agent: schema-ver-removal · session ses_f1cc58648ffetzNWhHFWuSeKxC
Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

…ugin)

Every plugin MUST serve a non-empty, self-contained CUE schema over Describe
(the SDK contract landed as sdk#314; there is no schema-less plugin). This
plugin passed `nil` as the schemaFS and served an EMPTY schema_cue, which makes
`charly` panic at process start (`loadBuiltinPluginUnits`) once charly pins the
post-sdk#314 contract — the direct blocker of the charly host leg
(opencharly/charly#714).

- NEW candy/plugin-candy-kind/schema/candy-kind.cue — a package-less, self-contained doc schema for
  this plugin's served declaration surface. It references no base def, so it
  compiles STANDALONE and splices `base ++ plugin` at the host load gate.
- plugin.go — `//go:embed schema/*.cue` + `sdk.NewMeta(calver, caps, schemaFS)`
  instead of `nil`; the stale "ships no schema" comment corrected.
- NEW schema_serve_test.go — `TestNewMetaServesNonEmptySchema` +
  `TestServedSchemaSplicesOntoHostBase` (the real `base ++ plugin` splice).

Refs opencharly/charly#714 · opencharly/charly#712.

Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: d6277e4eb086ff91d9895e6723810f53c1340473 (branch: feat/schema-ver-removal)

Change class: plugin Go + CUE schema (runtime/code — not docs-only, so the R10 bed evidence is applicable).

Security screen: PASS — no secrets, no new/repinned modules (the go.mod hunk only reclassifies the already-present cuelang.org/go as direct, matching the new test import), no guardrail/CI/rulebook edits, no injected directives (T1–T4 clear). *Agent:* footer metadata is not an instruction to me (not a T2 finding).

Blocks

  1. A1 — the body does not END with the mandated Assisted-by: footer. The body's final two lines are the *Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)* line followed by *Agent: \schema-ver-removal` · session `ses_f1cc58648ffetzNWhHFWuSeKxC`*. Rule A1 requires the AI-authored body to END with the italicized Assisted-by: ()line, in that exact form; a trailing line after it means the body does not end with it. Move theAgent:line above the footer (or drop it) so theAssisted-by:` line is the last line of the body.

  2. B12/R10 — the pasted bed evidence does not demonstrate that THIS plugin's changed path was exercised. The go version -m <bed>/bin/charly | grep -E 'plugin-(…candy-kind…)' output is truncated (...) before plugin-candy-kind ever appears, and TestBedBuiltinServedSchemaGate reports only an aggregate — gated 63 compiled-in plugin units; every one serves a non-empty schema — naming no unit. Nothing in the pasted output shows that plugin-candy-kind was compiled into the bed or that its served schema_cue was among the gated units; the body instead leans on a blanket "operator-sanctioned evidence for every plugin PR in this cutover" (a reuse, not a run scoped to this PR). Since the whole point of the change is this plugin's served schema, paste the untruncated dep github.com/opencharly/plugin-candy-kind/candy/plugin-candy-kind (devel) line and/or a per-unit gate line that names candy-kind, so the changed NewMeta→schemaFS path is shown to have executed at the real loadBuiltinPluginUnits gate.

Verdict: BLOCK


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

View action run

@aitrawog aitrawog added the rerun label Sep 27, 2026
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: d6277e4eb086ff91d9895e6723810f53c1340473 (branch: feat/schema-ver-removal)

Security screen: PASS — no secrets/egress/obfuscation, no new or repinned module (the go.mod hunk only reclassifies the already-present cuelang.org/go v0.16.1 as direct, matching the new test import), no guardrail/CI/rulebook edits, no injected directives (T1–T4 clear).
Checklist: All applicable rules PASS or NA — plugin Go+CUE (runtime/code) gate met: fresh-rebuild charly 2026.270.1151, disposable target check-commands-local (ok: true, errors/warnings 0), per-unit load-gate evidence gated kind:candy schema_bytes=1457 (byte count reconciles with the added schema/candykind.cue), test coverage that fails with nil→schemaFS; placement: CORRECT (schema is the plugin's own candy-layer declaration surface; no core/sdk/alias change).

Comments considered: Comment 5858020388 (github-actions[bot] BLOCK) — both findings stale-superseded against the CURRENT body: (1) the body now ENDS with the *Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)* line (the *Agent:* line precedes it), so the footer defect does not reproduce; (2) the bed evidence now pastes the untruncated dep github.com/opencharly/plugin-candy-kind/candy/plugin-candy-kind (devel) provenance line AND the per-unit gated kind:candy schema_bytes=1457 line, so the "changed path not exercised" defect does not reproduce. No independent surviving block.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 27, 2026 17:37
@github-actions
github-actions Bot merged commit 907935b into main Sep 27, 2026
2 of 3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 27, 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.

2 participants