Repository navigation
feat(build): build-resolve drive-model wire + shared image-build lock (P8b sdk half) - #31
Merged
Merged
Conversation
… (P8b sdk half)
The sdk contract half of P8b (the box-build podman DRIVE moves into candy/plugin-build;
charly's host side becomes a resolve/render seam provider).
- schema/buildresolve.cue → generated spec.BuildResolveRequest/BuildResolveBox/BuildResolveReply:
the HostBuild("build-resolve") seam envelope (CLI build inputs + GenerateOnly in; the resolved
drive-model out — engine/platform, Order⊻Levels, per-image descriptors, resolved tunables). All
plain/nested structs; Levels [][]string generates faithfully (no disjunction, no RawBody).
- kit/filelock.go → ImageBuildLockPath + AcquireImageBuildLock: the per-image build-lock derived
byte-identically across the module boundary (R3), so charly core and the compiled-in
candy/plugin-build share one lock (shared intermediate builds cold once; leaves fan out).
- deploy_wire.go BuildRequest comment R5-swept (the "engine STAYS host-side" claim corrected).
The transitional spec.MergeRequest/MergeReply the HostBuild("merge") seam uses are OWNED by P14a's
oci.cue (sdk#28, landing first); this branch rebases onto it and imports them (no parallel shape, R3).
Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
…rop transitional local copy sdk#28 (P14a's oci.cue MergeRequest/MergeReply) is merged into sdk main. Per the one-home dedupe ruling, delete the transitional #MergeRequest/#MergeReply from schema/buildresolve.cue (kept only for pre-#28 compilation) and regenerate — cue_types_gen.go now carries P14a's single MergeRequest (ImageRef/MaxMB/MaxTotalMB/Engine/DryRun) + MergeReply, which the HostBuild("merge") seam + the candy import. buildresolve.cue defines only the BuildResolve* family now. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
Contributor
Author
pr-validator — APPROVED ✅Change class: charly/sdk Go — producer wire types (CUE-sourced) + a shared Checklist
Decision: Independently re-derived in a fresh clone at Assisted-by: Claude (analysed on a live system) |
atrawog
added a commit
that referenced
this pull request
Jul 15, 2026
…am to 1-op (#67) ## 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 GLM 5.2 Cloud (analysed on a live system)*
aitrawog
pushed a commit
that referenced
this pull request
Nov 19, 2026
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)
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P8b sdk half — the build-resolve drive-model + the shared image-build lock
The sdk contract for P8b (the box-build podman DRIVE moves into
candy/plugin-build; charly's host side becomes a resolve/render seam). Consumer: opencharly/charly#70.schema/buildresolve.cue→ generatedspec.BuildResolveRequest/BuildResolveBox/BuildResolveReply(CUE-sourced, SDD). TheHostBuild("build-resolve")seam envelope: CLI build inputs +GenerateOnlyin; the resolved drive-model out (engine/platform,Order⊻Levels, per-image descriptors, resolved tunables). All plain/nested structs —Levels [][]stringgenerates faithfully viacue exp gengotypes(no disjunction, no RawBody).kit/filelock.go→ImageBuildLockPath+AcquireImageBuildLock— the per-image build-lock derived byte-identically across the module boundary (R3), so charly core + the compiled-in candy share one lock.spec/deploy_wire.go—BuildRequestcomment R5-swept.This branch's
schema/buildresolve.cuecarries a TRANSITIONAL#MergeRequest/#MergeReply(identical to T-P14a's finalized shape in sdk#28schema/oci.cue) ONLY so P8b compiles before #28 merges. Merge order: #28 FIRST, then this branch rebases onto merged main and DELETES its transitional MergeRequest/MergeReply (importsspec.MergeRequest/MergeReplyfrom #28, same shape → zero code change), rerunningtask cue:gen. One home = oci.cue (team-lead ruling). Do not merge before #28 + the rebase.Gate
task cue:genreproducible;go build ./...+golangci-lint run(kit + spec) → 0 issues; the types are exercised end-to-end by the consumer's realcharly box build(opencharly/charly#70 R10).Assisted-by: Claude (fully tested and validated)
https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif