Repository navigation
Description
plugin.primary: is honoured for a local candy but lost for an @github-pinned one
A plugin candy's plugin.primary: block is the documented pre-connect mechanism that lets a
verb accept scalar shorthand (myverb: status) at parse time, before any plugin is
connected. It works when the candy is discovered locally, and is silently ignored when the
same candy arrives by @github ref.
Controlled A/B
Same plugin candy (opencharly/plugin-punktfunk, which declares
plugin: { primary: { punktfunk: method } }), same project shape, same authored step:
plan:
- check: scalar sugar
punktfunk: health| arm | how the candy is referenced | charly box validate |
|---|---|---|
| A | candy: ['@github.com/opencharly/plugin-punktfunk/candy/plugin-punktfunk:v2026.241.1930'] |
fails |
| B | candy: [plugin-punktfunk], discovered from candy/ |
exit 0 |
Arm A:
charly: error: command "validate": validation error: .../charly.yml:doc0:
node "probe-pod": plan[0] plugin verb "punktfunk" takes a MAP input
(it declares no primary field for the scalar shorthand)
Arm B is the byte-identical candy, cloned from that same tag into candy/, and parses
cleanly. So the manifest is correct and the declaration is understood — it just never
reaches the parse when the candy is remote.
Pinning the ref in the root manifest rather than a discovered box makes no difference;
arm A above pins it at the root.
Why it went unnoticed
No other plugin declares primary:. vnc, cdp, wl, adb, … all get their scalar
shorthand from the frozen pluginPrimaries seed in node_desugar.go (the 11 live verbs),
so they never exercise the manifest path. plugin-punktfunk appears to be the first
out-of-tree plugin to actually use plugin.primary:, which is why this surfaced now.
Impact
Concretely: a bed authored with the documented scalar shorthand for a new out-of-tree verb
fails the project parse, and the failure is not local to that bed — it blocks the parse
for every bed sharing the project closure. In this case check-punktfunk-pod took down
check-agentteams-snapshot, check-boxload-pod and check-sidecar-pod until the steps
were rewritten to the map form (opencharly/distro-cachyos#38).
So the practical rule today is: a new out-of-tree verb must be authored in map form
(myverb: {method: …}), and plugin.primary: buys nothing unless the candy is local. That
contradicts the plugin authoring guidance, which presents primary: as the mechanism that
makes the shorthand work pre-connect.
Fix direction (not diagnosed)
The prescan (prescanDeclaredPluginWords → collectPluginPrimaries → registerPluginPrimary)
is documented as walking @github…/candy/plugin-*:vTAG refs precisely to solve this
chicken-and-egg. I have not traced why the remote arm does not reach
registerPluginPrimary — this is a controlled measurement, not a root cause.
Related: #469 (a remote add_candy: ref silently dropping the candy's
baked check: steps) looks like the same family — manifest-declared metadata surviving
local discovery but not a remote ref.
Activity
fix: author the punktfunk verb in map form, and say why (#5)
fix(prescan): do not gate the remote-ref leg on a local discover: blo…
atrawog commentedon Aug 30, 2026
Fixed in #473
Root cause, confirmed by instrumentation rather than inference: the remote-ref leg
(
prescanRemotePluginManifests) sat behindprescanDeclaredPluginWords's early return fora missing
discover:block. The two are unrelated — the remote leg reads@githubpluginrefs,
discover:walks in-repo directories — so a project that pins a plugin remotely anddiscovers nothing locally never prescanned that plugin at all, and its
plugin: primary:never reached the parse.
Tracing showed the leg was never entered in the failing arm, and entered + registering in
the passing one:
My original A/B in this issue (local candy vs
@githubref) was measuring the right symptomfor the wrong reason: the local arm happened to carry a
discover:block, which is whatactually made the difference. Corrected diagnosis, same defect.
Verified
discover:blockdiscover:blockA committed regression test (
TestPrescanRemoteLegRunsWithoutDiscoverBlock) stubs the reporesolver so the routing is asserted without a network fetch. With the control flow reverted
it fails with the exact regression:
Note for anyone who hit this
The real-world failure that surfaced it (opencharly/distro-cachyos#38, where a bed's scalar
shorthand broke the parse for three unrelated beds) was on a charly that predates the remote
leg entirely — that project does carry a
discover:block, so it is fixed by having theleg at all, which current
mainalready had. This PR closes the remaining hole: projectswithout a
discover:block.opencharly/plugin-punktfunk's skill still recommends the map form, which remains correctand version-independent; the shorthand now works as documented once a charly carrying this
fix is in use.
docs(punktfunk-skill): delete the map-form workaround — charly#471 is…