Skip to content

feat(build): relocate pure-compute build helpers from charly core into sdk (P8b-followup) - #32

Merged
atrawog merged 2 commits into
mainfrom
feat/p8b-followup
Jul 12, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/p8b-followup

Conversation

@atrawog

@atrawog atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

P8b-followup (sdk half) — pure-compute relocations

With the box-build DRIVE now in candy/plugin-build (P8b) and RESOLVE/RENDER host-side, the remaining PURE-COMPUTE build helpers (zero host-coupling — no loader, no *Config, no podman, no provider registry) relocate from charly core into the sdk libraries. Consumer: opencharly/charly (the superproject half repoints to aliases/shims + deletes the core copies, R5).

  • kit/install_dir.go → kit.InstallDirAtomic (pure renameat2(RENAME_EXCHANGE)); kit now imports golang.org/x/sys/unix directly.
  • buildkit/phase_template.go → buildkit.FormatPhaseTemplate / BuilderPhaseTemplate (pure (phase,venue)→template resolvers over spec types).
  • buildkit/system_packages.go → buildkit.RenderSystemPackagesFragment (pure system-packages fragment render; takes decoded scalars so buildkit need not import deploykit — no cycle).
  • deploykit/intermediates.go → the intermediate-image DAG pure funcs (GlobalCandyOrder + trie/graph helpers), re-typed over the CandyModel interface + buildkit.ResolvedBox (the graph_shim pattern). +HasInstallFiles() on the CandyModel interface (charly *Candy already implements it — plain method, no wire type, SDD-clean).

The *Config-reading orchestration (ComputeIntermediates family = the RESOLVE half) STAYS in charly.

Gate — byte-parity is load-bearing (the DAG must be unchanged)

charly box generate -C box/fedora --tag 2026.001.0000 (46 Containerfiles incl. every auto-intermediate): BYTE-IDENTICAL pre-move (funcs in charly core) vs post-move (funcs in sdk) — hash 25852f20… both legs. Independently reproduced by team-lead (fresh sub-agent, clean 933730e PRE checkout). go build ./... + go test ./kit/... ./buildkit/... ./deploykit/... → ok; golangci-lint 0 issues; gofmt clean. sdk main at ccd68e0 → conflict-free.

Assisted-by: Claude (fully tested and validated)

https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif

…o sdk (P8b-followup)

The sdk half of #24. Pure-compute (zero host-coupling) build helpers move from charly core
into the sdk libraries now that the box-build DRIVE is in candy/plugin-build (P8b):
- kit.InstallDirAtomic (pure renameat2 RENAME_EXCHANGE atomic dir-swap)
- buildkit.FormatPhaseTemplate/BuilderPhaseTemplate (pure phase-venue template resolvers)
- buildkit.RenderSystemPackagesFragment (pure system-packages install-fragment render; takes
  decoded scalars so buildkit need not import deploykit — no cycle)
- deploykit/intermediates.go: the intermediate-image DAG pure funcs re-typed over the
  CandyModel interface + buildkit.ResolvedBox (graph_shim pattern); +HasInstallFiles() on the
  CandyModel interface (charly *Candy already implements it; plain method, no wire type)

The *Config-reading orchestration (ComputeIntermediates family = the RESOLVE half) STAYS in
charly. Behaviour-neutral: charly box generate is BYTE-IDENTICAL (pinned --tag, box/fedora 46
Containerfiles incl. every auto-intermediate; the DAG is unchanged) — independently confirmed.

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
@atrawog

atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

(Fresh independent evaluation (I am not the author T-P8b), superproject-rooted, sdk driven via git -C/gh --repo opencharly/sdk. I re-derived the adversarial checks and re-ran the sdk gate live.)

Change class: sdk Go library — pure-compute relocation of build helpers from charly core into the sdk libraries (kit/buildkit/deploykit). No check bed applies; the gate is the sdk module in isolation. Behavior equivalence is the superproject byte-parity (46 Containerfiles, charly box generate byte-identical, hash 25852f20… both legs), independently reproduced by team-lead — I accept it rather than re-run it (a delegated gate confirmed by a non-author party). Head a02244b; base sdk main ccd68e0 — feat contains main (not behind).

The load-bearing adversarial checks (all PASS on my re-run)

  1. deploykit/intermediates.go is Config-FREE (mode-purity): grep 'Config|cfg.|.Defaults' → the only hit is line 17, a comment noting the *Config-reading half (resolvePlatforms/ComputeIntermediates) stays in charly. No actual *Config/cfg.Defaults read. ✔
  2. HasInstallFiles() bool is a plain method on the CandyModel INTERFACE (candy_model.go:34) — not a wire data-carrier struct/param, so no CUE requirement. SDD-clean. No *_wire.go/*.cue/*_gen.go touched → generation gate N/A. ✔
  3. buildkit does NOT import deploykit (no cycle): grep confirms; RenderSystemPackagesFragment takes decoded scalars; intermediates.go imports fmt/slices/sort + buildkit + kit (correct downward layering). ✔
  4. go.mod x/sys indirect→direct is a genuine go mod tidy result: go mod tidy leaves go.mod unchanged — not hand-edited noise (kit/install_dir.go now imports x/sys/unix directly). ✔

Gates I re-ran (verbatim)

go build ./...            -> OK
gofmt -l .                -> clean
go vet ./...              -> OK
go mod tidy               -> go.mod UNCHANGED (x/sys direct genuine)
go test ./kit/... ./buildkit/... ./deploykit/...
                          -> ok kit 3.349s · buildkit [no test files] · ok deploykit · EXIT 0
go test ./...  (whole sdk)-> all ok (kit/deploykit/spec/vmshared/loaderkit/root); EXIT 0
golangci-lint run ./...   -> 0 issues

(buildkit has no unit tests of its own; its new pure funcs FormatPhaseTemplate/RenderSystemPackagesFragment are exercised end-to-end by the consumer byte-parity — the correct coverage model for a behavior-preserving relocation: a break fails the 46-Containerfile parity.)

Decision: APPROVED. The relocation is genuinely pure-compute — Config-free, cycle-free, SDD-clean, and behavior-preserving (byte-identical generate, independently reproduced). The *Config-reading RESOLVE half correctly stays in charly (R2, not deferred), and the core-copy deletion is the consumer/superproject half (producer-first landing, git-workflow B6). sdk build/test/lint/vet all green on my own run. Finalizing the merge-time CalVer, merging --squash, and tagging under the sdk v0.<YYYYDDD>.<HHMM> scheme.

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

Evaluator version stamp for PR #32 — pure-compute build-helper relocation from
charly core into the sdk libraries (P8b-followup). Renames the placeholder
CHANGELOG to the merge-time CalVer and aligns its H1. No behavior change.

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_014ykuqUwq8WCYeBmmzm5VDk
@atrawog
atrawog merged commit f0f37fa into main Jul 12, 2026
@atrawog
atrawog deleted the feat/p8b-followup branch July 12, 2026 18:03
atrawog added a commit to opencharly/charly that referenced this pull request Jul 12, 2026
…ies (P8b-followup) (#80)

The #24 superproject half (consumes opencharly/sdk#32, tag v0.2026193.1801). The pure-compute
build helpers relocated into the sdk libraries; charly core repoints to aliases/shims and
DELETES the core copies (R5). Producer-first: the sdk half landed + tagged before this.

- `installDirAtomic` → `var = kit.InstallDirAtomic`
- `formatPhaseTemplate`/`builderPhaseTemplate` → `var = buildkit.*`
- the intermediates DAG pure funcs → `sdk/deploykit` via the `candyModelMap` adapter
  (new `intermediates_shim.go`); no-caller funcs (graphReaches/topoSortByPopularity/
  sortByPopularity/addTransitiveDeps) fully DELETED; the *Config-reading RESOLVE
  orchestration (ComputeIntermediates family) STAYS core
- `stepEmitSystemPackages` render → `buildkit.RenderSystemPackagesFragment` (delegates)
- sdk gitlink → f0f37fab; `charly/go.mod` require → v0.2026193.1801

R10 (re-run independently by the pr-validator, method-independent byte-parity): built BOTH the
pre-move baseline (main, core copies + old sdk) and this branch (shims + released sdk f0f37fab)
from source and generated box/fedora at the pinned `--tag 2026.001.0000` — all 46 Containerfiles
BYTE-IDENTICAL (diff -q: 0 of 46 differ). R5 grep self-test clean (no stale core def survives).
`go test ./charly/...` green; golangci-lint 0 issues; gofmt clean; go vet clean. Re-verified after
`gh pr update-branch` onto main (#79) — byte-parity holds.

Assisted-by: Claude (fully tested and validated)
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