Skip to content

refactor(core)!: charly + plugins consume loader-result types from opencharly/spec (#55 Phase B cut1) - #193

Merged
atrawog merged 5 commits into
mainfrom
feat/55-phaseb-loadtypes
Jul 29, 2026
Merged

atrawog merged 5 commits into
mainfrom
feat/55-phaseb-loadtypes

Conversation

@atrawog

@atrawog atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

#55 Phase B, Cutover 1 (superproject consumer leg)

charly core + plugins consume the loader-RESULT wire-type family from opencharly/spec (merged spec#2 v0.2026210.808) instead of sdk's kits — 19 charly files drop the sdk/loaderkit import entirely (the first Phase-B win: eliminating mechanism-kit imports from core).

  • Repoints loaderkit.UnifiedFile/InlineCandy/ValidationError/CandyCandidate + closure → spec.X; ProjectBundleConfig() → deploykit.ProjectBundleConfig(uf) free func.
  • Forward-pins: spec gitlink → d5eba0b (v0.2026210.808), sdk gitlink → 836f9586 (v0.2026210.828, consumes spec); charly/go.mod + all 85 plugin go.mod retidied to spec 808.
  • ResolveOpts stays in loaderkit (embeds *buildkit mechanism config → would cycle) — named Phase-B follow-on, not residue.

R10 (assembled tree, merged gitlinks)

check-pod 13/13 + check-builder-vm 10/10 (artifact-backed). A go.mod version skew surfaced by the gitlink bump (plugins on spec 518 vs merged sdk requiring 808) was RCA'd + fixed by retidying all 85 plugins to 808. go build/vet/test ./... green, golangci-lint 0, charly box validate exit 0, task cue:gen reproducible.

Producer-first B2: spec#2 + sdk#107 merged first.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)

atrawog added 3 commits July 29, 2026 09:47
#55 Phase B, Cutover 1)

The loader-result type family moved to the types-only spec module (spec + sdk
legs land first, producer-first B2). charly core + the candy plugins repoint
every loaderkit.X / kit.X (closure) / deploykit.X (provides) reference to spec.X,
and the type-only charly files drop their sdk/loaderkit import.

Repoints: loaderkit.{UnifiedFile,InlineCandy,Decode/EncodeInlineCandy,
ResolvePluginKindViaPlugin,DecodePluginKindMap,ValidationError,CandyCandidate},
kit.{UnifiedFileName,ImportList,ImportEntry,DiscoverConfig,ScanSpec},
deploykit.{ProvidesConfig,EnvProvideEntry} -> spec.X;
uf.ProjectBundleConfig() -> deploykit.ProjectBundleConfig(uf);
loaderkit.ProjectTemplates(uf) -> uf.ProjectTemplates().

Result: charly sdk/loaderkit importers 71 -> 52 (19 files dropped). Mechanism
callers (LoadUnified/Materialize/Walk/... and the loaderkit.ResolveOpts
constructors) keep loaderkit; only their TYPE refs repointed.

Scope is Option A (operator-ruled): loaderkit.ResolveOpts STAYS (it embeds
*buildkit.{Init,Distro,Builder}Config mechanism config, an unavoidable
spec<-buildkit cycle) — correctly-placed loader mechanism, a named Phase-B
follow-on, not residue.

Verification (assembled workspace): go build/go test ./... green across
charly+sdk+spec+every touched candy; golangci-lint 0 issues; charly box validate
exit 0 (root + box/fedora); task cue:gen reproducible (0 drift); grep-clean of
the moved types' old homes. spec/sdk gitlinks point at the Phase-B feat commits
here; the landing chain re-points them to the merged commits.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)

Claude-Session: https://claude.ai/code/session_01FhLKUsvyzj6Nh5W1xDgsXa
spec → d5eba0b (v0.2026210.808, loader-result types); sdk → 836f9586 (v0.2026210.828,
consumes them). charly/go.mod requires bumped. Forward-pins for the B2 consumer leg.
…sumer)

The sdk gitlink bump to merged 836f9586 (which requires spec v0.2026210.808) created a
version skew — the plugins' go.mod still required spec v0.2026210.518. go mod tidy across
all 85 plugins + charly reconciles the module graph to spec 808 (RCA: check-pod image-build
failed 'go mod tidy needed' building plugin-mcp/plugin-example-builder). go.mod/go.sum only.
@atrawog

atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly/sdk Go — superproject consumer leg of #55 Phase B, Cutover 1 (module-path refactor, runtime class). Producer legs spec#2 v0.2026210.808 + sdk#107 v0.2026210.828 already merged (B2 producer-first).

Validated independently on head 7f526a99 — no author claim trusted; every check re-derived.

Checklist

# Rule Verdict
0 Security / anti-tampering (T1–T4) PASS — pure type-relocation + go.mod bumps; no secret/exfil/guardrail-weakening/scope-mismatch; diff matches description; no instruction-injection
1 Description complete + evidence PASS — summary accounts for every file; beds named with per-step results; tier justified
2 Change-class gate matches evidence (R7/R10) PASS — runtime class; check-pod (pod substrate) + check-builder-vm (vm/builder substrate); no dry-run/rebuild-alone fraud
3 Attribution tier justified PASS — I set the ceiling at fully tested and validated (re-ran the fresh-rebuild bed on final code myself)
4 R0 skills honored PASS — go / plugin / SDD / import-purity spot-checked against diff
5 R1 RCA / ZERO warnings PASS — build/vet/test/lint/cue:gen + bed output all warning-free
6 R2 no pre-existing split PASS — ResolveOpts staying in loaderkit is a correct type-scoping boundary (loader-INPUT coupled to buildkit, would cycle), not a deferred surfaced issue
7 R3 no duplication PASS — type move, no duplication
8 R4 no ad-hoc workaround PASS — go.mod skew fixed by real go mod tidy (retidy), not a shim
9 R5 hard cutover + grep PASS — loaderkit.{UnifiedFile,InlineCandy,ValidationError,CandyCandidate} residuals = 0 (verified)
10 R6/R8/R9 integrity PASS — binary rebuilt from HEAD (version matches); no new OS deps; cue:gen reproducible
11 R10 disposable / fresh-rebuild / coverage PASS — I re-ran check-pod on the final clean HEAD myself → 13/13, 182s, ok:true, incl. update+check-live-rebuild+feature-run-rebuild. On-disk summaries check-pod/2026.210.0835 (ok:true 13/13) + check-builder-vm/2026.210.0749 (ok:true 10/10) confirmed
12 RDD / ADE / SDD @100% PASS — task cue:gen reproducible (clean tree after); no hand-edited *_gen.go; no new hand-written wire struct (types are CUE-sourced in spec); no new @go(-)
13 Concurrency + anti-cheat PASS — no forbidden framing; retidy sweep claim verified (all 85 plugin go.mod on spec 808, none on 518); no dead-code parking; the change cures loaderkit coupling rather than extending it
14 Hard cutover — one atomic PASS — 3 feat commits (refactor + gitlink-bump + retidy) → --squash folds to ONE on main; no Phase-2/TODO
15 ARCHITECTURE GATE PASS — see trace below
16 Disposable-only autonomy PASS — beds disposable; my re-run auto-updated/cleaned
17 Clean arch + Go gates PASS — golangci-lint run ./... 0 issues (v2, in-module); vet clean; go test ./... green; PR-touched files gofmt-clean (27 gofmt-flagged files are pre-existing untouched, a gofmt-variant artifact — none in this diff)
18 CHANGELOG present PASS — CHANGELOG/2026.210.0700.md, valid CalVer, H1 byte-matches filename, no collision on main

placement: CORRECT. Moves the loader-RESULT type family (UnifiedFile/InlineCandy/ValidationError/CandyCandidate + closure) OUT of the sdk/loaderkit mechanism kit into the pure wire-contract module opencharly/spec (clause E envelope shapes) — the outward, import-purity-positive direction the #55 phase targets.

per-item trace (charly/*.go):

  • New/grown charly/*_aliases.go: none.
  • New production sdk-kit import: none — deploykit/buildkit/vmshared/kit non-test importer counts all flat vs main; loaderkit non-test importers 54 → 41 (−13). The single added deploykit import is in charly/plugin_sidecar_test.go (a test), not production core.
  • Boundary-law placement: all staged core changes are E (spec wire-type repoints). No spec.<Kind> field-read, kind switch, or per-kind map introduced. No *Legacy* relocation smell.
  • 19 charly files drop the sdk/loaderkit import entirely (import-line removals: verified exactly 19) — the described Phase-B win.

Comments considered: none (PR carried no comments).

Cross-PR interactions considered: charly — only #193 open (no overlap). sdk/spec — none open. plugins — #110 (docs) + #113 (policy) touch the plugins submodule (skills/agents/policy), which #193 does not touch → none-found, non-blocking.

Decision

Every rule verified from the diff + my own re-run. The change is a compile-identical type relocation from a mechanism kit to the pure wire-contract module: build/vet/test green, golangci 0, cue:gen reproducible, and the fresh-rebuild check-pod bed re-run by me on the exact final code passed 13/13. Forward-pins correct (spec gitlink d5eba0b = v0.2026210.808, sdk gitlink 836f9586 = v0.2026210.828; charly/go.mod + all 85 plugin go.mod on spec 808). Approved — finalizing merge-time CalVer, squash-merging, and tagging.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)

atrawog added 2 commits July 29, 2026 10:54
Merge-time CalVer finalization by pr-validator.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
@atrawog
atrawog merged commit 2501d5c into main Jul 29, 2026
@atrawog
atrawog deleted the feat/55-phaseb-loadtypes branch July 29, 2026 08:55
@atrawog

atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — landing outcome ✅

  • Merged (squash) as 2501d5cd on main.
  • Tag v2026.210.0853 pushed + verified on remote.
  • Merge-time CalVer finalized: CHANGELOG/2026.210.0853.md (H1 byte-matches filename).
  • feat/55-phaseb-loadtypes deleted.

This completes #55 Phase B, Cutover 1 (spec#2 → sdk#107 → charly#193).

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)

atrawog added a commit that referenced this pull request Aug 17, 2026
…ent, and three stale figures

B1 — command.go still described driftCmd as "the CI gate" and "(the docs:drift
model)", the two claims this cutover measured false and removed everywhere
else. It contradicted generate.go's own comment ten lines away, inside the same
diff. The per-repo sweep found exactly one surviving site, in the superproject
only — the one file no projection carries, which is why no downstream review
met it.

B3 — the entry said "Four plugins legs". Six carried this cutover's prose:
#186, #187, #188, #190, #193, #194. The line was authored in the final commit,
after all six had landed. Enumerating by `git log | grep '(#N)'` is unreliable
here: #186, #187 and #190 have squash subjects that carry no PR-number suffix,
so the count came from the merged-PR list instead.

B4 — the reference index still called status-absence on a known head "a false
negative" while the section it indexes now says it "proves nothing". Those are
different claims: one asserts the thing is real but unseen, the other that the
observation is uninformative.

B6 — the tag invariant placed 2026.215.1207 both in the untagged set ("at or
before") and inside the tagged 67-for-67 run. It is untagged, and is the latest
untagged entry, so the run opens above it.

Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
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