Repository navigation
refactor(charly): F4.2 — providerClasses derived from spec.ProviderClasses (Cutover F) - #571
Conversation
…asses The closed provider-class set was held twice: plugin-box's validPluginClasses and charly's providerClasses (11 identical entries), plus the CUE-side #PluginCapability regex — all three hand-maintained copies of the same vocabulary. spec#125 made spec.ProviderClasses the ONE CUE-derived source (#ProviderClassNames in schema/candy.cue, emitted by schemagen; the #PluginCapability regex now derives from the same list). This PR deletes charly's hand map: providerClasses is now derived from spec.ProviderClasses, keeping the typed constants (ClassKind etc.) as the kernel's Go API. New TestProviderClassesParity locks the bijection (constants ⊆ spec set, sizes equal). The plugin-box copy is deleted in its own PR. Spec pin bumped to v0.2026251.1735.
Review — BLOCKHead SHA: Change class: runtime/code refactor (Go, charly core) — behavior-preserving derivation of Security screen: PASS — no embedded directives, no scope mismatch (diff matches body accounting exactly: go.mod, go.sum, provider.go, new test), no secrets/exfiltration, no weakened guardrails. Spec pin bump Blocks
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…cal 2026.251.1809)
Review — PASSHead SHA: Security screen: PASS — no embedded directives, no scope mismatch (diff matches body accounting: go.mod, go.sum, provider.go, new parity test), no secrets/exfiltration, no weakened guardrails. Spec pin bump Checklist: All applicable rules PASS or NA. Comment intake: The single prior comment (github-actions[bot] BLOCK on "bed deferred / will test later") is Placement: CORRECT — the change derives the core provider-class membership set from the CUE-owned Cross-checks: parity test locks the bijection (sizes equal, every typed constant ∈ derived set); old hand-maintained map deleted in the same commit (R5, no dual path); plugin-box duplicate routed to its named companion PR (not a vague deferral); attribution tier Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Summary
Cutover F4.2 charly side — the provider-class vocabulary held twice → ONE source in spec, CUE-derived; charly derives from it.
Duplication evidence (pre-change, current tree):
charly/provider.go:78-95—providerClasses11-entry closed map (kind|deploy|verb|step|build|builder|command|loader|refs|agent-runtime|terminal)plugin-box/candy/plugin-box/validate_rules.go:150-170—validPluginClassesbyte-identical 11-entry map (deleted in the companion plugin-box PR)spec/schema/candy.cue— the#PluginCapabilityregex carried the same 11 classes inline (reworked in spec#125)Fix: spec#125 minted
spec.ProviderClassesas the ONE CUE-derived vocabulary (the#ProviderClassNameslist in schema/candy.cue, emitted by schemagen; the#PluginCapabilityregex now derives from the same list via strings.Join). This PR makes charly'sproviderClassesmembership set DERIVED fromspec.ProviderClasses— the hand-maintained 11-entry map is gone. The typed constants (ClassKind,ClassVerb, …) stay as the kernel's Go API. NewTestProviderClassesParitylocks the bijection (every typed constant ∈ the derived set, sizes equal).Spec pin bumped to v0.2026251.1735.
How tested
R10 — live disposable-bed run (branch-built binary)
Ran
charly check run check-commands-local(the plugin-composition + box-verb bed; exercises the provider-class vocabulary — providerClasses derived from spec.ProviderClasses — through every provider registration and the box validate/load path) with the branch-built binary (head 26f32bc,charly version→ 2026.251.1747) from the charly repo as the project.Calver
2026.251.1809, summary.yml steps=6 all ok:true. Artifacts:.check/check-commands-local/2026.251.1809/. The one allowlisted finding is the standard dev-worktree-binary notice.Rulebook compliance
go test ./...+ the disposable bed run above on the branch-built binary. The consolidated-binary F-wave re-run remains scheduled for the F6 wave step.Change classification
go test ./...+ disposable local-bed run (calver 2026.251.1809, exit 0)analysed on a live system— suite + bed ran live on the changed tree.Assisted-by: pi anthropic/claude-sonnet-4-20250514 (analysed on a live system)