Skip to content

charly box validate does not validate a step's plugin_input: a typo'd field passes the manifest gate and is only caught at dispatch #1056

Open

Description

@aitrawog

charly box validate does not validate a step's plugin_input: a typo'd field passes the manifest gate and is only caught at dispatch

Found while proving opencharly/plugin-command#10 (the command: verb's skip_exit channel). It is not that change's defect and does not block it — this is the finding, filed per R1 so the boundary is owned by the repo that owns it.

The measurement

A manifest step carrying a command: plugin input, with the field name misspelled:

- check: the command verb dispatches through the provider registry and runs a shell command asserting its exit status
  id: command-verb-dispatches
  command:
      command: "true"
      skip_exi: 3          # the field is skip_exit
  context: [runtime]

charly box validate at the repo root:

charly box validate: OK — checked 1 candy, 7 distros, 7 builders; 0 warnings, 0 errors

exit status 0. The same manifest with the correctly spelled field is also 0 — so the manifest gate cannot tell the two apart. The typo is caught only when the step actually dispatches, at charly/charly/charly/provider_checkenv.go:141 (validateAuthoredPluginInput), which unifies the authored plugin_input with the plugin's served #<X>Input def and validates it with cue.Concrete(true).

RCA

  • Mechanism — there are two different validation boundaries for one piece of data. charly box validate checks the MANIFEST (entities, kinds, the CUE schema of the entities themselves). A step's plugin_input is not an entity: it is the payload of a PLUGIN call, and it is validated only where the call is made — at dispatch. A manifest that names a plugin field nobody has heard of is therefore structurally valid.
  • Missed control — the plugin's schema IS available at manifest-validation time for a compiled-in plugin: the load gate registers every builtin's served schema at process start (loadBuiltinPluginUnits → registerPluginUnitSchema), and the def is in the same process-wide set the dispatch-time validator reads (pluginSchemas.unified). The data needed to close the gap is already loaded; the manifest gate simply does not ask for it.
  • Blast radius — every authored plan step that carries a plugin_input: every candy's check:/run: step, every bed phase, the umbrella's own charly task verify steps. A typo'd plugin field is a green manifest that fails (or, worse, never runs) at execution time.
  • Root fix — the manifest gate should validate each authored step's plugin_input against the served def of the plugin it names, using the SAME validateAuthoredPluginInput the dispatch path uses (one implementation, R2), and report the offending step by its id. The dispatch-time check then becomes the second line of defence rather than the only one.

Why this is NOT blocking opencharly/plugin-command#10

That change adds a field to a plugin's OWN schema and reads it in the verb. The plugin's own test now compiles the embedded #CommandInput and validates real inputs against it (the acceptance case is RED without the schema field; a typo'd field is rejected, which proves the def is closed and the acceptance case is not a tautology). The dispatch-time gate is unchanged by that PR. The manifest-level gap is separable from it and is genuinely a charly-core property, so it is filed here rather than fixed in a plugin repo.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

Activity

  1. added
    category:verification
    type:fix
    on Nov 23, 2026
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

    category:verificationtype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions