Repository navigation
feat(deploy)!: K5-Unit-1 Option A — clean kit of R-item, shrink seam, redesign marshal (#67) - #124
Conversation
… redesign marshal (#67) The K5-Unit-1 cutover moved the deploy state-model body into sdk/deploykit (the S-K5 keystone). Option A fixes the incomplete-seam violation it introduced: the kind-blind kit gained a deploy-kind-specific R-item (MarshalBundleNodeLegacy) + the seam threaded 3 ops that are either kind-blind kit primitives or deploy-kind-specific transforms. Option A cleans the kit now; the consumer moves to plugin homes are the immediately-following K4 wave (tracked, not deferred). SDK leg (sdk PR #55, gitlink bumped here): - MarshalBundleNodeLegacy REMOVED from the kind-blind kit (the R-item fix). - Seam shrinks 4-op → 1-op: LatestSchemaVersion → kit.LatestSchemaVersion() direct; AcquireDeployConfigLock → kit.AcquireFileLock(path+".lock", true) direct; MigrateDeployEntity removed. ONE op remains: LoadUnifiedBundleConfig (K1-gated, dies at K1 task #31). E/M: kind-blind loader M, seam-only-because-K1-blocks. - 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 write + fail-safe re-check. SaveDeployState + CleanDeployEntry thread the callback through. Super leg (this commit): - marshalBundleNode: MarshalBundleNodeLegacy + migrateDeployEntity FUSED into ONE clean canonical BundleNode → node-form marshal in charly/deploy_nodeform.go. Legacy name + legacy struct-body shape dropped. Emits node-form directly (disc carries full inline body; nested/peer unwrap to direct siblings). Fixes the latent duplicate-key bug (yaml.Marshal emitted target/nested/peer via yaml tags, then old code APPENDED them again). - migrateDeployEntity DELETED (R5 — dead after fusion). - saveBundleConfigNodeForm(dc): the ONE charly/ helper for the deploy-state writer (R3). ~13 SaveBundleConfig call sites + 4 SaveDeployState + 2 CleanDeployEntry call sites updated to the new callback signature. - deploy_state_host.go init registers ONLY LoadUnifiedBundleConfig (1-op seam). K4-exit: the marshal + the ~12 charly/ deploy-lifecycle consumers stay in charly/ core as tracked K4/K5 inventory; they move to their plugin homes (plugin-bundle / plugin-deploy-pod / plugin-check) in the immediately-following K4 wave of this same operator window. Foreground gates: go test ./charly/ green (85s, incl. round-trip tests); go test ./sdk/... green; golangci-lint 0 issues; task build:charly succeeded; all workspace modules build. Assisted-by: Claude (analysed on a live system)
…gofmt clean - sdk submodule pointer 1f61218 -> 9ec6940 (the merged #55 main commit; same code — the merge produces the canonical main ref per B2) - charly/go.mod require v0.2026196.928 -> v0.2026196.1147 (the merged #55 tag) - gofmt -w deploy_nodeform.go + deploy_state_host.go (gofmt-clean before gate) Assisted-by: Claude (analysed on a live system)
pr-validator — APPROVED ✅PR: #124 — Per-item checklist (independently re-derived — trust nothing)
DecisionAPPROVED. The PR is in full CLAUDE.md compliance. I independently re-derived every item: re-ran the Go gates live (gofmt/golangci-lint/vet/test all clean), ran the SDD Assisted-by: Claude Code Anthropic Opus 4.1 (analysed on a live system) |
… Option A Assisted-by: Claude GLM 5.2 Cloud (fully tested and validated)
…e parsed node (wave: spec 533, sdk 531, plugin-loader 534) (#565) * refactor: F2 — the genericNode dual representation dies (bridge deletion) Parser consolidation F2 (plan/nested-capture-architecture.md, Cutover F2). The dual-representation member-tree IR is gone: node_parsed.go (the JSON→yaml→JSON round-trip machine parsedNodeToGeneric/genericToParsedNode + the normalizeNodeInto test bridge), node_parse.go (the genericNode type), node_candy.go (the yaml-key candyIsImage + buildCandy re-conversion) and node_build.go (decodeNodeValue's wrapper) are DELETED. Their last prod callers (foldCandyKind, validateKindValueCUE, materializeDiscoveredNode) now operate on the wire-safe spec.ParsedNode through the loader seam: - foldCandyKind: pl.CandyIsImage(pn)/pl.BuildCandy(pn) (the loaderkit parsed-node restatement) + the SHARED spec set-body folds (spec.SetBoxInto/SetCandyInto, F2.4) — no genericNode reconstruction anywhere in the dispatch. - validateKindValueCUE: the mapping-shape check reads the canonical JSON body directly; the CUE ingest is CueDocFromJSON (F2.3) — the gn→yaml.Marshal→CueDocFromYAML round trip is gone. - materializeDiscoveredNode: pl.CandyIsImage(pn) (F2.1). - materializeDocStream: the ONE loaderkit doc-stream composer (pl.ParseDocStream, F2.5) drives the embedded-vocab stream with the same per-document pipeline as the file walk; the hand-rolled classify/gate/parse loop is deleted. - The three self-labeled (R3) one-line wrappers (isStandaloneResourceKind, foldStandaloneTemplateReply, decodeNodeValue) are inlined at their call sites / die with buildCandy; node_normalize.go disappears, ensureMap moves beside its consumer. - pluginPrimaries (F2.6): the frozen 11-entry table is DELETED — the table is seeded at init from the compiled-in units' declared capability primaries (the embedded charly.yml verb_primaries: data directive, admitted by #NodeDoc), and the expectation is a parity assertion (node_desugar_test.go). - KindProvider (the last type naming genericNode) + its no-op bijection gate die with the type; the reserved-registry test iterates the live ClassKind registry instead. - R5 sweep: stale claims about the deleted bridge fixed across loader_threaded.go / plugin_prescan.go / materialize.go / materialize_seam_parity_test.go / plugin_inproc.go / the kernel manifest. - Moved tests: the bridge test files' candy/child-form coverage lives beside the loaderkit implementation in sdk (candy_node_test.go, node_childform_test.go); the charly-side plugin e2e + node-form tests were rewritten against parsed-node fixtures (parsednode_helpers_test.go). Full kernel suite green on the committed tree (with the wave's worktree replaces; the final pin commit swaps them for the released tags). * fix(deps): pin the F2 wave tags — spec v0.2026251.533, sdk v0.2026251.531, plugin-loader v0.2026251.534 The F2 bridge-deletion wave's seam surface + implementations are released (spec #123/#124, sdk #240, plugin-loader #8). The dev worktree replaces are dropped; the full kernel suite is green on the final committed real-pinned tree. * chore: re-trigger validator with the A2/A3 bed evidence (pod 2026.251.0621 + VM 2026.251.0627, both PASS)
K5-Unit-1 Option A — clean the kit of an R-item, shrink the seam, redesign the marshal
The K5-Unit-1 cutover (the S-K5 keystone that unblocks P13) moved the deploy
state-model body from
charly/core intosdk/deploykit(a kind-blindmechanism kit). The original move contaminated the kind-blind kit with a
deploy-kind-specific transform (
MarshalBundleNodeLegacy) and threaded FOURcore-coupled ops through the
DeployStateHostseam. Option A fixes thatincomplete-seam violation. The SDK leg landed as sdk PR #55 (merged
9ec6940, tagv0.2026196.1147); this PR is the super leg — the gitlinkbump to that merged sdk commit + the super-side
charly/deploy*.gochanges.What this PR does
SDK leg (sdk PR #55 — MERGED
9ec6940):MarshalBundleNodeLegacyfromsdk/deploykit— the R-item that contaminated the kind-blind kit.MigrateDeployEntity+LatestSchemaVersion+AcquireDeployConfigLockfrom theStateHostMechanismsseam.LatestSchemaVersion→kit.LatestSchemaVersion()directly;AcquireDeployConfigLock→kit.AcquireFileLock(path+".lock", true)directly.SaveBundleConfigas a kind-blind shell taking amarshalNodecallback (version-stamp + provides-marshal + write-temp-rename + fail-safe re-check).LoadUnifiedBundleConfig— K1-gated, dies when K1 relocates LoadUnified to loaderkit, task feat(spec): adopt sdk/spec InstallPlan IR enums (P4-unit-1 consumer) #31).Super leg (this PR — head
f34339f, merged up-to-date with main):MarshalBundleNodeLegacy+migrateDeployEntityinto ONE clean canonicalmarshalBundleNodeincharly/deploy_nodeform.go(no intermediate legacy-body, no separate migrate step; UNWRAPS nested/peer as direct siblings of the discriminator).saveBundleConfigNodeForm(dc)— the ONEcharly/helper (R3) supplyingmarshalDeployNodeas the callback.charly/SaveBundleConfigcall sites →saveBundleConfigNodeForm.SaveDeployState+CleanDeployEntrycall sites with themarshalDeployNodecallback param.LoadUnifiedBundleConfigindeploy_state_host.goinit (1-op seam).migrateDeployEntity(dead after fusion — R5).sdkgitlink to the merged Option A sdk commit9ec6940+charly/go.modrequirev0.2026196.1147.North-star rubric
charly/core LOC toward the ~6.9k floor (494 insertions, 1028 deletions);MarshalBundleNodeLegacyremoved fromsdk/deploykit);deploy_nodeform.goimports spec+yaml.v3 only; no newcharly/kit import, no new alias file — body-move exception).Tracked K4-exit inventory
The marshal + helper + ~12 deploy-lifecycle consumers live in
charly/core until K4 moves them to their plugin homes (plugin-bundle / plugin-deploy-pod / plugin-check). The violation K5 fixed was the marshal sitting in a kind-blind KIT, not core — an R-item in core tracked-for-extraction is the legitimate transient K-wave state (task #52 dissolvesdeploykit_state_aliases.go+ the residual deploykit imports in the next K4 consumer-move batch).R5 grep self-test
All deleted identifiers (
MarshalBundleNodeLegacy,migrateDeployEntity,MigrateDeployEntity,AcquireDeployConfigLock,LatestSchemaVersionseam field) appear ONLY in CHANGELOG files.R10 evidence (pasted — the changed deploy state-model paths executed LIVE on disposable beds, fresh-rebuild)
The deploy state-model is a shared-state path → the R10 gate is the disposable bed roster run CONCURRENTLY at max parallelism (the concurrency is part of the test — a serial-green gate does not prove a shared-state path). Per-worktree
bin/charly(2026.196.1203) via PATH-prepend, never installing over the shared binary. All 5 beds PASS, exit 0, ZERO warnings (each bed'supdatestep is the freshcharly updaterebuild):Every bed's
summary.ymlrecordsok: true+ exit 0 (the genuine-pass discriminator; exit 3 would be a prereq-skip — none here). The changed paths (marshalBundleNode/saveBundleConfigNodeForm/ the 1-opLoadUnifiedBundleConfigseam) are on every bed's deploy-add → config → update route.Delta re-gate after merging main (the FINAL code, head
f34339f)main advanced via #123 (
fa77de5: ZERO-ALIASES hook + CLAUDE.md hooks-doctrine + plugins gitlinkc30881e). Merged main into feat — clean (ort, zero conflicts); file overlap = EMPTY (#123 touched{gate_test.py, pre-commit-gate.sh, CHANGELOG/2026.196.1205.md, CLAUDE.md, plugins}; this PR touched{charly/deploy*.go, go.mod, sdk gitlink, CHANGELOG/2026.196.1102.md}). Per C4 (empty overlap → rebuild + go test + lint, no bed re-run — the merge brought zerocharly/*.gochanges so the binary behavior the beds validated is identical):Foreground gates (pre-merge, this worktree)
go test ./charly/— PASS (84.5s, incl. TestOverlayRoundTrip_NestedChildSurvives + TestOverlayRoundTrip_GroupMembersSurvive)go test ./sdk/...— PASSgolangci-lint run ./charly/...— 0 issuestask build:charly— succeeded (R9)R0–R10 checklist
marshalBundleNode+ ONEsaveBundleConfigNodeFormhelper (no duplication)updatestep), pasted abovetask build:charlysucceededcharly/kit import, no new alias file)9ec6940); this super PR bumps the gitlink to that merged commitAssisted-by: Claude GLM 5.2 Cloud (fully tested and validated)— 5 beds passed on the fresh rebuild, the changed deploy state-model paths executed live, both exploratory + final-roster outputs pastedAssisted-by: Claude GLM 5.2 Cloud (fully tested and validated)