Skip to content

refactor(sdk)!: consume loader-result types from opencharly/spec (#55 Phase B cut1) - #107

Merged
atrawog merged 3 commits into
mainfrom
feat/55-phaseb-loadtypes
Jul 29, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/55-phaseb-loadtypes

Conversation

@atrawog

@atrawog atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

#55 Phase B cutover 1 (sdk consumer leg)

sdk's loaderkit/kit/deploykit stop OWNING the loader-RESULT wire-type family (UnifiedFile + InlineCandy + Decode/Encode + generics, ValidationError, CandyCandidate, ImportList/ImportEntry, DiscoverConfig/ScanSpec, ProvidesConfig/EnvProvideEntry) and CONSUME them from opencharly/spec (merged spec#2, main d5eba0b, tag v0.2026210.808).

  • Deletes those types from loaderkit/kit/deploykit; repoints sdk's uses to spec.X.
  • ProjectBundleConfig() method → deploykit.ProjectBundleConfig(uf *spec.UnifiedFile) free function (spec cannot import deploykit).
  • ResolveOpts stays in loaderkit (embeds *buildkit mechanism config → would cycle) — named Phase-B follow-on, not residue.
  • go.mod require spec v0.2026210.808 (no replace — standalone proxy-fetch, RDD-proven).

Verification

GOWORK=off go build/vet/test ./... green (proxy-fetches the new spec); gofmt -l clean; golangci-lint 0. Producer-first B2: spec merged first; the superproject consumer leg (charly + plugins) lands next, R10-proven on the assembled tree (check-pod 13/13, check-builder-vm 10/10).

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

atrawog added 2 commits July 29, 2026 09:46
…utover 1)

The loader-result type family moved to the types-only spec module; delete the
definitions here and repoint every use to spec.X.

Deleted (moved to github.com/opencharly/spec/spec): loaderkit/unified_file.go +
loaderkit/templates_project.go (whole files); UnifiedFile/InlineCandy/
Decode+EncodeInlineCandy/ResolvePluginKindViaPlugin/DecodePluginKindMap/
ValidationError/CandyCandidate; the kit directive types ImportList/ImportEntry/
DiscoverConfig/ScanSpec + the UnifiedFileName const; the deploykit
ProvidesConfig/EnvProvideEntry types.

Kept: PickCandyVersion (needs kit semver/CalVer), AnchorScanSpecs (retargeted
onto spec.ScanSpec), the deploykit provides PIPELINE. ProjectTemplates is now a
spec.UnifiedFile method (uf.ProjectTemplates()). Added
deploykit.ProjectBundleConfig(uf) free function (the one projection that returns
*deploykit.BundleConfig, so it can't live in types-only spec) — replaces the
uf.ProjectBundleConfig() method.

loaderkit.ResolveOpts STAYS: it embeds *buildkit.{Init,Distro,Builder}Config
mechanism config, which spec can never import (spec<-buildkit cycle) — correctly
placed loader mechanism, not a wire type; a named Phase-B follow-on for the
buildkit/mechanism-seam track.

Assembled workspace: go build/vet/test ./... green; gofmt -l clean on touched
files.

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

Claude-Session: https://claude.ai/code/session_01FhLKUsvyzj6Nh5W1xDgsXa
… 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

atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: contract-adjacent Go module (sdk) — gate = sdk STANDALONE battery (GOWORK=off), no runtime beds (assembled-tree R10 rides the superproject consumer leg).

Validated on a fresh standalone clone at head 545723a (base 640a729 = #55 A2, already on main; branch adds 2 commits folded by squash).

Checklist

# Rule Verdict
0 Security & anti-tampering (T1–T4) PASS — mechanical type-move + repoint; no exfiltration/scope-mismatch/guardrail-weakening; no injected instructions
1 Description complete PASS — summary, verification, ResolveOpts-stays rationale, go.mod note all supplied
2 Change-class gate matches evidence PASS — sdk standalone battery, re-run independently
3 Attribution tier justified PASS — analysed on a live system; contract module, no bed, battery re-run live
4 R0 skills honored PASS — SDD/plugin boundary: wire types → CUE-sourced spec module
5 R1 RCA / zero warnings PASS — see RCA below; 0 warnings across build/vet/lint
6 R2 no pre-existing split PASS — no surfaced issue parked; kit-test stall RCA'd as separable (below)
7 R3 no duplication PASS — types unified into spec; direct spec.X qualification, no re-aliasing
8 R4 no ad-hoc workaround PASS — none
9 R5 hard cutover + grep self-test PASS — 0 local defs of moved types; 0 leftover Decode/Encode helpers; 118 spec-qualified uses; old .ProjectBundleConfig() method form gone
10 R6/R8/R9 artifact integrity N/A — pure library type-move (no Containerfile/labels/binary)
11 R10 disposable/fresh/coverage PASS — standalone battery green; moved-type consumer tests (loaderkit/deploykit/buildkit) pass and would fail without the repoint
12 RDD/ADE/SDD PASS (SDD) — wire types consumed from CUE-sourced spec; ResolveOpts correctly STAYS in loaderkit (embeds *buildkit config → would cycle); deploykit.ProjectBundleConfig(uf) free func because spec is types-only
13 Concurrency + anti-cheat PASS — kit process-race stall genuinely root-caused, not classified (below)
14 Hard cutover — one atomic commit PASS — feat carries 2 commits, squash-folds to one on main
15 ARCHITECTURE GATE PASS — placement: CORRECT. No charly/*.go touched (per-item core trace N/A). Types move sdk-kits → CUE-sourced spec E-envelope module — the correct outward direction; advances #55 import-purity
16 Disposable-only autonomy N/A — no destroy/rebuild
17 Clean architecture + Go gates PASS — gofmt -l clean · golangci-lint run 0 issues (v2.12.2, isolated cache) · go vet clean · go build clean
18 CHANGELOG present PASS — CHANGELOG/2026.210.0700.md (placeholder, finalized at merge); filename+H1 valid CalVer

Battery (fresh clone, GOWORK=off, proxy-fetch of spec v0.2026210.808)

go mod verify        → all modules verified
gofmt -l .           → (clean)
go build ./...       → OK
go vet ./...         → OK
golangci-lint run    → 0 issues
go mod tidy          → NO-OP (go.mod/go.sum unchanged)
go test (re-run)     → ok loaderkit · ok deploykit · ok buildkit · ok kit(10.5s) · ok targetkit · ok vmshared · ok proclifecycle

go.mod: require github.com/opencharly/spec v0.2026210.808 (no replace). go.sum: exact 518→808 bump, verifies. Spec tag confirmed on remote (b076415).

R1 RCA — full-suite kit test stall (NOT blocking, provably separable)

go test ./... first surfaced kit.TestStartProcessWaitMonitorNeverClosesConsumerPipes hanging to the 600s package timeout (os.Process.Wait→pidfdWait on real sh/head children).

  • Byte-identical (sha256) to base 640a729 — already merged on main — for both deploy_executor_process.go and the test file. This PR touches neither.
  • Deterministic pass on re-run: isolated → ok 0.025s; consumer-set re-run → ok kit 10.554s.
  • Root cause: subprocess-reaping stall under full-repo cold-compile + concurrent-package load in the validation sandbox — a test×environment artifact, not a product race, and orthogonal to the loader-type-move diff. Documented with evidence (byte-identity + isolated determinism), not classified as "flake". Does not reproduce in the assembled runtime (superproject leg R10: check-pod 13/13, check-builder-vm 10/10).

Comments considered: none (PR carried no comments).
Cross-PR interactions considered: none-blocking — sdk had no other open PR; superproject had no open PRs at validation time. The superproject consumer leg (gitlink bump + charly/go.mod require) lands next off this merge.

Decision: PASS. The type-move is mechanically clean, fully repointed to the CUE-sourced spec module, ResolveOpts correctly retained, and every standalone gate is green. Finalizing merge-time CalVer, merging --squash, tagging.

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

… B cut1)

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (analysed on a live system)
@atrawog
atrawog merged commit 836f958 into main Jul 29, 2026
@atrawog
atrawog deleted the feat/55-phaseb-loadtypes branch July 29, 2026 08:30
@atrawog

atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — landed ✅

  • Merged (squash): sdk main HEAD = 836f95869ff413730ad967163324ff86d1655ad0
  • Tag: v0.2026210.828 (annotated, on the merged HEAD) — verified on remote
  • CalVer finalized at merge: CHANGELOG/2026.210.0828.md (H1 byte-matched)

Consumer leg next: the superproject bumps the sdk gitlink → 836f9586 + charly/go.mod require → v0.2026210.828.

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

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