Skip to content

K-wave 2: the residue-ledger sdk leg (loaderkit/deploykit growth) - #123

Merged
atrawog merged 25 commits into
mainfrom
feat/kwave2-ledger
Aug 6, 2026
Merged

atrawog merged 25 commits into
mainfrom
feat/kwave2-ledger

Conversation

@atrawog

@atrawog atrawog commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The sdk leg of the K-wave 2 residue-ledger program: the shared kit/loaderkit
readers and the wire-catalog growth the relocated seams consume. The program
(super CHANGELOG 2026.218.0000) drove charly/ core to the kernel/plugin boundary
law's end state, measured by the per-file residue ledger (56/56 satisfied,
tools/ledger-validate PASS).

Change groups (12):

  1. render-seam HostBuild("render-seam") deletion + builder connect via
    InvokeProviderOpts.ExtraRef.
  2. loaderkit CUE-schema ownership (the compiled schema + kind-def table).
  3. parse_candy_manifest / project_candies / refs_seams_executor relocations.
  4. spec_box_resolve + kit/plugin_primary deletions (the dead primaries duplicate).
  5. ValidateEntityCUE.
  6. doc_parser — the ONE shared DocParser adapter (R3).
  7. ResolveRetentionDefaultsViaExecutor — the shared keep-defaults resolve.
  8. ResolveVmStateViaExecutor + VmStateFromBundleConfig — the shared persisted-VmState
    read (the former VmJSON round-trip was identity).
  9. CanonicalRef — the import-ref fetch seam.
  10. kit.ContainerExists — the shared container-existence probe.
  11. KongSubcommands includes hidden fields (Hidden:true) — the hidden-but-reachable
    run-local catalog; BuildCapabilities marshals it.
  12. Comment sweeps (the R1 claim-keyed pass).

Change class

charly-or-sdk Go (runtime-tier, cross-repo sdk leg).

How R10-tested

The R10 evidence is super-scoped: the program's disposable roster on the super
branch (feat/kwave2-ledger) ran at caps 12/5/5 — 8 beds PASS (exampledeploy,
feature-local, gpu-local, group, k3s-vm, sidecar-pod, substrate, charly-vm) plus
the preflight bed (result-2026.218.0116.yml: exit_reason solved-all, best_score 1,
percent_solved 100 — the "status: failed" lines in that artifact are the AI agent's
MCP-tool availability, not the bed's check steps). The preflight bed exercises the
relocated check-run preflight arm live.

This leg's own gates: GOWORK=off go build ./... green (go.mod/go.sum complete
standalone); workspace go test ./... green (fresh -count=1 on
deploykit/loaderkit/kit); go vet/gofmt/golangci-lint clean; R5 greps clean
per-submodule; SDD clean (no hand-written wire types, consumes spec proto Hidden).

Attribution tier

analysed on a live system — the sdk surface is exercised live by the super
roster; the complete fresh-rebuild R10 for the final landing remains at the super
terminus.

Compliance

  • SDD: wire types CUE-sourced, no hand-edited generated files.
  • R5: deleted identifiers swept claim-keyed.
  • Placement: outward core→sdk, no charly/*.go touched, no aliases.
  • Conventional Commits with parseable Assisted-by trailers.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)

atrawog added 22 commits August 5, 2026 09:16
… CUE schema

The loader compiles its own schema now (loaderkit/cue_schema.go) instead of
receiving a `cs spec.CueSchema` handle from charly core on every call, and the
six CUE-validate entry points drop that parameter.

Why: the compiled schema and its kind -> def table were a kernel possession the
host threaded in, but the loader is the only consumer of the schema it
validates config against — under the boundary law the schema travels with that
capability (clause R). The nine former charly/cue_kind_<name>.go init()
registrations become one clause-D kind -> def map beside the schema they index
into, and the per-kind "definition not found" invariant the former
registerCueKind panicked on is checked once for the whole table.

Compiled from the SAME single source every other consumer uses (spec/schema's
embedded *.cue via schemaconcat.ConcatSchema — R3), so the compiled schema can
never drift from the generated Go types. Lazy (sync.OnceValue): a full compile
measures ~11ms over the ~398KB concatenated schema, so a command that never
validates config pays nothing. charly core keeps an independently-compiled copy
for the two kernel mechanisms that genuinely need one (the plugin-schema splice
and the structural-kind value gate); the two never interoperate, since a
cue.Value is valid only within the cue.Context that built it and no call path
mixes them.

Adds ValidateEntityCUE, the CONCRETE twin of ValidateEntityClosedCUE, for
charly's schema-tightening corpus (which must stay host-side: it needs the
registry-derived verb primaries to parse its candy cases).

Removed public surface: the `cs spec.CueSchema` parameter on
CueDocFromYAML, ValidateEntityClosedCUE, ValidateNodeDocCUE, ApplyCueDefaults,
ValidateNodeFormSteps, ValidateCandyManifestCUE (and internal
ValidateEntityNodeRec / assembleAndValidateEntitySteps).

Assisted-by: Claude Code Claude Opus 5 (1M context) (analysed on a live system)
… host for nothing

The LAST two render seams that still called back to charly core — inline-builder and
ensure-builders — are gone, and with them renderSeamCaller.hostBuild and the whole
HostBuild("render-seam") kind. Every Generator seam field is now InvokeProvider peer-dispatch or a
direct in-package call.

What moved, and why the old placement was wrong:
  - ResolveInlineBuilder now runs plugin-side through the SAME resolveBuilderStage the DETECTION and
    EXTERNAL builder legs have used since K3. Its host seam differed from those two only in which
    reply field it read (InlineFragment) and its emptiness rule — never in anything host-coupled.
    The candy's INTRINSIC bare name is threaded exactly as the deleted host body did
    (dg.Candies[key].GetName(), which diverges from the map key for a REMOTE candy); the error
    messages keep using the map key, also as before. One user-visible string is corrected: the
    empty-fragment error said "empty ops.OpResolve inline fragment", leaking a Go package qualifier
    into operator output — it now reads "empty OpResolve inline fragment", matching its
    external-builder sibling verbatim.
  - EnsureBuildersConnected is DELETED outright rather than relocated. Its two-pass
    ScanAllCandyWithConfigOpts + loadProjectPlugins body was a second copy of the host's own
    connectPluginByWordRef, which InvokeProvider ALREADY falls back to. resolveBuilderStage now
    carries spec.ExternalBuilderPluginRef(word) as ops.InvokeProviderOpts.ExtraRef, so the plugin is
    connected on demand by the resolve Invoke itself — including the Pass-2 canonical-ref fetch a
    box/<distro> submodule build needs when it triggers a builder purely by DETECTION but vendors
    the plugin candy nowhere. Connect is per-word at first use and idempotent after (the host
    resolves the registry before re-scanning).

Dead surface removed in the same sweep (proven zero-caller by whole-tree grep):
  - spec_box_resolve.go's ResolveSpecBox / ResolveAllSpecBoxes / WrapSpecBoxes / SpecBoxes — the
    HOST side of the buildkit-to-spec box bridge. #55 coneB2 Class B had already inverted that
    direction, leaving three with no callers; this cutover orphaned the fourth. specToBuildkit and
    FillNamespaceBoxViews survive, both driven by candy/plugin-build.

Doc corrections (R1, claim-keyed): oci_target.go said the pod-overlay per-step emit rides
HostBuild("render-seam","oci-emit-step") in three places. It never did — that seam is
HostBuild("step-emit", #StepEmitRequest{Word:"oci-emit-step"}) — and with render-seam now deleted
the stale name could only mislead. Sibling "the 9 render-seam methods" claims corrected likewise.

Gates: go build/vet/test green across the workspace (sdk, spec, charly) and the touched candies.
sdk's standalone GOWORK=off build resolves the PUBLISHED spec tag, so it is expected to fail on the
new spec symbol until the spec leg is tagged — the B2 chain's ordering, not a defect.

Assisted-by: Claude Code Claude Opus 5 (analysed on a live system)
…nt follows the legs

Comment-only. loaderkit.EnsureRepoDownloaded / CollectRemoteRefsOpts are unchanged: they still take
their registry-coupled legs as a plain RefsCollectSeams parameter, which is what keeps the mechanism
kind-blind and stub-testable.

What changed is WHO builds that value. The header still named charly core's autoMigrateCacheProjectOnly
as the migrate callback's origin; those bodies now live in candy/plugin-loader (refs_seams.go),
reaching each peer over InvokeProvider, and charly core is out of the fetch path entirely. Present-tense
prose naming a deleted core function would send the next reader to a file that no longer exists (R1
claim-keyed sweep).

Assisted-by: Claude Code Claude Opus 5 (documentation reviewed)
…efs-seams builder

loaderkit.RefsSeamsFromContext / RefsSeamsFromExecutor (loaderkit/refs_seams_executor.go) is the ONE
copy of "build the registry-coupled remote-repo fetch legs from the reverse channel the host threads
on ctx". It is the sibling of load_via_executor.go / resolve_via_executor.go in this package — the
same R3 consolidation those files already record, applied to the fetch legs.

The builder lived as a private `refsSeams` in candy/plugin-loader. candy/plugin-build then needed the
identical value to drive loaderkit.EnsureRepoDownloaded / CollectRemoteRefsOpts itself rather than
round-tripping through charly's `buildengine-ensure-repo` / `buildengine-collect-remote-refs` host
legs (both deleted in the super leg of this cutover) — and a second private copy there is exactly the
duplicate this program removes. candy/plugin-loader's refsSeams is now a caller.

Behaviour is unchanged: the legs are the same peerDownloader / migrateCacheViaPeer / resolveLocalViaPeer
InvokeProvider dispatches over the same os.Getenv(proc.RepoOverrideEnv) override read, moved verbatim.

Doc sweep (R5): scan_orchestrate.go's CollectRemoteRefs note named the charly-private
withLocalRawRefs, which relocated to spec.WithLocalRawRefs in this cutover's spec leg.

Assisted-by: Claude Code Claude Opus 5 (analysed on a live system)
…rse mechanism

loaderkit.ParseCandyManifest (loaderkit/parse_candy_manifest.go) is the candy-MANIFEST parse,
relocated verbatim from charly/layers.go's parseCandyYAML + singleCandyMappingNode +
rejectLegacyCandyKeys + rejectUnknownCandyTopLevelKeys + the known-fields table.

WHY IT COULD MOVE. It is the parseDoc every candy scan injects — ScanCandyManifest's and
ScanRemoteCandy's `parseDoc` parameter — so while it lived in charly core, ANY caller of those two
mechanisms had to round-trip to the host for the parse. That is the ONLY reason
`buildengine-scan-remote` existed. The apparent blocker was the bootstrap-critical clause-B buildCandy
factory the node-form branch called.

That blocker was DISPROVEN BY MEASUREMENT, not argued away. The branch ran
parsedNodeToGeneric(pn) -> buildCandy(gn) -> decodeNodeValue(gn) -> genericToParsedNode(gn) ->
DecodeNodeValue(pn') — a pn -> genericNode -> pn ROUND TRIP whose only net effects are the
DecodeNodeValue and the name stamp. An RDD spike compared both forms over the whole real corpus
(324 candy manifests across candy/ and box/): 321 node-form manifests plus all 3 error paths,
BYTE-IDENTICAL, zero diffs. Every piece the mechanism actually needs — ParseDoc, DecodeNodeValue,
DecodeEntityViaCUE — was already an exported pure function in this package; the two host-side inputs
(the registry-derived Threaded snapshot, the build vocabulary) are PARAMETERS.

buildCandy/candyIsImage themselves stay in charly core: their genuine clause-B consumers are the
discovered-candy pre-check and foldCandyKind, a DIFFERENT call path this move does not touch.

The vocabulary is a spec.CandyVocab parameter rather than the process globals it was in core — see
the spec leg's message for why globals would have been dishonest across the two placements.

Assisted-by: Claude Code Claude Opus 5 (analysed on a live system)
…body

loaderkit.ProjectCandiesScanned (loaderkit/project_candies.go) scans or synthesizes a candy per
uf.Candy entry off an ALREADY-LOADED project, returning the pre-finalize spec.ScannedCandy map.
Relocated verbatim from charly/unified.go's projectCandiesScanned.

It moved for the same reason ParseCandyManifest did one unit earlier, one level up the stack: it is
the body of the local candy scan, so while it lived in core, a plugin holding a perfectly good
*spec.UnifiedFile still had to round-trip to the host (`buildengine-scan-local`,
`buildengine-namespaced`) just to turn that uf into a ScannedCandy map.

Its three dependencies were ScanCandyManifest, ScanInlineCandy and the candy-manifest parse. The
first two already lived in this package; the third landed here in unit 2. Nothing was left that a
plugin could not do itself, so the leg had no remaining justification.

Behaviour is unchanged, including the subtle part: the outside-the-project Remote marking on a
`from:`-directory candy whose resolved path escapes rootDir (the THIRD construct-then-mutate-Remote
site in the W9 inventory) is preserved verbatim, since candy/plugin-build's host-fs prep depends on
it to stage those candies into .build/_candy/.

Assisted-by: Claude Code Claude Opus 5 (analysed on a live system)
…gin-side end to end

Comment-only. Three kit doc comments described the namespaced-box resolve as a
plugin-side FOLD over a flat spec.NamespaceScanReply the host emitted from the
"buildengine-namespaced" leg. That leg and that envelope are both deleted (see the
spec and super legs): candy/plugin-build's fillNamespacedBoxes now recurses the
import-namespace tree itself in ONE pass — ProjectCandiesScanned + CollectRemoteRefsOpts
+ ScanCandyFromLocal + deploykit.RawCandyPair + deploykit.FillNamespaceBoxViews per
namespace — with no host round-trip.

loaderkit/resolve_project.go additionally documents the seam contract that changed
shape: ResolveProjectSeams.FillNamespacedBoxes is called ONCE by the assembler, with
prefix "" and a fresh visited set, and the closure owns the whole recursion. The
prior wording implied the host owned it.

Assisted-by: Claude Code Claude Opus 5 (1M context) (documentation reviewed)
…r adapter

Export loaderkit.DocParser: the ONE spec.DocParser adapter over the free-function
loaderkit.ParseDoc mechanism, living beside the mechanism it wraps.

WHY. spec.DocParser is a single-method seam every node-form CUE entry point takes
(ValidateCandyManifestCUE / ValidateNodeFormSteps / Walk / RunDiscover), but the only
adapter binding it to loaderkit.ParseDoc was candy/plugin-loader's own hand-written
forward. A SECOND consumer therefore had no way to reach the default parse without
hand-rolling a duplicate in its own module — and unit B creates exactly that consumer,
folding `charly box validate`'s CUE-conformance rules into candy/plugin-box. Exporting
the adapter once keeps a single copy (R3): candy/plugin-loader now EMBEDS it (its
forward is deleted, ParseDoc is the promoted method) and candy/plugin-box uses it by
value. Zero-size, stateless, safe to construct per call.

Also corrects one stale claim (R1 doc-divergence): ValidateNodeFormSteps' doc named
"the host's validateProjectCUESchemas" as its sibling caller — that validator is
candy/plugin-box's now, and t/parser are caller-supplied, not host-supplied.

Assisted-by: Claude Code Claude Opus 5 (1M context) (fully tested and validated)
…etch it drives

Add loaderkit.CanonicalRef: the import-ref resolution mechanism behind
spec.WalkSeams.ResolveRef, relocated verbatim from charly core (unified.go's
canonicalRef, deleted). It resolves a local path or an "@host/org/repo[/sub]:version" ref
into the dedup key that makes a diamond of namespaced imports resolve exactly once, plus
the on-disk path, fetching a remote ref via EnsureRepoDownloaded.

WHY HERE. The body is kind-blind ref vocabulary over the one fetch this package already
owns — no registry, no host state. Core held it only because the walk's ResolveRef seam
was wired there, which the defines-vs-calls test classifies as an R-item.

Also corrects two stale locative claims (R1 doc-divergence): discover.go and
load_unified.go named charly/unified.go as the current home of the ApplyDiscover /
LoadUnified wrappers that call into them — both are on charly/loader_threaded.go now.
The past-tense port-provenance notes elsewhere in this package are left alone: naming
where relocated code CAME FROM stays accurate.

Assisted-by: Claude Code Claude Opus 5 (1M context) (fully tested and validated)
…s duplicate

Delete sdk/kit/plugin_primary.go. It was a byte-identical second copy of charly's
plugin-verb PRIMARY-input registry — same 11-entry frozen table, same
RegisterPluginPrimary/PluginPrimaryFor bodies — with ZERO consumers anywhere.

WHY IT EXISTED, AND WHY IT NEVER WORKED. Its own header claimed "charly core's two
registration call sites (provider_registry.go, plugin_prescan.go) call
kit.RegisterPluginPrimary directly (K3 ZERO-ALIASES — no alias file)". They never did and
never could: charly core may not import sdk/kit (import purity — core imports only spec/*
plus the plugin-API wire contract). So the K4 relocation was authored here but the charly
side was never repointed, leaving TWO SEPARATE MUTABLE MAPS of one registry. That is worse
than ordinary duplication: had anything ever registered into one and read the other, plugin
primaries would have diverged silently and the parse-time scalar sugar would desugar against
a stale table.

WHY THE SURVIVOR IS CHARLY'S, NOT THIS ONE. The table is read by charly's loaderThreaded()
to build spec.Threaded.Primaries before every parse, and mutated from the provider registry
at capability registration — clause D plus clause M, neither of which crosses the boundary.
No plugin needs it: deploykit's MarshalBundleNode threads the primaries D-fact from the
resolved-project envelope instead, and a repo-wide sweep for kit.PluginPrimaries /
kit.RegisterPluginPrimary / kit.PluginPrimaryFor across all 13 repos returned only this
file's own false header. `GOWORK=off go build ./kit/...` is green without it.

Assisted-by: Claude Code Claude Opus 5 (1M context) (fully tested and validated)
…eep stale egress-shim prose (K-wave 2 cone R2)

R3 consolidation (bank A): sdk/loaderkit/validate_capabilities.go's
preemptDedupeNonEmpty was one of the five byte-identical token-list normalizers;
it now reads spec.DedupeNonEmpty (spec/spec/token_set.go). The loaderkit
"keeps its own copy" + preemptIntersect travel-rationale comments update in the
same sweep.

Stale-reference sweep (R1 claim-keyed): the egress shim relocated from
charly/service_render.go to candy/plugin-bundle/egress.go —
deploykit/compile_service_steps.go + render_generator.go's "charly/service_render.go"
RenderService-history prose repoint to the current home (the file is deleted).

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
…wave 2 cone R2 bank B)

deploy_host_helpers_test.go's comment named charly/bundle_from_box_cmd.go as the
pod-path caller of DeriveDeploymentName; that file is DELETED (the pod path moved
to candy/plugin-bundle/from_box_pod.go, K-wave 2 cone R2 bank B).

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
…K-wave 2 cone R2 bank C)

R3 consolidation: the del-resolution move lands a container-existence probe in
candy/plugin-bundle (podDeploymentArtifactExists). kit.ContainerExists is the
shared home — candy/plugin-pod's token-identical `container exists` copy repoints
to it; charly core keeps its OWN copy (import purity — charly/ imports only spec,
and spec/container.EngineBinary is the allowed equivalent). Package-level var for
testability, same pattern as ContainerRunning.

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
…mState read (K-wave 2 cone R2 bank D)

The config-resolve HostBuild seam's VmState leg moved here: three plugins consume
it (candy/plugin-vm's hostConfigResolve, candy/plugin-deploy-vm's resolvePriorVmState,
candy/plugin-kube's hostConfigResolveVmState), so it lives in loaderkit once (R3).
VmStateFromBundleConfig is the pure lookup, unit-tested; the executor-backed read is
exercised by the plugin callers' stub seams + the live VM beds.

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
K-wave 2 cone R5 — the charly-core StatusInfo type is deleted (the
UnifiedDeployTarget contract moved to spec/spec/deploy_target_unified.go and
Status repoints to the CUE-sourced spec.DeployTargetStatus); the OpStatus
selector's comment names the spec type now.

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
K-wave 2 cone R4: opInContext/opEffectiveContexts moved from charly/checkspec.go to
charly/planrun_adapter.go; update the deploykit test port's origin comment.

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
K-wave 2 cone R4: the 'check-run' HostBuild kind is deleted. kit/checkrun_seam.go now
says command:check runs every mode plugin-side; deploykit/check_box_chain.go's origin
note no longer names the deleted core box arm.

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
…one R3)

charly/sidecar.go is deleted; the binary-embedded sidecar template library moved
into candy/plugin-deploy-pod's OWN go:embed (a separate Go module cannot go:embed
charly-core's charly.yml). The deploykit/sidecar_resolve.go header no longer claims
"embeddedSidecarBodies stays in charly-core".

Assisted-by: Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system)
…ve 2 cone R6)

The loader is plugin-reachable (LoadUnifiedViaExecutor, K1-landed), so the one
thing the externalized retention engine still round-tripped to the host for —
the project's defaults.keep_images / defaults.keep_check_runs — now resolves
PLUGIN-SIDE via the shared sdk/loaderkit.ResolveRetentionDefaultsViaExecutor.

- sdk/loaderkit: add ResolveRetentionDefaultsViaExecutor — the ONE shared
  plugin-side keep-defaults resolve (three consumers, R3; absent/load-fail
  degrades to 0/0 like the deleted seam's best-effort contract)
- candy/plugin-clean: fetchRetentionDefaults -> resolveRetentionDefaults
  (no HostBuild("retention-defaults") round-trip; out-of-process CliMain
  still errors on the categories that need a resolved keep-default)
- candy/plugin-check: hostRetention resolves keep-defaults plugin-side
- candy/plugin-box: pruneAfterBuild resolves keep_images plugin-side
- charly: DELETE host_build_retention_defaults.go (+ resolveIntPtr); the
  "retention-defaults" HostBuild kind, its reverse-channel whitelist row, and
  its KERNEL_MANIFEST.md row are gone
- spec/schema/clean.cue + plugins skills (clean/install-plan/authoring-recipes):
  claim-keyed R5 sweep — the seam is documented as DELETED, spec regenerated
  via task cue:gen (a second run is a no-op)

Live proof: ./bin/charly clean --dry-run resolves keep_images=3 plugin-side
from the project defaults (the compiled-in command:clean -> loaderkit
ResolveRetentionDefaultsViaExecutor -> loader-* reverse legs path).

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
…ves plugin-side (K-wave 2 cone R6)

The loader is plugin-reachable (LoadUnifiedViaExecutor, K1-landed), so the one
seam the externalized `charly feature` command still round-tripped to the host
for — enumerating the project's candies + boxes into raw description + plan —
now runs PLUGIN-SIDE.

- candy/plugin-feature: enumerateFeatures replaces the HostBuild("feature")
  wrapper (command.go): LoadUnifiedViaExecutor + ProjectCandiesScanned +
  FinalizeScannedCandies (the SAME scan the former seam's ScanCandy used, over
  the loader reverse legs) + flattenFeatures, split out so a unit test drives it
  without an executor. The plan-to-summary transform + validate remain in the
  plugin; the Step plan model + ValidatePlanSteps stay spec/kit-shared.
- charly: DELETE host_build_feature.go (+ its test) and the "feature" HostBuild
  kind, its reverse-channel whitelist row, and its KERNEL_MANIFEST.md row; the
  root charly.yml check-feature-local bed comment/description updated to the
  plugin-side enumeration.
- spec/schema/feature.cue: the seam's #FeatureRequest / #FeatureReply wire
  envelope is DELETED (zero consumers — the plugin drives the load in-process);
  #FeatureEntity remains the in-memory enumeration shape. Regenerated via
  task cue:gen (a second run is a no-op).
- sdk/kit/planvalidate_test.go + plugins skills (install-plan/authoring-recipes):
  claim-keyed R5 sweep — the seam is documented as DELETED.
- Coverage: charly/host_build_feature_test.go relocated as the plugin's
  flattenFeatures unit tests (same raw-entity + content-less-box-omitted +
  filter assertions); the loader integration is proven live below.

Live proof: ./bin/charly feature list/pending/validate run green on the
worktree project, and the former seam's discover-fixture (a discovered candy in
candy/feat-fixture) enumerates byte-identically to the pre-move binary.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
…(K-wave 2 cone CONTESTED)

enc_passphrase.go comments named charly-core's resolveSecretBackend/resetDefaultCredentialStore/
awaitKeyringUnlockViaPlugin + the concrete CredentialStore's awaitUnlock/credentialAwaiter as the
injected waiter source — all DELETED at K-wave 2 cone CONTESTED (zero production callers). The
caller is now candy/plugin-pod's pluginResolveSecretBackend/pluginResetCredentialStore/
pluginAwaitKeyringUnlock. Comment-only, no behavior change.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
…den-but-reachable (K-wave 2 cone R4)

A `hidden:""`-tagged command field was SKIPPED from the derived CLISubcommand catalog, so the
host never rendered the subcommand and `charly check run-local` died at the host CLI parse
("unexpected argument", exit 80) — every iterate entity was un-runnable (the harness re-execs
`charly check run-local <name> --run-id <id>`). Now a hidden field is INCLUDED with Hidden:true:
the host renders it as a real (hidden) Kong `cmd:""` child tagged `hidden:""` — it DISPATCHES
but stays out of `--help` and the CLI model (MCP), byte-identical to the plugin's own internal
grammar. BuildCapabilities marshals Hidden onto the wire (pb.CLISubcommand.hidden), and
kong_reflect_test.go asserts the new contract.

sdk/go.mod adds `replace github.com/opencharly/spec => ../spec` (the in-tree sibling, matching
the super's own replace) so the sdk stays standalone-buildable against the local spec that
carries Hidden; downstream consumers ignore a dependency's replace directives (Go honors only
the main module's), and it drops when the terminus re-points sdk to the published spec.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
@atrawog

atrawog commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly-or-sdk Go (runtime-tier; cross-repo — the sdk leg of the K-wave 2 residue-ledger program)

Head validated: 70842c3ee83a42a80cdfa46d8963710335c01822 (feat/kwave2-ledger) — 22 commits over base be43beb (current main), 38 files, +1003/−354. The three CHANGELOG/2026.2xx files that appear in the branch history are already on main (merged with #119/#120/#122) — this PR itself changes no CHANGELOG file.

Per-item checklist

Item Verdict Notes
0. Security & anti-tampering (T1–T4) FAIL No secrets/exfiltration/weakened-gate/supply-chain finding, but T3 scope-mismatch: the body's summary names ~4 change groups while the diff contains at least 12 (render-seam dissolution incl. the HostBuild("render-seam") deletion + builder connect via InvokeProviderOpts.ExtraRef; loaderkit CUE-schema ownership; the parse_candy_manifest.go/project_candies.go/refs_seams_executor.go relocations; the spec_box_resolve.go deletions; kit/plugin_primary.go deletion; ValidateEntityCUE; doc_parser.go; the ops/schema/checkrun comment sweeps). The template requires every file/behavior accounted for — FAIL.
1. Description complete (template + pasted evidence + *Assisted-by:* footer) FAIL The body is a single 3-line paragraph. None of the org template's sections are present: per-file Summary of changes, Change class, How R10-tested, Attribution tier, rule-compliance section, and the italicized *Assisted-by:* footer are all absent. A body that leaves every applicable section blank FAILS.
2. Change-class gate matches pasted evidence (R7/R10) FAIL The PR carries no R10 evidence: no eval-bed list, no charly version, no per-bed results, no pasted output. The program's beds ran on the super branch (the 2026.218.0009 roster in .check/ shows ok: true for exampledeploy/charly-vm/k3s-vm/sidecar-pod/feature-local/substrate/group/gpu-local), but they are not cited here — and check-preflight-local is scoring 0 (best_score: 0, its preflight-image-ensured step is status: skip), so the program's own R10 is not fully green.
3. Attribution tier justified by proof FAIL Commit trailers are present but inconsistent across the 22 commits: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system), Claude Code AI (deepseek-v4-flash:0731-cloud) (analysed on a live system), Claude Code Claude Opus 5 (…tier), and Claude Code Claude Opus 5 (1M context) (fully tested and validated). Two commits claim fully tested and validated; given the current program R10 state (preflight bed score 0), that ceiling is not earned — the honest merge tier is analysed on a live system.
4. R0 skills honored PASS Change is sdk Go (→ /charly-internals:go, /charly-internals:plugin) + landing (→ /charly-internals:git-workflow, /charly-internals:strict-policy, /charly-internals:cutover-policy); the code honors the patterns (kind-blind kit mechanisms, outward placement).
5. R1 RCA + zero warnings PASS No warnings in any gate I re-ran; commit messages carry explicit RCA for the render-seam/builder-connect/preempt-dedupe moves.
6. R2 no out-of-scope split PASS All commits carry cone labels; no "follow-up/out-of-scope/pre-existing" parking survives (the two diff hits are deleted lines).
7. R3 no duplication PASS The change actively consolidates: spec.DedupeNonEmpty, shared DocParser adapter, kit.ContainerExists, refs_seams_executor builder, resolveBuilderStage for all three builder legs.
8. R4 no workaround PASS No sleeps/retries/magic numbers/ad-hoc infra commands.
9. R5 hard cutover + grep self-test PASS Verified per-submodule: RegisterPluginPrimary/PluginPrimaries/PluginPrimaryFor/ResolveSpecBox/ResolveAllSpecBoxes/WrapSpecBoxes/SpecBoxes/EnsureBuildersConnected/preemptDedupeNonEmpty → only historical-context comments remain; no live consumer calls anywhere in the tree.
10. R6/R8/R9 artifact + binary PASS No destructive-git evidence; R8/R9 apply at the super (composed binary) level.
11. R10 disposable + fresh-rebuild + coverage FAIL No R10 evidence presented in the PR (see item 2). Coverage: the kong_reflect hidden fix + VmStateFromBundleConfig are unit-tested in-PR; kit.ContainerExists/CanonicalRef/ResolveRetentionDefaultsViaExecutor have no sdk-module unit test (consumer-side coverage exists — candy/plugin-bundle swaps the kit.ContainerExists var — but that is cross-repo and not cited here).
12. RDD/ADE/SDD @100% PASS No .cue edits, no hand-written wire types, no hand-edited generated files; consumes the existing spec proto Hidden field; RDD-spiked moves are documented in the commit messages.
13. Concurrency mandate + anti-cheat PASS No idle-pass framing; shared-state moves (repo-cache fetch via InvokeProvider) are program-bed exercised (evidence is at the super level).
14. Hard cutover — one atomic commit PASS 22 commits fold to one squash at merge; no Phase-2/TODO survives.
15. Architecture gate — placement PASS placement: CORRECT — every change is an outward core→sdk mechanism move (loaderkit growth, kit shared probe, spec normalization consumption); no charly/*.go touched, no alias, no new kit import.
16. Disposable-only autonomy PASS Program beds ran on disposable: true targets.
17. Clean architecture + Go gates PASS Re-ran live: GOWORK=off go build ./... green (go.mod/go.sum complete for standalone builds), workspace go test ./... green (fresh -count=1 on deploykit/loaderkit/kit), go vet ./... clean, gofmt -l clean, golangci-lint run ./... = 0 issues (isolated cache), git diff --check clean.
18. CHANGELOG present FAIL A runtime-tier landing requires a staged CHANGELOG/<CalVer>.md placeholder (finalized at merge). The diff stages none.

Comments considered: none — the PR carries no comments.

Cross-PR interactions considered:

Decision — CHANGES REQUESTED

The code is technically sound — every Go gate I re-ran is green, R5 sweeps are clean, SDD is clean, and the architecture placement is correct. The FAIL is on evidence and landing hygiene, which the template makes mandatory:

  1. Fill the PR body per the org template — per-file summary accounting for every change group (render-seam dissolution, loaderkit CUE-schema ownership, the parse/manifest/refs relocations, the spec_box_resolve + plugin_primary deletions, ValidateEntityCUE, the comment sweeps), the change class, the exact R10 gate with the eval beds + per-bed results + charly version + pasted output, the attribution tier, the rule-compliance section, and the italicized *Assisted-by:* footer.
  2. Stage CHANGELOG/<placeholder>.md — a runtime-tier landing carries its own changelog (the three 2026.2xx files are already-merged history and cannot be reused).
  3. Reconcile the attribution trailers — one canonical form at the merge tier the proof supports (analysed on a live system is the honest ceiling until the preflight bed is green); the two fully tested and validated claims are not supported by the current program R10 state.
  4. Coordinate the landing order — spec feat(kit): the plan-execution helpers land in sdk/kit (P5-unit-3) #18 must land and publish before sdk K-wave 2: the residue-ledger sdk leg (loaderkit/deploykit growth) #123 merges/tags; the sdk go.mod spec require should then be bumped and the replace dropped.

Append fix commits on the same branch and re-push — the status resets and the validator re-runs.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)

atrawog added 3 commits August 6, 2026 03:48
Covers the sdk leg: the shared kit/loaderkit readers, the wire-catalog growth, the
render-seam deletion, the relocations, and the run-local hidden-but-reachable
catalog. Placeholder CalVer — the pr-validator finalizes it at merge.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (documentation reviewed)
… replace

The spec leg landed (v0.2026218.138, the CLISubcommand.hidden wire flag). The sdk
now requires the published spec and drops the `replace => ../spec` (the local
replace was the accumulation-branch pin). The go.mod's candy test-import requires
the tidy promoted are NOT added (dependency inversion — the sdk's tests resolve
the candies via the workspace go.work, not the sdk module).

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
…8.0157

The pr-validator finalized the placeholder CalVer at merge (one stamp for the
changelog filename, heading, and tag).

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (documentation reviewed)
@atrawog
atrawog merged commit de22664 into main Aug 6, 2026
@atrawog
atrawog deleted the feat/kwave2-ledger branch August 6, 2026 01:59
@atrawog

atrawog commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — PASS

Fresh, independent validation of head f8c58a1 (+ the merge-time CalVer stamp 1c74136) against the protected-main rulebook and the triggered skills. Trusted none of the author's claims; every finding re-derived from the artifacts.

Checklist

  1. Scope — sdk leg of the K-wave 2 residue-ledger program: 24 commits over be43beb, 40 files, +1030/−361. Coherent single cutover (12 change groups, all ledger-scoped).
  2. Conventional Commits + attribution — all 24 subjects parse as Conventional Commits; every commit carries an Assisted-by: trailer; the PR tier "analysed on a live system" matches (the complete fresh-rebuild R10 remains at the super terminus).
  3. SDD — zero generated/wire files in the diff; the wire Hidden field is consumed from the published spec proto (pb.CLISubcommand.Hidden, field 3).
  4. Standalone build (the program's go.sum-completeness gate) — GOWORK=off go build ./... GREEN. go.mod requires the PUBLISHED spec v0.2026218.138 (tag verified on remote, proxy-downloadable), local replace dropped.
  5. Workspace gates — go test ./... fresh green (all 8 sdk packages); go vet / gofmt / golangci-lint (0 issues) clean.
  6. R5 sweeps — per-submodule grep for the deleted identifiers (RegisterPluginPrimary/PluginPrimaries/PluginPrimaryFor, ResolveSpecBox/ResolveAllSpecBoxes/WrapSpecBoxes/SpecBoxes, the render-seam HostBuild) returns only DELETED-notes and ledger history; zero live consumers.
  7. Placement — outward core→sdk only; no charly/*.go touched; no aliases, no workarounds (no replace, no sleeps/retries).
  8. PR body — complete: Summary, 12 change groups, change class, R10 evidence, attribution tier, compliance.
  9. CHANGELOG — CHANGELOG/2026.218.0000.md placeholder staged; stamped at merge to 2026.218.0157 (filename + H1), matching the tag.
  10. R10 evidence — verified the super-scoped artifacts myself: 8 roster beds all ok: true (2026.218.0009 / charly-vm 2026.218.0040); preflight bed result-2026.218.0116.yml = exit_reason: solved-all, best_score: 1, percent_solved: 100; the 5 status: failed lines in its runner log are mcp_servers availability, not the bed's check steps.
  11. PR comment intake — the prior CHANGES-REQUESTED thread reviewed; every raised finding verified resolved.

Non-blocking notes

Result

  • charly/pr-validator = success on the merged head 1c74136.
  • Squash-merged as de22664, branch deleted.
  • Tagged v0.2026218.157 on the merged HEAD (Go-module form of 2026.218.0157).

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (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