Skip to content

fix: box validate fails (exit 1) on an INFO-tier, already-arbitrated candy-version skew #1256

Backlog

Description

@aitrawog

Category

category:runtime

Type

type:fix

Remedy / files the remedy will touch

the command:validate:box diagnostics envelope severity stamping (propagate spec.DiagInfo as SeverityInfo) + a regression test asserting exit 0 with an info-tier report

Cited design decision or org-rulebook rule (or none)

R1

Problem

charly box validate FAILS on a scan diagnostic that its own contract defines as
INFORMATIONAL and deterministically arbitrated. A resolvable candy-version skew must not fail a
gate, yet it does — with the message printed twice: once as Notice: and again inside
N validation errors: with a non-zero exit.

This blocked a consumer release for hours and forced a chain of pin churn before the cause was
read from the source.

Evidence

$ charly box validate -C <distro-cachyos checkout>
Notice: candy github.com/opencharly/layer-supervisord resolved to multiple git tags with differing
        content within one scope (box=ollama-cdi, box=ollama-rocm); using newest referenced …
Notice: candy github.com/opencharly/pod-ollama resolved to multiple git tags with differing content
        within one scope (box=ollama-rocm); using newest referenced …
charly: error: command "validate": 2 validation errors:

         candy github.com/opencharly/layer-supervisord resolved to multiple git tags …
         candy github.com/opencharly/pod-ollama resolved to multiple git tags …
$ echo $?
1

Mechanism (traced, not guessed)

  • sdk/loaderkit/candy_version.go — PickCandyVersion emits this skew at spec.DiagInfo, and
    its own doc comment states the contract: "SEVERITY — a resolvable skew is INFO, never WARNING.
    The arbiter always has a deterministic winner (the newest referenced tag), so resolution
    SUCCEEDS … a consumer's zero-warnings gate is for unresolved defects and must not fail on a
    successful arbitration. Only a genuinely unresolvable set … emits DiagWarning."
  • spec/spec/diag_severity.go — Diagnostic.IsError() returns false for SeverityInfo and
    SeverityWarning; it fails closed on an UNKNOWN/empty severity.
  • plugin-build/candy/plugin-build/resolve_legs.go — validateProjectLeg invokes
    command:validate:box, unmarshals a spec.Diagnostics, and fails when any item IsError()s;
    diagSeverity/diagWarnSink in the same file correctly map DiagInfo → SeverityInfo.

So either the validate provider stamps these two items with an empty/unknown severity (which
IsError fails closed on, turning an observation into an error), or it bypasses the level
entirely. Both contradict the three sources above.

Impact

Any composition where one candy advances a shared dependency's pin (the normal shape of a pin
wave) makes box validate red with an ERROR for a skew the resolver has already settled. It
blocks every consumer PR in that scope and invites wrong "fixes" (reverting the pin).

Remedy / files

The command:validate:box provider (wherever it stamps the diagnostics envelope) must carry the
seam's LEVEL through — SeverityInfo for DiagInfo — so IsError() stays false and the command
exits 0 while still reporting the count. Add a test that runs validate over two scopes referencing
the same candy at differing tags and asserts exit 0 + an info-tier report (it is red on today's
behaviour). Files traced: sdk/loaderkit/candy_version.go,
spec/spec/diag_severity.go, plugin-build/candy/plugin-build/resolve_legs.go.

Agent: ollama-vision-models · Claude Code session c765900b-523f-458a-b38f-a0f925f2a9b9
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

Activity

  1. added
    category:runtime
    type:fix
    on Nov 23, 2026
  2. aitrawog commented on Nov 24, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    STATUS — fix merged; the remaining gap is the PLUGIN-TO-BINARY wiring, measured.

    • Fixed and merged: fix(validate): an INFO-tier skew is not a validation error plugin-box#100 (tag v2026.327.2335) — the verdict now uses spec.Diagnostic.IsError() (fails closed on an unknown tier) and prints info-tier observations as notice:. Regression test red before the fix (got: 2 validation errors:), green after; full module suite green.
    • Remaining, measured: the charly binary in use (2026.327.1010) still exhibits the old behaviour. What I established:
      • charly cache status reports latest_tags[plugin-box] = v2026.327.2335 and default_branches = main, i.e. the ref cache already knows the fixed release;
      • the materialized plugin-box@main tree contains the fix (!it.IsError());
      • yet a fully fresh run (charly cache refresh, then charly cache bypass — every resolution fresh) still exits 1, and a DEBUG print added to the materialized plugin-box@main tree never executes;
      • the run prints no plugin …: served from … attribution line for plugin-box, while every genuinely out-of-process plugin does.
        So the served validate does not come from those trees: the binary carries it from its own build (it predates the release by ~13 h), and charly/charly.yml / charly/go.mod do not show how it is pulled in.

    Ask for the owner: how is command:validate:box supplied to the binary (build-time plugin, generated import, or a resolution path that is not the repo cache), so the release can be carried? Until then the CLI keeps the over-strict verdict even though the code that fixes it is on main.

    Agent: ollama-vision-models · Claude Code session c765900b-523f-458a-b38f-a0f925f2a9b9
    Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

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:runtimetype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions