Repository navigation
Description
What happens
A charly binary built from a worktree loads plugin binaries out of
/usr/lib/charly/plugins/ — the FHS path belonging to the system-installed package, which is
a different build of charly entirely. When the two disagree on the plugin API version, the run
emits an error pair per attempt and continues degraded:
[WARN] charly.plugin: plugin failed to exit gracefully
[ERROR] charly.plugin: plugin process exited: plugin=/usr/lib/charly/plugins/plugin-secrets
id=2245248 error="signal: killed"
warning: baked plugin /usr/lib/charly/plugins/plugin-secrets: connect: plugin client:
incompatible API version with plugin. Plugin version: 1, Client versions: [2]
On this host the installed package is opencharly-git 2026.187.2228-1 (7 July); the worktree
binary is 2026.230.1238. Six weeks of API drift, and the dev binary reaches into the old one's
plugin directory without a word about the mismatch until a connect fails.
Why it is a product defect, not a dirty host
bakedPluginDir (sdk/deploykit/bake_plugins.go:36) exists so a DEPLOYED container — which has
neither a candy tree nor a Go toolchain — can still reach its baked providers. That is the right
mechanism for its case. What is wrong is that the same absolute path is consulted by a binary that
does have a candy tree and a toolchain, and that has no relationship to whatever produced those
files.
This collides directly with R9 (binary equals source). The point of building the worktree binary
and invoking it through that worktree's bin/ is that what runs IS what the tree says. A plugin
binary from an unrelated installation, six weeks stale, silently violates that — and unlike the
binary itself there is no charly version to catch it.
Severity: it is no longer silent
The bed diagnostics gate now fails a step whose log carries error-tier lines even under a zero
exit code. So this skew turns into a hard bed failure:
charly check run check-githubrunner-pod: [config] FAIL after 9.125s: config exited 0 but its log
carries 2 error line(s)
check-githubrunner-pod reaches config and dies there, on a host whose only fault is an old
package. Three steps before it — image-build, check-image, deploy-add — all pass.
That is the gate working as designed, and it is also what makes this worth fixing rather than
tolerating: the failure is real, reproducible, and points at the wrong thing.
Two separable questions
- Should a non-installed binary consult
bakedPluginDirat all? The candidate rule: consult
it only when the running binary IS the installed one (os.Executable()resolving inside the
package's own prefix), or when nothing else can provide the plugin. A worktree binary has its
own plugin build path and should prefer it unconditionally. - Should a recovered version mismatch log at ERROR? charly recovers — the run continues and
configexits 0. The[ERROR]lines come from go-plugin's own logger for the killed child, so
the mismatch is reported at a severity charly did not choose and does not mean. A skew charly
handles should read as one line at warning tier naming both versions and the remedy, not as an
error pair per attempt.
Reproduce
- Have an installed
opencharly-gitolder than the worktree by at least one plugin-API bump. task build:binary./bin/charly -C box/cachyos check run check-githubrunner-pod- Observe: image-build / check-image / deploy-add PASS,
configFAILs on the error lines above. pacman -Q opencharly-gitand/usr/bin/charly versionconfirm the installed side (here it
panics outright:duplicate command name "update" in command "CLI").
Related
- A plugin candy that fails to COMPILE is a warning, and the build dies later on 'no provider registered' — the actionable error is buried above an error that names the wrong cause #326 — a plugin that fails to COMPILE is demoted to a warning and the build
dies later on an unrelated-looking error. Same family: plugin-loading problems reported at a
severity that does not match their consequence. - go.work + replace mask sdk/go.mod's spec pin: no superproject bed can fail on a stale pin, so every sdk PR proved only via beds has an unvalidated dependency #324 —
go.work+replacemasking a stale pin. Same family again: a
resolution mechanism that hides which artifact actually got used.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Activity
atrawog commentedon Aug 28, 2026
Validation (2026-08-28) — STILL VALID, needs bed verification
Verified against current
charlymain.plugin_loader.gostill hasbakedPluginDir = "/usr/lib/charly/plugins"andbakedPluginDirs()still returns$CHARLY_PLUGIN_DIRfirst, then the FHS path (lines 403-411). A worktree-built charly can still reach into the installed package plugin directory. The comment at :402 notes the mount-namespace masking idea was considered but not implemented.Full verification needs a live run of a worktree-built charly to confirm it loads from the installed path. Value: HIGH — this caused six weeks of silent API drift; dev integrity.
atrawog commentedon Aug 28, 2026
Final validation (2026-08-28) — VERIFIED LIVE (confirmed still valid)
Live check with a fresh worktree-built charly (built from current
charlymain ata2cc84b8), strace of the plugin-dir access:The worktree-built binary opens
/usr/lib/charly/pluginsand reads the INSTALLED package's.providersfiles — the exact defect the issue describes.bakedPluginDirs()still returns$CHARLY_PLUGIN_DIRfirst, then the FHS path (plugin_loader.go:403-411).Status: VERIFIED — keep open. Value: HIGH (caused six weeks of silent API drift; dev integrity).
atrawog commentedon Aug 29, 2026
Closing: the fix landed and merged on main. Verified against the current state of main — the fix is present (see the validation comment for the specific evidence).
fix(loader): a dev/worktree charly must not load the installed packag…