Repository navigation
feat(spec,deploykit,loaderkit): W9/K1 Candy → spec.CandyReader retype - #162
Conversation
…ace repoint prep WIP checkpoint on the held feat/w9-loader-cone branch (not yet landed). Pairs with the sdk leg (spec/loaderkit vocab + CandyReader/CandyRefEntry promotion). - refs.go/main_repo.go/namespace.go/config.go/k8s_deploy_preresolve.go: repoint ParsedRef/ParseRemoteRef/IsRemoteImageRef/SplitRepoAndSubPath and SplitNamespaceRef/LeafName to their new sdk/spec homes; ns_identity.go/ ns_identity_test.go deleted (repo-identity logic promoted to sdk/loaderkit.RepoIdentity, defaulted by candy/plugin-loader's own WalkProject — the spike-target-#0 seam-composition pattern, confirmed loader_threaded.go is the sole WalkProject caller, always the omitted form). - layers.go: added Capabilities()/RequiresCapabilities() accessors (pre-step for the CandyModel interface fill). - security.go/hooks.go: CollectSecurity/CollectHooks now thin host wrappers over deploykit.MergeCandySecurity/MergeCandyHooks — the *Config candy-tree walk stays host-side, the merge itself is the shared pure R-item. SecurityArgs/ResourceCapArgs/appendUnique's local duplicates deleted (an R1 catch: the deploykit header claimed a "security_aliases.go passthrough" that never existed) — repointed to deploykit.SecurityArgs/ deploykit.AppendUniqueString across config_image.go/devices.go/start.go/ pod_lifecycle_resolve.go. - layer_secrets.go/deploy_add_shared.go: ResolveCandySecret/ResolveSecretForCandy retyped to spec.CandyReader (not deploykit.CandyModel — the ONE repoint target ruling: every NEW/retyped charly reference says spec.CandyReader, deploykit.CandyModel stays an sdk-internal passthrough only). - resolved_project_host.go: projectCandyModel populates the 5 new CandyModel fields (Security/Hook/Artifact/RequiresCapability/Capability/Secret/Port). Verified: go build/vet/test ./charly/... clean (full suite), golangci-lint 0 issues, gofmt clean. Axis A (kit-import file count) 141, unchanged. Axis B (non-test core LOC) 48385 (W9 start) -> 47922, -463 net so far. Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system)
# Conflicts: # charly/generate.go
…te-parity WIP checkpoint pairing the sdk leg (loaderkit.ScanCandy). Throwaway comparison harness (RDD spike, deleted once the port lands): runs both the pre-move scanCandy+populateCandyFromYAML+projectCandyModel/projectCandyView pipeline and the new loaderkit.ScanCandy over the same real candies (charly-mcp for bake_plugin->require, charly for distro:/package: derivation, android-emulator-layer for plain-int ports) plus a synthetic udp:5353 fixture (protocol-suffix normalization — no real candy in-repo authors one) and a malformed-manifest negative case. All 4 pass, field-level diff (not whole-struct dump). Also fixes a stale plugins submodule checkout in this worktree (was at 4a2ac8d, an ancestor of the f02d448 the last merge commit already recorded — fast-forwarded to match, no gitlink regression). Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system)
…n + spike Match candy/plugin-loader's ScanCandy/ScanInlineCandy to the sdk CandyScanner interface's new CandyRefs return value (findings 3+4 from the W9 byte-parity spike: BakePlugin missing from the envelope + Require/IncludedCandy/BakePlugin bare-stringed too early). Strengthen scan_candy_parity_spike_test.go to prove the fix: assert the rich pre-qualification CandyRefEntry lists match the live *Candy's own Require/IncludedCandy/BakePlugin fields, and that the finalized CandyModel.BakePlugin is the correct bare-string projection (a deliberate old/new divergence — the pre-move projectCandyModel never carried this field at all, a genuine schema gap this move fixes, not a parity break). activeCandyScanner/requireCandyScanner remain unwired to a call site (2 known lint "unused" warnings) — the host ScanAllCandy pipeline retype that consumes this seam is the next chunk. WIP checkpoint on feat/w9-loader-cone. Assisted-by: Claude Sonnet 5 (analysed on a live system)
Wire candy/plugin-loader's ScanRemoteCandy method to the updated
CandyScanner interface. Add TestScanRemoteCandyParitySpike: a synthetic
2-candy "remote repo" fixture (charly-mcp requiring the plain-name sibling
plugin-mcp, also its bake_plugin:) proving loaderkit.ScanRemoteCandy matches
the pre-move charly/layers.go ScanRemoteCandy byte-for-byte, INCLUDING the
sibling-dep qualification (.Resolved) — the one spike case that actually
exercises QualifyRemoteSiblingDeps, unlike the local-only ScanCandy cases.
Non-blocking finding surfaced while building this fixture (reported
separately, not fixed here — R2 separability: this cutover's own claim holds
without it): charly/layers.go's candyYAMLKnownFields allowlist (the bare
top-level `candy:` form's typo-guard) is missing "bake_plugin" — a real gap,
but in a form no candy in this repo actually authors (every real candy uses
the named node-form `<name>: candy: {...}`, which bypasses that check
entirely via a different parse branch). The fixture uses the named form to
avoid the unrelated dead path.
WIP checkpoint on feat/w9-loader-cone.
Assisted-by: Claude Sonnet 5 (analysed on a live system)
…anifest projectCandyView now copies the live *Candy.InitSystems map onto CandyView.InitSystems (charly/resolved_project_host.go) so the fixed specCandyAdapter.HasInit(initName) (sdk) actually has data to read — this takes effect immediately for the ALREADY-EXTERNALIZED build engine (candy/plugin-build via sdk/deploykit), independent of the W9 pipeline retype still in progress. candy/plugin-loader/plugin.go + the spike test follow the sdk rename (ScanCandy -> ScanCandyManifest). WIP checkpoint on feat/w9-loader-cone. Assisted-by: Claude Sonnet 5 (analysed on a live system)
WIP checkpoint on feat/w9-loader-cone. Assisted-by: Claude Sonnet 5 (analysed on a live system)
Adds ResolveOpts.InitCfg *InitConfig — the seam ScanAllCandyWithConfigOpts will use to run the cross-candy init-system host-completion pass BEFORE wrapping each scanned candy into the FINAL spec.CandyReader (a CandyReader is read-only from the caller's side, so nothing can mutate CandyView.InitSystems after the scan returns, unlike today's raw map[string]*Candy that generate.go mutates in place via PopulateCandyInitSystem afterward). nil by default — every caller except generate.go passes zero-value ResolveOpts, matching today's behavior byte-for-byte (InitSystems stays empty unless a caller opts in). Field added, not yet consumed — the ScanAllCandy pipeline retype that reads it is the next chunk. WIP checkpoint on feat/w9-loader-cone. Assisted-by: Claude Sonnet 5 (analysed on a live system)
WIP checkpoint on feat/w9-loader-cone. Assisted-by: Claude Sonnet 5 (analysed on a live system)
…(prod compiles) The big mechanical push: charly/layers.go's ScanCandy/legacyScanCandiesDir/ ScanAllCandy family/candyCandidate/pickCandyVersion and charly/unified.go's ProjectCandies now carry the scan→fetch→qualify→arbitrate pipeline as (spec.CandyModel, spec.CandyView, spec.CandyRefs) triples (spec.ScannedCandy) in place of the pre-move *Candy, wrapping into spec.CandyReader (via deploykit.NewSpecCandyModel) only at the final step — after PopulateCandyInitSystem's host-completion pass (now threaded via the new ResolveOpts.InitCfg, run BEFORE the wrap, since a CandyReader is read-only) and spec.FinalizeCandyRefs (bare-stringing the refs). All ~39 consumer files retyped from map[string]*Candy / []*Candy / *Candy to the spec.CandyReader equivalents — the vast majority mechanical (already read via CandyReader-shaped accessor methods), a handful needing direct-field-access fixes (Name->GetName(), SourceDir(==Path)->GetSourceDir(), Remote->GetRemote(), Description->GetDescription(), Status->GetStatus(), Plugin.*-> IsPluginCandy()/GetPluginSource()/GetPluginProviders(), BakePlugin->GetBakePlugin(), InitSystems[x]->HasInit(x)). resolved_project_host.go's projectCandyView/projectCandyModel (which re-derived CandyModel/CandyView from a live *Candy) are gone entirely, replaced by the RawCandy() escape hatch — the scan pipeline already constructs the wire-shaped views directly, so there's nothing left to re-project. candy_model_accessors.go + candy_model_render_accessors.go (pure *Candy->CandyModel accessor shims) deleted wholesale. `go build ./charly/...` is CLEAN. `type Candy` itself, its ~50 accessor methods, scanCandy/derivePackageSectionsFromCalamares/populateCandyFromYAML/ qualifyRemoteSiblingDeps are UNCHANGED in this commit (deletion is the next chunk, gated on the mutation-site inventory already delivered) — dead code at this point but not yet removed. Test files (builder_preresolve_test.go et al.) still reference the old *Candy shape — the next chunk after the type-Candy deletion. WIP checkpoint on feat/w9-loader-cone — NOT yet a landable state (dead code + broken tests). Committed per the held-branch WIP-checkpoint policy to protect this mechanical push against loss. Assisted-by: Claude Sonnet 5 (analysed on a live system)
…ix (WIP checkpoint) Finishes the ScanAllCandy pipeline retype's test-file sweep (every *Candy-literal test fixture across ~30 files rewritten to spec.CandyModel/spec.CandyView + testCandy/pixiCandy fixtures) and deletes scan_candy_parity_spike_test.go (the RDD throwaway spike, per its own doc comment, now that the port has landed). Fixes a confirmed regression surfaced by the sweep: CandyModel.RunOps was never populated anywhere in the retyped pipeline, so HasTasks()/HasInstallFiles() were unconditionally false — silently dropping every candy's run: steps from WriteCandySteps' pod-overlay build render and breaking the validator's "at least one install file" check for task-only candies. Adds completeCandyRunOps (charly/layers.go), called at all 4 pre-wrap scan sites (legacyScanCandiesDir, both ProjectCandies arms, ScanAllCandyWithConfigOpts's winners loop) to port the pre-move *Candy.runOps() logic and OR-complete HasInstallFiles/HasContent with RunOps + InitSystems, per scanFromParsed's own deferred-completion doc comment. Also fixes 2 staticcheck findings (S1001 identity-copy loops) introduced this session in deploy_add_shared.go/generate.go, and an unparam finding on the pixiCandy test helper. go build/vet/test ./charly/... and (GOWORK=off) ./sdk/... all pass; golangci-lint run reports 0 issues on both modules. WIP checkpoint on the held feat/w9-loader-cone branch — pending: the dual parity witnesses (charly box inspect --format json + Containerfile byte-parity) and the R7/R10 live runtime gate (charly box build / check box / bundle add / check live) on a disposable target, neither run yet this pass. Assisted-by: Claude Sonnet 5 (syntax check only — R10 not yet run)
…e point The previous fix (this branch's prior commit) sprinkled completeCandyRunOps at 4 pre-wrap call sites. That left a class-level gap: PopulateCandyInitSystem (InitSystems) still ran ONLY over ScanAllCandyWithConfigOpts's remote `winners` map, so a LOCAL candy — wrapped inside legacyScanCandiesDir/ProjectCandies with no InitCfg in scope — never got InitSystems completed, even when generate.go supplied a real InitCfg for the SAME project's remote candies. HasInit() stayed unconditionally false for every local candy: the same regression class, surviving in the sprinkled shape because each arm completed with only what it locally knew. Consolidates to finalizeScannedCandies(scanned, initCfg) — the SOLE function that can produce a spec.CandyReader. Every construction path now funnels through it: ScanCandy delegates to the new scanLocalCandies (dispatches to legacyScanCandiesDirScanned or (*UnifiedFile).projectCandiesScanned, both now UNWRAPPED, returning spec.ScannedCandy). ScanAllCandyWithConfigOpts scans its own locals unwrapped too, combines them with the remote-arbitrated winners into ONE map, and calls the choke point ONCE at the end — including through the zero-remote-downloads early-return path, which previously returned the already-wrapped (and therefore InitSystems-incomplete) locals directly. The one wrinkle: CollectRemoteRefsOpts walks Require/IncludedCandy edges via the CandyReader interface, so it needs a wrapped view before the final combine — resolved with a throwaway finalizeScannedCandies(locals, nil) call, safe because the function never mutates its input map (each candidate completes off a range-loop copy). Adds the pinning fixture (layers_test.go): TestScanAllCandyWithConfigOpts_LocalCandyGetsInitSystemsCompletion — a LOCAL-only project (zero remote refs, forcing the early-return leg) with a packaged-service candy + a supplied InitCfg, asserting HasInit() is true post-wrap. Verified empirically (not just by inspection): git-stashed this commit's layers.go/unified.go changes, confirmed the test FAILS against the prior (4-site) commit, then restored and confirmed it PASSES. go build/vet/test ./charly/... and golangci-lint run both green (0 issues). Assisted-by: Claude Sonnet 5 (syntax check only — R10 not yet run)
…heckpoint) loadProjectForResolve loaded its own lp.initCfg via LoadDefaultBuildConfig but never assigned it onto opts.InitCfg before its own ScanAllCandyWithConfigOpts call — the scan that feeds rp.Candies/rp.CandyModels, the wire envelope plugin-build's Generator reads for per-candy HasInit() lookups during real Containerfile emission (since #67's render-DRIVE move). The NewGenerator scan path (charly/generate.go) already threaded InitCfg correctly; this path did not, so the supervisord.conf assembly block silently dropped out of the generated Containerfile for any box whose init system is auto-detected through this path. Root-caused via a live box/cachyos generate + a Containerfile byte-parity diff against a pre-W9 baseline binary, confirmed byte-identical since #67 landed (introduced by W9's retype, not pre-existing). Also lands the lossy CandyView.Require/.IncludedCandy fix from the prior WIP checkpoint: withLocalRawRefs harvests each local candy's RAW (pre-finalize, still-pinned) require:/candy: refs into opts.ExtraCandyRefs, since FinalizeCandyRefs's bare-stringing (correct for graph-topology consumers) left CollectRemoteRefsOpts structurally unable to discover a local candy's pinned remote require edge — confirmed via a live "depends: unknown candy" crash on box/cachyos generate, reproduced deterministically pre-choke-point too. Verification this checkpoint: - go build/vet/test/lint: clean (0 issues) - charly check run check-charly-selftest-pod (disposable bed, fresh binary, frozen tree): image-build PASSED (160s); 76 steps: 57 passed, 1 failed (claude-code native-binary bootstrap needs network, unavailable in box-check mode — pre-existing/unrelated, confirmed against main by a peer teammate), 18 skipped (runtime-context steps, expected in box mode) - box inspect golden (cachyos/python-ml/charly-selftest) vs pre-W9 baseline: byte-identical modulo tag timestamp - Containerfile byte-parity (cachyos/python-ml/charly-selftest) vs pre-W9 baseline: byte-identical modulo tag timestamp; supervisord assembly block now present in charly-selftest's Containerfile sdk bump: 9cda059 -> 7e5f125 (specCandyAdapter.Port() wire-form fix, prior checkpoint). Assisted-by: Claude Sonnet 5 (analysed on a live system)
R5 grep self-test on this branch's file deletions found two comments in cue_loader.go and unified.go still pointing at ns_identity.go (deleted, relocated to sdk/loaderkit/repo_identity.go), plus one in refs.go pointing at normalizeRepoSpec "in main_repo.go" (relocated to loaderkit.NormalizeRepoSpec; main_repo.go's own doc comment already says so). Comment-only; go build/vet/test/lint all clean. Assisted-by: Claude Sonnet 5 (analysed on a live system)
…CalVer) Placeholder entry for the wave's eventual landing — CalVer stamp will be finalized by the fresh pr-validator at merge time (git mv to the real merge-time stamp), per the standard placeholder-CalVer convention. Assisted-by: Claude Sonnet 5 (analysed on a live system)
…iders) Two riders from review before landing: 1. CHANGELOG: third "Related finding: LATENT" section for validate.go:371's remote-Require accessor — the same proven-divergence/proven-unreachable/ follow-up-batch clause pattern as the other two LATENT findings this wave surfaced, so a validator finds the narrative rather than discovering the gap independently. 2. TestCollectRemoteRefs (refs_test.go): marker comment naming its "my-layer" fixture as an unreal wire-form state (a full "@repo:vTag" pin surviving in CandyView.Require, which a real scan+finalize never produces) and pointing at the W9 follow-up batch (#59) that reworks it. A green test embodying an unreal state without a marker is a doc-divergence in test form. go build/vet/test/lint clean. Assisted-by: Claude Sonnet 5 (analysed on a live system)
sdk#71's fresh pr-validator flagged deploykit.AppendUniqueString as a byte-identical copy of kit.AppendUnique (R3, blocking). The sdk-side fix deletes the divergent name and aliases AppendUnique = kit.AppendUnique in deploykit/kit_aliases.go. Follows every charly-side call site + the one comment naming it (config_image.go, pod_lifecycle_resolve.go, devices_test.go, security_test.go) onto deploykit.AppendUnique — no new kit import added to any charly file (IMPORT-PURITY; these files already import deploykit). Bumps the sdk gitlink to a35f37b (the R3 fix + the CUE mirror-divergence fix for requires_capability, both from the same validator round). Verification: go build/vet/test/lint clean; git grep AppendUniqueString (both repos) returns zero hits; axes unchanged (137 kit-importing files, 253 non-test charly/*.go files, 46261 LOC — this fix touches only already-tracked files). Assisted-by: Claude Sonnet 5 (analysed on a live system)
Repoints to sdk 7e76424 (dropped a code comment naming a deleted test identifier, per the fresh validator's R5 residual finding; CHANGELOG carries the provenance instead). No charly-side source change. go build/vet/test -count=1 ./... clean (fresh, not cached). Assisted-by: Claude Sonnet 5 (analysed on a live system)
Repoints to the MERGED sdk main SHA (sdk#71 squash-merged; tag v0.2026198.2057 dereferences to the same commit) — not the feature branch head (7e76424), which the merge superseded. Verified via a fresh `git fetch origin main` + exact-match diff before committing. go build/vet/test -count=1 ./... clean (fresh, not cached) against the merged sdk. Assisted-by: Claude Sonnet 5 (analysed on a live system)
/#61) Updates the bed-run evidence to the full 7-step check-charly-selftest-pod run (2026.198.2033, post sdk#71 R3/CUE fixes) and documents all 4 check-live failures found there, each independently root-caused: - 2 claude-code failures: a NEW cross-worktree candy-resolution contamination finding (task #61, sequenced post-W9 since the fix lands in this wave's own loader-cone relocation target) — the check-bed's repo-identity-keyed candy cache picked up a sibling worktree's uncommitted higher-CalVer candy via the shared git object store's "newest wins" version arbiter. - 2 pre-existing main defects (MCP box.list.boxes unknown-tool + `charly check --help`'s generic placeholder): baseline-reproduced by two independent parties on clean main; root-caused to buildCLIModel()'s pre-existing inability to reflect dynamic out-of-process command words (PR #89, an ancestor of the W9 fork point) — tracked as task #60. None of the 4 are W9 regressions; the change class's tier stands. Assisted-by: Claude Sonnet 5 (analysed on a live system)
candy/tailscale-up/charly.yml's task-body comment (both the run: sugar form and its desugared command: echo) named a file that never existed under that path — charly/deploy_target_local.go. The deploykit.RenderBuilderScript helper it's actually describing lives at sdk/deploykit/localpkg.go (relocated from charly/deploy_host_helpers.go in the W3 build-engine wave) — the exact phrasing plugins/infrastructure/skills/tailscale-up/SKILL.md already carries since its own W3 R5 sweep fix. R1 claim-keyed sweep: the same false claim, a second instance not caught by that earlier fix (candy YAML lives in charly, not plugins). charly box validate: exit 0. Assisted-by: Claude Sonnet 5 (documentation reviewed)
Merges origin/main (5f173df, incl. 56b1a6b's generic federated control plane: Provider.Channel relay, tmux control-mode provider, plugin-agent daemon-free control plane, agent/terminal-profile candy declarations) into the W9 CandyReader/CandyModel/CandyView retype. Conflict resolution (charly/layers.go, unified.go, resolved_project_host.go): kept the W9 side throughout — origin/main's edits landed on the concrete `type Candy struct` + resolve-time projectCandyView/projectCandyModel/ PopulateCandyInitSystem(map[string]*Candy,...), all of which the retype already deleted in favor of spec.CandyReader wrapping sdk/loaderkit-scanned (CandyModel, CandyView) pairs, with init-system population moved to scan time. Two now-obsolete tests referencing the deleted identifiers (TestProjectCandyViewPreservesPerInitTriggers, TestResolvedProjectCompletesPerInitTriggersBeforeProjection) are removed; their behavior is proven by the existing TestScanAllCandyWithConfigOpts_LocalCandyGetsInitSystemsCompletion. sdk gitlink -> 76df6c0 (origin/main's pin, a descendant of the branch's b24b168), plus a NEW sdk commit de7e8ae (own PR needed before this one lands, see report) adding AgentProvide()/HasAgentProvides()/ TerminalProfiles() to spec.CandyReader + deploykit.specCandyAdapter + loaderkit population — closing the gap between the W9 retype's CandyView (which already carried AgentProvide but no interface exposure or TerminalProfiles at all) and render_baked_metadata.go's per-box agent/terminal-profile OCI-label aggregation, which the control-plane merge needs through spec.CandyReader now that no live *Candy exists. plugins gitlink -> c794cb7 (plugins#88 merged main head). Verified: sdk module standalone (go build/vet/test/golangci-lint all clean, go.mod tidy no-op); charly module (task build:binary, go test ./... 115s green, gofmt/vet/golangci-lint clean); task cue:gen at the superproject level is a no-op beyond the intended sdk schema addition; charly box validate exits 0 with box/arch+box/fedora+box/cachyos initialized; charly box generate on check-k8s-deploy-app produces a correct Containerfile. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…er-cone Merges origin/main (09172e1, PR #160 — restores nested CLI grammar for check/box-list, touching cli_model_cmd.go/main.go/main_freshness.go/ plugin_provider_common.go/provider_command_external.go/candy/plugin-box/ candy/plugin-check) into feat/w9-loader-cone. Clean auto-merge, one real conflict: charly/go.mod's sdk require version (HEAD's v0.2026200.1312 vs main's v0.2026201.542) — resolved to v0.2026201.636, matching the sdk gitlink bump below. None of #160's touched files overlap the W9 retype's surface (layers.go/unified.go/resolved_project_host.go/render_baked_metadata.go). sdk gitlink -> db63ef1 (sdk#75 merged main, tag v0.2026201.636) — the CandyReader agent/terminal-profile accessors this cutover's render_baked_metadata.go fix depends on are now landed upstream, so the previous local-only pin is replaced by the real merged+tagged commit. Verified: task build:binary (2026.201.0620, zero go.work.sum drift); charly go test ./... 114.7s green; gofmt/vet/golangci-lint clean; GOWORK=off go mod verify clean; superproject task cue:gen no-op beyond untouched submodule pointer noise; charly box validate exit 0. candy/plugin-http and candy/plugin-port fakeCC fixture failures reproduced with the identical signature (*fakeCC missing ResolveClusterContext) already tracked as pre-existing/unrelated (task #10's thematic batch) — confirmed untouched by this merge, not fixed here. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…loader-cone Merges origin/main (6d436e2, "thematic hygiene batch — sdk-interface-drift fixtures, dead code, stale refs" — #161, which fixes the plugin-http/ plugin-port fakeCC fixture failures + #159 builder_venue.go work) into feat/w9-loader-cone. Clean auto-merge, one conflict: charly/go.mod's sdk require version (HEAD v0.2026201.636 vs main v0.2026201.603) — resolved to v0.2026201.649, matching the sdk gitlink bump below. No overlap between #159/#161's touched files (builder_venue.go, k8s_generate.go, k8s_deploy_from_box.go, validate_preempt.go, bundle_add_cmd_k8s.go deleted, plugin-substrate/status_k8s.go) and the W9 retype surface (layers.go/unified.go/resolved_project_host.go/render_baked_metadata.go). sdk gitlink -> 5cf230d (sdk#76, a docs-only hygiene fix, confirmed a descendant of the previous db63ef1 pin). Verified: task build:binary (2026.201.0649, zero go.work.sum drift); charly go test ./... 97.7s green; gofmt/vet/golangci-lint clean; GOWORK=off go mod verify clean; superproject task cue:gen no-op beyond the pre-existing untouched box/cachyos pointer noise; charly box validate exit 0. candy/plugin-http + candy/plugin-port: the previously-reproduced fakeCC fixture failures are now GREEN after this merge (confirming #161's fix landed correctly here). This is the W9 loader-cone cutover's FINAL rebase — the full 10/10 disposable bed roster (check-exampledeploy, check-substrate, check-builder-vm, check-k3s-vm, check-group, check-structkind, check-sidecar-pod, check-charly-vm, check-local-vm, check-k8s-deploy) passed against this lineage's immediate predecessor (6b07a93); check-k8s-deploy's one roster-run flake was concurrency contention (isolated re-run PASS 10/10), not a regression, and is tracked separately (bed-robustness batch). Axis measurements (charly/ only, vs 6d436e2): axis-A (non-test non-alias files importing an sdk mechanism kit) 139 vs main's 141 (net -2); non-test LOC 46,835 vs main's 48,177 (net -1,342); *_aliases.go count 1 (vmshared_aliases.go) on both sides — no regression. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
…nal axes Adds the landing narrative to the wave's placeholder CHANGELOG entry: the three sequential main-rebases (federated control plane / F-CLI-NEST / hygiene batch), the sdk#75 follow-on PR that closed the agent/terminal- profile CandyReader gap, the full 10/10 disposable bed roster result (two initial localpkg failures root-caused to a stale pkg/arch submodule working-tree checkout — infra, not a retype regression — both green on re-run; one k8s-deploy roster flake classified as concurrency contention, isolated re-run green 10/10), and the final axis measurements against main @ 6d436e2. Bumps the attribution tier to `fully tested and validated`. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: cross-repo ( Head verified: Checklist
Finding #1 — R1/R5 BLOCKING: stale comment reference to a deleted identifier, outside
|
…loaderkit/scan_candy.go populateFromYAML (W9 R5) The W9 loader-cone retype moved unified.go's populateCandyFromYAML into sdk/loaderkit/scan_candy.go (populateFromYAML); a candy comment still cited the deleted unified.go identifier. Claim-keyed R5 sweep: grep now returns only CHANGELOG/ history. box validate exit 0. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — APPROVED ✅ (round 2, supersedes the prior CHANGES REQUESTED)Head verified: Round-2 delta re-gateThe only change since round 1 ( Independently re-verified, not taken on trust:
Round 1's full checklist (architecture gate, 10-bed disposable roster cross-checked against on-disk DecisionPASS. Proceeding to Phase 3: CalVer finalization, merge (squash), tag. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated) |
pr-validator merge-time CalVer stamp: renames the placeholder CHANGELOG entry to its final merge CalVer and rewrites the H1 heading to match. No schema version bump (this cutover is a Go retype, not a schema-shape change). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
…cer-first prerequisite for the plugins projection) Two docs-only edits in the superproject, both producer-side sources for the plugins/ skill projection. ## candy/charly-internals/charly.yml — three corrections to the candy skill content 1. TZ=UTC0 fix in the git-workflow skill: scripts/calver.sh derives the CalVer from the HEAD commit UTC time (TZ=UTC0 git log -1 --format=%cd --date=format-local:%Y %j %H %M — the TZ=UTC0 is what makes the bare %cd UTC). 2. localpkg gotcha consolidation: the two pkg/arch makepkg/localpkg build gotchas folded into ONE generic gotcha (a disposable bed that builds from a submodule builds from the submodule ON-DISK WORKING-TREE checkout, NOT from the committed gitlink alone). 3. cumulative-cap bullet in the go skill: the sandbox TOTAL /tmp usage cap (beyond the per-command cap) — write error: Disk quota exceeded when /tmp fills to ~80% of the tmpfs; on this host 17G of tmp.* dirs had accumulated. ## PROGRAM/nfpm-packaging-north-star.md — the binding north-star doc - Phase 0 follow-on — Go-module-valid tags on the plugin repo: the plugin repo CalVer v2026.227.0013-style tags are semver-REJECTED as Go module versions; needs v0.2026227.13-style tags mirroring sdk v0.2026226.1201 scheme. - Expanded Phase 3: the superproject declaration of the external charly generate-packages plugin — a THIN re-export shim module under a discovered candy (candy/generate-packages/ with charly.yml + go.mod require+replace to the Go-module-tagged external module + cmd/serve shim + go.sum). ## Why producer-first The plugins/ skill files are generated from the candies skill: entities by charly marketplace generate. The plugins PRs #162/#163 carried hand-edits to those generated files; the round-5 validator correctly rejected them (a hand-edit of a generated file whose candy source is not landed). The correct path is producer-first: 1. This PR — land the candy source change in the superproject (cutover A). 2. Plugins cutover — after this lands, run charly marketplace generate and land ONE plugins PR carrying the regenerated output (byte-identical to the generator), superseding #162/#163. 3. Cutover B — bump the plugins gitlink in the superproject. The transitional marketplace drift after this landing is expected and resolved in step 2. Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (documentation reviewed)
Summary of changes
W9/K1 of the core-minimization program: the concrete
type Candy struct(which carriedevery candy's build-plan/package/env AND identity/graph state) is retyped to the
spec.CandyReaderinterface, backed by two CUE-schema-sourced halves —spec.CandyModel(build model) andspec.CandyView(identity/graph) — wrapped throughthe sole
deploykit.NewSpecCandyModelentry point. The scan→fetch→qualify→arbitratepipeline (
charly/layers.go) is reshaped around a mutable pre-wrap triple,spec.ScannedCandy{Model, View, Refs}, and consolidated behind ONE choke point,finalizeScannedCandies, the sole exit from every construction path (ScanCandy,ScanAllCandyWithConfigOptsincl. its early-return,UnifiedFile.ProjectCandies,legacyScanCandiesDirScanned).Full narrative, bugs found/fixed during the retype, SDD notes, and the landing history
(three sequential main-rebases + a follow-on sdk PR) are in
CHANGELOG/2026.198.1859.md(this PR's placeholder — the pr-validator finalizes itsCalVer at merge).
Landing required three sequential rebases as
mainadvanced during the cutover(each fully re-gated before push):
56b1a6b(federated control plane) — surfaced a real gap:render_baked_metadata.go'snew per-box
agent_provide/terminal_profileOCI-label aggregation neededAgentProvide()/HasAgentProvides()/TerminalProfiles()throughspec.CandyReader,which this wave's
CandyViewdidn't fully expose. Closed by a follow-on sdk PR(sdk#75, merged as
db63ef1, tagv0.2026201.636) with dedicated regressioncoverage (both new tests proven to FAIL without their fix).
09172e1(F-CLI-NEST, sdk#72 consumer) — zero surface overlap, one mechanicalgo.modrequire-version conflict.6d436e2(thematic hygiene batch, sdk#76) — fixed theplugin-http/plugin-portfakeCC fixture failures (confirmed green here) +
builder_venue.go/k8s_generate.gowork, zero surface overlap.
sdk gitlink →
5cf230d(sdk#76, tagv0.2026201.649); plugins gitlink →c794cb7(plugins#88, tag
v2026.201.0550).Change class
cross-repo (
charly+sdk) Go + CUE schema — both sdk legs (sdk#71/b24b168theoriginal producer,
sdk#75/db63ef1the follow-on) already merged before this PR opens,per B2/B6.
How R10-tested — exact gate, commands, and pasted output
concurrent
/verify-beds-class full W9 disposable bed roster, run by the orchestrator.check-exampledeploy| pod | ok | — | — (first-pass)check-substrate| pod | ok | — | — (first-pass)check-builder-vm| vm | ok | — | — (first-pass)check-k3s-vm| vm | ok | — | — (first-pass)check-group| pod | ok | — | — (first-pass)check-structkind| pod | ok | — | — (first-pass)check-sidecar-pod| pod | ok | — | — (first-pass)check-charly-vm| vm | ok | 8 steps | 353s (re-run, after the pkg/arch env fix below)check-local-vm| vm | ok | 8 steps | 402s (re-run, after the pkg/arch env fix below)check-k8s-deploy| pod | ok | — | 579s (ISOLATED re-run, 10/10 — the concurrent-rosterrun flaked once on
check-livek3s-APIconnection refused, classified asconcurrency contention: the standalone
check-k3s-vmbed passed the SAME stackconcurrently, and this bed passed cleanly isolated — non-blocking, tracked separately)
check-charly-vm/check-local-vm's first roster pass FAILED atdeploy-addwith an identicalgit -C /tmpsignature — root-caused (file:line evidence in the CHANGELOG) to astale
pkg/archsubmodule working-tree checkout in the bed's worktree (on-diskat
96ce37c, predating the upstream5734a83"fix(packaging): preserve isolatedpackage sources" fix — the committed superproject gitlink was already correctly
pinned at
5734a83).git submodule update --checkout pkg/arch(a worktree-envsync, no source edit) resolved it; both beds passed cleanly on re-run.
task build:binaryat every rebase, zerogo.work.sumdrift;final
charly version→2026.201.0649.exercised by every one of the 10 beds'
deploy-add/image-build/config/start paths, pluscharly box validate/generatelocally.all-at-once fan-out) — the ONE contention finding (
check-k8s-deploy's port-starvedk3s API under 10-way load) was isolated, root-caused as concurrency-only (not a code
defect), and re-verified green in isolation; tracked as its own non-blocking
bed-robustness follow-up (not fixed in this PR — it isn't this cutover's regression).
Attribution tier
fully tested and validated— the full 10/10 disposable bed roster passed (two initialinfra-only failures independently root-caused and re-verified green, one concurrency-only
flake isolated and re-verified green), build/vet/test/lint clean at every rebase, and
every new accessor ships regression coverage proven to fail without its fix.
Harness rulebook compliance
/charly-internals:go(SDD, CUE pipeline),/charly-internals:git-workflow(multi-repo B2/B6 sequencing, per-module verification),
/charly-internals:agents(bed-scoped parallel testing),
/charly-internals:cutover-policy(one-phase cutover,cutover sizing) — all loaded and followed.
roster flake, the missing agent/terminal-profile coverage) was independently root-caused
with file:line evidence BEFORE any fix — see the CHANGELOG's landing narrative. Zero
warnings in every gate output above.
pkg/arch-fix's "confirm the derived-artifact staleness lesson" are explicitly NOT this
cutover's regressions (proven via isolation + independent RCA) and are tracked as their
own separate, already-scoped follow-ups, not silently deferred.
CandyReaderpattern (
GetStatus/GetDescription/…) — no new abstraction invented.5734a83) read intothe worktree via a normal submodule sync — no sleep/retry/env-shim.
charly/candy_model_accessors.go+charly/candy_model_render_accessors.godeleted whole;git grepfor every deletedidentifier (
type Candy struct,legacyScanCandiesDir(,populateCandyFromYAML, barescanCandy() returns only historical-provenance doc-comment mentions in the relocatedfiles, per the CHANGELOG's R5 self-test section.
git status/git diff --statchecked before every merge/commit/push;no destructive git action.
cross-cutting loader change — see "Eval beds run" above.
baseline binary (see CHANGELOG "Verification"); OCI-label emission (including the new
ai.opencharly.agent_provide/terminal_profileslabels) exercised live through the10-bed roster's image-build steps.
task build:binaryrebuilt at every rebase,charly versionmatched each time; no new runtime OS dependency.disposable: truetarget; the change ships regression coverage that fails without it (the new sdk
accessors' tests,
TestScanAllCandyWithConfigOpts_LocalCandyGetsInitSystemsCompletionfor the InitSystems host-completion fix).
k8s-deploy flake's classification) was proven on a live disposable bed, never assumed
from a doc/code read. SDD — every new wire field (
CandyModel.Security/.Hook/…,CandyView.TerminalProfiles) is an additive CUE def,task cue:gen-generated, nohand-written wire struct; reproducibility verified at every rebase.
charlymain; no transitional/dual-mode path left (the old*Candytype and every accessorfully deleted in the same change); no Phase-2/deferred scope.
scan/populate logic) OUT of
charly/core and INTOsdk/loaderkit+sdk/deploykit(a mechanism kit plugins consume) — the retype is itself an instance of the boundary
law's "everything but the four kernel escapes is a plugin/kit" direction, not a
violation of it. No new
charly/*_aliases.go, no newcharly/import of an sdkmechanism kit beyond what already existed (axis-A measurement below).
check-charly-vm/check-local-vmre-runs were on
disposable: truetargets.gofmt -l .empty,golangci-lint run= 0 issues,go vetclean,go test ./...green at every rebase — pasted above.CHANGELOG/2026.198.1859.mdfinalized with the full landing narrative(placeholder CalVer; the pr-validator finalizes it at merge).
Both axes (charly/ only, branch vs main @ 6d436e2)
141 (net −2).
*_aliases.gocount: 1 (vmshared_aliases.go) on both sides — no regression.Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)