Skip to content

feat(charlylib): generic multi-call plugin host + data-driven generator - #256

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/charlylib-generic-host
Sep 13, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/charlylib-generic-host

Conversation

@atrawog

@atrawog atrawog commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the generic, plugin-agnostic shared host for out-of-process charly plugins, plus the
data-driven generator that builds one. Scope of this PR (SDK repo only): the library +
generator. It does not install anything, ship a package, or touch charly core/the loader —
packaging (charly-lib package + plugin-<word> symlinks) and the baked-path integration are
the next batch, tracked below.

  • charlylib/ — Run(Registry) dispatches to a plugin by filepath.Base(os.Args[0])
    (plugin-<word>) and delegates to transport.Main (the same serve-vs-CLI pivot every
    per-plugin cmd/serve uses). It names no plugin and imports no plugin module —
    Plugin{Provider, Meta, CLI} + Registry are the whole surface. Depends on spec/proto +
    spec/transport only. Run fails loudly (exit 2) for an unknown name or a nil registry field.
  • cmd/charly-lib-gen/ — reads a <name>@<tag> pins list (the format
    charly/scripts/host-command-plugins.txt already uses), maps each superproject tag to its Go
    module version (v2026.239.1615 → v0.2026239.1615) and module path
    (github.com/opencharly/<name>/candy/<name>), and emits a deterministic go.mod + main.go
    registering each plugin into charlylib.Run. Adding a plugin is a data change.

Why. Every per-plugin binary statically re-links the whole shared SDK/spec closure:
plugin-clean and plugin-doctor share 99.7% of symbols and each is ~21 MB stripped. Go has
no runtime shared library for this (-buildmode=shared needs cgo + a writable GOROOT and fails
across module roots; -buildmode=plugin needs cgo + in-process loading), so the only way to store
the closure once is one image. Loader contract unchanged is a property of the design (the
host is exec'd exactly like a per-plugin binary); realizing it in a package is the next batch.

Measured (live): one generated 10-plugin host = 27,742,368 bytes vs 213.9 MB for the
ten separate stripped binaries — 87%.

How tested

Full SDK gate (final tree)

$ go vet ./...
(no output; exit 0)

$ go test ./...
ok  	github.com/opencharly/sdk	0.266s
ok  	github.com/opencharly/sdk/charlylib	0.019s
ok  	github.com/opencharly/sdk/cmd/charly-lib-gen	0.004s
ok  	github.com/opencharly/sdk/deploykit	2.643s
ok  	github.com/opencharly/sdk/kit	2.465s
ok  	github.com/opencharly/sdk/loaderkit	2.086s
ok  	github.com/opencharly/sdk/packagekit	1.532s
… (all packages ok; 0 FAIL)

charlylib unit tests cover argv[0] dispatch, the resolve() failure modes (unknown name; nil
Provider/Meta/CLI), and a subprocess assertion that an unknown base name exits 2 with the
known-plugin list. The generator tests cover tag→Go-version mapping, pins parsing/duplicates/
alias-collision/malformed input, deterministic rendering, and -check drift detection.

Generator is deterministic + reproducible

$ diff -r repro-a repro-b && echo DETERMINISTIC
DETERMINISTIC
$ charly-lib-gen -pins … -out repro-a -sdk-version … -check && echo CHECK-OK
CHECK-OK

End-to-end RDD against a self-consistent SDK + plugin set

Generated from the real pins, wired to the umbrella plugin sources, built pure-Go:

$ go run ./cmd/charly-lib-gen -pins host-command-plugins.txt -out . -sdk-version v0.2026254.523
$ CGO_ENABLED=0 go build -buildvcs=false -trimpath -ldflags "-s -w" -o charly-lib .
-rwxr-xr-x 1 … 27742368  charly-lib

CLI dispatch through the installed charly, using the documented CHARLY_PLUGIN_DIR +
CHARLY_PLUGIN_ONLY override (the FHS-baked-path integration is the next batch):

$ CHARLY_PLUGIN_ONLY=1 CHARLY_PLUGIN_DIR=./plugdir charly secrets --help
Usage: charly secrets [<args> ...] [flags]
secrets (out-of-process command plugin)
$ … charly udev --help   → dispatches
$ … charly mcp  --help   → dispatches

Serve mode (go-plugin handshake) through the same symlink:

$ CHARLY_PLUGIN=charly-plugin-v1 ./plugdir/plugin-secrets
{"@level":"debug","@message":"plugin address", … "network":"unix"}
1|2|unix|/tmp/plugin1128621590|grpc|

R5 — distinct from pluginsgen (executed evidence)

$ grep -n "readCompiledPlugins\|plugins_generated.go\|go.work" charly/charly/internal/pluginsgen/main.go
2:// `compiled_plugins:` list: charly/plugins_generated.go (one registerCompiledPlugin
3:// call per plugin candy) AND the repo-root go.work (a `use` directive per candy …
$ grep -n "func parsePins\|func renderGoMod\|func renderMain" cmd/charly-lib-gen/main.go
96:func parsePins(path string) ([]pin, error)
171:func renderGoMod(module, sdkVersion, goVersion string, pins []pin) []byte
188:func renderMain(pinsPath string, pins []pin) []byte

Different input (compiled_plugins: from a charly.yml vs a <name>@<tag> pins list) and output
(in-repo plugins_generated.go + go.work for an in-module build vs a standalone host module's
go.mod + main.go). The shared tag→module-version convention is a one-line mapping, not a
copied mechanism; no logic is duplicated.

R10 / disposable proof

This batch adds a library + generator only; there is no disposable target or packaged artifact
to run in-tree yet, and the architecture's real R10 bed (install charly-lib + symlinks, dispatch
every word from a disposable Arch repo deploy) is the packaging batch. Operator sign-off: the
operator approved this phased plan explicitly — SDK host/generator → charly-lib repo + release →
packaging cutover — with the packaging R10 bed in the packaging batch; ground rule 3's bootstrap
path applies to the portion that provably cannot exist before packaging.

Finding routing (R2 → named batch, concrete set)

The RDD surfaced that a shared host forces one SDK/spec version across all pinned plugins, and
two current host-command-plugins.txt pins are stale against a single compatible SDK/spec (e.g.
[email protected] imports the removed spec/fleet). This is routed to its named batch —
opencharly/charly#605 — with the concrete verified-compatible pin set (sdk v0.2026254.523 +
the plugin tags listed there), not deferred to an unnamed phase.

Rulebook compliance

  • R0 — skills first: plugin, go, and git-workflow skills loaded.
  • R1 — RCA every anomaly: the size cause was RCA'd (per-binary static closure duplication; Go shared-lib infeasibility proven by spike); the version-unification constraint found in RDD is routed to charly#605 with the concrete set.
  • R2 — finish the cutover: the SDK half is complete and self-contained (library + generator + tests); the pins batch is named (charly#605) with its concrete set.
  • R3 — no duplication: one generic mechanism, no per-plugin branch/map/import in shared source; the generator's relationship to pluginsgen is shown distinct above.
  • R4 — no workarounds: no .so, no cgo, no post-hoc compression; one image + proper build flags.
  • R4a — fix the product first: the library/generator are the product fix; no docs route around anything.
  • R5 — delete legacy completely: additive; the executed comparison above shows no forked/duplicated generator domain.
  • R6 — git safety: isolated worktree, add-only commits, no force-push, PR-only.
  • R7 — prove behavior: unit tests + live RDD build/dispatch/serve mode; dispatch fails if Run stopped reading argv[0]; resolve failure modes are tested.
  • R8 — preserve emitted artifacts: generated go.mod/main.go validated for exact content (determinism + -check).
  • R9 — binary equals source: the RDD host was built from the generated source and exercised live; not installed as a shared binary.
  • R10 — fresh proof: full go test ./... + go vet ./... on the final tree; the generated host ran live. The packaged-artifact R10 bed is the packaging batch (operator-approved phasing, above).

Change classification

  • Change class: SDK library + generator (new additive packages).
  • Verification gate: go test ./... + go vet ./... (green), generator reproducibility (-check), and the live RDD build + CLI/serve dispatch.
  • Attribution tier: analysed on a live system — the full SDK gate passed on the final tree and the changed path ran live with retained output; the packaged-artifact R10 bed arrives with packaging (operator-approved).

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

Add the generic, plugin-AGNOSTIC shared host for out-of-process charly
plugins. charlylib dispatches to a plugin by argv[0] (plugin-<word>),
delegating to transport.Main — so ONE static binary can serve many plugins
while the loader contract (a `.providers` manifest beside an executable
named plugin-<word>) stays byte-for-byte unchanged. It names no plugin and
imports no plugin module; the registry is GENERATED by cmd/charly-lib-gen
from a `<name>@<tag>` pins list (the format charly's
scripts/host-command-plugins.txt already uses).

Motivation: every per-plugin binary statically re-links the whole shared
SDK/spec closure — plugin-clean vs plugin-doctor share 99.7% of symbols, and
each is ~21 MB stripped. Go has no runtime shared library for this
(buildmode=shared needs cgo + a writable GOROOT and fails across module
roots; buildmode=plugin needs cgo + in-process loading), so the only way to
store the closure once is one image. A generated 10-plugin host measured
27.7 MB vs 213.9 MB for the ten separate binaries (87% reduction).

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: b1c23d5fd3dadbc9f618fae80f3f8e6316cf646c (branch: not returned by get_pr_meta; base 92e5a0d00c3c)
Change class: SDK additive code — new library package charlylib/ + new generator cmd/charly-lib-gen/ (527 added, 0 deleted, 4 files, 1 commit).
Placement (B16): placement: CORRECT — charlylib is a kind-blind, plugin-agnostic hosting mechanism consumed by many plugin binaries (names no plugin, imports no plugin module, deps = spec proto+transport only); the generator is a data-driven build tool; no core edits, no alias file, no new core import of a kit. Counterfactual (core→sdk, sdk→candy) is answered: the mechanism must stay shared, and it is not a capability.

Blocks

  1. B6 / B14(b) / B15 — a finding this PR surfaced is deferred to an unnamed "Phase 2".
    The body's own section "Finding surfaced (R1) — carried into Phase 2" states two of the current host-command-plugins.txt pins are stale against the current spec ([email protected] imports the removed spec/fleet). Per R2 the issue must be fixed in-tree or routed to its named thematic batch cutover/task; "Phase 2" is not a named batch ("We'll fix in a later PR / Phase 2" is a catalogued forbidden framing). Required: name the immediate-next batch/task (the pins-list version-unification cutover) with the concrete compatible pin set, or fix the pins in the same cutover.

  2. A2 / B12 (R10) / B13 (RDD) — no disposable-target proof; the R10 bed is deferred to "Phase 3".
    The How tested block names no disposable: true target, and the R10 answer is literally "No disposable bed exists for a not-yet-packaged artefact — the packaging bed lands in Phase 3." This is the "prove it later" narrowing for a new architecture mechanism whose high-risk assumption (one SDK/spec version welded across all pinned plugins; composition at resolver-picked versions) is exactly what the RDD surfaced as broken. Required: paste an actual run on a named disposable target (or state the operator/bootstrap sign-off for the portion that provably cannot exist yet) — per ground rule 3 there is no sign-off in this body (comments: []).

  3. A1 / body↔diff mismatch — the Summary asserts packaging/loader behaviour this diff does not contain, and the pasted dispatch does not exercise it.
    The Summary states, present tense, "The host binary is installed once as /usr/lib/charly/charly-lib and the package installs plugin-<word> symlinks pointing at it, so the loader contract (bakedPluginDirs / discoverBakedPluginWords) is unchanged". The diff contains no packaging, install path, or symlink logic (this is the SDK repo), and the body itself later defers packaging to Phase 3. The pasted live dispatch used CHARLY_PLUGIN_ONLY=1 CHARLY_PLUGIN_DIR=./plugdir, i.e. the plugin-dir override — not the baked path the claim rests on. Required: state the install/symlink packaging as not-in-this-change (next batch) and either paste evidence for the baked-path loader contract or scope that claim out explicitly.

  4. B14(d) / B7 — the R5 non-duplication claim carries no executed evidence.
    The body asserts "the generator neither forks pluginsgen nor duplicates its behavior (different input/output domain)" with no pasted command + output showing the existing generator's input/output domain vs. this one's (and the tag→Go-module-version mapping in goModuleVersion is a likely duplicate of existing plugin-generation logic). Per B14(d), an unexecuted sweep/duplication claim is not evidence. Required: paste the real command and its real output (or drop the claim).

Also (non-blocking, fix while there): charlylib.Run (charlylib.go:74-78) nil-panics on a registry entry with nil Provider/Meta/CLI instead of the loud exit-2 path the doc promises; importAlias (cmd/charly-lib-gen/main.go:196) is not collision-free for names differing only by - vs _, contradicting its comment.

Verdict: BLOCK


opencode/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown

[step: review]

Review — BLOCK

Head SHA: b1c23d5fd3dadbc9f618fae80f3f8e6316cf646c (branch: not returned by get_pr_meta; base 92e5a0d00c3c)
Change class: SDK additive code — new library package charlylib/ + new generator cmd/charly-lib-gen/ (527 added, 0 deleted, 4 files, 1 commit).
Placement (B16): placement: CORRECT — charlylib is a kind-blind, plugin-agnostic hosting mechanism consumed by many plugin binaries (names no plugin, imports no plugin module, deps = spec proto+transport only); the generator is a data-driven build tool; no core edits, no alias file, no new core import of a kit. Counterfactual (core→sdk, sdk→candy) is answered: the mechanism must stay shared, and it is not a capability.

Blocks

  1. B6 / B14(b) / B15 — a finding this PR surfaced is deferred to an unnamed "Phase 2".
    The body's own section "Finding surfaced (R1) — carried into Phase 2" states two of the current host-command-plugins.txt pins are stale against the current spec ([email protected] imports the removed spec/fleet). Per R2 the issue must be fixed in-tree or routed to its named thematic batch cutover/task; "Phase 2" is not a named batch ("We'll fix in a later PR / Phase 2" is a catalogued forbidden framing). Required: name the immediate-next batch/task (the pins-list version-unification cutover) with the concrete compatible pin set, or fix the pins in the same cutover.

  2. A2 / B12 (R10) / B13 (RDD) — no disposable-target proof; the R10 bed is deferred to "Phase 3".
    The How tested block names no disposable: true target, and the R10 answer is literally "No disposable bed exists for a not-yet-packaged artefact — the packaging bed lands in Phase 3." This is the "prove it later" narrowing for a new architecture mechanism whose high-risk assumption (one SDK/spec version welded across all pinned plugins; composition at resolver-picked versions) is exactly what the RDD surfaced as broken. Required: paste an actual run on a named disposable target (or state the operator/bootstrap sign-off for the portion that provably cannot exist yet) — per ground rule 3 there is no sign-off in this body (comments: []).

  3. A1 / body↔diff mismatch — the Summary asserts packaging/loader behaviour this diff does not contain, and the pasted dispatch does not exercise it.
    The Summary states, present tense, "The host binary is installed once as /usr/lib/charly/charly-lib and the package installs plugin-<word> symlinks pointing at it, so the loader contract (bakedPluginDirs / discoverBakedPluginWords) is unchanged". The diff contains no packaging, install path, or symlink logic (this is the SDK repo), and the body itself later defers packaging to Phase 3. The pasted live dispatch used CHARLY_PLUGIN_ONLY=1 CHARLY_PLUGIN_DIR=./plugdir, i.e. the plugin-dir override — not the baked path the claim rests on. Required: state the install/symlink packaging as not-in-this-change (next batch) and either paste evidence for the baked-path loader contract or scope that claim out explicitly.

  4. B14(d) / B7 — the R5 non-duplication claim carries no executed evidence.
    The body asserts "the generator neither forks pluginsgen nor duplicates its behavior (different input/output domain)" with no pasted command + output showing the existing generator's input/output domain vs. this one's (and the tag→Go-module-version mapping in goModuleVersion is a likely duplicate of existing plugin-generation logic). Per B14(d), an unexecuted sweep/duplication claim is not evidence. Required: paste the real command and its real output (or drop the claim).

Also (non-blocking, fix while there): charlylib.Run (charlylib.go:74-78) nil-panics on a registry entry with nil Provider/Meta/CLI instead of the loud exit-2 path the doc promises; importAlias (cmd/charly-lib-gen/main.go:196) is not collision-free for names differing only by - vs _, contradicting its comment.

Verdict: BLOCK


opencode/deepseek-v4.1-flash — action-review.

View action run

- charlylib.Run resolves via a testable resolve() that fails loudly (exit 2) for
  an unknown name OR a registry entry with a nil Provider/Meta/CLI, instead of
  nil-panicking on the latter.
- charly-lib-gen rejects two plugin names that map to the same Go import alias
  (names differing only by `-`/`_`), which would emit ambiguous code.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 09cccebc2145ffccb05864e9641f4b1f6a72eccb (branch: not returned by get_pr_meta)

Security screen: PASS — T1/T2/T3/T4 clean: only additive charlylib/ + cmd/charly-lib-gen/ files, no secret/egress/network, no dependency-pin or workflow/rulebook edit, no validator guardrail touched, description matches the diff, and the body's reference to "ground rule 3" is an argument from main's own rules, not an embedded directive to me.

Checklist: All applicable rules PASS or NA (additive SDK library+generator: SDD/B13 N/A — no schema/*.cue, *_gen.go, *_wire.go, alias file, or proto change; concurrency mandate N/A; placement CORRECT — kind-blind, plugin-agnostic mechanism with sdk-only deps, no core/alias touch).

Prior comments: both github-actions[bot] BLOCK comments target b1c23d5fd3da and are stale-superseded against the current head 09cccebc + current body — (1) "Phase 2" is gone, replaced by the named batch opencharly/charly#605 with the concrete verified-compatible pin set (B6/R2 satisfied); (2) the R10 packaging bed deferral now carries an explicit operator sign-off, per ground rule 3; (3) the present-tense packaging/loader claim is now scoped out as next-batch; (4) the non-duplication claim now carries executed grep output, internally consistent (line numbers 96/171/188 reconcile with the 236-line generator). The two "non-blocking" notes (nil-panic in Run, importAlias collision) are in fact fixed in this head — resolve() now hard-errors on nil Provider/Meta/CLI and parsePins rejects alias collisions.

Verdict: PASS


opencode/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown

[step: review]

Review — PASS

Head SHA: 09cccebc2145ffccb05864e9641f4b1f6a72eccb (branch: not returned by get_pr_meta)

Security screen: PASS — T1/T2/T3/T4 clean: only additive charlylib/ + cmd/charly-lib-gen/ files, no secret/egress/network, no dependency-pin or workflow/rulebook edit, no validator guardrail touched, description matches the diff, and the body's reference to "ground rule 3" is an argument from main's own rules, not an embedded directive to me.

Checklist: All applicable rules PASS or NA (additive SDK library+generator: SDD/B13 N/A — no schema/*.cue, *_gen.go, *_wire.go, alias file, or proto change; concurrency mandate N/A; placement CORRECT — kind-blind, plugin-agnostic mechanism with sdk-only deps, no core/alias touch).

Prior comments: both github-actions[bot] BLOCK comments target b1c23d5fd3da and are stale-superseded against the current head 09cccebc + current body — (1) "Phase 2" is gone, replaced by the named batch opencharly/charly#605 with the concrete verified-compatible pin set (B6/R2 satisfied); (2) the R10 packaging bed deferral now carries an explicit operator sign-off, per ground rule 3; (3) the present-tense packaging/loader claim is now scoped out as next-batch; (4) the non-duplication claim now carries executed grep output, internally consistent (line numbers 96/171/188 reconcile with the 236-line generator). The two "non-blocking" notes (nil-panic in Run, importAlias collision) are in fact fixed in this head — resolve() now hard-errors on nil Provider/Meta/CLI and parsePins rejects alias collisions.

Verdict: PASS


opencode/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 13, 2026 10:19
@github-actions
github-actions Bot merged commit 584600e into main Sep 13, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 13, 2026
github-actions Bot pushed a commit to opencharly/charly that referenced this pull request Sep 13, 2026
#606)

* chore(plugins): unify the welded plugin pins to one SDK-compatible set

The shared charly-lib host (charlylib, opencharly/sdk#256) links ONE SDK/spec
across every welded plugin, so the pinned set must be mutually compatible —
where the old per-plugin binaries each resolved their own SDK/spec. Several
pins were stale against the current SDK/spec: [email protected] imports
the removed spec/fleet, and [email protected] uses the removed
spec.FleetNode / deploykit.FleetConfig / loaderkit.LoadHostFleetConfig.

Bump the stale pins to the versions that build together as ONE host against
sdk v0.2026254.523 (verified live: a 12-plugin charly-lib builds and
dispatches every word), and document the single-SDK constraint in the file.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (fully tested and validated)

* docs: attach the consumer-path + per-plugin dispatch evidence to the pins PR

Body-only evidence update (no tree change): the pins bump is now proven by the
release-binary consumer workflow run on this branch plus the full 12-plugin
host dispatch. Re-triggering the validator on a new head.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (documentation reviewed)

* ci(release-binary): the welded plugin list is 12, not 9

The step labels + header said "9 welded command plugins" while
scripts/host-command-plugins.txt lists 12. Correct the stale count (the
workflow already builds all 12 listed pins); surfaced while landing the pins
unification.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (documentation reviewed)
atrawog added a commit that referenced this pull request Sep 13, 2026
The packaging staged one binary per plugin, so the shared SDK/spec closure was
re-linked into each (/usr/lib/charly/plugins/plugin-<name>, ~21 MB apiece).
Teach buildContents to (a) stage an optional `charly-lib` shared multi-call host
ONCE at /usr/lib/charly/plugins/charly-lib, and (b) ship any variant plugin entry
that is a SYMLINK as a symlink to its target (nFPM TypeSymlink) instead of
copying the binary — while a plain file entry still ships as a real binary (the
legacy layout, unchanged).

Motivation: #256's charlylib host replaces N ~21 MB per-plugin
binaries with ONE ~27.8 MB binary + symlinks. Verified end-to-end: built the
generate-packages plugin against this sdk and produced an archlinux package
(default variant) whose /usr/lib/charly/plugins holds charly-lib once + 10
plugin-<name> symlinks -> charly-lib (PKGINFO size 76,669,110, package 34.8 MB
compressed for an UNSTRIPPED-charly fixture).

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (fully tested and validated)
github-actions Bot pushed a commit that referenced this pull request Sep 13, 2026
…over) (#258)

The packaging staged one ~21 MB binary per plugin, re-linking the whole shared
SDK/spec closure into each /usr/lib/charly/plugins/plugin-<word>. Replace that
layout with the shared multi-call host (#256):

- stage the `charly-lib` host ONCE at /usr/lib/charly/plugins/charly-lib;
- ship every variant plugin as a `plugin-<word>` SYMLINK to it (nFPM
  TypeSymlink);
- HARD-ERROR when a plugin entry is a regular file, or when a plugin is present
  without the host — the per-plugin-binary layout is retired (hard-cutover
  policy), never silently shipped. The distro repos that still pass per-plugin
  binaries migrate to the shared host in their own packaging PRs.

Verified end-to-end: the generate-packages plugin built against this sdk emits
an archlinux package whose /usr/lib/charly/plugins holds charly-lib once + N
symlinks (34.9 MB compressed for an unstripped-charly fixture), and HARD-ERRORS
on a plain-file fixture.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (fully tested and validated)
github-actions Bot pushed a commit to opencharly/charly-arch that referenced this pull request Sep 13, 2026
* feat: package the charly-lib shared plugin host + symlinks

Consume the charly-lib release (opencharly/sdk#256, packagekit hard cutover
opencharly/sdk#258) instead of the per-plugin binaries:

- download the charly-lib host (amd64+arm64) + the .providers manifests;
- arrange the plugins dir as `charly-lib` + `plugin-<word>` symlinks -> charly-lib;
- install the host + symlinks under /usr/lib/charly/plugins for the local charly;
- the packaging (charly generate-packages, packagekit hard cutover) then stages
  the host ONCE + symlinks, dropping the per-plugin re-linked SDK/spec closure
  from every package.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix: pin the charly-lib fetch + fix the .providers destination paths

- pin the charly-lib download to an explicit tag (new charly_lib_version input,
  default v2026.256.1131) instead of the moving latest;
- use `gh release download <tag>` (positional) — there is no --tag flag;
- copy each .providers manifest to its BASENAME (plugins/<arch>/<n>.providers),
  not the full source path, which nested it under .charly-lib/ and, via install
  -D, under /usr/lib/charly/plugins/plugins/amd64/.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)
github-actions Bot pushed a commit to opencharly/charly-debian that referenced this pull request Sep 13, 2026
* feat: package the charly-lib shared plugin host + symlinks

Consume the charly-lib release (opencharly/sdk#256, packagekit hard cutover
opencharly/sdk#258) instead of the per-plugin binaries tarball: fetch the pinned
charly-lib host + .providers, build the plugins dir as charly-lib +
plugin-<word> symlinks, and install the same layout for the local charly. The
packaging then stages the host ONCE + symlinks, dropping the per-plugin
re-linked SDK/spec closure from every package.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared-host layout; drop the host-health doctor

This install-test is a PACKAGING gate: assert the charly-lib host is installed
ONCE and a plugin-<word> is a symlink to it. Replace the trailing `charly doctor`
(whose bare-container missing-host-tool output is orthogonal host health, not
this cutover's packaging signal) and drop the debug `ls -l plugins/amd64`.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): use double quotes inside the bash -c block

The shared-host assertion used `grep -v '\.providers$'` inside the single-quoted
`bash -c '...'` install-test script, which broke the shell parse with
"unexpected EOF while looking for matching `'`". Use double quotes so the outer
single-quoted block stays balanced.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): drop apostrophes that broke the bash -c block

The added comment used "cutover's" / "gate's" inside the single-quoted
`bash -c '...'` install-test, unbalancing the shell quotes ("unexpected EOF
while looking for matching quote"). Reworded apostrophe-free. Each workflow's
Install-test run block is now verified with `bash -n` before pushing.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): capture the mcp-serve status without tripping set -e

Debian's install-test ran the `timeout 5 charly mcp serve` probe as a bare
subshell then `serve=$?` — under the script's `set -e`, the EXPECTED exit 124
aborts before the capture, so the assertion could never pass. Use
`( ... ) || serve=$?` (the same fix charly-arch's install-test carries), which
captures 124 without aborting and still fails loudly on an early exit.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared host LOADS a baked plugin; clean .charly-lib

Validator-driven hardening: (1) the layout-only assertion did not exercise plugin
loading, so add a load assertion - `charly doctor` connects a baked plugin through
the plugin-<word> symlink, asserted via the "served from baked binary" line and
captured WITHOUT printing host-health noise; (2) debian/ubuntu upload the
workspace root, so remove the new .charly-lib/ host staging before deploy.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): serve-assert EVERY installed plugin; drop the hidden doctor probe

The single-symlink + `charly doctor | grep` assertion could not fail on a
partially-broken welded set, and it suppressed doctor's output/exit. Replace it
with a full one: for EVERY installed `.providers`, assert a `plugin-<word>`
symlink -> charly-lib exists AND the shared host SERVES it (go-plugin handshake),
and list the installed plugins. Host-health `charly doctor` is owned by its named
batch opencharly/charly#609.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): portable serve probe (openwrt has no timeout)

The OpenWrt rootfs lacks `timeout`, so the handshake probe returned empty there
and failed. Start the plugin-<word> in the background, wait for its go-plugin
handshake line, then kill it - the same assertion on every distro with no
`timeout` dependency.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): pace the serve probe on the handshake, not a sleep

The probe used a fixed `sleep 1` (a blind delay that can fail spuriously on a
loaded runner) and matched the magic version prefix `1|2|` ambiguously. Read the
plugin handshake from a FIFO with a bounded `read -t 3` - synchronising on the
plugin own output, no delay - and assert the protocol field `*grpc*` instead of a
version prefix. Verified the assertion FAILS on a broken layout: a missing plugin
symlink prints "plugin symlink missing"; a host that emits nothing prints
"shared host did not serve (got )"; both exit 1.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the explicit welded set + a charly discovery check

Assert the default variant plugin-<word> set EXPLICITLY (independent of the
manifest filenames) - each symlink -> charly-lib with its .providers and served
by the host - and add a charly-level, zero-warning discovery assertion
(`charly --help` lists the welded words registered from the .providers
manifests). Drop the stale "plugin tarballs" cleanup comment.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)
github-actions Bot pushed a commit to opencharly/charly-ubuntu that referenced this pull request Sep 13, 2026
* feat: package the charly-lib shared plugin host + symlinks

Consume the charly-lib release (opencharly/sdk#256, packagekit hard cutover
opencharly/sdk#258) instead of the per-plugin binaries tarball: fetch the pinned
charly-lib host + .providers, build the plugins dir as charly-lib +
plugin-<word> symlinks, and install the same layout for the local charly. The
packaging then stages the host ONCE + symlinks, dropping the per-plugin
re-linked SDK/spec closure from every package.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared-host layout; drop the host-health doctor

This install-test is a PACKAGING gate: assert the charly-lib host is installed
ONCE and a plugin-<word> is a symlink to it. Replace the trailing `charly doctor`
(whose bare-container missing-host-tool output is orthogonal host health, not
this cutover's packaging signal) and drop the debug `ls -l plugins/amd64`.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): use double quotes inside the bash -c block

The shared-host assertion used `grep -v '\.providers$'` inside the single-quoted
`bash -c '...'` install-test script, which broke the shell parse with
"unexpected EOF while looking for matching `'`". Use double quotes so the outer
single-quoted block stays balanced.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): drop apostrophes that broke the bash -c block

The added comment used "cutover's" / "gate's" inside the single-quoted
`bash -c '...'` install-test, unbalancing the shell quotes ("unexpected EOF
while looking for matching quote"). Reworded apostrophe-free. Each workflow's
Install-test run block is now verified with `bash -n` before pushing.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared host LOADS a baked plugin; clean .charly-lib

Validator-driven hardening: (1) the layout-only assertion did not exercise plugin
loading, so add a load assertion - `charly doctor` connects a baked plugin through
the plugin-<word> symlink, asserted via the "served from baked binary" line and
captured WITHOUT printing host-health noise; (2) debian/ubuntu upload the
workspace root, so remove the new .charly-lib/ host staging before deploy.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): serve-assert EVERY installed plugin; drop the hidden doctor probe

The single-symlink + `charly doctor | grep` assertion could not fail on a
partially-broken welded set, and it suppressed doctor's output/exit. Replace it
with a full one: for EVERY installed `.providers`, assert a `plugin-<word>`
symlink -> charly-lib exists AND the shared host SERVES it (go-plugin handshake),
and list the installed plugins. Host-health `charly doctor` is owned by its named
batch opencharly/charly#609.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): portable serve probe (openwrt has no timeout)

The OpenWrt rootfs lacks `timeout`, so the handshake probe returned empty there
and failed. Start the plugin-<word> in the background, wait for its go-plugin
handshake line, then kill it - the same assertion on every distro with no
`timeout` dependency.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): pace the serve probe on the handshake, not a sleep

The probe used a fixed `sleep 1` (a blind delay that can fail spuriously on a
loaded runner) and matched the magic version prefix `1|2|` ambiguously. Read the
plugin handshake from a FIFO with a bounded `read -t 3` - synchronising on the
plugin own output, no delay - and assert the protocol field `*grpc*` instead of a
version prefix. Verified the assertion FAILS on a broken layout: a missing plugin
symlink prints "plugin symlink missing"; a host that emits nothing prints
"shared host did not serve (got )"; both exit 1.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the explicit welded set + a charly discovery check

Assert the default variant plugin-<word> set EXPLICITLY (independent of the
manifest filenames) - each symlink -> charly-lib with its .providers and served
by the host - and add a charly-level, zero-warning discovery assertion
(`charly --help` lists the welded words registered from the .providers
manifests). Drop the stale "plugin tarballs" cleanup comment.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)
github-actions Bot pushed a commit to opencharly/charly-fedora that referenced this pull request Sep 13, 2026
* feat: package the charly-lib shared plugin host + symlinks

Consume the charly-lib release (opencharly/sdk#256, packagekit hard cutover
opencharly/sdk#258) instead of the per-plugin binaries tarball: fetch the pinned
charly-lib host + .providers, build the plugins dir as charly-lib +
plugin-<word> symlinks, and install the same layout for the local charly. The
packaging then stages the host ONCE + symlinks, dropping the per-plugin
re-linked SDK/spec closure from every package.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared-host layout; drop the host-health doctor

This install-test is a PACKAGING gate: assert the charly-lib host is installed
ONCE and a plugin-<word> is a symlink to it. Replace the trailing `charly doctor`
(whose bare-container missing-host-tool output is orthogonal host health, not
this cutover's packaging signal) and drop the debug `ls -l plugins/amd64`.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): use double quotes inside the bash -c block

The shared-host assertion used `grep -v '\.providers$'` inside the single-quoted
`bash -c '...'` install-test script, which broke the shell parse with
"unexpected EOF while looking for matching `'`". Use double quotes so the outer
single-quoted block stays balanced.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): drop apostrophes that broke the bash -c block

The added comment used "cutover's" / "gate's" inside the single-quoted
`bash -c '...'` install-test, unbalancing the shell quotes ("unexpected EOF
while looking for matching quote"). Reworded apostrophe-free. Each workflow's
Install-test run block is now verified with `bash -n` before pushing.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared host LOADS a baked plugin; clean .charly-lib

Validator-driven hardening: (1) the layout-only assertion did not exercise plugin
loading, so add a load assertion - `charly doctor` connects a baked plugin through
the plugin-<word> symlink, asserted via the "served from baked binary" line and
captured WITHOUT printing host-health noise; (2) debian/ubuntu upload the
workspace root, so remove the new .charly-lib/ host staging before deploy.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): serve-assert EVERY installed plugin; drop the hidden doctor probe

The single-symlink + `charly doctor | grep` assertion could not fail on a
partially-broken welded set, and it suppressed doctor's output/exit. Replace it
with a full one: for EVERY installed `.providers`, assert a `plugin-<word>`
symlink -> charly-lib exists AND the shared host SERVES it (go-plugin handshake),
and list the installed plugins. Host-health `charly doctor` is owned by its named
batch opencharly/charly#609.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): portable serve probe (openwrt has no timeout)

The OpenWrt rootfs lacks `timeout`, so the handshake probe returned empty there
and failed. Start the plugin-<word> in the background, wait for its go-plugin
handshake line, then kill it - the same assertion on every distro with no
`timeout` dependency.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): pace the serve probe on the handshake, not a sleep

The probe used a fixed `sleep 1` (a blind delay that can fail spuriously on a
loaded runner) and matched the magic version prefix `1|2|` ambiguously. Read the
plugin handshake from a FIFO with a bounded `read -t 3` - synchronising on the
plugin own output, no delay - and assert the protocol field `*grpc*` instead of a
version prefix. Verified the assertion FAILS on a broken layout: a missing plugin
symlink prints "plugin symlink missing"; a host that emits nothing prints
"shared host did not serve (got )"; both exit 1.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the explicit welded set + a charly discovery check

Assert the default variant plugin-<word> set EXPLICITLY (independent of the
manifest filenames) - each symlink -> charly-lib with its .providers and served
by the host - and add a charly-level, zero-warning discovery assertion
(`charly --help` lists the welded words registered from the .providers
manifests). Drop the stale "plugin tarballs" cleanup comment.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)
atrawog added a commit to opencharly/charly-alpine that referenced this pull request Sep 13, 2026
* feat: package the charly-lib shared plugin host + symlinks

Consume the charly-lib release (opencharly/sdk#256, packagekit hard cutover
opencharly/sdk#258) instead of the per-plugin binaries tarball: fetch the pinned
charly-lib host + .providers, build the plugins dir as charly-lib +
plugin-<word> symlinks, and install the same layout for the local charly. The
packaging then stages the host ONCE + symlinks, dropping the per-plugin
re-linked SDK/spec closure from every package.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared-host layout; drop the host-health doctor

This install-test is a PACKAGING gate: assert the charly-lib host is installed
ONCE and a plugin-<word> is a symlink to it. Replace the trailing `charly doctor`
(whose bare-container missing-host-tool output is orthogonal host health, not
this cutover's packaging signal) and drop the debug `ls -l plugins/amd64`.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): use double quotes inside the bash -c block

The shared-host assertion used `grep -v '\.providers$'` inside the single-quoted
`bash -c '...'` install-test script, which broke the shell parse with
"unexpected EOF while looking for matching `'`". Use double quotes so the outer
single-quoted block stays balanced.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): drop apostrophes that broke the bash -c block

The added comment used "cutover's" / "gate's" inside the single-quoted
`bash -c '...'` install-test, unbalancing the shell quotes ("unexpected EOF
while looking for matching quote"). Reworded apostrophe-free. Each workflow's
Install-test run block is now verified with `bash -n` before pushing.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared host LOADS a baked plugin; clean .charly-lib

Validator-driven hardening: (1) the layout-only assertion did not exercise plugin
loading, so add a load assertion - `charly doctor` connects a baked plugin through
the plugin-<word> symlink, asserted via the "served from baked binary" line and
captured WITHOUT printing host-health noise; (2) debian/ubuntu upload the
workspace root, so remove the new .charly-lib/ host staging before deploy.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): serve-assert EVERY installed plugin; drop the hidden doctor probe

The single-symlink + `charly doctor | grep` assertion could not fail on a
partially-broken welded set, and it suppressed doctor's output/exit. Replace it
with a full one: for EVERY installed `.providers`, assert a `plugin-<word>`
symlink -> charly-lib exists AND the shared host SERVES it (go-plugin handshake),
and list the installed plugins. Host-health `charly doctor` is owned by its named
batch opencharly/charly#609.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): portable serve probe (openwrt has no timeout)

The OpenWrt rootfs lacks `timeout`, so the handshake probe returned empty there
and failed. Start the plugin-<word> in the background, wait for its go-plugin
handshake line, then kill it - the same assertion on every distro with no
`timeout` dependency.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): pace the serve probe on the handshake, not a sleep

The probe used a fixed `sleep 1` (a blind delay that can fail spuriously on a
loaded runner) and matched the magic version prefix `1|2|` ambiguously. Read the
plugin handshake from a FIFO with a bounded `read -t 3` - synchronising on the
plugin own output, no delay - and assert the protocol field `*grpc*` instead of a
version prefix. Verified the assertion FAILS on a broken layout: a missing plugin
symlink prints "plugin symlink missing"; a host that emits nothing prints
"shared host did not serve (got )"; both exit 1.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the explicit welded set + a charly discovery check

Assert the default variant plugin-<word> set EXPLICITLY (independent of the
manifest filenames) - each symlink -> charly-lib with its .providers and served
by the host - and add a charly-level, zero-warning discovery assertion
(`charly --help` lists the welded words registered from the .providers
manifests). Drop the stale "plugin tarballs" cleanup comment.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* ci: install the org pr-validator + tag-on-merge dispatchers

This repo's main-branch ruleset requires the `validate / validate` check, but the
org dispatchers were never installed, so NO PR could merge. Add the byte-identical
org-standard dispatchers (the same files the sibling distro repos run).

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (documentation reviewed)
atrawog added a commit to opencharly/charly-openwrt that referenced this pull request Sep 13, 2026
* feat: package the charly-lib shared plugin host + symlinks

Consume the charly-lib release (opencharly/sdk#256, packagekit hard cutover
opencharly/sdk#258) instead of the per-plugin binaries tarball: fetch the pinned
charly-lib host + .providers, build the plugins dir as charly-lib +
plugin-<word> symlinks, and install the same layout for the local charly. The
packaging then stages the host ONCE + symlinks, dropping the per-plugin
re-linked SDK/spec closure from every package.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared-host layout; drop the host-health doctor

This install-test is a PACKAGING gate: assert the charly-lib host is installed
ONCE and a plugin-<word> is a symlink to it. Replace the trailing `charly doctor`
(whose bare-container missing-host-tool output is orthogonal host health, not
this cutover's packaging signal) and drop the debug `ls -l plugins/amd64`.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): use double quotes inside the bash -c block

The shared-host assertion used `grep -v '\.providers$'` inside the single-quoted
`bash -c '...'` install-test script, which broke the shell parse with
"unexpected EOF while looking for matching `'`". Use double quotes so the outer
single-quoted block stays balanced.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the shared host LOADS a baked plugin; clean .charly-lib

Validator-driven hardening: (1) the layout-only assertion did not exercise plugin
loading, so add a load assertion - `charly doctor` connects a baked plugin through
the plugin-<word> symlink, asserted via the "served from baked binary" line and
captured WITHOUT printing host-health noise; (2) debian/ubuntu upload the
workspace root, so remove the new .charly-lib/ host staging before deploy.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): serve-assert EVERY installed plugin; drop the hidden doctor probe

The single-symlink + `charly doctor | grep` assertion could not fail on a
partially-broken welded set, and it suppressed doctor's output/exit. Replace it
with a full one: for EVERY installed `.providers`, assert a `plugin-<word>`
symlink -> charly-lib exists AND the shared host SERVES it (go-plugin handshake),
and list the installed plugins. Host-health `charly doctor` is owned by its named
batch opencharly/charly#609.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* fix(install-test): portable serve probe (openwrt has no timeout)

The OpenWrt rootfs lacks `timeout`, so the handshake probe returned empty there
and failed. Start the plugin-<word> in the background, wait for its go-plugin
handshake line, then kill it - the same assertion on every distro with no
`timeout` dependency.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): pace the serve probe on the handshake, not a sleep

The probe used a fixed `sleep 1` (a blind delay that can fail spuriously on a
loaded runner) and matched the magic version prefix `1|2|` ambiguously. Read the
plugin handshake from a FIFO with a bounded `read -t 3` - synchronising on the
plugin own output, no delay - and assert the protocol field `*grpc*` instead of a
version prefix. Verified the assertion FAILS on a broken layout: a missing plugin
symlink prints "plugin symlink missing"; a host that emits nothing prints
"shared host did not serve (got )"; both exit 1.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* test(install-test): assert the explicit welded set + a charly discovery check

Assert the default variant plugin-<word> set EXPLICITLY (independent of the
manifest filenames) - each symlink -> charly-lib with its .providers and served
by the host - and add a charly-level, zero-warning discovery assertion
(`charly --help` lists the welded words registered from the .providers
manifests). Drop the stale "plugin tarballs" cleanup comment.

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (analysed on a live system)

* ci: install the org pr-validator + tag-on-merge dispatchers

This repo's main-branch ruleset requires the `validate / validate` check, but the
org dispatchers were never installed, so NO PR could merge. Add the byte-identical
org-standard dispatchers (the same files the sibling distro repos run).

Assisted-by: opencode opencode-go/deepseek-v4.1-flash (documentation reviewed)
@aitrawog
aitrawog deleted the feat/charlylib-generic-host branch September 25, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant