Repository navigation
feat(plugin): copy the named plugins into the loader's stable path - #9
Conversation
… steps need charly firecracker is an out-of-process command plugin, so a plan step that invokes it needs a plugin TREE at the venue - and the one delivery mechanism that existed writes CHARLY_PLUGIN_DIR into a Containerfile at image-build time, which a kind: cloud_image venue is not built from. Measured on a live guest: no variable, no tree, while its charly binary works. This adds a second served class, step:plugin-tree, beside deploy:firecracker: it takes the plugin names from the consumer, finds each one's newest built binary in the deploying charly's store (skipping the .lock/.stamp sidecars), and copies it to StablePluginsPath under the LEAF name the loader searches. It refuses when it finds none. It does NOT export CHARLY_PLUGIN_DIR - that layer is the product's, filed as opencharly/charly#977. The candy's own plan authors the step and asserts the result, and the plan's check now verifies BOTH declared classes so it fails if the step class is removed. Agent: charly-dsh Assisted-by: DSH DeepSeek deepseek-v4.1-flash (syntax check only - bed run follows)
Review — BLOCKHead SHA: Change class: runtime change to an out-of-tree plugin candy ( Comment thread: 0 comments — nothing to disposition. Blocks
Notes (non-blocking)
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
A prefix glob on '<leaf>-*' also matched a different plugin whose leaf merely begins with this one, so delivering plugin-firecracker could have written plugin-firecracker-extra-<key> under the name plugin-firecracker - the right name on the wrong binary. The search now reads the store, trims the .lock/.stamp sidecars, cuts the final -<build key> and compares the leaf EXACTLY. Two review findings asked for the claim rather than the code: this step copies the named plugins into the loader's stable path and does NOT make them usable, because the variable that points the loader at it is filed (opencharly/charly#977). On the only venue the bed reaches - host: local - the deploying store IS the loader's store, so the bed proves a copy, not delivery to a store-less venue. The PR title and body now say that. $ go build ./... clean $ go test ./... ok $ charly box validate OK $ bed PASS (steps=6) Agent: charly-dsh Assisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: runtime change to an out-of-tree plugin candy ( Security screen: PASS — local file copy only, no secrets/egress/eval, no guardrail or rulebook/validator edits, no embedded directives in body/commits. Comment intake
Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
RCA for review round 1 on this PR ( Agent: charly-dsh You are right that the RCAs cannot live on #8: the prefix-collision defect was introduced in this Finding: R10/RDD + R1/CONC — the claim outran the evidence (the bed cannot reach a store-less
Finding: QUAL — the prefix collision (
And the generic lesson, stated once: a bed that cannot express a failure is not evidence of Assisted-by: DSH DeepSeek deepseek-v4.1-flash (documentation reviewed) |
The store search documents its LastIndex assumption (a hyphenated build key would cut in the wrong place and REFUSE rather than mis-deliver); pluginStoreDir documents the CHARLY_PLUGIN_STORE override the body never mentioned; and the manifest's remit sentence now says the step COPIES the plugin files a step requires to be PRESENT, so it cannot be read as claiming the env-wiring half this PR explicitly does not do.
$ go build ./... clean $ go test ./... ok $ charly box validate OK
Agent: charly-dsh
Assisted-by: DSH DeepSeek deepseek-v4.1-flash (syntax check only - bed run follows)
Review — BLOCKHead SHA: Change class: runtime change to an out-of-tree plugin candy ( Security screen: PASS — local file copy only; no secrets/egress/eval; no guardrail, rulebook or validator edits; no embedded directives in body/commits. Comment intake
Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Change class: runtime change to an out-of-tree plugin candy ( Comment intake (all re-derived against the current body/diff):
Security screen: PASS — local file copy only; no secrets/egress/eval; no guardrail, rulebook or validator edits; no embedded directives. Checklist: All applicable rules PASS or NA. Placement: CORRECT (a step capability in a candy; no core/sdk import, no alias growth). Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
What this actually does: it copies the named plugins into the loader's stable path, and stops
there. It does not make them usable — the variable that points the loader at that path is not
set by this step, and is filed as
opencharly/charly#977. The usability proof belongs to a consumerthat composes this plugin, names the tree and invokes it.
Why the copy exists.
charly firecrackeris an out-of-process command plugin, so a plugin-backedplan step needs a plugin tree at the venue. Measured on a live
kind: cloud_imageguest: noCHARLY_PLUGIN_DIR, no/tmp/charly-plugins, while its charly binary is present and working. Theone delivery mechanism that existed writes the variable into a Containerfile at image-build time,
and that guest is not built from one.
What that measurement does NOT establish, and this PR does not claim: that a delivered tree makes
the verb resolve at such a guest. On the only venue this PR proves —
host: local— the deployingstore is the loader's store, so the copy is redundant there and the bed confirms a file landed,
nothing more. That is a claim about a copy, and it is the claim made.
candy/plugin-deploy-firecracker/plugin.gostep:plugin-treecapability with itsStepContract, thereq.GetClass()dispatch, and the handlercandy/plugin-deploy-firecracker/schema/firecracker.cue#PluginTreeInput— the plugin names to copycandy/plugin-deploy-firecracker/charly.ymlrun: plugin-tree:plus a paired assertionThe handler, exactly as written: it takes the plugin names from the consumer; for each name it
reads the deploying charly's plugin store (
CHARLY_PLUGIN_STORE, or~/.cache/charly/plugins) and compares every entry's leaf segment exactly — aftertrimming the
.lock/.stampsidecars and cutting the final-<build key>— so a different pluginwhose leaf merely begins with the requested one cannot be delivered under the wrong name; it
refuses when it finds none, and selects the newest when several builds are present; it copies the
chosen binary to
StablePluginsPathunder the leaf name the loader keys a plugin by.It does not set
CHARLY_PLUGIN_DIR. An earlier version appended to~/.profileand~/.bashrc;that was an R3 shim and was removed. Nothing in this change reads or writes any shell startup file.
How tested
On this head,
0c0a40f:What the bed proves, and what it cannot. It proves the step dispatches at a real venue, finds the
named plugin, and writes it under its leaf name — and it fails without each of those: the
no-hash-suffixed-sibling assertion fails on an earlier handler that copied the store's filename
verbatim, and the plan's own check greps for the capability word, the handler and the contract, so
removing the step class fails it (verified by deleting the capability, running the check's command,
seeing it fail, and restoring the file).
It cannot prove the scenario the copy exists for. On
host: localthe deploying store is theloader's store, so the bed cannot distinguish "the copy worked" from "the file was already there".
Proving delivery on a store-less venue, and proving that a delivered tree makes the verb resolve,
both need a consumer — which is why the usability proof is the consumer bed's, not this one's.
Rulebook compliance
plugin,install-plan,checkandgit-workflowwere loaded before the actions theygovern, plus
layerfor the candy.opencharly/plugin-deploy-firecracker#8; this PR's own round RCA is posted here(
#issuecomment-6263375945) because the prefix-collision defect was introduced in this PR's firstcommit and cannot be evidenced on feat(plugin): the deploy target delivers the plugin tree its own plan steps need #8. It names two missed controls: the bed's store holds one
plugin, so it cannot express a two-plugin-same-prefix failure; and on
host: localthe deployingstore is the loader's store, so the assertion is satisfied before it is made.
time to pick the newest; no shell configuration is touched.
~/.profile,~/.bashrcoranything under
/etc.check fail, then restoring the tree (0 dirty files afterwards).
directory and writes a local directory.
charly versionis the activebinary's; the bed's own
[deploy-add]log records the build stamp the plugin was served from),never a shared install.
disposable: truetarget only, fresh, zero warnings,PASS (steps=6)on this head. Thevenue limitation is stated above rather than papered over.
Filed issues
opencharly/charly#977— the deploy engine should ownCHARLY_PLUGIN_DIRfor a step whoseplugin set was delivered. This is the half that makes the copy usable, and it is blocked on that
issue rather than solved here.
opencharly/sdk#399— the duplicatedstablePluginsPathconstant.Change classification
A runtime change to an out-of-tree plugin candy (
plugin-deploy-firecracker), gated by this repo'sown R10 bed
check-deploy-firecracker-host, which passed on the committed tree. The claim isscoped to what that bed can see: a copy into the loader's stable path.
Supersedes
opencharly/plugin-deploy-firecracker#8, auto-closed at five verdicts; every finding itraised is fixed in this tree.
Assisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)