Repository navigation
feat(loader)!: relocate the loader ORCHESTRATION to sdk/loaderkit; core is the materialize half (K1) - #93
Conversation
…re is the materialize half (K1) The superproject half of K1. The kind-blind WALK+PARSE half of charly's LoadUnified now lives in sdk/loaderkit.Walk (see sdk v0.2026194.1400); charly core keeps only the registry-coupled MATERIALIZE + root-wins MERGE and replays them over the returned spec.LoadedProject envelope via a single new driver file. K1 of the v2 plugin-host program: the loader is now a plugin-servable, kind-blind mechanism, and core's ONLY sdk/loaderkit import is the one inventoried driver file (P16 gate-b target), which dies at the K5 OpLoad-envelope unit. - NEW charly/loader_driver.go — the SINGLE core file importing sdk/loaderkit. hostWalkProject builds the six kind-blind host seams (Parser/Boundary/Threaded/ ResolveRef/GateDoc/RepoIdentity) and calls loaderkit.Walk; materializeLoadedProject replays the host decode->materialize->merge over the envelope — identical to the former inline loadUnifiedInto (root-wins doc order, explicit-entry-wins discovered nodes, embedded-defaults, and namespace pointer-sharing by id for the mutual-import cycle-break). materializeDiscoveredNode is the ONE discovered-node fold shared with the layers candy-scan (R3); materializeDocStream materializes the binary-embedded default vocab. - REMOVED (hard cutover, no aliases): loadUnifiedInto, mergeUnifiedDocs, loadNamespaceCached, the in-core validateNamespaceAlias, the loaderkit.DefaultParser fallback (activeLoaderParser is a plain spec.DocParser set by the compiled-in candy/plugin-loader, guarded by a FATAL requireLoaderParser), and the dead namespaceAliasRe + MaxIncludeDepth. The kind-blind config-directive primitives moved to sdk/kit. - candy/plugin-loader: ParseDoc now implements spec.DocParser (spec.Threaded). - sdk submodule -> b95165f + charly/go.mod require -> v0.2026194.1400 (the K1 sdk merge). Migration residue (K1 IOU register, in the CHANGELOG): the one core->loaderkit import (driver, K5 exit); the six WalkSeams with lifecycle classes (Boundary/Threaded/ResolveRef/ Parser = PERMANENT-LEGIT; GateDoc/RepoIdentity = UNTIL-K5); deploy_ref.go (K4->K1) = LOAD-DOMAIN ref-resolver, coupled to the host ParseRemoteRef family, STAYS host + registered (moves with the ref-parse family; not churned in for LOC). Verified: both modules build; full charly test suite PASS (60s, incl. TestImportNamespace_DivergentVersionMutualCycle, the namespace cycle-break equivalence); golangci-lint 0; gofmt clean; the K1 7-bed CONCURRENT roster 7/7 PASS on the frozen tree. The charly-side loader code is byte-identical across the P14a super/sdk merges (additive- disjoint), so the roster evidence stands. 7-bed roster (per-tree binary v2026.194.1340, all through the relocated Walk + driver + materialize): check-commands-local PASS 5 steps 147s check-substrate PASS 9 steps 237s check-builder-vm PASS 9 steps 262s check-structkind PASS 5 steps 311s check-group PASS 5 steps 316s check-sidecar-pod PASS 11 steps 359s check-local-vm PASS 7 steps 408s Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01CCo9NzoUXrqkq5vbkWJLM3
pr-validator (V-K1chain) — CHANGES REQUESTED ❌Change class: charly/sdk Go (K1 consumer/superproject half). placement: CORRECT (walk→sdk/loaderkit; the registry-coupled MATERIALIZE+MERGE correctly stays core; The cutover is architecturally clean and all runtime gates pass — one blocking R5/R1 finding is the only thing between this and merge. ❌ BLOCKING — R5/R1: incomplete claim-keyed sweep of the MOVED loader-seam TYPESLeg 1 (sdk#37, merged) moved Most egregious: Sweep these (→
Fix: update the 7 comment references, append a fix commit, push (status resets → I re-validate). No code change needed. ✅ Everything else — verified clean (independently re-run on
|
…K1 fix) V-K1chain (pr-validator) flagged an incomplete claim-keyed R5 sweep on charly#93: the deleted FUNCTION names were clean, but the MOVED TYPE names (loaderkit.DocParser -> spec.DocParser, loaderkit.Threaded -> spec.Threaded, relocated to sdk/spec in the K1 sdk half) were left alive in 7 comment references. Comment/docs-only fix — no code change: - candy/plugin-loader/plugin.go (x4): the header + the ParseDoc method comment now say spec.DocParser / spec.Threaded (matching the code, which already implements spec.DocParser). - charly/plugin_inproc.go:61 + candy/plugin-box/plugin.go:71: the registerCompiledPlugin pattern-exemplar comment -> spec.DocParser. - CLAUDE.md:118: the boundary-law D-clause canonical example -> spec.Threaded (x2) — type-name only; the mechanism description is byte-identical (the DATA-snapshot contract type moved to spec; loaderkit.ParseDoc still reads it). `git grep 'loaderkit.DocParser\|loaderkit.Threaded'` now returns 0 non-CHANGELOG hits. Both modules build; candy/plugin-loader standalone builds. Squash folds this under the PR's earned "fully tested and validated" tier. Assisted-by: Claude (documentation reviewed) Claude-Session: https://claude.ai/code/session_01CCo9NzoUXrqkq5vbkWJLM3
…onsumer) pr-validator (V-K1chain) merge-time version stamp for #93. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01RiTCtnrPV5gfPzG4BaJ6a4
pr-validator (V-K1chain) — APPROVED ✅ (supersedes the prior CHANGES-REQUESTED)The R5/R1 blocker is fixed exactly as requested in fix commit Re-validation of the fix (head
Everything from round 1 still holds: placement CORRECT (walk→sdk/loaderkit; materialize+merge stays core); P16 gate-(b) = only Decision: APPROVED. Finalizing the merge-time CalVer Assisted-by: Claude (analysed on a live system) |
…cendant-wins main advanced with the #152/#153 plugins-submodule bumps (now at plugins main a58da76 = post-#95); the branch recorded 9caed76 (post-#91). The gitlink conflict resolves descendant-wins to a58da76 (a descendant of 9caed76: #93/#94/#95 are docs-only skill accuracy fixes), so the branch cannot regress main's pointer. Delta gate: charly box validate re-run. Assisted-by: Kimi Code Moonshot Kimi K3 (analysed on a live system)
…— the cache verbs need CacheStatus/ClearCache/BypassCache)
…ypass (#539) * chore(vendor): re-vendor spec v0.2026247.2009 + plugin-check update_gate (the R10 change-class switch) * feat(cache): charly cache status|clear|refresh + the --no-git-cache bypass (the git-ref cache operator surface) * ci: re-trigger validator * chore(vendor): spec pin → v0.2026247.2350 (the #93 cache-surface tag — the cache verbs need CacheStatus/ClearCache/BypassCache) * fix(go): drop the committed TEMP-LOCAL-DEV absolute-path replaces (plugin-check/sdk/spec → /home/atrawog/...) — they break the CI go gate on ubuntu-latest; the modules resolve from the proxy at the pinned require versions (go build clean) * docs(manifest): add cache_cmd.go row — the charly cache status|clear|refresh CLI surface over the core git-ref cache (same M class as cli_model_cmd.go/plugin_cmd.go); fixes the KERNEL_MANIFEST.md gate in TestKernelManifestBidirectional * refactor(cache): the git-ref cache command moves OUT of core into the plugin-cache command candy (R5) — delete cache_cmd.go + the Cache CLI field + the --no-git-cache flag; the singleton honors the PERSISTED bypass (spec/refs SetBypass, spec #95); plugin-cache wired as a compiled-in command plugin (compiled_plugins + go.mod pin + regenerated plugins_generated.go); KERNEL_MANIFEST.md drops the cache_cmd.go row * chore: plugin-cache pin → v0.2026248.728 (the ADE-plan + schema-version fix) * chore: plugin-cache pin → v0.2026248.730 (the candy-gate charly pin fix)
What this does
K1 — the superproject half (consumes the merged sdk half, opencharly/sdk#37 →
b95165f/v0.2026194.1400). The kind-blind WALK+PARSE orchestration ofLoadUnifiednow lives insdk/loaderkit.Walk; charly core keeps only the registry-coupled MATERIALIZE + root-wins MERGE and replays them over the returnedspec.LoadedProjectenvelope via a single new driver file. K1 of the v2 plugin-host program — the loader is now a plugin-servable, kind-blind mechanism, and core's ONLYsdk/loaderkitimport is the one inventoriedloader_driver.go(P16 gate-(b) target), which dies at the K5 OpLoad-envelope unit.Contents (22 files: +461/−656; unified.go −649, new loader_driver.go +217)
charly/loader_driver.go— the single core→loaderkit file.hostWalkProjectbuilds the six kind-blind host seams (Parser/Boundary/Threaded/ResolveRef/GateDoc/RepoIdentity);materializeLoadedProjectreplays the host decode→materialize→merge over the envelope — identical to the former inlineloadUnifiedInto(root-wins doc order, explicit-entry-wins discovered nodes, embedded-defaults, and namespace pointer-sharing by id for the mutual-import cycle-break).materializeDiscoveredNodeis the ONE discovered-node fold shared with the layers candy-scan (R3).loadUnifiedInto,mergeUnifiedDocs,loadNamespaceCached, in-corevalidateNamespaceAlias, theloaderkit.DefaultParserfallback (activeLoaderParseris a plainspec.DocParserset by the compiled-in candy/plugin-loader, guarded by a FATALrequireLoaderParser), and the deadnamespaceAliasRe/MaxIncludeDepth.candy/plugin-loader:ParseDocimplementsspec.DocParser. sdk gitlink →b95165f,charly/go.modrequire →v0.2026194.1400.Change class
Code (runtime) — the consumer half of the cross-repo K1 landing (sdk#37 merged first, per B2). Base
c8d2bd9(post-P14a #92). The 20 loader files are disjoint from P14a's status/oci delta.R10 evidence (fully tested and validated)
Full re-verification on the reconciled tree (base
c8d2bd9+ this cutover + sdkb95165f):go build ./...= 0, fullgo test .PASS (60s, incl.TestImportNamespace_DivergentVersionMutualCycle— the namespace cycle-break equivalence),golangci-lint run= 0,gofmtclean.K1 7-bed CONCURRENT roster (orchestrator-owned; frozen tree super
0d7472d+ sdk2977d5c, per-tree binaryv2026.194.1340) — all through the relocatedloaderkit.Walk+loader_driver+ host materialize, launched simultaneously (max parallelism incl. the 4-way eval-vm flock):The charly-side loader code is byte-identical across the P14a super/sdk merges (additive-disjoint — P14a touched status/oci +
plugin_loader.go, not the config-load path), and the reconciled tree re-passes the full suite — so the roster evidence stands.Migration residue (K1 IOU register — see the CHANGELOG)
loader_driver.go) → K5 OpLoad exit.deploy_ref.go(reassigned K4→K1): LOAD-DOMAIN ref-resolver, coupled to the hostParseRemoteReffamily → STAYS host + IOU-registered (moves with the ref-parse family; not churned in for LOC).R0–R10 checklist
git grepover charly/ returns onlyloader_driver.gohistorical context.b95165f+charly/go.modrequire →v0.2026194.1400.Assisted-by: Claude (fully tested and validated)