Repository navigation
feat: the 92 plugin candies advance to their standalone module paths (the candy cutover, Phase 2c) - #408
Conversation
…(the candy cutover, Phase 2c) Each plugin candy's plugin.source: field, go.mod module path, and Go self-imports rewrite from github.com/opencharly/charly/candy/<name> to github.com/opencharly/plugin-<name>/candy/<name> — the standalone module path (pluginsgen's source-driven resolution, charly#407, reads the source: field). The in-repo candy dirs stay as workspace members (go.work use ./candy/<name>, regenerated by pluginsgen) at the new module paths until Phase 4 deletes them; the sibling/proxy go.work rework is Phase 4's job. The import-purity gate gains the standalone-plugin-module exception (isStandalonePluginModule: github.com/opencharly/plugin-<name>/candy/<name> — the same B-bootstrap registry-seed exception as the in-repo candy/plugin-* imports it replaces, now cross-repo; narrow by construction, never the sdk ban). plugins_generated.go regenerated: all 62 compiled-in plugins import at the standalone module paths. Build + full suite green.
Review — BLOCKHead SHA: Change class: code/config + guardrail (import-purity gate) — 326 files, +408/−387, single commit, base Tool-limited disclosure: Blocks
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…ly module now requires the standalone plugin module paths)
Review — BLOCKHead SHA: Change class: code/config + guardrail (import-purity gate modified) — 328 files. Security screen — FINDING (T4): this PR modifies a security gate (the import-purity allowlist gains a "standalone-plugin-module exception"), and the diff is unretrievable — Blocks
Comment dispositions: Non-blocking (verified): Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
|
T4 reviewable slice — the ENTIRE import-purity gate change (charly/import_purity_test.go, +23/−0): --- a/charly/import_purity_test.go
+++ b/charly/import_purity_test.go
@@ -61,6 +61,14 @@ var allowedThirdPartyPrefixes = []string{
// (host_build_buildengine.go) — a same-repo registry-seed import, NOT an
// sdk-mechanism-kit import, so it is its own reviewed exception, distinct
// from (and never a loophole for) the sdk ban below.
+// - github.com/opencharly/plugin-* is the STANDALONE plugin-module tree (the
+// candy de-submodule cutover, Phase 2): the compiled-in-plugin registry
+// (plugins_generated.go) imports the compiled-in plugin candies at their
+// standalone module paths (github.com/opencharly/plugin-<name>/candy/<name>)
+// — the same B-bootstrap registry-seed exception as the in-repo
+// candy/plugin-* imports it replaces, now cross-repo. The prefix is
+// deliberately narrow (plugin- only): it cannot be a loophole for the sdk
+// ban below, and it matches the kind-prefixed standalone plugin repos.
//
// github.com/opencharly/sdk (root OR any subpackage — kit/buildkit/deploykit/
// loaderkit/vmshared) is NEVER allowed here: the sdk mechanism kits + the sdk
@@ -68,6 +76,7 @@ var allowedOpencharlyPrefixes = []string{
"github.com/opencharly/spec",
"github.com/opencharly/charly",
+ "github.com/opencharly/plugin-",
}
@@ -118,7 +127,7 @@
- if hasAllowedPrefix(importPath, allowedOpencharlyPrefixes) || hasAllowedPrefix(importPath, allowedThirdPartyPrefixes) {
+ if hasAllowedPrefix(importPath, allowedOpencharlyPrefixes) || hasAllowedPrefix(importPath, allowedThirdPartyPrefixes) || isStandalonePluginModule(importPath) {
continue
}
@@ -153,6 +162,18 @@
+func isStandalonePluginModule(importPath string) bool {
+ return strings.HasPrefix(importPath, "github.com/opencharly/plugin-") &&
+ strings.Contains(importPath, "/candy/")
+}Properties: (1) the sdk ban runs FIRST and |
Review — PASSHead SHA: Security screen: PASS — the guardrail change (T4) is now reviewable via the maintainer's posted slice of Checklist: All applicable rules PASS or NA — with this tool-limited disclosure: Comment dispositions: Verdict: PASS deepseek.com/deepseek-v4-flash — pi-review-action. |
Summary
The candy de-submodule cutover, Phase 2c: 92 plugin candies advance to their standalone module paths — every
plugin.source:field, go.mod module path, and Go self-import becomesgithub.com/opencharly/plugin-<name>/candy/<name>(the standalone repo module path, matching the plugin-generate-packages precedent). The companion umbrella PR (opencharly/opencharly#26, MERGED) adds the 92 repos as submodules.The import-purity gate gains the standalone-plugin-module exception (the same B-bootstrap registry-seed exception as the in-repo candy/plugin-* imports it replaces, now cross-repo — narrow to
plugin-+/candy/only, never a loophole for the sdk ban).plugins_generated.goregenerated: 62 compiled-in imports at the standalone paths. The charly module's go.mod now requires the standalone plugin module paths (57 stale in-repo requires dropped bygo mod tidy).go.work decision: kept
use ./candy/<name>(regenerated by pluginsgen on every build) — the in-repo candy dirs stay as workspace members at the new module paths until Phase 4 deletes them; the sibling/proxy rework is Phase 4's job.How tested
The full charly suite green from the committed tree:
The import-purity gate passes with the new standalone-plugin-module exception (the full gate diff — the reviewable T4 slice — is posted in the thread):
task build:binaryregenerates the wiring from the source: fields:Diff accounting (328 files, +612/−563) — every file class:
candy/plugin-*/charly.yml(source: field)candy/plugin-*/go.mod(module path)candy/plugin-*/**/*.go(self-imports)charly/go.mod(57 stale requires dropped, standalone requires added)charly/go.sum(regenerated)charly/import_purity_test.go(the plugin- exception, +23)charly/plugins_generated.go(regenerated)(The 2 plugins without a charly.yml change are plugin-agentteams + plugin-dsh —
source: builtin, no source: field to rewrite.)Stale old-path sweep (R5) — charly's OWN tree is clean (the only remaining old-path references are test fixtures in
*_test.gothat assert the pre-cutover form, thebox/*SUBMODULE repos with their own cutover timelines, and the sdk module's requires — the latter fixed by the companion sdk PR):Rulebook compliance
Change classification
task build:binary+ the org validatoranalysed on a live system— the changed paths ran live (full suite + build) on the committed treeAssisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)