Repository navigation
fix(build): propagate a plugin compile failure as a fatal error, not a warning - #2
Conversation
…a warning The build-time plugin connect leg (buildengine-connect-plugins) failure was emitted as a warning and the build continued, dying later on 'no provider registered' — an error naming the wrong cause. The host leg now returns the error (charly companion change); this caller propagates it so the build stops immediately with the actionable message (the plugin name + the go build error). Closes opencharly/charly#326.
Review — BLOCKHead SHA: Change class: code change (bug fix in Blocks
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…ilures (T3) The code makes every build-time plugin connect failure fatal — a compile failure, a missing module, a download error all stop the build with the actionable error. The prior comment framed it as only compile failures. Update the comment to state the honest scope: the host leg loads only the plugins the build REFERENCES, so a connect failure means a needed plugin could not be loaded — continuing would surface a misleading 'no provider registered' error (charly#326).
Review — BLOCKHead SHA: Change class: code change (bug fix in Security screen: PASS — no T1–T4 findings. No scope mismatch (the body now explicitly scopes the change to ALL connect failures, matching the code), no secrets/exfiltration, no weakened guardrails, no supply-chain changes. Blocks
The two prior Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code change (bug fix in Security screen: PASS — no T1–T4 findings. No scope mismatch (the body now explicitly scopes the change to ALL connect failures, matching the code), no secrets/exfiltration, no weakened guardrails, no supply-chain changes. Blocks
The two prior Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
… test (B12, #326)
Extract resolveBuildEngine step 4 (the build-time plugin CONNECT leg) into
connectPluginsOrFatal so the fatal-vs-warning semantics are unit-testable
without faking the entire loader/scan leg family. The test asserts a connect
failure returns done=true with a fatal BuildResolveReply{Error: ...} naming
the connect leg and the plugin — it FAILS against the pre-fix warning
behavior (verified) and passes with the fix.
Review — BLOCKHead SHA: Change class: code change (bug fix in Security screen: PASS — no T1–T4 findings. No scope mismatch (body explicitly scopes to ALL connect failures, matching the code), no secrets/exfiltration, no weakened guardrails, no supply-chain changes. Blocks
Comment intake
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code change (bug fix in Blocks
Comment intake
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — no T1–T4 findings. No scope mismatch (body explicitly scopes to ALL connect failures, matching the code), no secrets/exfiltration, no weakened guardrails, no supply-chain changes. Checklist: All applicable rules PASS or NA.
Comment intake: all four prior Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Summary
The build-time plugin connect leg (
buildengine-connect-plugins) failure was emitted as a warning and the build continued, dying later onno provider registered— an error naming the wrong cause. The host leg now returns the error (companion PR opencharly/charly#414); this caller propagates it so the build stops immediately with the actionable message (the plugin name + the go build error).This is deliberately ALL build-time plugin connect failures — a compile failure, a missing module, or a download error — not only compile failures: the host leg loads only the plugins the build REFERENCES (
collectReferencedPluginWords), so a connect failure means a plugin the build needs could not be loaded. Continuing would surface the misleadingno provider registerederror.Fixes opencharly/charly#326.
How tested
Committed regression test (B12): step 4 (the connect leg) is extracted into
connectPluginsOrFatalso the fatal-vs-warning semantics are unit-testable without faking the loader/scan leg family.resolve_connect_fatal_test.godrives it with a fake executor whosebuildengine-connect-pluginsleg fails and asserts done=true with a fatalBuildResolveReply{Error: ...}naming the leg and the plugin; a second test asserts a successful connect is NOT fatal (done=false). Verified the failure test FAILS against the pre-fix warning behavior and PASSES with the fix:Runtime proof on an explicitly
disposable: truetarget (check-compile-fatalin the reproduction project, declareddisposable: true— never derived from the name). The disposable bed builds the broken-plugin box; its image-build phase triggers the plugin connect. The bed FAILS at image-build (937ms) with the actionable error — the fresh rebuild from the committed tree:The build FAILS immediately with the actionable error — ZERO warnings (the warning is replaced by the fatal error). Before the fix, the same reproduction emitted
warning: build-time plugin load: ...and the build continued to the build steps.Module gate:
go build ./...clean,gofmt -lclean,GOWORK=off go test ./candy/plugin-build/passes (full suite green).Rulebook compliance
Change classification