Skip to content

no generator for params/cue_types_gen.go: the generated types cannot be kept in step with schema/builder.cue #10

Closed

Description

@aitrawog

Finding (R1)

candy/plugin-builder/schema/builder.cue is the single source for this plugin's params package, and candy/plugin-builder/params/cue_types_gen.go is generated from it ("Code generated by cue exp gengotypes; DO NOT EDIT"). This repo carries no way to run that generation: no task: entity (charly task cue-gen reports unknown task "cue-gen" (declared tasks: )), no Makefile and no generator workflow. So the generated file cannot be kept in step with the schema by anyone working in this repo.

Measured

opencharly/spec#421 removed #Copy and the authored copy_artifact/copy_binary from the core #Builder; this plugin's #BuilderInput mirrors that node and dropped them too (branch feat/unified-builders, commit 03bcb69). But the committed params/cue_types_gen.go still declares Copy_artifact, Copy_binary and type BdCopy, because regenerating it needs the pipeline this repo does not have. Running cue exp gengotypes directly on the schema produces a file that differs in tag style (json-only, no yaml: tags), so it is not a drop-in replacement.

Why it matters

A generated param struct that disagrees with its schema is exactly the divergence SDD forbids, and the leg of the opencharly/sdk#608 chain that would update this repo cannot land until the generation exists or is documented.

Ask

Add the generation step to this repo (a task: entity running the same pipeline the other plugin repos use, or a documented command), so cue_types_gen.go can be regenerated from schema/builder.cue and a stale file is detectable. Until then this leg is held.

Assisted-by: Claude Code deepseek-v4.1-flash (analysed on a live system)

Activity

  1. aitrawog commented on Nov 23, 2026

    @aitrawog
    ContributorAuthor

    WAITING

    WAITING — on opencharly/spec#425 (this issue's generator leg).

    opencharly/spec#425 moves internal/schemagen to the module root (schemagen), so this repo can run the ONE generator by ref instead of copying a pipeline:

    go run github.com/opencharly/spec/schemagen@<tag> -mode=params -schema=schema -pkg=params -out=params/cue_types_gen.go
    

    Measured while preparing the leg: the moved generator reproduces this repo's committed params/cue_types_gen.go BYTE FOR BYTE (diff exit 0), so the file is already in step — what is missing is only the ability to regenerate it, which that release supplies.

    This issue closes with the consumer PR (the cue-gen task + the tag pin) as soon as #425 tags.

    Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942
    Assisted-by: Claude Code deepseek-v4.1-flash (analysed on a live system)

  2. aitrawog commented on Nov 23, 2026

    @aitrawog
    ContributorAuthor

    CLEARED

    CLEARED — the blocking relation is over.

    opencharly/spec#425 merged and tagged (v0.2026327.329), and the consumer leg now exists as #13: charly task cue-gen there runs go run github.com/opencharly/spec/[email protected] by ref and gates on the regeneration leaving no diff. Measured: the released generator reproduces plugin-builder's committed params/cue_types_gen.go byte for byte.

    Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942
    Assisted-by: Claude Code deepseek-v4.1-flash (analysed on a live system)

  3. aitrawog commented on Nov 23, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED

    RESOLVED — fixed in #13 (merged, tagged v2026.327.0335).

    The repo now has the generation step this issue asked for: charly task cue-gen runs spec's ONE generator by ref —

    go run github.com/opencharly/spec/[email protected] -mode=params -schema=candy/plugin-builder/schema -pkg=params -out=candy/plugin-builder/params/cue_types_gen.go
    

    — so params/cue_types_gen.go is regenerable from schema/builder.cue and a second copy of the pipeline exists nowhere (the generator moved to spec's module root in opencharly/spec#425 precisely so another module can run it).

    A stale file is detectable, not just fixable: the task's second step is a drift gate — after regeneration the committed file must show no diff. Measured both ways on the PR: a throwaway copy with one line appended to the committed generated file makes the task fail ([fail] check … exit=1); the clean tree passes.

    And the file was never out of step — only unreproducible: the released generator reproduces the committed params/cue_types_gen.go BYTE FOR BYTE (diff empty).

    Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942
    Assisted-by: Claude Code deepseek-v4.1-flash (fully tested and validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions