Skip to content

An out-of-tree provider's build target is not discoverable from the candy: go build in the candy root yields a Go archive, not a binary #900

Open

Description

@aitrawog

A dev/worktree charly build cannot serve the out-of-process plugin-deploy-pod provider, so any pod bed is unrunnable from a worktree build

Discovered 2026-10-14 while trying to run the disposable pod bed openclaw.check-openclaw-pod as the R10 witness for a plugin-check change.

$ /tmp/charly-707 -C <umbrella> check run openclaw.check-openclaw-pod
[image-build] PASS after 6m8.667s
[check-image] PASS after 1m9.821s
[deploy-add]  FAIL after 4m23.342s: exit 1
  charly: error: command "deploy": resolve target: deployment "openclaw/check-openclaw-pod":
    target "pod" is a known substrate but its deploy provider is not connected (the
    @github.com/opencharly/plugin-deploy-pod/candy/plugin-deploy-pod plugin candy is not compiled-in
    or failed to load)

What is established

  • plugin-deploy-pod is not a require in charly/go.mod (grep plugin-deploy-pod charly/go.mod → nothing), so it is not a compiled-in plugin.
  • Plugins otherwise arrive out-of-process, and the same run's log shows that working for others: plugin github.com/opencharly/plugin-openclaw/candy/plugin-openclaw: served from /home/atrawog/.cache/charly/plugins/github.com_opencharly_plugin-openclaw_candy_plugi….
  • There is no installed charly in this environment (/usr/lib/charly/plugins does not exist), and every charly run prints: "charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may …)".
  • So a dev/worktree build cannot load the pod substrate provider, and the bed fails at [deploy-add] before any test step runs.

Why this matters beyond one bed

A bed that needs an out-of-process substrate provider cannot be used as an R10 witness from a worktree build. For a contributor working in the umbrella — which is how this org's rulebook says every session works — that makes a whole class of beds unrunnable, and an R10 requirement that names such a bed unsatisfiable. Two PRs on plugin-check spent several rounds on exactly this: the change's gate named a pod bed, and no witness binary available in this checkout could run it.

It also interacts with the R9 rule (use the worktree-local, CalVer-stamped build, never a shared install): the rulebook asks for a worktree build, and a worktree build is precisely the thing that cannot serve these providers here.

What is NOT claimed

  • Not claimed that the pods/plugins are broken in general — an installed charly may serve them; this environment has none to test against.
  • Not claimed as a defect in plugin-deploy-pod — it is never reached.
  • Not claimed that the provider must be compiled in — compiling everything in is one answer; making a worktree build able to serve the provider it needs is another.

The question to answer first

How is a plugin that is neither compiled-in nor present as an installed package supposed to be served? The cache path (~/.cache/charly/plugins/…) evidently works for several plugins in the same run, so the mechanism exists — the open question is why plugin-deploy-pod is absent from it (never built into that cache? built for a different version? only loaded by an installed charly?). That is one reading of plugin.go/the loader plus one ls ~/.cache/charly/plugins | grep deploy-pod, neither of which was done here, so neither is asserted.

Agent: dsh-opencharly
Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. added a commit that references this issue on Oct 14, 2026
  3. aitrawog commented on Oct 14, 2026

    @aitrawog
    ContributorAuthor

    STATUS — correcting my own last paragraph: the plugin is NOT absent from the cache, and the question is the KEY.

    I wrote that the open question was "why plugin-deploy-pod is absent from it". The check I ran in the same command refutes that:

    $ ls ~/.cache/charly/plugins/ | grep -ci deploy-pod
    132
    $ ls ~/.cache/charly/plugins/ | grep -i deploy-pod | head -3
    github.com_opencharly_plugin-deploy-pod_candy_plugin-deploy-pod-04b1c97122babd60
    github.com_opencharly_plugin-deploy-pod_candy_plugin-deploy-pod-04b1c97122babd60.lock
    github.com_opencharly_plugin-deploy-pod_candy_plugin-deploy-pod-04b1c97122babd60.stamp
    

    Those 132 entries are many BUILDS of exactly this plugin, keyed by build stamps (04b1c97122babd60, 0d61d714c9a06f83, ...), three files per build (dir, lock, stamp). So the plugin is present, repeatedly, and the failure is a KEY MATCH: the loader asked for a key that is not among them.

    That sharpens the question and moves it one file closer. The next reads are: (a) the cache key derivation in the plugin loader (what does it hash -- the plugin commit? the sdk version? the charly version?), and (b) whether my witness build's three local replace lines (plugin-check, plugin-build at 282) changed the expected key while the cached builds carry the keys of the released versions. If (b) is the cause, the finding is narrower than filed: a witness build with local replaces can fail to match any cached plugin build, which is a fact about how the replaces interact with the cache rather than about dev builds in general.

    What does NOT change: the bed still cannot run here, the R10 requirement still cannot be satisfied from this checkout, and the interaction with R9 (which requires a worktree-local build) stands.

    Agent: dsh-opencharly
    Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)

  4. aitrawog commented on Oct 14, 2026

    @aitrawog
    ContributorAuthor

    STATUS — CORRECTION to this issue: a dev/worktree charly CAN serve this provider. The measured mechanism:

    1. CHARLY_PLUGIN_DIR — the loader consults it BEFORE the dev/worktree FHS drop (charly/charly/plugin_loader.go:484; the drop is at :490). Point it at a directory containing the provider binary; bakedPluginFileName/safePluginBinName (:175, :407) keep [a-zA-Z0-9.-], so the filename for this plugin is simply plugin-deploy-pod. The binary is then reported as served from baked binary …. So the title of this issue — "cannot serve the out-of-process plugin-deploy-pod provider" — is FALSE.

    2. The build target is not the candy root. go build in candy/plugin-deploy-pod compiles the LIBRARY package (package deploypod) and produces a Go archive (!<arch>); the plugin main package is candy/plugin-deploy-pod/cmd/serve. That is the residual, real content of this issue: the correct target is not discoverable from the candy without reading cmd/serve.

    3. The install location must be executable. A copy under /tmp failed with fork/exec …: permission denied (no execute bit, and /tmp may be noexec); under $HOME with mode 755 it loads.

    Result, with those three in place:

    $ CHARLY_PLUGIN_DIR=$HOME/.cache/charly/plugins-dev charly check run check-openclaw-pod
      PASS (steps=14)   bed-rc=0
      summary.yml: every step errors: 0; the sole allowlisted entry is dev-worktree-binary-notice
      deploy-add.log: "plugin plugin-deploy-pod: served from baked binary …/plugin-deploy-pod (build 33773804B …)"
    

    Evidence: .dsh/ledger/evidence/bed-green-102/ (the run log, the deploy-add log, the per-step summary) and opencharly/plugin-check#108, whose ## How tested pastes it.

    Agent: dsh-opencharly
    Assisted-by: dsh deepseek-v4.1-flash (fully tested and validated)

  5. added 2 commits that reference this issue on Oct 14, 2026
  6. changed the title [-]A dev/worktree charly build cannot serve the out-of-process plugin-deploy-pod provider, so any pod bed is unrunnable from a worktree build[/-] [+]An out-of-tree provider's build target is not discoverable from the candy: `go build` in the candy root yields a Go archive, not a binary[/+] on Oct 14, 2026
  7. aitrawog commented on Oct 14, 2026

    @aitrawog
    ContributorAuthor

    STATUS — this issue is RETITLED and its premise retracted. A dev/worktree charly can serve an out-of-tree provider; the original title said it could not, and that was wrong.

    What is true, measured tonight on opencharly/plugin-check#109:

    export CHARLY_PLUGIN_DIR=$HOME/.cache/charly/plugins-dev          # consulted BEFORE the dev FHS drop
    cd plugin-deploy-pod/candy/plugin-deploy-pod/cmd/serve
    go build -o $CHARLY_PLUGIN_DIR/plugin-deploy-pod .
    charly check run check-openclaw-pod
      -> the bed runs; deploy-add.log shows:
         plugin plugin-deploy-pod: served from baked binary …/plugins-dev/plugin-deploy-pod (build 33773804B …)
      -> PASS (steps=14), bed-rc=0

    CHARLY_PLUGIN_DIR is read at charly/charly/plugin_loader.go:484, before the dev-build FHS drop at :490; bakedPluginFileName/safePluginBinName (:407, :175) keep [a-zA-Z0-9.-], so the expected filename is simply plugin-deploy-pod.

    The residual defect this issue now tracks, which is real and cost me two runs:

    1. The build target is not discoverable from the candy. go build in candy/<plugin> compiles the LIBRARY package (package deploypod) and emits a Go archive beginning !<arch> — the failure appears only when the loader tries to exec it. The plugin main package lives in candy/<plugin>/cmd/serve, and nothing in the candy says so; the candy's own charly.yml only mentions that "charly's loader host-builds" it.
    2. The install location must be executable. A copy under /tmp failed with fork/exec …: permission denied — no execute bit, and /tmp may be noexec.

    Not claimed any more: that a dev/worktree build "cannot serve" the provider, or that #328's FHS-drop behaviour is at fault — the FHS drop is deliberate and CHARLY_PLUGIN_DIR is the documented path around it. The narrower ask: make the provider's build target discoverable (a charly box verb, or the candy naming its cmd/serve in charly.yml), and let a non-executable provider binary fail with a message that names the missing execute bit rather than only permission denied.

    Agent: dsh-opencharly
    Assisted-by: dsh deepseek-v4.1-flash (fully tested and validated)

  8. added
    category:runtime
    type:fix
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

category:runtimetype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions