Skip to content

fix(build): a plugin candy that fails to compile is a fatal error, not a warning - #414

Merged
github-actions[bot] merged 6 commits into
mainfrom
feat/plugin-compile-fatal
Aug 28, 2026
Merged

github-actions[bot] merged 6 commits into
mainfrom
feat/plugin-compile-fatal

Conversation

@atrawog

@atrawog atrawog commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A plugin candy that fails to COMPILE was reported as a warning: and the build continued, then died later on no provider registered — an error naming the wrong cause. The actionable error (the plugin name + the go build error) was buried above it.

hostBuildConnectPlugins (charly/host_build_buildengine.go) now returns the error instead of emitting a warning, so the build stops immediately with the actionable message. The plugin-side caller (candy/plugin-build/resolve.go, companion PR in opencharly/plugin-build) propagates it.

Fixes #326.

How tested

Committed regression test (B12): TestHostBuildConnectPlugins_BrokenPluginIsFatal (charly/host_build_buildengine_test.go) — a project with a plugin candy whose go module fails to compile (an unterminated function body — deterministic, no network), referenced by the work at hand. Asserts hostBuildConnectPlugins returns the fatal error naming the plugin and the go build failure.

Verified the test FAILS against the pre-fix warning behavior (returns nil + prints the warning) and PASSES with the fix:

$ GOWORK=off go test . -run TestHostBuildConnectPlugins_BrokenPluginIsFatal -v
=== RUN   TestHostBuildConnectPlugins_BrokenPluginIsFatal
--- PASS: TestHostBuildConnectPlugins_BrokenPluginIsFatal (0.08s)
PASS

# Reverted to the pre-fix warning behavior:
--- FAIL: TestHostBuildConnectPlugins_BrokenPluginIsFatal
    host_build_buildengine_test.go:64: hostBuildConnectPlugins must return a FATAL error ...
FAIL

Live reproduction with a broken plugin candy:

Before (warning + continue): the build emits warning: build-time plugin load: ... and proceeds to the build steps.
After (fatal): charly: error: command "build": buildengine-connect-plugins: build-time plugin load failed: plugin "broken-plugin" ...: go build ...: exit status 1 — no build steps run.

Full suite: GOWORK=off go test . passes (ok, ~76s) with the box/fedora submodule present. gofmt -l clean.

Rulebook compliance

Rule Status
R1 (RCA) The warning-vs-fatal asymmetry was reproduced live and traced to the two call sites
R3 (no duplication) One fix at the host leg + one propagation at the plugin-side caller
R4 (no workarounds) The error is propagated, not swallowed or retried
R6 (git safety) feat/ branch, no force-push, no direct push to main
R10 (fresh proof) Verified from the committed tree with a fresh build; committed B12 regression test

Change classification

  • Change class: bug fix (build error reporting)
  • Verification gate: go test + live reproduction + committed regression test
  • Attribution tier: fully tested and validated

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)

…t a warning

The build-time plugin connect (hostBuildConnectPlugins) emitted a warning and
continued when a plugin candy failed to compile, so the build died later on
'no provider registered' — an error naming the wrong cause. The actionable
error (the plugin name + the go build error) was buried above it.

Now the connect leg returns the error, so the build stops immediately with
the actionable message. The plugin-side caller (candy/plugin-build resolve.go)
propagates it in a companion change.

Closes #326.
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 259355a23504 (branch: feat)

Change class: runtime/code change (Go, core build engine — charly/host_build_buildengine.go)

Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes. The change is a focused error-handling fix matching its description.

Blocks

  1. B12 — new behavior ships with no committed test coverage. The diff adds new code (return nil, fmt.Errorf("build-time plugin load failed: %w", perr) in charly/host_build_buildengine.go) that changes the behavior: a plugin candy that fails to compile is now a fatal error instead of a warning. The diff contains no test/hook that would FAIL without this change. The body supplies a manual live reproduction, but B12 requires the change to ship check/test coverage proving the new functionality — a change whose new behavior has no test that would fail without it BLOCKS. The author must add a test (e.g. a broken-plugin-candy fixture asserting the build fails with the actionable error) in the same commit.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

atrawog and others added 4 commits August 28, 2026 20:54
…al error

Adds TestHostBuildConnectPlugins_BrokenPluginIsFatal: a project with a plugin
candy whose go module fails to compile, referenced by the work at hand. Asserts
hostBuildConnectPlugins returns the fatal error naming the plugin and the go
build failure — NOT the pre-fix warning-and-continue that died later on
'no provider registered'.

Verified the test FAILS against the pre-fix warning behavior and PASSES with
the fix. Closes the B12 finding on #326.
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: b3cbc977b31c (branch: feat)

Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes. The change is a focused error-handling fix matching its description.

Checklist: All applicable rules PASS or NA.

The prior github-actions[bot] BLOCK (head 259355a23504) claimed the new fatal-error behavior shipped with no committed test coverage. That finding is stale-superseded: the CURRENT diff adds charly/host_build_buildengine_test.go with TestHostBuildConnectPlugins_BrokenPluginIsFatal, which asserts the fatal error is returned naming the plugin and the go build failure, and the body shows it FAILS against the pre-fix warning behavior and PASSES with the fix. The B12 coverage requirement is now satisfied.

Placement is CORRECT: the fix lives in the core build-engine connect leg (charly/host_build_buildengine.go), which is the right layer for plugin-load error propagation; no alias files, no new sdk imports, no capability pulled into core. The body supplies a real Summary, a How-tested block with pasted go test output and a live before/after reproduction, a justified fully tested and validated tier (the changed branch executes against the fresh build in the committed test), a rulebook-compliance table, and the required *Assisted-by:* footer. No forbidden-framing, no parked issues, no duplication, no ad-hoc workarounds.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 6fa7d130d6dd5e4fd09702e04028d88fad74eee7 (branch: feat/plugin-compile-fatal)

Change class: runtime/code change (Go, core build engine — charly/host_build_buildengine.go + new regression test).

Security screen: PASS — no scope mismatch (change matches description exactly), no secrets/exfiltration, no weakened guardrails, no supply-chain changes.

Checklist: All applicable rules PASS or NA.

The prior github-actions[bot] BLOCK (head 259355a23504) claimed the fatal-error behavior shipped with no committed test coverage. That finding is stale-superseded: the CURRENT diff adds charly/host_build_buildengine_test.go with TestHostBuildConnectPlugins_BrokenPluginIsFatal, which asserts the fatal error is returned naming the plugin and the go build failure, and the body shows it FAILS against the pre-fix warning behavior and PASSES with the fix. B12 coverage is satisfied.

Placement is CORRECT: the fix lives in the core build-engine connect leg (charly/host_build_buildengine.go), the right layer for plugin-load error propagation; no alias files, no new sdk imports, no capability pulled into core. The body supplies a real Summary, a How-tested block with pasted go test output and a live before/after reproduction, a justified fully tested and validated tier (the changed branch executes against the fresh build in the committed test), a rulebook-compliance table, and the required *Assisted-by:* footer. No forbidden framing, no parked issues, no duplication, no ad-hoc workarounds, gofmt-clean.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit 746251e into main Aug 28, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 28, 2026
@aitrawog
aitrawog deleted the feat/plugin-compile-fatal branch September 25, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant