Repository navigation
feat: pluginsgen resolves the compiled-in module path from the plugin source: field (the plugin mechanism cutover, part 1) - #407
Conversation
… source: field The candy de-submodule cutover, Phase 2 mechanism (charly/charly/internal/pluginsgen): the compiled-in plugin wiring's module path of record becomes each plugin candy's `plugin.source:` field (the standalone module path after the move — e.g. github.com/opencharly/plugin-port/candy/plugin-port), falling back to candy/<name>/go.mod when source is absent or `builtin` (the in-repo state for plugin-agentteams / plugin-dsh). Why: on the Phase-2c move, pluginsgen reads candy/<name>/go.mod which will no longer exist (the plugin lives in its standalone repo). source: is the field the plugin skill documents as the out-of-tree module location; 60/62 compiled plugins already declare it, and today it equals the go.mod module path — so this change is byte-identical for the current tree (reproducibility gate green) and makes Phase 2c a pure source:-field rewrite. Import purity preserved: pluginsgen still imports only stdlib + yaml.v3 (string-templates module paths, never imports candy modules). Tests: TestPluginModulePath_SourceDriven (standalone path wins over go.mod), TestPluginModulePath_BuiltinFallback (builtin → go.mod), TestPluginModulePath_ SiblingSkillEntityNoSource (multi-top-key files with a <name>-cli-skill entity), plus the existing TestPluginsGenReproducible gate stays green. Verified: GOWORK=off go test ./internal/pluginsgen (4 pass); task build:binary produces bin/charly (48.9MB, version 2026.237.1119) with plugins_generated.go and go.work byte-identical after regeneration; go vet clean.
Review — BLOCKHead SHA: Change class: code/config — build-mechanism change ( Security screen: no findings (no scope mismatch, no secrets/egress, no guardrail changes, no new deps; T1–T4 clean). Comment intake: thread has no comments. Blocks
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS (no scope mismatch, no secrets/egress, no guardrail changes, no new deps; T1–T4 clean). Change class: code/config — build-mechanism change ( Comment intake: prior bot review (head Checklist: A1/A2/A3 satisfied (evidence pasted; tier Verdict: PASS deepseek.com/deepseek-v4-flash — pi-review-action. |
Summary
The plugin mechanism cutover, part 1 (the candy de-submodule cutover Phase 2):
pluginsgennow resolves each compiled-in plugin's Go module path from the candy'splugin.source:field — the module path of record — falling back tocandy/<name>/go.modonly when source is absent orbuiltin.Why: the RDD bed (Phase 2a) proved charly builds with an out-of-tree compiled plugin at the standalone module path
github.com/opencharly/plugin-port/candy/plugin-port— but pluginsgen today readscandy/<name>/go.modunconditionally, which fails withopen ../candy/<name>/go.mod: no such file or directorythe moment a plugin candy moves to its standalone repo.source:is already the module path of record in 90/92 plugin candies; making pluginsgen source-driven means Phase 2c (the 93-repo move) only rewrites thesource:fields, with zero pluginsgen change at move time.No behavior change in the current in-repo state — the generated
plugins_generated.go+go.workstay byte-identical for all 64 compiled plugins (the reproducibility gate proves it).How tested
The pluginsgen unit tests — 4/4 PASS (incl. the new source-driven, builtin-fallback, sibling-skill-entity cases + the reproducibility gate):
task build:binary— the changed path runs live (pluginsgen regenerates the wiring, then go build):The full charly suite green (the current in-repo wiring is byte-identical — reproducibility gate + full suite prove no behavior change):
R10 change-class matrix row (
charlyGo code): pre-flightgo test ./...+go vet+task build:binary— all green above. The gate for a build-mechanism change is the build itself (pluginsgen runs live, the changed path) + the full suite (byte-identical output via the reproducibility gate). The named compiled-in-plugin witness bedcheck-charly-vmrequires a VM substrate (libvirt daemon) that this host does not run — the matrix exempts "beds whose substrate the change cannot reach". The pod-substratecheck-podbed fails IDENTICALLY on the base (origin/main, proven below) because the box/fedora submodule is at distro-fedora#36 with pre-Phase-1 bare candy refs — the known Phase-4 stale-ref sweep item, unrelated to this change:Rulebook compliance
no such file or directoryfailure (proven in the Phase 2a RDD bed) is the defect; source:-driven resolution is the fix. The check-pod bed failure is RCA'd as pre-existing (identical on origin/main — stale box/fedora submodule, the Phase-4 sweep item)Change classification
task build:binary(the changed path live) + the org validatoranalysed on a live system— the changed path ran live (build:binary + full suite) on the committed treeAssisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)