Repository navigation
feat(wire): the connected plugin entry carries its provider words, and ONE manifest format - #313
Conversation
…d ONE manifest format
A delivered plugin TREE is a directory of provider binaries in which a bare command/verb WORD
resolves only through a `<leaf>.providers` manifest beside the binary. MEASURED 2026-11-13 on a
disposable guest: the tree was delivered, `CHARLY_PLUGIN_DIR` pointed at it, and `charly
firecracker --help` still printed charly's USAGE text - because the tree carried the binary and
not the manifest. Adding the manifest by hand made the same command resolve.
The engine has the words at connect time (`unit.Providers`, in scope at `loadPluginUnit`), so they
ride the set rather than being re-derived from the plugin:
- `#DeployConnectedPlugin.providers?: [...string]` - additive, optional.
- `spec.ManifestSuffix` / `spec.PluginManifest(providers)` / `spec.PluginManifestName(bin)` - the
ONE serializer for that format. It has TWO writers today (sdk/deploykit's baked-image emitter,
and any class:step that delivers a tree), and they must produce the SAME bytes because the
reader is one reader. A second `strings.Join` in the plugin would have been the third spelling.
- `spec/exec`'s `ManifestSuffix` now ALIASES `spec.ManifestSuffix`, so the package that owns the
tree probe keeps its API and the value has one home.
Both new artifacts are CUE-generated (`cue_types_gen.go`) or hand-written protocol helpers beside
the constant they name; a clean `charly task cue-gen` on the committed tree is a no-op.
Refs opencharly/charly#1131
Agent: charly-plugins
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Change class: contract / wire-schema addition (spec library module) — module CI gate; no Security screen: PASS — additive optional field + pure serializer + tests; no secrets, network egress, obfuscation, guardrail weakening, supply-chain, or scope mismatch. Minor non-blocking note: the regeneration proof's heading says "no-op on the committed tree" while the pasted Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…ializer (#506) * feat(deploykit): write the plugin manifest through the ONE shared serializer A plugin tree — baked into an image by `EmitBakedPlugins`, or delivered at a venue by a `class:step` — is read by ONE reader, so its `<leaf>.providers` manifest has exactly one spelling. This file carried its own `strings.Join(providers, "\n") + "\n"` and its own `.providers` literal; adopting the delivered-tree format would have made a third copy. Repointed at `spec.PluginManifest` / `spec.PluginManifestName` / `spec.ManifestSuffix` / `spec.ManifestMode` (opencharly/spec#313, tagged v0.2026317.2143), and the empty case now refuses loudly instead of writing a zero-word manifest that would satisfy a "carries a manifest" count while addressing nothing. `bake_plugins_manifest_bytes_test.go` is the leg's whole point: it asserts the staged manifest's bytes against a LITERAL (one `class:word` per line, newline-terminated), its mode (0644, data not a program), and the emitted `COPY … .providers … .providers` line — so the repoint is proven byte-for-byte rather than assumed. Mutation-proven: dropping the serializer's trailing newline turns that test red (`staged manifest = "verb:stub\ncommand:stub", want "verb:stub\ncommand:stub\n"`). Refs opencharly/charly#1131 Agent: charly-plugins Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated) * fix(deploykit): drop the unreachable empty-provider branch Round-2 fix: the `manifest == nil` refusal added in round 1 sat INSIDE the unchanged `len(plugin.GetPluginProviders()) > 0` guard, so it could never execute - it was dead code that also made the body claim a behaviour change this PR does not make. Deleted. The guard is what decides whether a manifest exists at all; `spec.PluginManifest` only renders its bytes. The empty-provider case is therefore UNCHANGED by this leg (the old inline join was under the same guard), and the body now says so instead of claiming a refusal. The leg stays what its title says: the same bytes, from one function. Refs opencharly/charly#1131 Agent: charly-plugins Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system) --------- Co-authored-by: charly <[email protected]>
…#1140) * feat(plugin): the connected plugin record carries the words it serves The loader registers a unit's providers when it connects it, and the manifest a delivered plugin tree needs is built from exactly those words. Until now the record carried key/leaf/view_path/ src_dir and dropped them, so a delivering step had to re-derive "what does this plugin serve" - or, as the measured defect showed, deliver a tree of binaries that no command/verb word could reach because the `<leaf>.providers` manifest could not be written (#1131). So `recordConnectedPluginFromLoad` takes the words and stores them, and the words come from `unitProviderKeys(unit)` - the unit the engine CONNECTED, rendered by the ONE identity renderer the rest of the loader uses. Nothing scrapes the plugin's binary and nothing re-parses its candy. The tests assert the field survives both ends: the registry entry (a word list, in order) and the step input the construct seam injects (the entry's providers array). Adopts github.com/opencharly/spec v0.2026317.2143 (opencharly/spec#313, the field's wire home) and github.com/opencharly/sdk v0.2026317.2240 (opencharly/sdk#506, the released repoint of the manifest writer this field feeds). Refs #1131 Agent: charly-plugins Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated) * chore(pins): align the tools modules with the adopted spec and sdk pins The red `go` job on the previous head was `TestContractPinsMatchShared`: the three lockstep `tools/*` modules still required sdk v0.2026317.712 / spec v0.2026317.1828 while this change adopts sdk v0.2026317.2240 / spec v0.2026317.2143. `charly task mods-tidy` writes the shared pins into every lockstep module; its own check step then verifies it, and the canonical test passes locally (GOWORK=off go test ./... in tools/gomod-canonical: ok). Refs #1131 Agent: charly-plugins Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: charly <[email protected]>
Summary
A delivered plugin TREE is a directory of provider binaries in which a bare command/verb WORD resolves only through a
<leaf>.providersmanifest beside the binary. Measured 2026-11-13 on a disposable guest: the tree was delivered,CHARLY_PLUGIN_DIRpointed at it, andcharly firecracker --helpstill printed charly's USAGE text. Adding the manifest by hand made the same command resolve:The engine has the words at connect time (
unit.Providers, in scope atloadPluginUnit), so this leg carries them and gives the format ONE home:#DeployConnectedPlugin.providers?: [...string]— additive, optional: the words the connected unit serves, exactly as it declared them over Describe.spec.ManifestSuffix/spec.PluginManifest(providers)/spec.PluginManifestName(bin)— the ONE serializer. It has TWO writers (sdk/deploykit's baked-image emitter, and any class:step that delivers a tree), and they must produce the SAME bytes because the reader is one reader. A secondstrings.Joinin the plugin would have been the third spelling of one format.spec/exec'sManifestSuffixnow ALIASESspec.ManifestSuffix— that package owns the tree probe and keeps its API, while the value lives in one place.nil), because a zero-word manifest would satisfy a "does this tree carry a manifest" count while addressing nothing — the vacuous-tree class this format exists to prevent.CUE-first:
schema/seam.cueis authored,spec/cue_types_gen.gois generated, and a clean regeneration on the committed tree is a no-op (pasted below).Head
04c8ea2d125ffb5e90292f1ca439269cf2a7ec14How tested
Change class: Contract / library module — no
disposable: truetarget can exist here, so the gate is the repo's committed module CI on the committed tree, genuinely EXECUTING the changed paths (proven below and by the no-disposable premise).The new units execute their changed paths — the serializer's exact bytes/filename/mode, the empty-list refusal, and the new wire field:
Regeneration is a no-op on the committed tree, so the generated types are what the schema says:
(The status after the FIRST generation is the change itself; the second generation adds nothing, and the diff above is unchanged by it.)
The "no disposable target" premise, executed on the head:
Where the behaviour is observable next in the cutover:
charlyrecords the words (next leg),plugin-deploy-firecrackerwrites the manifest and its beds assert RESOLUTION (charly <word> --help) instead of file existence, and only then doplugin-firecracker#11andlayer-fireactions-runner#2move.Rulebook compliance
git-workflow,go,go-quality,plugin,check,disposable,strict-policy,root-cause-analyzer, plus this repo'sspec/AGENTS.md(CUE-first, and the wire types are not here — they are authored here and generated here).spec.PluginManifest+spec.ManifestSuffix), andspec/exec's existing constant is an ALIAS of it rather than a second literal. The sdk's baked-image emitter is repointed at it in the next leg — that leg exists precisely to delete the copy, and it is why this is a four-repo cutover instead of a plugin-local formatter.spec/exec's constant is an alias, so there is one value; the sdk's copy is deleted in the next leg with its own proof.git statusread before committing; branchcharly-plugins/leg-cofforigin/main(7b66e58); one commit; no force-push; no submodule touched.disposable: truetarget exists here. The consumer bed that can fail on the delivered manifest rides the plugin leg.Change classification
providersis optional and absent by default, and the serializer is new. Rollback isgit revert; a consumer that adopted the field degrades to absent, which is this leg's pre-change behaviour.charly.ymlkey.Agent: charly-plugins
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)