Repository navigation
fix(validate): an INFO-tier skew is not a validation error - #100
Conversation
`charly box validate` turned EVERY non-warning diagnostic into a validation error.
The verdict filter skipped only `SeverityWarning`, so `SeverityInfo` fell through,
was printed inside `N validation errors:` and made the command exit 1 — for a
candy-version skew the resolver has ALREADY arbitrated deterministically.
Two contracts say that is wrong, both in-tree:
- `sdk/loaderkit/candy_version.go` emits the skew at `DiagInfo` and states: "a
resolvable skew is INFO, never WARNING … a consumer's zero-warnings gate is for
unresolved defects and must not fail on a successful arbitration".
- `spec.SeverityError` says it is "the only tier a verdict may turn into a
non-zero exit".
The verdict now uses the canonical `Diagnostic.IsError()` predicate (which fails
CLOSED on an unknown tier), and info-tier observations are printed as
`notice: …` so they stay actionable instead of only being counted.
Live effect this unblocks: any pin advance that leaves two candies in one box
scope naming different tags of the same repo (the normal shape of a wave). It
blocked a consumer release with:
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 …
(exit status 1)
Regression proof (R7): `TestValidateVerdictDoesNotFailOnInfoTier` is RED before
this change ("must not fail the gate, got: 2 validation errors:") and green after;
`TestValidateVerdictStillFailsOnErrorTier` keeps the error and unknown tiers
failing. Full module suite green.
Refs opencharly/charly#1256
Agent: `ollama-vision-models` · Claude Code session `c765900b-523f-458a-b38f-a0f925f2a9b9`
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Change class: plugin logic (one predicate + one print branch, one new test file). Security screen: PASS — no scope mismatch (diff does exactly what the body claims: verdict now uses Checklist: All applicable rules PASS or NA.
Non-blocking note (tool-limited): the end-to-end Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
… code change Round-1 review fixes. - A3: the tier was `fully tested and validated`, which requires the changed BEHAVIOUR to execute against the fresh rebuild. It did not: `box validate` turning an INFO diagnostic into a `notice:` line plus exit 0 was never exercised, because three live two-tag fixtures (a project naming two tags of one candy — the skew's shape) resolved and validated without the resolver emitting any INFO diagnostic (rc=0, zero `notice:` lines). The behavioural proof stays opencharly/plugin-box#100's test; what ran here is the resolution, the whole CI go job and the R9 build. Tier lowered to `analysed on a live system`, per the reviewer's stated ceiling. - R1/R10: the `check-generated-clean` NOTICE is now RCA'd with a measurement rather than explained in prose. Regenerating both generated files with the build's own corpus into a scratch dir: the refs table differs by exactly TWO `plugin-distro` rows (`kind:os`, `kind:source`) because pluginsgen indexes corpus repos at their DEFAULT BRANCHES, `plugins.go` is byte-identical, and `diff | grep -c plugin-box` is 0 for both files — so this pin provably cannot have produced the divergence. The residual (the committed index lagging the corpus by those two rows) is filed as #1268 under `## Filed issues`. 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)
…O diagnostics gating a build (#1267) * fix(deps): pin plugin-box v0.2026327.2335, the release that stops INFO diagnostics gating a build charly required github.com/opencharly/plugin-box/candy/plugin-box v0.2026326.938, but opencharly/plugin-box#100 — `charly box validate` exits 0 on an INFO-tier diagnostic instead of gating the build with exit 1 on an already-arbitrated candy-version skew — shipped as git tag v2026.327.2335 / module v0.2026327.2335 (8cef2effe), the latest the proxy serves. Found by checking that every fix from the per-host config session is reachable from a shipped binary: spec v0.2026328.1115, sdk v0.2026328.1130 and charly v2026.328.1249 were landed and pinned (#1265); this one was not, so the compiled-in plugin still carried the old severity rule. Gate on this tree: the repo's `go` CI job reproduced verbatim — root `go test ./charly/...` (charly/ 283.3s, pluginsgen 155.0s), the `tools/*` GOWORK=off sweep, `gofmt -l charly tools` empty, golangci-lint v2.13.2 0 issues over charly/ and all five tools modules — plus the R9 worktree build. Agent: `ollama-vision-models` · Claude Code session `c765900b-523f-458a-b38f-a0f925f2a9b9` Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * chore(pr): correct the attribution tier and RCA the build NOTICE — no code change Round-1 review fixes. - A3: the tier was `fully tested and validated`, which requires the changed BEHAVIOUR to execute against the fresh rebuild. It did not: `box validate` turning an INFO diagnostic into a `notice:` line plus exit 0 was never exercised, because three live two-tag fixtures (a project naming two tags of one candy — the skew's shape) resolved and validated without the resolver emitting any INFO diagnostic (rc=0, zero `notice:` lines). The behavioural proof stays opencharly/plugin-box#100's test; what ran here is the resolution, the whole CI go job and the R9 build. Tier lowered to `analysed on a live system`, per the reviewer's stated ceiling. - R1/R10: the `check-generated-clean` NOTICE is now RCA'd with a measurement rather than explained in prose. Regenerating both generated files with the build's own corpus into a scratch dir: the refs table differs by exactly TWO `plugin-distro` rows (`kind:os`, `kind:source`) because pluginsgen indexes corpus repos at their DEFAULT BRANCHES, `plugins.go` is byte-identical, and `diff | grep -c plugin-box` is 0 for both files — so this pin provably cannot have produced the divergence. The residual (the committed index lagging the corpus by those two rows) is filed as #1268 under `## Filed issues`. 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)
Summary
charly box validateturned every non-warning diagnostic into a validation error. The verdictfilter skipped only
SeverityWarning, soSeverityInfofell through, was printed insideN validation errors:and made the command exit 1 — for a candy-version skew the resolver hasalready arbitrated deterministically.
Two in-tree contracts say that is wrong:
sdk/loaderkit/candy_version.goemits the skew atDiagInfo: "a resolvable skew is INFO, neverWARNING … a consumer's zero-warnings gate is for unresolved defects and must not fail on a
successful arbitration."
spec.SeverityError: "the only tier a verdict may turn into a non-zero exit."The verdict now uses the canonical
Diagnostic.IsError()predicate (which fails closed on anunknown tier), and info-tier observations are printed as
notice: …so they stay actionablerather than merely counted.
Why this matters (the finding it removes)
Any pin advance that leaves two candies in one box scope naming different tags of the same repo —
the normal shape of a wave — made validate red. Observed while releasing a consumer change:
Filed as opencharly/charly#1256 with the full trace; this change is its fix.
How tested
The regression test is red without the fix (R7 — a test that cannot fail is invalid). With
validate.goreverted to the previous head and the new test kept:and green with it.
TestValidateVerdictStillFailsOnErrorTiercovers both theerrortier and anunknown/empty severity, so the widening cannot silence a real failure.
Rulebook compliance
/charly-internals:root-cause-analyzer,/charly-internals:strict-policy,/charly-internals:go,/charly-internals:go-qualityand/charly-internals:git-workflowforthis work.
model, the verdict's filter); the finding is fixed here and its issue (charly#1256) will be
closed explicitly after merge.
Diagnostic.IsError()predicate instead of a second severityladder; the old inline
== "warning"test was the duplicate.suppressing them.
== "warning"filter and its misleading comment are deleted outright.direct push to
main.go tested here.behavioural proof in
charly box validateitself lands when the next charly build carries thisplugin (the consumer leg re-validates then).
contract.
Change classification
charly box validateno longer exits non-zero on an already-arbitrated skew; itprints
notice: …and still reports0 warnings, 0 errors. Genuine errors and warnings behaveexactly as before.
Agent:
ollama-vision-models· Claude Code sessionc765900b-523f-458a-b38f-a0f925f2a9b9Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated)