Skip to content

feat(deploykit)!: K5-Unit-1 Option A — clean kit of R-item, shrink seam to 1-op (#67) - #55

Merged
atrawog merged 3 commits into
mainfrom
feat/k5-unit-1-option-a-clean-kit
Jul 15, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/k5-unit-1-option-a-clean-kit

Conversation

@atrawog

@atrawog atrawog commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

K5-Unit-1 Option A — fix the incomplete-seam violation + shrink the DeployStateHost seam to 1-op

The K5-Unit-1 cutover (#SDK-PR that landed 1b9f376) moved the deploy state-model body into sdk/deploykit but introduced an incomplete-seam violation (the kernel/plugin boundary law): the kind-blind kit gained a deploy-kind-specific R-item (MarshalBundleNodeLegacy) and the DeployStateHost seam threaded 3 ops that are either kind-blind kit primitives or deploy-kind-specific transforms that never belonged in a kind-blind kit. This cutover fixes the violation (Option A — clean the kit now; the consumer moves to their plugin homes are the immediately-following K4 wave, tracked not deferred).

Seam shrinks 4-op → 1-op (StateHostMechanisms)

The ONE remaining field is LoadUnifiedBundleConfig (the kind-blind unified-loader M, K1-gated — it dies when K1 relocates LoadUnified to sdk/loaderkit, task #31):

  • LatestSchemaVersion → collapsed to a direct kit.LatestSchemaVersion() call (a kind-blind kit primitive; the seam op was a redundant hop).
  • AcquireDeployConfigLock → collapsed to a direct kit.AcquireFileLock(path+".lock", true) call (a kind-blind kit primitive; acquireDeployConfigLock was a thin charly alias of it).
  • MigrateDeployEntity → removed (the deploy-kind-specific legacy→node-form transform is an R-item that contaminated the kind-blind kit; it was never the kit's to own).

MarshalBundleNodeLegacy leaves the kit (the R-item fix)

MarshalBundleNodeLegacy (the deploy-kind-specific struct-body marshal with re-injected target:/nested:/peer:) is REMOVED from sdk/deploykit/deploy_file.go. It returns to charly/deploy_nodeform.go (beside migrateDeployEntity, where it lived pre-K5) as the REDESIGNED marshalBundleNode — the "Legacy" name AND the legacy struct-body shape dropped, fused with migrateDeployEntity into ONE clean canonical BundleNode → node-form marshal (the super leg of this cutover).

SaveBundleConfig redesigned kind-blind

SaveBundleConfig is now a kind-blind file shell: it takes a marshalNode callback (the deploy-kind-specific node-form serializer the caller supplies) and does ONLY the version stamp (kit.LatestSchemaVersion), the provides: directive, the per-entry callback invocation, and the atomic tempfile+rename write with the fail-safe re-check. SaveDeployState + CleanDeployEntry thread the callback through to SaveBundleConfig.

E/M justification (the 1-op seam)

LoadUnifiedBundleConfig is a kind-blind MECHANISM (M) — it loads ANY per-host charly.yml through the unified loader and returns its ProjectBundleConfig, never branching on a deploy kind. It lives in the seam (not in deploykit directly) ONLY because the LoadUnified orchestration has not yet relocated to sdk/loaderkit (K1, task #31): once K1 lands, plugin-bundle calls loaderkit.LoadUnified directly and this seam dies entirely. Tracked K1-exit + K4-exit tasks.

Tests

deploykit/deploy_state_test.go updated to the new SaveBundleConfig callback signature + the 1-op seam. MarshalBundleNodeLegacy test removed (the marshal is tested charly-side, where it now lives). The sdk tests execute the changed code LIVE (go test ./deploykit/ green; go test ./... green; golangci-lint 0 issues).

BREAKING

  • MarshalBundleNodeLegacy removed (public API)
  • StateHostMechanisms.LatestSchemaVersion / AcquireDeployConfigLock / MigrateDeployEntity fields removed
  • SaveBundleConfig / SaveDeployState / CleanDeployEntry signatures changed (added marshalNode callback)

B2

This is B2 leg 1 (sdk). The super leg (charly gitlink bump + go.mod require bump + the redesigned marshal moved to charly/deploy_nodeform.go + the ~12 charly/ consumer call-site updates + deploy_state_host.go init shrink + the orchestrator's full disposable bed roster R10 CONCURRENTLY) follows.

Assisted-by: Claude (analysed on a live system)

atrawog added 2 commits July 15, 2026 13:03
…am to 1-op (#67)

The K5-Unit-1 cutover (1b9f376) moved the deploy state-model body into sdk/deploykit but
introduced an incomplete-seam violation: the kind-blind kit gained a deploy-kind-specific
R-item (MarshalBundleNodeLegacy) and the DeployStateHost seam threaded 3 ops that are
either kind-blind kit primitives or deploy-kind-specific transforms. This cutover fixes
the violation (Option A — clean the kit now; the consumer moves to plugin homes are the
immediately-following K4 wave, tracked not deferred).

Seam shrinks 4-op → 1-op (StateHostMechanisms):
- LatestSchemaVersion → collapsed to direct kit.LatestSchemaVersion() call
- AcquireDeployConfigLock → collapsed to direct kit.AcquireFileLock(path+".lock", true)
- MigrateDeployEntity → removed (deploy-kind-specific R-item, never the kit's to own)
- LoadUnifiedBundleConfig remains (the 1 kind-blind K1-gated M; dies at K1, task #31)

MarshalBundleNodeLegacy REMOVED from the kind-blind kit (the R-item fix). It returns to
charly/deploy_nodeform.go as the redesigned marshalBundleNode (Legacy name + legacy
struct-body shape dropped, fused with migrateDeployEntity into one clean node-form marshal)
in the super leg.

SaveBundleConfig redesigned kind-blind: takes a marshalNode callback (the deploy-kind-specific
node-form serializer the caller supplies) + does ONLY version-stamp + provides + per-entry
callback + atomic tempfile/rename + fail-safe re-check. SaveDeployState + CleanDeployEntry
thread the callback through. No per-kind map, no target-vocabulary switch in the kit.

E/M justification: LoadUnifiedBundleConfig is a kind-blind M (loads ANY per-host charly.yml
through the unified loader, never branches on a deploy kind). It lives in the seam ONLY
because LoadUnified orchestration has not yet relocated to sdk/loaderkit (K1, task #31);
once K1 lands this seam dies. Tracked K1-exit + K4-exit tasks.

Tests: deploykit/deploy_state_test.go updated to the new SaveBundleConfig callback signature +
the 1-op seam. MarshalBundleNodeLegacy test removed (the marshal is tested charly-side). The
sdk tests execute the changed code LIVE (go test ./deploykit/ green).

BREAKING: MarshalBundleNodeLegacy removed (public API); StateHostMechanisms.LatestSchemaVersion
/ AcquireDeployConfigLock / MigrateDeployEntity fields removed; SaveBundleConfig /
SaveDeployState / CleanDeployEntry signatures changed (added marshalNode callback).

Assisted-by: Claude (analysed on a live system)
…teDeployEntity comment refs

The Option A commit deleted MarshalBundleNodeLegacy + migrateDeployEntity +
the LatestSchemaVersion/AcquireDeployConfigLock seam fields, but two code
comments in deploy_state.go still named them:
- an orphaned marshalBundleNodeLegacy doc comment (the function was deleted;
  the comment was left attached to DropMappingKey)
- the relocated-helpers block comment listing 4 core-coupled ops (LoadUnified /
  LatestSchemaVersion / acquireDeployConfigLock / migrateDeployEntity) that
  reach through the seam — the seam is now 1-op (LoadUnified only).

R5 grep self-test: all deleted identifiers now appear ONLY in CHANGELOG files.

Assisted-by: Claude (documentation reviewed)
@atrawog

atrawog commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED

Change class: charly/sdk Go (sdk library leg, B2 leg 0)

Independently re-validated in a fresh /tmp/sdk-val-55 clone (new context, author claims trusted nothing). All gates re-run by me, not inherited.

Checklist (every rule — PASS/FAIL)

  • [PASS] 0. security & anti-tampering (T1-T4): diff is deploykit Go + CHANGELOG only; no secrets/exfiltration/weakened-gate/supply-chain; no directive aimed at the validator; no scope mismatch (code does what the body claims).
  • [PASS] 1. description complete: body has Summary, E/M justification (boundary law), R5 sweep (2nd commit), Tests, BREAKING, B2 note, attribution tier. K4-exit is a NAMED thematic batch (immediately-following wave, tracked — R2-compliant, not a vague follow-up).
  • [PASS] 2. change-class gate matches evidence: sdk Go code → go test ./... + build + lint. Re-ran independently — all green. The disposable bed roster is the super leg K-wave 2: drop the deleted preempt.go from the box_engine caller list #124's gate (sdk is a library; beds run against the assembled superproject) — correct per B2.
  • [PASS] 3. attribution tier justified: analysed on a live system — changed deploy_state.go/deploy_file.go executed live via go test ./deploykit/ (output below). NOT inflated (fully tested and validated belongs to K-wave 2: drop the deleted preempt.go from the box_engine caller list #124 after its bed roster).
  • [PASS] 4. R0 skills honored: /charly-internals:go + /charly-internals:plugin (boundary law). The change FIXES an incomplete-seam violation (R-item removed from kind-blind kit).
  • [PASS] 5. R1 RCA / ZERO warnings: go test, golangci-lint, go vet, go build all clean — zero warnings.
  • [PASS] 6. R2 no pre-existing/out-of-scope split: K4-exit is a NAMED thematic batch (immediately-following K4 wave, tracked not deferred). The R5 sweep fixed stale comments IN THIS cutover (2nd commit).
  • [PASS] 7. R3 no duplication: PR REMOVES duplication (seam ops LatestSchemaVersion/AcquireDeployConfigLock were redundant hops over kit primitives; collapsed to direct calls). marshalNode is one shared callback abstraction.
  • [PASS] 8. R4 no ad-hoc workaround: no sleep/retry/magic-number/shim. Lock is kit.AcquireFileLock (a real sync primitive).
  • [PASS] 9. R5 hard cutover + grep self-test: all deleted identifiers (MarshalBundleNodeLegacy, MigrateDeployEntity, AcquireDeployConfigLock, migrateDeployEntity) appear ONLY in CHANGELOG/. No transitional/dual-mode in final code.
  • [PASS] 10. R6/R8/R9: R6 N/A (no destructive git); R8 N/A (no generation/Containerfile/labels); R9 N/A for sdk library leg (binary is superproject's; K-wave 2: drop the deleted preempt.go from the box_engine caller list #124 handles R9).
  • [PASS] 11. R10 disposable-only/fresh-rebuild/coverage: fresh clone, go test ./... green, golangci-lint 0. Test coverage ships (deploy_state_test.go: TestSaveBundleConfig_RoundTrip exercises new callback + version stamp + atomic write; TestSaveBundleConfig_ErrorsWhenCallbackNil pins nil guard; TestRegisterDeployStateHost pins 1-op seam). Tests would FAIL without the change (signature changed).
  • [PASS] 12. RDD/ADE/SDD: RDD N/A (mechanical boundary fix); ADE N/A (no candy/box config); SDD N/A (no .cue/_gen.go/.pb.go touched — pure deploykit Go).
  • [PASS] 13. concurrency mandate: the flock change REPLACES the seam hop with a direct kit.AcquireFileLock(path+".lock", true) — same primitive, same path, no new shared-state surface. Concurrent bed roster is K-wave 2: drop the deleted preempt.go from the box_engine caller list #124's gate.
  • [PASS] 14. hard cutover — one atomic: 2 commits (Option A + R5 sweep fix) — squash folds them. No Phase-2/TODO. K4-exit is a separate named cutover (next wave).
  • [PASS] 15. ARCHITECTURE GATE — placement: CORRECT. PR FIXES an incomplete-seam violation — removes deploy-kind-specific R-item (MarshalBundleNodeLegacy) from the kind-blind kit, shrinks seam 4-op→1-op. Goal-fit: forward motion toward plugin-host end-state. Right layer: kit stays kind-blind; marshal moves to caller. Counterfactual: marshal better further out — and that's what happens (charly/deploy_nodeform.go, then plugin homes K4). Mechanical: no new/grown alias (no alias files touched), no new charly import.
  • [PASS] 16. disposable-only autonomy: N/A (no destroy/rebuild in this sdk leg).
  • [PASS] 17. clean architecture + go gates: gofmt -l . empty, golangci-lint 0 issues, go vet clean, go test green.
  • [PASS] 18. CHANGELOG present: CHANGELOG/2026.196.1102.md staged.

Verbatim gate output (fresh clone, GOWORK=off)

go build ./... → EXIT=0
go vet ./...   → EXIT=0
go test ./... →
  ok   github.com/opencharly/sdk           0.174s
  ok   github.com/opencharly/sdk/deploykit 0.005s
  ok   github.com/opencharly/sdk/enginekit 0.003s
  ok   github.com/opencharly/sdk/kit       4.335s
  ok   github.com/opencharly/sdk/loaderkit 0.003s
  ok   github.com/opencharly/sdk/spec      0.852s
  ok   github.com/opencharly/sdk/vmshared  0.484s
  EXIT=0
golangci-lint run ./... → 0 issues. EXIT=0
gofmt -l . → empty (clean)

R5 grep: MarshalBundleNodeLegacy / MigrateDeployEntity / AcquireDeployConfigLock / migrateDeployEntity → ONLY CHANGELOG/ context. MarshalBundleNodeLegacy fully removed from *.go source. kit.LatestSchemaVersion + kit.AcquireFileLock confirmed present as kit primitives.

Decision

APPROVED. The kit is genuinely cleaner — the deploy-kind-specific R-item (MarshalBundleNodeLegacy) is removed from the kind-blind sdk/deploykit, the seam shrinks 4-op→1-op (LoadUnifiedBundleConfig alone, K1-gated with a tracked exit), and SaveBundleConfig is redesigned as a kind-blind shell with a caller-supplied marshalNode callback. All foreground gates green on a fresh clone. Proceeding to finalize the merge-time CalVer, squash-merge, and tag.

Assisted-by: Claude GLM 5.2 Cloud (analysed on a live system)

Assisted-by: Claude (analysed on a live system)
@atrawog
atrawog merged commit 9ec6940 into main Jul 15, 2026
@atrawog
atrawog deleted the feat/k5-unit-1-option-a-clean-kit branch July 15, 2026 11:55
atrawog added a commit that referenced this pull request Jul 16, 2026
…) + #55 rider

feat(spec): add WalkSeams + ProjectWalker seam for the loader WALK (#46) + #55 rider

Adds the seam contract that lets a plugin (candy/plugin-loader, in the superproject) serve the
whole-project WALK, mirroring the already-landed DocParser/Threaded seam for the per-document
PARSE (P6). spec/loader_seam.go gains WalkSeams (the six host callbacks) + ProjectWalker
(WalkProject(rootDir, rootData, rootIdentity, seams) (LoadedProject, error)); loaderkit/walk.go's
local WalkSeams duplicate is deleted, Walk now takes spec.WalkSeams directly — one canonical type.

Routed in per orchestrator batching: vmshared/vm_snapshot.go DecrementSnapshotRefcount demotes its
benign snapshot-already-absent message from warning: to note:, matching the identical sibling
convention in candy/plugin-vm/vm_snapshot_libvirt.go. Message text only, no logic change.

Verified standalone (GOWORK=off): go build/vet/test all green, golangci-lint 0 issues, gofmt
clean, go mod tidy/verify no-op, task cue:gen no-op. Downstream dispatch proof cross-checked on
disk: check-sidecar-pod/2026.197.0716 bed, ok: true, 12/12 steps including a genuine update +
feature-run-rebuild, run against this PR's exact head commit.

Assisted-by: Claude (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 17, 2026
pr-validator finalization for sdk#68: combines the two placeholder CHANGELOG
entries (K6 status-fanout op + P14 kit.ResolveShellImageRef) into one file at
the merge-time CalVer, matching this repo's one-file-per-merge convention
(precedent: CHANGELOG/2026.197.0800.md, a same-shaped "#46 + #55 rider"
combined entry). Also corrects the Assisted-by tier from the inflated
placeholders' "fully tested and validated" to "analysed on a live system" -
the tier the PR body's own Attribution-tier section already claims, and the
one the evidence supports (sdk is a library leg with no disposable bed of its
own in this repo; go build/test/vet/lint/mod-verify all ran live and green,
but no fresh-rebuild R10 exists here to earn the higher tier).

Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
…a extracted to their own module (#55 A2)

#55 Phase A2 (sdk consumer leg): sdk stops OWNING the wire/IR/param types, the
gRPC proto contract, and the CUE ingress schema, and becomes a CONSUMER of the
new dedicated github.com/opencharly/spec module (published + tagged
v0.2026210.518, opencharly/spec#1).

- Deletes the moved dirs (spec/ proto/ schema/ protocol/schema/ schemaconcat/
  internal/{schemagen,wiregen}/) + the whole gen Taskfile.yml (−28,759 lines).
- Repoints every import github.com/opencharly/sdk/{spec,proto,schema,schemaconcat}
  → github.com/opencharly/spec/... (253 refs across 243 .go files).
- go.mod: require github.com/opencharly/spec v0.2026210.518 with NO replace, so a
  standalone sdk clone proxy-fetches the published, go.sum-verified module.
- README.md + CLAUDE.md rewritten to the post-extraction reality (sdk is a
  CONSUMER of opencharly/spec); gofmt import-sort clean.

Validated by a fresh pr-validator on a standalone clone: GOWORK=off
build/vet/test/mod-verify green, go mod tidy no-op, gofmt -l empty,
golangci-lint 0 issues. Producer-first B2: merged before the superproject bumps
its sdk gitlink.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
… Phase B cut1

The spec producer leg (opencharly/spec#2) merged to spec main d5eba0b (tag v0.2026210.808)
hosting the loader-RESULT type family; bump sdk's require to it so the standalone build
proxy-fetches the module carrying UnifiedFile/ValidationError/CandyCandidate + closure.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
… B cut1)

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
…Phase B cut1)

#55 Phase B cutover 1 (sdk consumer leg). loaderkit/kit/deploykit stop OWNING the
loader-RESULT wire-type family (UnifiedFile + InlineCandy + generics, ValidationError,
CandyCandidate, ImportList/ImportEntry, DiscoverConfig/ScanSpec, ProvidesConfig/EnvProvideEntry)
and CONSUME them from github.com/opencharly/spec (merged spec#2, tag v0.2026210.808).

- Deletes those types from loaderkit/kit/deploykit; repoints uses to spec.X (direct qualification).
- UnifiedFile.ProjectBundleConfig() method -> deploykit.ProjectBundleConfig(uf) free func
  (spec is types-only, cannot import a mechanism kit).
- ResolveOpts STAYS in loaderkit (embeds *buildkit config -> would cycle).
- go.mod require spec v0.2026210.808 (no replace).

Validated on a fresh standalone clone: GOWORK=off build/vet/test green, gofmt clean,
golangci-lint 0 issues, go mod tidy no-op, go mod verify OK.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
…) — #55 step1 sdk leg

spec#3 (transport/sshx/proc slices) merged to spec main e412efce (tag v0.2026210.1121).
sdk consumes them; the 4 kits (targetkit/sshx/proclifecycle/testkit) are deleted (in the
step1 feat base). Bump the require; go mod tidy settles (x/crypto stays as a test-only
indirect via sdk/kit.test → spec/testkit — Rule 2 preserved: no runtime consumer pulls it).

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
…NGELOG x/crypto wording (#55 step1 review round)

pr-validator CHANGES-REQUESTED on sdk#108:
- R5: README 'What this repo owns' still listed targetkit/proclifecycle/sshx/testkit
  (deleted; now spec/{transport,proc,sshx,testkit}). Bullets removed — grep self-test
  now CHANGELOG-only + the correct CLAUDE.md 'not owned here' pointer.
- R1: CHANGELOG claimed x/crypto require is 'pruned by go mod tidy' — false. Reworded:
  tidy DEMOTES it to a test-only // indirect (kit.test → spec/testkit → x/crypto/ssh),
  not pruned; Rule 2 preserved (no runtime consumer pulls it).

Docs-only round; code cutover unchanged (validator confirmed GREEN).

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 29, 2026
…k leg)

pr-validator PASS on f6d8529 (fresh standalone clone, GOWORK=off, no replace):
build/vet/test green, gofmt clean, golangci-lint 0, tidy no-op, spec 1121,
x/crypto test-only indirect (Rule 2 preserved). Both review-round findings
(README R5 sweep, CHANGELOG x/crypto wording) verified resolved.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RuuNS3hnyFi4kPgT2pWTHw
atrawog added a commit that referenced this pull request Jul 29, 2026
… spec fabric slices (#55 step1) (#108)

* refactor(sdk)!: drop targetkit/sshx/proclifecycle/testkit; consume spec fabric slices (#55 step1)

STEP 1 of the everything-is-a-plugin import-purity plan moved the standalone
fabric primitives into granular github.com/opencharly/spec sub-packages. This
sdk leg DELETES the four now-relocated kits and repoints every sdk consumer at
the spec slices — a hard cutover, no alias shims.

Deleted (moved to spec): sdk/targetkit → spec/transport, sdk/sshx → spec/sshx,
sdk/proclifecycle → spec/proc, sdk/testkit → spec/testkit.

Moved out of sdk/kit: process.go launch helpers (ShutdownProcessGroup /
SortedEnvPairs / RemoteLaunchCommand / ProcessShutdownGrace) → spec/proc (the
caller-owned startProcessPipes stays in kit); kit.ShellQuote → spec.ShellQuote.

Repoints: kit deploy executors + deploykit emitters → spec.ShellQuote /
spec/proc; vmshared/ssh_target.go → type SSHTarget = spec.SSHTarget +
libvirt_uri.go → spec.CurrentUsername (CurrentUsername re-export dropped);
deploy_chain.go → spec.ParseSSHTarget; privileged_runner / localpkg /
venue_builder / cloud_init_iso → spec/proc temp-cleanup.

No sdk source imports golang.org/x/crypto anymore (moved to spec/sshx); the
go.mod require is pruned by the post-spec-tag go mod tidy (B2). go build/vet/test
green (kit/deploykit/vmshared/loaderkit/buildkit); git grep
'sdk/(targetkit|sshx|proclifecycle|testkit)' and 'kit.ShellQuote' both EMPTY.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
Claude-Session: https://claude.ai/code/session_01Tu3YHSZ5GZQyafFg9xk4uf

* build(spec): pin merged spec v0.2026210.1121 (fabric-primitive slices) — #55 step1 sdk leg

spec#3 (transport/sshx/proc slices) merged to spec main e412efce (tag v0.2026210.1121).
sdk consumes them; the 4 kits (targetkit/sshx/proclifecycle/testkit) are deleted (in the
step1 feat base). Bump the require; go mod tidy settles (x/crypto stays as a test-only
indirect via sdk/kit.test → spec/testkit — Rule 2 preserved: no runtime consumer pulls it).

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

* docs(sdk): R5 sweep — drop 4 deleted-kit README bullets + correct CHANGELOG x/crypto wording (#55 step1 review round)

pr-validator CHANGES-REQUESTED on sdk#108:
- R5: README 'What this repo owns' still listed targetkit/proclifecycle/sshx/testkit
  (deleted; now spec/{transport,proc,sshx,testkit}). Bullets removed — grep self-test
  now CHANGELOG-only + the correct CLAUDE.md 'not owned here' pointer.
- R1: CHANGELOG claimed x/crypto require is 'pruned by go mod tidy' — false. Reworded:
  tidy DEMOTES it to a test-only // indirect (kit.test → spec/testkit → x/crypto/ssh),
  not pruned; Rule 2 preserved (no runtime consumer pulls it).

Docs-only round; code cutover unchanged (validator confirmed GREEN).

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

* chore(release): stamp merge-time CalVer v0.2026210.1134 (#55 step1 sdk leg)

pr-validator PASS on f6d8529 (fresh standalone clone, GOWORK=off, no replace):
build/vet/test green, gofmt clean, golangci-lint 0, tidy no-op, spec 1121,
x/crypto test-only indirect (Rule 2 preserved). Both review-round findings
(README R5 sweep, CHANGELOG x/crypto wording) verified resolved.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RuuNS3hnyFi4kPgT2pWTHw

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
atrawog added a commit that referenced this pull request Jul 29, 2026
…ds spec.ResolvedBox)

Merge-time CHANGELOG entry finalized by the fresh pr-validator, named by the
merge CalVer v0.2026210.1407 (shared with the release tag).

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd6ptqJukBksWqzq4A2PNZ
atrawog added a commit that referenced this pull request Jul 29, 2026
…Box (#55 step3 unit 3a) (#109)

#55 step-3 unit 3a — sdk consumer leg. buildkit.ResolvedBox becomes an EMBEDDING
WRAPPER around the CUE-sourced spec.ResolvedBox (github.com/opencharly/spec spec#4,
merged spec main 172027b2, tag v0.2026210.1533): the ~30 wire-clean value fields
are promoted from the embedded spec.ResolvedBox; only the genuinely buildkit-owned
host-render-cache pointers stay in buildkit.

- buildkit/resolved_box.go: embeds spec.ResolvedBox; keeps the 5 build-vocabulary
  pointers (DistroConfig/DistroDef/BuilderConfig/InitSystem/InitDef) + the 4
  json:"-" host-render caches (CandyCaps/BakedMetadata/RenderCandyOrder/ActiveInits)
  — the documented json:"-" gengotypes exception. Field access unchanged via Go
  promotion (zero read/write-site changes).
- MergeConfig/ResolvedInit/BuilderMap/AggregatedCandyCaps are thin = spec.X aliases
  (buildkit's pre-existing alias convention).
- Composite-literal construction sites nest the wire-clean fields under
  ResolvedBox: spec.ResolvedBox{…} (config_resolve.go, intermediates_compute.go,
  spec_resolved_box_adapter.go + deploykit test fixtures); values preserved,
  test-function counts unchanged.
- go.mod require spec v0.2026210.1533 (no replace); go mod tidy no-op.

Validated on a fresh standalone clone (GOWORK=off): build/vet green, gofmt clean,
go mod tidy no-op, go mod verify OK; go test green across buildkit+deploykit (the
touched packages) and all others; sole non-green is the kit package's
TestStartProcessWaitMonitor* stdlib os/exec process-wait hang — the known
environmental starvation (sdk process-wait RCA), in a package this change leaves
byte-identical and which does not reference ResolvedBox.

Producer-first B2: spec#4 (tag v0.2026210.1533) -> this sdk leg -> superproject leg.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd6ptqJukBksWqzq4A2PNZ
atrawog added a commit that referenced this pull request Jul 29, 2026
Merge-time CalVer finalization by the fresh pr-validator: rename the
placeholder CHANGELOG to the merge-time stamp and rewrite its H1. No code
change; the buildkit alias cutover is unchanged.

Assisted-by: Claude Code Claude Opus 4.8 (fully tested and validated)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_018iiqSrY7SkJhgvqDYpiHGH
atrawog added a commit that referenced this pull request Jul 29, 2026
…c aliases (#55 step 3-III sdk leg) (#110)

* refactor(buildkit)!: DistroConfig/BuilderConfig containers → thin spec aliases (#55 step 3-III sdk leg)

The value-type containers + methods + WrapDistroDef/DistroTagChain now source
from spec (merged v0.2026210.2052); buildkit keeps thin type aliases (−285 LOC in
format_config.go), matching its existing DistroDef/BuilderDef alias pattern.
InitConfig unchanged (composition policy → #65/#71). require spec bumped
v0.2026210.1533 → v0.2026210.2052.

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

* chore(changelog): finalize #55 step 3-III sdk-leg stamp → 2026.210.2103

Merge-time CalVer finalization by the fresh pr-validator: rename the
placeholder CHANGELOG to the merge-time stamp and rewrite its H1. No code
change; the buildkit alias cutover is unchanged.

Assisted-by: Claude Code Claude Opus 4.8 (fully tested and validated)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_018iiqSrY7SkJhgvqDYpiHGH

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
atrawog added a commit that referenced this pull request Jul 29, 2026
….2318

Merge-time CalVer finalization by the fresh pr-validator: rename the
placeholder CHANGELOG entry to its release stamp and rewrite the H1.

Assisted-by: Claude Code Claude Opus 4.8 (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 29, 2026
…ts (#55 step-4 sdk leg) (#111)

Consumer leg (B2) of #55 step-4. deploykit deletes the 13 InstallStep struct
definitions + field-structs (RepoSpec/CacheMountSpec/ArtifactRef) + the view
converters + plan mechanisms (~1330 LOC) and keeps only thin re-export aliases
(OpStep = spec.OpStep, …); step_view_test.go deleted (relocated to spec). The
vocabulary is in-proc IR now sourced from the merged spec contract
v0.2026210.2308. Public surface byte-identical (aliases → same spec types).

Validated fresh + independently by pr-validator: GOWORK=off build/vet/test/gofmt
green vs the real merged spec tag; R5 grep self-test clean; downstream assembled
#55-step-4 tree previously passed check-pod 13/13 + check-builder-vm 10/10.

Assisted-by: Claude Code Claude Opus 4.8 (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 30, 2026
…CHANGELOG (#55 Cone V sdk leg, completes 3d36414)

The prior commit captured only the bundle_del_argv.go deletion (atomic git-add abort
on the already-staged deletion pathspec). This adds the actual relocation: deploy_key_aliases.go
(thin re-exports OpStep-style: DeployKey/ParseDeployKey/BundleDelArgv/DeriveDeploymentName/
OCIEmitStepParams/SaveDeployStateInput = spec.X), the deploy_state/deploy_host_helpers/
oci_target repoints, go.mod/go.sum require bump to spec v0.2026211.549, and the CHANGELOG.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
atrawog added a commit that referenced this pull request Aug 1, 2026
…ag v0.2026213.1726 + SDD sweep + zero-warnings gate

Leg 2 of the 4-leg B2 chain (spec → sdk → plugins → super). The spec leg (#10, merged v0.2026213.1726) relocated the contract + fabric-primitive surface out of the sdk mechanism kits into the opencharly/spec contract module. This leg re-points sdk/go.mod at that merged tag, re-exports every relocated symbol from its kit so every candy call site compiles UNCHANGED, sweeps the sibling sdk/kit comments of the spec leg's SDD fix, and lands the zero-warnings gate the sdk PR's own R10 requires.

What:
- go.mod re-point: require github.com/opencharly/spec bumped v0.2026211.754 → v0.2026213.1726 (the spec leg's merged tag), + go mod tidy.
- SDD comment sweep (sibling to spec leg): the spec leg CUE-sourced StepResult/CheckRunReply/StepPass (DELETING spec/spec/checkresult_wire.go) and narrowed the P12 gengotypes exception to EXACTLY kit.CheckResult's engine-internal DeadlineExceeded bool json:"-". This leg sweeps the sibling sdk/kit comments (checkrun_seam.go + checkresult.go) that still claimed the reply types were the "hand-written wire-mandate exception" — now accurate: both request AND reply are CUE-sourced in spec/schema/checkresult.cue, generated into spec/spec/cue_types_gen.go. Aliases intact (kit.CheckRunReply = spec.CheckRunReply, kit.StepPass = spec.StepPass, kit.StepResult = spec.StepResult).
- Zero-warnings gate: the sdk PR gates the full sdk module, so the #55-introduced lint/gofmt drift that was batched when the per-cone bank gate was ./charly/-scoped now BLOCKS this leg's own R10 and is fixed here (overruling the prior per-cone deferral): gofmt fixes on 9 #55-drifted files; prealloc fix in deploykit/candy_for_plans_test.go; dupl dedup in deploykit/intermediates_move_test.go (shared boxFixt helper, R3).
- CHANGELOG consolidation: the two per-cone CHANGELOG files consolidated into ONE comprehensive narrative mirroring spec PR #10 (one release = one CalVer = one CHANGELOG); the K5 per-cone file folded in and deleted.
- K5 regression fix: loaderkit.LoadBundleConfigViaExecutor returned (nil,nil) for an absent/empty per-host overlay; its drop-in predecessor deploykit.LoadBundleConfig returned a NON-NIL &BundleConfig{}. The check-commands-local reap-orphans-runs step regressed. Restored to &deploykit.BundleConfig{} (non-nil) on absent/empty, matching the pre-K5 contract; false (nil,nil)-on-absent comments corrected (R1 claim-keyed).

Why: charly/ keeps ONLY the E/M/B/D plugin-host fabric; every capability is a plugin candy. The mechanism kits are shared CAPABILITY libraries consumed by PLUGINS, never charly core. This leg re-points sdk at the spec leg's relocated contract + fabric slices, so the downstream super leg can re-point charly/ and the candies off the kits onto the spec slices — the end state git grep 'github.com/opencharly/sdk/(kit|deploykit|buildkit|loaderkit|vmshared)' charly/ is EMPTY.

R10 proof: the sdk leg is a Go contract/library module; its own gate (GOWORK=off) is GREEN — go build ./... ok; go test ./... ok (all packages); golangci-lint run ./... 0 issues; gofmt -l . empty. The runtime R10 roster (disposable check beds that build against the ASSEMBLED step1-fabric tree) runs at the SUPER leg of this B2 chain (the super leg re-points the sdk gitlink to this leg's merged commit and re-runs the fresh-rebuild roster). The full #55 accumulation R10 roster was GREEN driven from the assembled tree: check-pod, check-sidecar-pod, check-substrate, check-exampledeploy, check-commands-local (K5 fix re-verified — reap-orphans-runs PASS), check-charly-vm, check-builder-vm, check-structkind, check-group, check-local, check-doctor-local, check-feature-local, check-udev-local, check-gpu-local, check-preempt-local, check-migrate-local all PASS.

B2 dependency: leg 2 of 4 (spec → sdk → plugins → super). Spec leg (#10, merged v0.2026213.1726) produced the relocated contract + fabric slices; super leg re-points the sdk gitlink + re-runs the fresh-rebuild roster. Plugins leg (#116, docs-only) already merged.

Assisted-by: Claude Code glm-5.2:cloud (fully tested and validated)
atrawog added a commit that referenced this pull request Aug 1, 2026
…tract + spec re-point to v0.2026213.2047

## Leg 2 of the 4-leg import-purity B2 PR chain

**spec (merged, v0.2026213.2047 / ddb7892) → sdk (THIS) → plugins → super.**

The spec leg relocated the plugin-host contract symbols the sdk ROOT package defines into new `opencharly/spec` slice packages, ADDITIVELY (the sdk root kept its definitions). This leg replaces the sdk-root DEFINITIONS with thin re-export shims so every candy/charly call site compiles UNCHANGED, and re-points `sdk/go.mod` at the merged spec tag. It does NOT itself achieve the end-state gate (`git grep 'github.com/opencharly/sdk' charly/` → empty — the super leg lands that); it is the dependency that unblocks it.

### go.mod re-point
- `require github.com/opencharly/spec` bumped `v0.2026213.1726` → `v0.2026213.2047`; `GOWORK=off go mod tidy` clean. The sdk go.mod carries NO `replace` directive (the worktree-replace gotcha did not apply); spec is fetched from the published tag, matching the candies' local-replaced shape.

### Re-export shims (definitions → `type/var/const X = spec/<slice>.X`)
- **spec/transport** (`sdk.go`, `channel.go`) — `ProtocolVersion`, `DispenseKey`, `Handshake`, `IsServeMode`, `Main`, `Serve`, `PluginMap`, `Conn`; Channel* frame-kind consts; `ProviderChannel`, `ChannelProvider`, `ReceiveChannelOpen`, `OpenProviderChannel`, `SequenceGate`, `NewSequenceGate`, `ReplayBuffer`, `NewReplayBuffer`, `CopyChannel`, `RelayChannel`. `grpcPlugin` + `servedBroker` DELETED.
- **spec/exitcode** (`exitcode.go`) — `ExitCodeError`, `CheckFailExitCode`, `CheckSkippedExitCode`.
- **spec/phase** (`phase.go`) — `PhaseBootstrap`…`PhaseRuntime`, `PhaseOrder`, `NormalizePhase`.
- **spec/ops** (`ops.go`, `verb.go`) — 32 `Op*` selectors + `EphemeralPanicMarker`; `ResultJSON`; `InvokeProviderOpts` (from `executor.go`).
- **spec/climodel** (`schema.go`, `validate.go`) — `CLISubcommand`; `ValidateGenerated`, `DecodeGeneratedJSON`. `SchemaValidator` STAYS; `validateCUEValue`/`validateCUEInput` DELETED → delegate to `climodel.ValidateCUEValue`/`ValidateCUEInput` (R3).
- **spec/exec** (`executor.go`, `host_step_deps.go`) — `Executor` (alias, 15 methods), `ExecutorFromInvoke`, `NewInProcExecutor`, `ContextWithExecutor`, `ExecutorFromContext`, `ExecutorForInvoke`, `HostStepDeps`, `ContextWithHostStepDeps`, `HostStepDepsFromCtx`. `servedBroker`, 15 `*Executor` methods, `runErr`, `executorCtxKey`, `hostStepDepsKey` DELETED.

### ⚠️ StepContract decision (the load-bearing high-risk — RDD-spiked)

`sdk.StepContract` (string `Scope` / int `Venue` / string `Gate`, `schema.go`) is the AUTHORING form two candies CONSTRUCT (`candy/plugin-example-stepkind`, `candy/plugin-installstep`). `spec.StepContract` (typed enums) is the form charly core ALREADY uses (`charly/plugin_provider_common.go` builds `&spec.StepContract{Scope: spec.ScopeFromName(...), ...}`). A naive `type StepContract = spec.StepContract` re-export would BREAK the two candy constructors.

**Decision: keep `sdk.StepContract` as the string-scope authoring form (NOT a re-export).** The typed form lives in `spec/spec`; the proto→typed conversion lives in `spec/exec.Executor.DescribeProvider`. The one candy `DescribeProvider` caller (`candy/plugin-installstep/oci_dispatch.go`) reads only `.Emits` (bool, field-identical) via `:=`, so the `sdk.Executor = spec/exec.Executor` alias is call-site-compatible. charly's repoint (super leg) is clean — charly already uses `spec.StepContract` directly.

**BREAKING CHANGE:** `sdk.Executor.DescribeProvider` return type changed from `*sdk.StepContract` (string) to `*spec.StepContract` (typed). Candy callers reading only `.Emits` (the sole existing caller) are unaffected; charly core already uses `spec.StepContract`.

### Files deleted (R3/R5)
- `parentwatch.go` (unexported; relocated to `spec/transport`).
- `channel_test.go`, `parentwatch_test.go` (byte-identical duplicates of `spec/transport`'s tests).

### checkverb.go (kept, edited)
`servedBroker` → `transport.ServedBroker`; `&Executor{client: ...}` (unexported field, illegal under the alias) → `NewInProcExecutor(...)`.

### Scope discipline
Touches ONLY the `sdk` submodule. The re-export shims PERSIST beyond the B2 chain (candies still import `sdk.Serve` etc. via the shims) — NOT transitional-to-delete. `sdk.StepContract` (string authoring form) and `SchemaValidator` are kept sdk-root definitions, not shims.

### Verification (R10 gate for a Go contract module — NO disposable bed; the fresh-rebuild disposable-bed R10 belongs to the SUPER leg against the assembled 4-leg tree)

```
$ GOWORK=off go build ./...   # ok (exit 0)
$ GOWORK=off go vet ./...      # ok (exit 0)
$ GOWORK=off gofmt -l .        # (empty — clean)
$ GOWORK=off go test ./... -count=1
ok  	github.com/opencharly/sdk	0.079s
ok  	github.com/opencharly/sdk/agentkit	0.035s
ok  	github.com/opencharly/sdk/buildkit	0.005s
ok  	github.com/opencharly/sdk/deploykit	0.443s
ok  	github.com/opencharly/sdk/enginekit	0.003s
ok  	github.com/opencharly/sdk/kit	0.313s
ok  	github.com/opencharly/sdk/loaderkit	0.007s
ok  	github.com/opencharly/sdk/vmshared	0.110s
$ GOWORK=off golangci-lint run ./...   # 0 issues
```
R5 grep self-test on the 12 deleted identifiers (`servedBroker`, `watchParentDeath`, `runParentWatch`, `parentWatchInterval`, `grpcPlugin`, `resultWire`, `validateCUEValue`, `validateCUEInput`, `loadGeneratedSchema`, `generatedSchema`, `hostStepDepsKey`, `executorCtxKey`) → zero hits.

### Attribution
Honest ceiling `analysed on a live system` — the live `go test ./...` executed and output is pasted. NOT `fully tested and validated` (that requires a fresh-rebuild R10 on `disposable: true` targets, which does not exist at a contract-module leg; the runtime roster runs at the SUPER leg).

Assisted-by: Claude Code glm-5.2:cloud (analysed on a live system)
atrawog added a commit that referenced this pull request Aug 2, 2026
…pec/clireflect (#116)

The sdk leg of the clireflect mini-B2 (spec → sdk → plugins → super) that dissolves
the `github.com/opencharly/sdk` ROOT package's last fabric-primitive holdout. The
Kong→CLIModel reflection mechanism (BuildCLIModel + its 4 helpers) was relocated
upstream into the NEW kong-bearing spec/clireflect slice (merged spec v0.2026214.434,
PR opencharly/spec#12). sdk/climodel.go's 5 function DEFINITIONS are replaced by a
one-line re-export `var BuildCLIModel = clireflect.BuildCLIModel`, mirroring the
standing sdk re-export-shim convention (validate.go's ValidateGenerated/
DecodeGeneratedJSON). The 4 helpers had zero external callers (whole-tree verified)
and are not re-exported — spec/clireflect owns the single implementation.
candy/plugin-agent (3 call sites) compiles unchanged through the shim;
charly/cli_model_cmd.go repoints directly in the downstream super leg (the step-1
import-purity gate — charly core off sdk ROOT).

BuildCLIModel is a shared fabric primitive (charly core + candy/plugin-agent), so by
the fabric-vs-capability rule it lives in a spec/<slice>, not charly-only (R3) and
not the sdk root (the step-1 gate). spec/clireflect is a SEPARATE slice from
spec/climodel (cuelang-bearing) so kong is contained to the slice that needs it
(Rule 2): consumers needing only CUE validation never pull kong, and consumers
needing only CLI reflection never pull cuelang.

go.mod: require github.com/opencharly/spec v0.2026213.2047 → v0.2026214.434 (go mod
tidy is a no-op on the committed state; go-plugin/grpc reclassified direct→indirect
as a tidy consequence — the sdk root package imports neither directly).

Verification: GOWORK=off go build/vet/test ./... -count=1 ok (all 8 packages — sdk,
agentkit, buildkit, deploykit, enginekit, kit, loaderkit, vmshared; serial + concurrent);
golangci-lint 0 issues; gofmt empty — against the real merged spec tag v0.2026214.434.
Contract module: no disposable bed this leg; the runtime R10 roster runs at the super
leg against the assembled 4-leg tree. The exported KongLeafToCLILeaf (no external
callers, verified) is removed from the sdk root public surface → the ! marker.

Validated by a FRESH pr-validator (independent context): all gates re-run green
against the published spec tag; R5 sweep clean; SDD holds (no .cue touched);
placement CORRECT (shared fabric primitive → spec/clireflect, kong contained per
Rule 2). CalVer 2026.214.0445 finalized at merge.

Assisted-by: Claude Code glm-5.2:cloud (analysed on a live system)
atrawog added a commit that referenced this pull request Aug 3, 2026
…rites at merge)

Assisted-by: Claude Code Claude Fable 5 (documentation reviewed)
atrawog added a commit that referenced this pull request Aug 3, 2026
…#13 → 04c2754b)

The B2 producer landed; the local-resolution note in the PR body is superseded — the module now builds against the published tag (full suite green, output in the PR body update).

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
atrawog added a commit that referenced this pull request Aug 3, 2026
…rity leg

CHANGELOG placeholder renamed + H1 rewritten to the merge-time stamp (sdk
Go-module tag v0.2026215.1806).

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
atrawog added a commit that referenced this pull request Aug 3, 2026
…es, cloud-init provisioning fixes

Relocate the sdk import-purity leg of #55: value types (ResolvedBox, BundleConfig,
ledger records, CloudInitRuntimeParams, the matcher/capability engine) move to
CUE-sourced spec/spec, with thin re-export aliases kept in sdk so the 85+
out-of-tree plugin candies compile unchanged during the migration window.
Engine test suites relocate from charly to sit beside the engines they prove
(deploykit, kit, loaderkit). The cloud-init provisioning chain switches to a
scoped pacman refresh (-Sy --needed) plus an idempotent sshd try-restart
guard, replacing a full -Syu that destabilized live VM guests.

Chain: spec#13 (merged v0.2026215.1748) -> sdk (this PR) -> plugins#123 /
pkg-arch#6 (both merged) -> charly#204 (the super terminus, open, depends on
this merge).

Round-1 pr-validator FAIL (a live unparam finding in a newly-added test file,
deploykit/effective_version_test.go) fixed by dropping the dead
spec.CandyView parameter from newTestCandy across all 4 call sites; verified
independently on a fresh clone with an isolated golangci-lint cache: 0
issues. Full module gate (go build/vet/test, gofmt, golangci-lint) re-run
green by two independent validator passes (pre- and post- gh pr
update-branch, empty file overlap with the concurrent #117 doc fix).

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
atrawog added a commit that referenced this pull request Aug 3, 2026
Two round-2 findings.

THE CITED FILE DOES NOT EXIST. The entry named
`charly/kernel_manifest_floor_test.go` as prose still describing
`deploykit.ResolveSpecBox` as live, and pointed the dead-code batch at it. That
file was deleted from superproject main at 21ab450b, about an hour before this
PR's first commit; `charly/import_purity_test.go:6` records the deletion. The
citation was false when written — I described a rider I had not opened.

The real residue is in `spec`, not `charly`: resolvedproject.cue:331-332 and
buildwire.cue:238 (plus their generated twins) still name the two functions in
the present tense, and `WrapSpecBoxes`' own doc comment claims a charly consumer
that has not existed since the #55 terminus. That makes the separability
argument stronger, not weaker — deleting the three here would drag a spec schema
sweep plus `task cue:gen` into the middle of a four-repo chain.

R10 EVIDENCE NOW IN THE ENTRY, not only in the PR body, and re-run on the
caught-up tree rather than the tree the header was written against. The gate the
plan states is the gate that runs: check-tutorial-shell PASS (steps=13), which
fails without this change because its box composes no supervisord candy and
still gets [program:sshd]; check-migrate-local PASS (steps=6), exercising
ProjectResolvedProject on the deploy path the injection now sits inside. Zero
warnings.

Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
atrawog added a commit that referenced this pull request Aug 6, 2026
* refactor(sdk)!: #55 K-wave2 R1 ruling 1 — loaderkit owns the compiled 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)

* refactor(sdk)!: #55 K-wave2 cone R1 ruling 2 — the render reaches the 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)

* docs(sdk): #55 K-wave2 cone R1 — refs_collect's seam-provenance comment 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)

* refactor(sdk)!: #55 K-wave2 cone R1 A2 — one shared executor-backed refs-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)

* refactor(sdk)!: #55 K-wave2 cone R1 A2 unit 2 — the candy-manifest parse 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)

* refactor(sdk)!: #55 K-wave2 cone R1 A2 unit 3 — the local candy scan 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)

* docs(sdk): #55 K-wave2 cone R1 A2 unit 3b — the namespace walk is plugin-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)

* refactor(sdk)!: #55 K-wave2 cone R1 unit B — one shared spec.DocParser 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)

* refactor(sdk)!: #55 K-wave2 cone R1 unit 3 — CanonicalRef joins the fetch 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)

* refactor(sdk)!: #55 K-wave2 cone R1 unit C — delete the dead primaries 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)

* sdk: repoint the arbiter token normalizer to spec.DedupeNonEmpty + sweep 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)

* sdk: repoint DeriveDeploymentName caller prose to from_box_pod.go (K-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)

* sdk: add kit.ContainerExists — the shared container-existence probe (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)

* sdk: add loaderkit.ResolveVmStateViaExecutor — the shared persisted-VmState 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)

* docs(sdk): sweep StatusInfo comment to spec.DeployTargetStatus

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)

* docs(sdk): point the plan-compile op-context port at its new core home

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)

* docs(sdk): drop the deleted check-run seam from kit/deploykit comments

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)

* docs(sdk): sidecar_resolve header reflects the embed move (K-wave 2 cone 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)

* refactor!(core): dissolve the retention-defaults HostBuild seam (K-wave 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)

* refactor!(core): dissolve the feature HostBuild seam — enumeration moves 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)

* docs(deploykit): sweep the deleted core credential-waiter references (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)

* feat(sdk): KongSubcommands carries hidden fields as Hidden:true — hidden-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)

* docs(changelog): K-wave 2 residue-ledger sdk leg — the terminus entry

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)

* build(sdk): require the published spec v0.2026218.138, drop the local 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)

* docs(changelog): stamp the K-wave 2 residue-ledger sdk leg at 2026.218.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)
github-actions Bot pushed a commit that referenced this pull request Nov 19, 2026
* docs(deploykit): D-CODE-4 sweep, the intermediates subsystem

DESIGN.md:2649 -- D-CODE-4, comments describe present code; history goes to CHANGELOG/.
Eleven history sites across intermediates.go, intermediates_compute.go and
intermediates_move_test.go, rewritten to present tense with every load-bearing reason kept.

The headers said "relocated from charly core (P8b)", "the formerly HOST-COUPLED half", "This half
used to read *Config and stayed in charly core for that reason alone", "the former charly-side
entry point lifted cfg.Defaults ... (removed in #55 Cluster-B)", "the former docstring already
gave". They now state where each half lives, why it is pure over IntermediateDefaults, and the
namespace-boundary rule -- the reasons, without the relocations.

One site is left alone deliberately: "Default UID -- used to decide whether an intermediate
needs a UID suffix" is present tense (is used to decide), not history, and the widened grep
cannot tell them apart.

Comment-only, proven by the canonical git diff filter. build, vet and gofmt clean;
go test ./deploykit/ ok.

This is deploykit second unit. 150 of the 171 widened-class sites remain, named by file and
count in opencharly/opencharly#1147.

Agent: lead
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): finish the move-test block, whose tail still said before the move

The header was rewritten and the sentences flowing from it were not: instead of the

concrete charly *Candy struct the tests used before the move, verified against the

pre-move behaviour, None of the pre-move fixtures, mirrors the pre-move test file.

A comment block is one claim in several sentences, and this PR claimed only the

relocations are gone while four remained in the same block.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): the IntermediateDefaults sentence, which the last fix left ungrammatical

It read exactly the fields a *Config read off cfg.Defaults.* -- past tense and broken. The

rewrite of the sentence above it introduced it, so the block asserted present code and then

narrated a read in the same clause. Now: the cfg.Defaults.* fields, and nothing else.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): drop the phase tags, which name a past campaign, not the code

The body removed the relocations and left (P8b), (W3), (W3/K3) and (W3, task #36) standing

in the same headers. A phase or task id is history in the same sense: it names when the

code moved rather than what it does.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

---------

Co-authored-by: aitrawog <dsh-opencharly@local>
github-actions Bot pushed a commit that referenced this pull request Nov 19, 2026
…ridge (#577)

DESIGN.md:2649 -- D-CODE-4, comments describe present code; history goes to CHANGELOG/.
Twelve history sites across spec_box_resolve.go and compile_service_steps.go, rewritten to
present tense with every load-bearing reason kept.

spec_box_resolve.go said the box-resolve options were relocated to the dedicated spec module in
the #55 loader cascade, that a deploykit-local SpecResolveOpts twin kept only because the loader
options once lived in loaderkit is dissolved, and that ResolveSpecBox / ResolveAllSpecBoxes /
WrapSpecBoxes / SpecBoxes are DELETED with a paragraph on what each one used to feed. It now
says: the options ARE the shared spec.ResolveOpts, there is no deploykit-local twin (R3: one
shape), and the bridge the plugin drives is specToBuildkit + FillNamespaceBoxViews.

compile_service_steps.go said rendering no longer needs a host round trip, that a former
framing was stale, that the former render-service HostBuild CLI-reentry seam is DELETED, and
that a former LoadBuildConfigForBox fallback is DELETED, not ported. It now states the same
facts as the present arrangement: no host round trip is needed because kind:init OpResolve and
verb:egress OpValidate are both compiled-in; renderServiceViaSeam is a thin wrapper over
renderSeamCaller.renderService; and there is no LoadBuildConfigForBox fallback because every
caller receives ActiveInit pre-resolved.

The R3 argument, the R8 byte-proof and the render-prep tolerance are all kept.

Comment-only, proven by the canonical git diff filter. build, vet and gofmt clean;
go test ./deploykit/ ok.

This is deploykit third unit. 150 of the 171 widened-class sites remain, named by file and
count in opencharly/opencharly#1147.

Agent: lead
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

Co-authored-by: aitrawog <dsh-opencharly@local>
aitrawog pushed a commit that referenced this pull request Nov 19, 2026
… behind

The body claimed only the relocations and the phase tags are gone, and fourteen phase

references and one campaign narrative survived -- K3, K5-Unit-1, W3, #55 W3 B4, #67,

K-wave 2 cone R1, S-K5, coneB-buildtail, and the paragraph recounting that five of nine

seams went first.

A phase tag says when the code moved, not what it does; the campaign paragraph is

history D-CODE-4 sends to CHANGELOG. Both are gone; every reason is kept.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
github-actions Bot pushed a commit that referenced this pull request Nov 19, 2026
… construction (#581)

* docs(deploykit): D-CODE-4 sweep, deploy-file and the render-generator construction

DESIGN.md:2649 -- D-CODE-4, comments describe present code; history goes to CHANGELOG/.
Fifteen historical comment sites across deploy_file.go and
render_generator_from_project.go, rewritten to present tense with every load-bearing reason kept.

deploy_file.go said the former trailing-variadic form silently fell back to the process env,
that SaveDeployConfig no longer depends on the DeployStateHost package var, that ExportAllBox
was relocated from charly/deploy.go (K5-Unit-1, the #67 keystone) and that the former
per-deploy version: is GONE. It now says why ctx is REQUIRED (no fail-open fallback exists, so
an omitting caller fails to compile), that the host-coupled leg is injected, that the state
model is built from the SAME envelope inspect/list/validate consume, and that the box overlay
carries no version:.

render_generator_from_project.go said plugin-build's former buildRenderGenerator was the sole
caller, that the whole HostBuild(render-seam) kind is DELETED, that ExtraRef REPLACES the former
ensure-builders host round-trip, and that several seams were closed by P8b/W3. It now states
the shared construction source, that no hostBuild and no render-seam kind exist, and why
on-demand per-word connect needs no second copy of the scan machinery.

Comment-only, proven by the ranged git diff filter. build, vet and gofmt clean;
go test ./deploykit/ ok.

This is deploykit fourth unit. 136 of the widened-class sites remain, named by file and count
in opencharly/opencharly#1147.

Agent: lead
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): drop the phase and campaign tags the first pass left behind

The body claimed only the relocations and the phase tags are gone, and fourteen phase

references and one campaign narrative survived -- K3, K5-Unit-1, W3, #55 W3 B4, #67,

K-wave 2 cone R1, S-K5, coneB-buildtail, and the paragraph recounting that five of nine

seams went first.

A phase tag says when the code moved, not what it does; the campaign paragraph is

history D-CODE-4 sends to CHANGELOG. Both are gone; every reason is kept.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): repair the comment my tag-stripping regex left dangling

Stripping (K1, task #31) left '// : once K1 lands ...' in the StateHostMechanisms block

-- a fragment with no subject. The regex removed a parenthetical and the sentence around it

was not rebuilt, so the result was neither present tense nor English.

The K1-exit task reference goes too: it names when the seam dies, not what it does.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): remove the five relocations the tag-stripping left behind

Stripping (K5-Unit-1) left the sentence it qualified: Relocated from charly/deploy.go

survived five times in deploy_file.go, so the body's claim that only the relocations

and the phase tags are gone was false in the same file.

This is the third time in this PR family that a regex removed a tag and left the sentence

around it: a tag lives inside a sentence, so the sentence is what has to be rewritten.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): rewrite the file header, which was a relocation narrative in one block

deploy_file.go opened with relocated out of charly/deploy.go, the PURE helpers were already

here, and this cutover moved the state-model bodies -- history for a block of eight lines.

It now states what the file holds and lists the same bodies. render_generator's Every

former host-coupled seam becomes Every seam that would need it, which says the same thing in

the present.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

---------

Co-authored-by: aitrawog <dsh-opencharly@local>
github-actions Bot pushed a commit that referenced this pull request Nov 19, 2026
* docs(deploykit): D-CODE-4 sweep, the bed-session header

DESIGN.md:2649. Seven history sites in bed_session.go: the HostRooted trait check formerly

nodeTraits(...), ResolveBedCheckLevel DIED as dead code, no longer requires the

DeployStateHost package var, a CORRECTION to this file's own former prediction, and three

#55 W3 B2-full / #55 U4 promotions.

Each now states the present rule -- deploy.HostRooted is a pure #Deploy-tree read, the

plugin-check bed_persist.go is the sole caller, the reader is injected. The CORRECTION

paragraph becomes what the code does, not what it once predicted.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): the file header, which opened with a relocation and read badly thereafter

bed_session.go line 10 said the check-bed HOST helpers relocated from charly/check_bed_run.go,

and my earlier edit left the SAME pattern stranded on its own line mid-sentence.

The header now opens by saying what the file is, and the provider-registry paragraph runs

as prose: no coupling is load-bearing except ONE classification, which the caller computes

once and threads in.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

---------

Co-authored-by: aitrawog <dsh-opencharly@local>
github-actions Bot pushed a commit that referenced this pull request Nov 19, 2026
* docs(deploykit): D-CODE-4 sweep, the deploy-state ledger

DESIGN.md:2649. Ten history sites in deploy_state.go: seven Relocated from charly/... clauses,

no longer requires the DeployStateHost package var, the former substrate-word sniff, a

residual .Target word-read is DELETED, and a SPIKE (#55 cluster 2) tag.

Each now states the present rule: consult the trait not the word, the reader is injected, the

flock is a kind-blind kit primitive. One past-participle (whether anything was removed) is

left alone -- it describes the operation, not history.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): the '// .' line my relocation strip left dangling

Removing a Relocated from clause and its trailing period left a comment line holding only

the period: '// .'. The regex consumed the sentence and left its punctuation, which is the

same orphan-a-fragment class as '// : once K1 lands' and 'whether anything was removed'.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): the two double periods the strip left behind

Removing a clause that ended with ').' from a sentence already ending in ')' produced 'match)..'

and 'Idempotent..'. Same mechanism as the '// .' line: the regex removed a phrase and left

its punctuation behind, doubled.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): the SPIKE block, which still said moved from charly/deploy.go, P4

The body's summary table promised the value type lives in spec.DeployConfig and the diff

kept --- DeployConfig state container (moved from charly/deploy.go, P4) --- with a SPIKE

(value-type relocation) tag above it.

It now states the shape: the value type IS spec.DeployConfig, every field is a spec.* type,

and the alias is zero-churn.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

---------

Co-authored-by: aitrawog <dsh-opencharly@local>
aitrawog pushed a commit that referenced this pull request Nov 19, 2026
…ders

deploy_members.go opened with (#55 W3 A4, relocated from charly/deploy_members.go) and

builders_render.go carried K-wave 2 cone R1, #55 coneK3tasks and four (C10) references.

A header is where provenance accumulates; the breadth pass swept bodies and left these.

Each now states the arrangement: there is no EnsureBuildersConnected pre-pass, the inline

builder resolve is plugin-side, and the sibling peer: members are what the file brings up.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
github-actions Bot pushed a commit that referenced this pull request Nov 19, 2026
* docs(deploykit): D-CODE-4 breadth sweep, four more files

DESIGN.md:2649. Four files lose their former/relocated/used-to clauses: deploy_members.go's

two HostBuild seams, compile_construct_step.go's moved-verbatim provenance, builders_render.go's

EnsureBuildersConnected note and former structure, and secret_provision.go's two relocation

clauses.

Every reason survives: why the trait beats the registry fallback, why the connect rides ExtraRef

on the resolve Invoke, why the header appears once per builder, and why the slug helper has one

caller.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

* docs(deploykit): the phase tags the breadth pass left in two file headers

deploy_members.go opened with (#55 W3 A4, relocated from charly/deploy_members.go) and

builders_render.go carried K-wave 2 cone R1, #55 coneK3tasks and four (C10) references.

A header is where provenance accumulates; the breadth pass swept bodies and left these.

Each now states the arrangement: there is no EnsureBuildersConnected pre-pass, the inline

builder resolve is plugin-side, and the sibling peer: members are what the file brings up.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

---------

Co-authored-by: aitrawog <dsh-opencharly@local>
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