Skip to content

refactor(charly): F4.2 — providerClasses derived from spec.ProviderClasses (Cutover F) - #571

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/f4-provider-class
Sep 8, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/f4-provider-class

Conversation

@atrawog

@atrawog atrawog commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

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 — providerClasses 11-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 — validPluginClasses byte-identical 11-entry map (deleted in the companion plugin-box PR)
  • spec/schema/candy.cue — the #PluginCapability regex carried the same 11 classes inline (reworked in spec#125)

Fix: spec#125 minted spec.ProviderClasses as the ONE CUE-derived vocabulary (the #ProviderClassNames list in schema/candy.cue, emitted by schemagen; the #PluginCapability regex now derives from the same list via strings.Join). This PR makes charly's providerClasses membership set DERIVED from spec.ProviderClasses — the hand-maintained 11-entry map is gone. The typed constants (ClassKind, ClassVerb, …) stay as the kernel's Go API. New TestProviderClassesParity locks the bijection (every typed constant ∈ the derived set, sizes equal).

Spec pin bumped to v0.2026251.1735.

How tested

$ cd charly/charly
$ go build ./... && go vet ./... && gofmt -l .
(empty, exit 0)
$ go test -run TestProviderClassesParity . -v
=== RUN   TestProviderClassesParity
--- PASS: TestProviderClassesParity (0.00s)
$ go test -run 'TestSplitCapability|TestProvider|TestPlugin' .   # ok, 3.4s
$ go test ./...   # full charly suite green

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.

$ ./bin/charly -C charly check run check-commands-local
charly check run check-commands-local: [deploy-add] PASS after ~63s
charly check run check-commands-local: [bring-up-members] PASS after 0s
charly check run check-commands-local: [check-live] PASS after ~36s
charly check run check-commands-local: [update] PASS after 9.758s
charly check run check-commands-local: [cleanup] PASS after 5.911s
charly check run check-commands-local: [cleanup-members] PASS after 0s
charly check run check-commands-local: PASS (steps=6)

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

  • R0 (skills honored): R0 dispatcher skills (go, git-workflow, strict-policy) loaded before the first tool call.
  • R1 (RCA): the three-way duplication verified against the current tree before changing (evidence in the summary).
  • R2 (scope): only F4.2's charly-side derivation, the parity test, and the spec pin bump.
  • R3 (no duplication): the 11-entry map copy is deleted; charly reads the one CUE-derived slice. Typed constants are the kernel's compile-time API (locked by the parity test).
  • R4 (no workarounds): no hand-pin of the vocabulary; the pin bump is a legitimate require.
  • R5 (hard cutover): the old map literal is deleted in the same commit; no dual path.
  • R10 (fresh-build proof): full 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

  • Change class: refactor (parser consolidation F4.2 charly leg; behavior-preserving)
  • Verification gate: full go test ./... + disposable local-bed run (calver 2026.251.1809, exit 0)
  • Attribution tier: 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)

…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.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 26f32bc260a1703a6ce3dddd98707a7a1392d8d6 (branch: F4.2 cutover)

Change class: runtime/code refactor (Go, charly core) — behavior-preserving derivation of providerClasses from spec.ProviderClasses, spec pin bump, new parity test.

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 v0.2026251.533 → v0.2026251.1735 is a legitimate require to the tag carrying spec.ProviderClasses.

Blocks

  1. A2/R10 — bed run deferred ("will test later"). This is a runtime/code change in charly core (charly/provider.go), which per the R10 change-class gate requires a FRESH-rebuild bed run with pasted output. The body explicitly states the bed was NOT run here: "the F-wave consolidated-binary bed remains scheduled for the F6 wave step (noted for the orchestrator)." That is a "will test later" deferral, which the rules classify as FRAUD-class → BLOCK. The full go test ./... suite is necessary but not sufficient for a runtime change; the changed code path must execute live on a disposable: true target against the fresh rebuild. The author must run the required bed (or otherwise provide the fresh-rebuild live proof) in this PR rather than parking it for F6.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: afd48819bffd5269264858649a71618d68f75b78 (branch: F4.2 cutover)

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 v0.2026251.533 → v0.2026251.1735 is a legitimate require to the tag carrying spec.ProviderClasses.

Checklist: All applicable rules PASS or NA.

Comment intake: The single prior comment (github-actions[bot] BLOCK on "bed deferred / will test later") is stale-superseded — it was filed against head 26f32bc2 before the second commit (afd48819bffd, docs-only) added the R10 bed evidence. The current body now supplies the fresh-rebuild disposable-bed run (check-commands-local, calver 2026.251.1809, steps=6 all ok:true, pasted output), resolving that finding. The bed ran on the code-change commit 26f32bc2; the only delta to current head is the body/docs, so the evidence is valid for the current code.

Placement: CORRECT — the change derives the core provider-class membership set from the CUE-owned spec.ProviderClasses (wire shape, CUE-first); the spec/spec import is not an sdk mechanism kit, no alias file added/grown, no capability moved into core.

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 analysed on a live system is justified and not inflated; Assisted-by: footer present in exact form.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 8, 2026 18:18
@github-actions
github-actions Bot merged commit cc32fd5 into main Sep 8, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 8, 2026
@aitrawog
aitrawog deleted the feat/f4-provider-class branch September 25, 2026 19:04
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