Skip to content

refactor(sdk)!: #55 import-purity — spec re-exports, engine test suites, cloud-init provisioning fixes - #118

Merged
atrawog merged 22 commits into
mainfrom
feat/55-import-purity-sdk
Aug 3, 2026
Merged

atrawog merged 22 commits into
mainfrom
feat/55-import-purity-sdk

Conversation

@atrawog

@atrawog atrawog commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

The sdk consumer/re-export leg of #55 (fe0e1d2→442cd6e). Full commit narrative in CHANGELOG/2026.215.1930.md (placeholder CalVer, H1 filename-matched). Concretely:

  • Re-exports, zero-churn for all 85 plugins: ProvidedCapability/StepContract → spec/capability aliases; MatchAll/MatchValueString(s) → spec var re-exports; ResolvedBox = spec.BuildResolvedBox; BundleConfig = spec.BundleConfig (its 3 kit-dependent methods DEMOTED to deploykit free functions — DeployedContainerNames/OccupiedHostPorts/GlobalEnvForImage; the 8 candy call sites updated in the super leg); kit ledger records + LedgerSchemaVersion + vmshared.CloudInitRuntimeParams aliased.
  • Engine test suites relocated from charly beside the engines they prove: deploykit plan_compile_test.go (first direct CompileOpSteps/CompileServiceSteps coverage, 12 tests) + enc/quadlet/preempt/apk/effective-version/bed-persist-writer/deploy-state-writer/venue-builder/init-def-label/bootstrap; kit checkvars/planvalidate/RunPlan-semantics/ProbeNeverHang; loaderkit validate-ephemeral/bakeplugin; buildkit render_test.go.
  • cloud-init provisioning chain (R10-roster-driven, guest-journal-evidenced): pacman is -Sy --needed (scoped refresh+install; the -Syu experiments' three failure layers documented in the chain's messages) + the sshd try-restart guard.
  • 442cd6e build(deps): spec pinned to the MERGED tag v0.2026215.1748 (spec#13 → 04c2754b) — the earlier local-resolution note is superseded.

Change class

charly-or-sdk Go (cross-repo consumer leg). Chain: spec#13 (MERGED v0.2026215.1748) → sdk (this) → plugins#123 (MERGED v2026.215.1738) / pkg-arch#6 (MERGED v2026.215.1737) → charly#204.

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: the full module suite against the MERGED spec tag + the super terminus roster (charly#204) whose binary compiles THIS sdk content (gitlink-pinned).
  • Eval beds run: in charly#204's terminus — check-pod | pod | ok | 13 | ~200s · check-group | group | ok | 7 | ~300s · check-sidecar-pod | pod | ok | 17 | ~600s · check-builder-vm | vm | ok | 10 | ~500s · check-local-vm | vm | ok | 8 | ~503s · check-k3s-vm | vm | ok | 8 | ~380s — all exit 0, ONE binary 2026.215.1641, concurrent (.check run-calvers 2026.215.1641–1654). check-local-vm + check-k3s-vm are DIRECT witnesses of the cloud-init chain (their guests were provisioned by it live).
  • Fresh rebuild: the roster's task build:binary compiled charly against this sdk content (R9); the module gate below runs on the published spec tag.
  • Did the CHANGED code path execute live? Yes — aliases compile every consumer; the relocated suites ARE the changed paths and ran; RenderCloudInit's final form provisioned both VM beds' guests.
  • Concurrency: the super roster's 4-way concurrent final sweep; sdk's suites are unit-scope.
# after 442cd6e (spec = the MERGED v0.2026215.1748):
$ GOWORK=off go build -buildvcs=false ./... && GOWORK=off go test -buildvcs=false -count=1 ./...
BUILD_OK
ok  	github.com/opencharly/sdk	0.131s
ok  	github.com/opencharly/sdk/agentkit	0.069s
ok  	github.com/opencharly/sdk/buildkit	0.011s
ok  	github.com/opencharly/sdk/deploykit	0.443s
ok  	github.com/opencharly/sdk/enginekit	0.003s
ok  	github.com/opencharly/sdk/kit	0.390s
ok  	github.com/opencharly/sdk/loaderkit	0.007s
ok  	github.com/opencharly/sdk/vmshared	0.109s
GATE_EXIT=0
(gofmt -l clean; go vet clean; the identical suite previously green against the branch-local spec content — same tree as the tag)

Attribution tier

analysed on a live system — module suites live against the merged tag + the roster's live provisioning; charly#204 owns the fresh-rebuild bed evidence.

Harness rulebook compliance

  • R0 skills loaded across the cones. R1 every cloud-init failure layer RCA'd from guest journals; zero warnings. R2 all round findings fixed in place. R3 one alias per symbol; the demotion swept all call sites. R4 try-restart (idempotent unit op) + scoped -Sy: minimal primitives, no sleeps. R5 no dangling old syntax (whole-tree grep in the super leg). R6 no destructive tree ops. R7 the roster, not unit tests, is the acceptance. R8 N/A (no Containerfile surface). R9 the roster binary rebuilt from source. R10 table above; disposable-only; fresh-rebuild steps included. RDD the value-type + checkrun spikes preceded authoring. ADE N/A. SDD aliases only — no new hand-written wire type. Hard cutover the aliases are the permanent re-export architecture. Boundary law placement CORRECT (sdk = the capability layer keeps the engines; contracts moved out). Disposable autonomy confirmed. Go gates build/vet/gofmt/lint clean. CHANGELOG staged, H1 matched.

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

https://claude.ai/code/session_015CXB8CkzwZeXPzbqKjsuYj

atrawog added 16 commits August 3, 2026 09:23
…hAll from spec (import-purity)

- schema.go: ProvidedCapability + StepContract → type aliases re-exporting from spec/capability (the 92 plugin candy call sites compile UNCHANGED); spec/spec import dropped (no longer used here), spec/capability added. CLISubcommand alias (climodel.CLISubcommand) kept — resolves through spec/climodel's re-export to capability.CLISubcommand. BuildCapabilities compiles UNCHANGED (alias = same type).
- matchers.go: MatchAll + MatchValueString + MatchValueStrings → var re-exports from spec/spec (mirrors the clireflect var-BuildCLIModel precedent); private matchOne/matchNumeric dropped (moved to spec/spec, exercised by its own matchers_test.go). type Matcher = spec.Matcher kept.
- matchers_test.go: TestMatchers kept (exercises the re-exports); 2 private-matchOne tests (TestMatcher_AllowlistRunnerSync, TestMatcher_AllOperators) moved to spec/spec/matchers_test.go.
- go.mod carries NO local replace (workspace resolution provides local spec; terminus sets the real tag).

GATE: go build ./... ok (local workspace resolving spec); go test ./... ok (sdk + 7 kits); gofmt clean.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
…OnlyVar

Relocated from charly/check_members_test.go (the #55 decoupling cone, Batch
D): TestFilterHostVars and TestEffectiveEnv_HostVarsOverlay/
_NoHostVarsReturnsBase assert kit's own behavior directly with zero charly
coupling, so they belong in kit's own test suite rather than charly/. The
HOST:web:8080 compound-key case is folded into the existing
TestIsRuntimeOnlyVar table (R3 — extends coverage instead of duplicating it).
Relocated from charly/*_test.go (the #55 decoupling cone, Batch D):
empty-op no-verb failure, variable expansion (resolved + unresolved skip),
unresolved-${HOST:...}-fails-vs-other-unresolved-skips, SkipDeterministicRun
skipping a deterministic run: install step while agent-run: is not swept up
as one, and per-step Origin re-stamping from the owning LabeledDescription.
All assert kit.RunOne/kit.RunPlan's own wrapper semantics, driven through the
existing fakePlanContext/fakeVerbResolver fixtures (planrun_test.go) rather
than a directly-constructed charly hostVerbResolver — the construction path
production no longer uses (the plan-walk engine moved plugin-side in the #55
CHECK-ENGINE cone). fakeVerbResolver now also captures the full *spec.Op it
last saw, for asserting post-expansion/post-stamping field values.
…overage

Relocated from charly/poll_probe_neverhang_test.go (#55 decoupling cone,
Batch D): Runner.ProbeNeverHang's floor-vs-author-timeout calculation, and
the load-robustness regression guard proving a single wedged probe is
cancelled INDIVIDUALLY at ProbeTimeout while the pass continues to the next
probe. Driven via r.Run against a real Runner with a tight ProbeTimeout and a
commandVerbResolver dispatching to Exec().RunCapture (mirroring the real
compiled-in command verb), so RunOne's own per-probe ctx-shadow — not
test-only plumbing — is what cancels the wedge.
…onfig/ledger records/CloudInitRuntimeParams onto spec

Second leg of the 3-repo B2 (spec -> sdk -> super): every call site that
used to reference the sdk-native struct definitions now reads through a
zero-churn type alias onto the spec.* types the previous spec-leg commit
added, so every existing composite-literal / field-selector call site
compiles unchanged.

- buildkit.ResolvedBox = spec.BuildResolvedBox
- deploykit.BundleConfig = spec.BundleConfig (Lookup/LookupKey moved with
  the type as spec methods)
- kit.DeployRecord/CandyRecord/StepRecord = spec.DeployRecord/CandyRecord/StepRecord
- kit.LedgerSchemaVersion = spec.LedgerSchemaVersion
- vmshared.CloudInitRuntimeParams = spec.CloudInitRuntimeParams

BREAKING (method-set cut): BundleConfig.DeployedContainerNames/
OccupiedHostPorts/GlobalEnvForImage were METHODS that reach sdk/kit
(ContainerNameInstance/IsAutoPort/ParseHostPort) — spec can never import
sdk/kit, so they demote to deploykit FREE FUNCTIONS taking *BundleConfig
as the first parameter (deploykit.DeployedContainerNames(dc), etc). A
whole-tree grep (charly/ + every candy incl. out-of-work + sdk itself)
found exactly 8 call sites, all in candy/plugin-deploy-pod — fixed in the
matching candy-leg commit.

Verified: sdk builds + full test suite green against the new spec commit
(via a local, uncommitted go.work override — go.mod's require stays on
the last published spec tag until that tag is cut), gofmt/vet clean.

Assisted-by: Claude Code claude-sonnet-5 (analysed on a live system)
…overage

Neither compiler sub-function had isolated test coverage anywhere in the
repo before this (confirmed by a repo-wide grep): CompileOpSteps was only
ever exercised transitively via BuildDeployPlan or charly's own narrow
verb-routing tests; CompileServiceSteps had exactly one direct caller,
scoped to distro filtering alone. Adds 12 tests covering run-step
filtering, runtime-only-context skipping, non-plugin-verb purity (zero
HostBuild calls), the construct-step HostBuild round trip both ways
(empty-reply fallback and typed-step-reply decode with reversals intact),
error propagation, and the full service-lowering matrix (packaged vs
custom, machine-venue gating, mixed-pair polymorphism, per-distro
filtering, the render-service HostBuild round trip).

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
Claude-Session: https://claude.ai/code/session_015CXB8CkzwZeXPzbqKjsuYj
…rly (#55 K4 cone3)

charly/enc_test.go's remaining 6 tests (TestQuadletWithBindMounts +
TestQuadletWithEncryptedBindMountsKeyring/NonKeyring + TestQuadletWithoutEncryptedMounts +
TestCryptoPasswdRequiresUnmount + TestCryptoPasswdPasswordMismatch) were pure GenerateQuadlet/
QuadletConfig/ResolvedBindMount/IsEncryptedMounted/AskPassword/EncryptedPlainDir assertions with
zero charly dependency. Diffed against the existing quadlet_test.go (has plain-Volumes coverage
but no encrypted-bind-mount/keyring-backend/crypto-service paths) and enc_probe_test.go (covers
the probe helpers but not the mock-driven CryptoPasswd flows) — confirmed non-duplicate, so
relocated same-package-unqualified rather than deleted.

Assisted-by: Claude Code Sonnet 5 (analysed on a live system)
Relocate the deploykit/loaderkit-testing portions of 6 charly test files
(apk_format_test.go, refs_test.go, effective_version_test.go,
ephemeral_classification_test.go, preempt_schema_test.go, checkspec_test.go)
into their owning sdk kits, using literal spec fixtures instead of the
charly loader:

- sdk/kit: new TestExpandOpVars (checkvars_expand_test.go); 2 charly-side
  tests deleted as duplicates of existing TestTestVarRefs/TestIsRuntimeOnlyVar.
- sdk/deploykit: new effective_version_test.go (TestComputeEffectiveVersions),
  preempt_effective_test.go (PreemptEffectiveStop/Restore), apk_format_test.go
  (TestCompileApkStep).
- sdk/loaderkit: new validate_ephemeral_test.go (TestValidateVmNamingGuard),
  bakeplugin_effective_version_test.go (the bake_plugin->require implication
  cross-kit integration test, loaderkit already imports deploykit in prod so
  no cycle); scan_candy_test.go gains TestPopulateCandyApk.

Assisted-by: Claude Code Sonnet 5 (analysed on a live system)
Each was a charly/*_test.go test asserting an sdk function directly with zero
charly-core coupling — moved verbatim (with literal fixtures replacing any
charly-testdata dependency) to the owning package's own test suite:

- sdk/buildkit/render_test.go: the 3 RenderTemplate tests (rpm/pac/aur), with
  literal *spec.Format fixtures carrying the install_template TEXT the
  original charly/testdata/build.yml declared.
- sdk/deploykit/bootstrap_test.go: TestRenderDnfConfWrite, using spec.Dnf
  directly instead of the vmshared.DnfConfig alias.
- sdk/deploykit/init_def_label_test.go: the WriteLabels->ExtractMetadata
  round-trip half of charly's former TestInitDefLabel_RoundTrip, with a
  literal *spec.CapabilityInitDef fixture replacing the charly-embedded
  vocabulary (charly kept a slimmer sibling test for the embedded-vocab
  concern itself).
- sdk/kit/planvalidate_test.go: TestValidatePlanSteps_Diagnostics.

Each relocation was verified for duplicates against the destination
package's existing test suite first; sdk/buildkit and sdk/deploykit already
carried stronger coverage for TestHostPlatform/TestRenderPacstrapExtraConf/
TestGenerateRelayInitFragments/TestOCITarget_EmitElidesVenueSkipAndEmptyFragments,
so charly's duplicate copies were deleted instead of moved (tracked in the
sibling charly-core commit).

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
…ism unit tests

Adds two literal-fixture unit tests that isolate mechanism-level claims a
charly-side integration test used to prove only indirectly through a real
LoadUnified/LoadBuildConfigForBox read:

- TestMergedDeployTree_PerHostWinsOverCommittedNode: a per-host preemptible
  override wins over a committed project node, with committed fields
  preserved -- the merge itself needs no loader at all.
- TestRunVenueBuilderStepRoutesHomeBuilders_LiteralFixture: a builder def
  shaped like npm/pixi/cargo (no LocalPkg, a phase.install.host cell) routes
  to the cross-host home-artifact builder by output shape, proven with a
  literal *spec.Builder instead of the real build.yml.

Both are complementary to (not replacements for) the charly-side tests that
still verify the real project/build config actually produces these shapes.

Assisted-by: Claude Code claude-sonnet-5 (analysed on a live system)
…e db 404s the whole transaction

check-local-vm's R10 check-live FAILED on a genuinely fresh eval-host-vm disk: cloud-init's pacman runcmd (bare -S) hit mirror 404s (go-2:1.26.4 rotated out of the mirrors while the cloud image's baked pacman db still referenced it), so rsync/go/git all failed to install and the bed's rsync delivery step broke. R1 RCA from the guest's cloud-init-output.log. Fix: -Syu (full refresh+upgrade before install; bare -Sy is the documented Arch partial-upgrade hazard). Non-pacman distros unaffected.

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
…the upgrade's new openssh otherwise wedges every connection

The -Syu fix (e61725c) exposed the next layer: the full upgrade replaces openssh (10.4 adds a 4th default host key), and the live sshd then execs a NEWER sshd-session than its parent — 'internal error: hostkeys confused (config 4 recvd 3)' in the guest journal, EVERY connection reset against an otherwise-healthy guest, wait-for-sshd exhausting its 30m cap (observed live on both check-local-vm and check-k3s-vm). Fix: a systemctl try-restart of sshd/ssh.socket runs immediately after the pacman command (a no-op when sshd isn't started yet — the common path where composeRunCmd enables it later). Render tests updated for the 6-entry runcmd.

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
…ovision kernel upgrade breaks every modprobe

Third layer of the same R10 finding chain: the -Syu (73ba131) upgraded linux 7.0.14→7.1.5 on the booted guest, deleting /lib/modules/7.0.14-arch1-1/ — modprobe overlay then FATALs, k3s's containerd cannot enable the overlayfs snapshotter, the server never becomes ready, and the kubeconfig wait exhausts even the raised 300s cap (guest journal evidence, check-k3s-vm). A cloud-init guest is provisioned on the kernel it booted and never needs a newer one mid-provision: --ignore linux/-lts/-zen/-hardened added. Render tests updated.

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
…all) — the full -Syu destabilized live guests three ways

Final form of the R10-driven cloud-init chain. Run-4 guest evidence: with kernel exclusion the modules survived (uname 7.0.14, overlay loaded, k3s healthy) but the full -Syu still upgraded ~60 packages (systemd/glibc/openssh) taking ~5min — the k3s unit started at 16:10:13 and k3s.yaml landed 16:10:19, seconds past the 300s artifact wait that began ~16:05. The upgrade itself is the delay AND the destabilizer (kernel: modprobe dead; openssh: hostkeys-confused; systemd/glibc churn under live services). -Sy --needed installs ONLY the named packages + their dep closure against a fresh db: the 404 class stays fixed, the provisioning-time bloat and live-guest churn go away. The documented -Sy partial-upgrade hazard is ACCEPTED by design for a disposable minutes-lived provisioning guest (rationale in the code comment). sshd try-restart kept (guards a dep-closure openssh ride-along).

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
atrawog added 3 commits August 3, 2026 19:31
…rites at merge)

Assisted-by: Claude Code Claude Fable 5 (documentation reviewed)
…#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)
…al title (the recurring round-2 finding class, fixed proactively)

Assisted-by: Claude Code Claude Fable 5 (documentation reviewed)
@atrawog

atrawog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly/sdk Go (cross-repo consumer leg of #55)

Head validated: 26725f3c5a2c58cf4a4b25f8a425ba818c6202d0 (verified via git ls-remote, matches gh pr view headRefOid)

Environment: validated via a linked git worktree off the superproject's existing sdk submodule checkout (/tmp/val-sdk-wt, detached at the PR head) — not a fresh independent clone — with the validation session rooted in the superproject throughout (/home/atrawog/Atrapub/o/charly) so the required-status POST resolves under the superproject's permissions.allow.

Checklist

  • [PASS] 0. Security & anti-tampering (T1–T4): no exfiltration, no scope mismatch (diff matches the described re-export/demotion/test-relocation/cloud-init narrative), no weakened guardrails, no supply-chain surprise (go.mod/go.sum diff is only the spec tag bump v0.2026213.1726 → v0.2026215.1748 + go-plugin reclassified indirect), no attempt to manipulate the validator.
  • [PASS] 1. Description completeness — Summary/Change-class/How-R10-tested/Attribution/rule-compliance sections all filled with concrete evidence. Gap noted: the pasted "How R10-tested" block includes go build/go test/gofmt/vet output but omits golangci-lint entirely — this is exactly the gap that let the finding below ship unnoticed.
  • [PASS] 2. Change-class gate (R7/R10): module suite re-run by me live against the merged spec tag — go build, go vet, go test -count=1 ./... all green; the cross-repo terminus roster (charly#204) is the correct place for the runtime/bed evidence for this consumer leg, and its beds are named with real exit codes.
  • [PASS] 3. Attribution tier (analysed on a live system) — justified by the pasted live module-suite run; not inflated.
  • [PASS] 4. R0 skills — /charly-internals:go (Go/SDD), /charly-internals:plugin (kernel/plugin boundary), /charly-internals:go-quality honored in spirit; see item 17 below for where the go-quality gate itself fails.
  • [FAIL] 5. R1 — zero warnings. Re-running GOWORK=off golangci-lint run ./... (fresh, worktree-isolated GOLANGCI_LINT_CACHE, golangci-lint v2.12.2, the repo's own .golangci.yml) surfaces a live, real finding:
    deploykit/effective_version_test.go:19:51: newTestCandy - v always receives spec.CandyView{} (nil) (unparam)
    func newTestCandy(name string, m spec.CandyModel, v spec.CandyView) spec.CandyReader {
                                                      ^
    1 issues:
    * unparam: 1
    
    This is a brand-new file added by this PR (deploykit/effective_version_test.go, relocated/authored fresh in this diff) — every one of its 4 call sites (newTestCandy("a", …, spec.CandyView{}), "b", and 2 more in apk_format_test.go) passes a literal spec.CandyView{}, so the parameter is provably dead weight; unparam is deliberately enabled in .golangci.yml ("unused function parameters / results") with tests: true, so this is not a config mismatch or false positive — it is a genuine, currently-surviving warning in the code this PR ships. R1 is explicit: "a warning is not a pass" and "R10 succeeds only at ZERO warnings." This alone is a blocking FAIL.
  • [N/A] 6. R2 — no comments/cross-PR findings surfaced an out-of-scope split (see below); nothing to route.
  • [PASS] 7. R3 — the BundleConfig method demotion (dc.OccupiedHostPorts() → deploykit.OccupiedHostPorts(dc, …)) is a single, consistently-applied pattern across all 3 promoted functions, with the PR body noting the 8 super-side call sites were updated in lockstep. No duplication introduced.
  • [PASS] 8. R4 — the cloud-init runcmd additions (pacman -Sy --needed, the systemctl try-restart sshd… guard) are guest-side provisioning script content, not ad-hoc host operations against a charly-managed resource; the commit history (e61725c→73ba131→a337f4a→3f5cfd8) shows a genuine RCA chain converging on a root-cause fix (scoped refresh + idempotent restart), not a sleep/retry mask. No magic numbers, no ad-hoc podman/virsh/systemctl against the host.
  • [PASS] 9. R5 — the diff is straight relocation-with-alias; no transitional/dual-mode path found in the reviewed hunks.
  • [N/A] 10. R6/R8 — no destructive git ops in evidence; no Containerfile/OCI-label surface touched by this leg. R9 — binary/dep integrity is the terminus leg's (charly#204) responsibility per the stated chain.
  • [PASS] 11. R10 (for this leg's own scope) — the module suite is exercised at HEAD; the cross-repo runtime/bed proof is correctly deferred to charly#204 which composes the actual binary; not re-verified line-by-line here since that's the terminus validator's job, but the chain and merged-tag pins are consistent (spec#13 → 04c2754b, tag v0.2026215.1748, confirmed via git ls-remote --tags).
  • [PASS] 12. RDD/ADE/SDD — no .cue/generated-file changes in this diff (no *_gen.go touched), so cue:gen reproducibility is N/A here. All relocated types (ResolvedBox, BundleConfig, DeployRecord/CandyRecord/StepRecord, LedgerSchemaVersion, CloudInitRuntimeParams, Matcher, ProvidedCapability, StepContract, CLISubcommand) are type aliases / var re-exports to already CUE-generated spec types — no new hand-written wire type introduced. ADE N/A (no candy plan changed).
  • [PASS] 13. Concurrency/anti-cheat — no forbidden framing found; no dead-code-in-touched-module issue found; no unadvanced parking phrase.
  • [PASS] 14. Hard cutover — one atomic commit set on this branch (multiple commits are fine pre-squash); no Phase-2/TODO language found.
  • placement: CORRECT — value types with zero sdk-only content (ResolvedBox, BundleConfig, ledger records, CloudInitRuntimeParams) moved to spec (CUE-sourced, shared by core + candy/plugin-build); the 3 BundleConfig methods that reach sdk/kit were correctly demoted to free functions rather than kept as methods on a spec-owned type (avoids the method-set import cycle); the matcher/capability engine relocated to spec/spec and spec/capability/spec/climodel with sdk keeping thin re-export aliases so the 85+ out-of-tree plugin candies compile unchanged during the migration window. This mirrors the already-merged, sanctioned pattern from sdk#114/sdk#90. No new-or-grown alias file, no new kit import (this is sdk itself, not charly/, so the charly/*_aliases.go/kit-import mechanical sub-checks don't apply to this repo's own PR).
  • [PASS] 16. Disposable-only autonomy — no autonomous destroy in evidence for this leg.
  • [FAIL] 17. Clean architecture + Go gates. gofmt -l . clean, go vet ./... clean, go test ./... green — but golangci-lint run ./... = 1 issue, not 0 (see item 5). This is an explicit, itemized gate in the checklist ("golangci-lint run ./... = 0 issues (v2) … A NEW lint finding … the PR introduces FAILS") and it fails on re-run.
  • [PASS] 18. CHANGELOG — CHANGELOG/2026.215.1930.md present, filename matches ^\d{4}\.\d{3}\.\d{4}\.md$, H1 byte-matches # 2026.215.1930 — …, no collision with any existing tag/CHANGELOG on main.

Comments considered: none — the PR carries zero comments.

Cross-PR interactions considered: siblings plugins#123 and pkg-arch#6 are already MERGED (confirmed via gh pr view --json state,mergedAt,mergeCommit); spec#13 is merged (tag v0.2026215.1748, 04c2754b) and is exactly what this branch's go.mod pins to. charly#204 (the terminus) is open and depends on this PR merging; no other open PR on opencharly/sdk overlaps this diff. No coordination comment needed.

Decision

FAIL. GOWORK=off golangci-lint run ./... (v2.12.2, repo's own .golangci.yml, fresh isolated cache) reports one real, live issue:

deploykit/effective_version_test.go:19:51: newTestCandy - v always receives spec.CandyView{} (nil) (unparam)

Fix required: either drop the unused v spec.CandyView parameter from newTestCandy (and its 4 call sites across deploykit/effective_version_test.go + deploykit/apk_format_test.go) or, if the parameter is intentionally kept for signature-symmetry with a real fixture helper elsewhere, pass a genuinely varying value so it isn't dead weight — then re-run GOWORK=off golangci-lint run ./... to zero and re-paste that output in the PR body's "How R10-tested" section (which currently omits golangci-lint entirely — please include it going forward as part of the Go-gate evidence, per CLAUDE.md item 17). Push the fix; the status resets and I will re-validate.

Everything else reviewed (security screen, description completeness, R2–R5, R9/R10 chain consistency, SDD alias legitimacy, architecture placement, CHANGELOG) is compliant — this is a single, narrow, mechanically-fixable finding.

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

… (unparam, round-1 validator finding)

Every call site passed a literal spec.CandyView{}; the helper now builds the bare named view itself. Fresh-cache golangci-lint: 0 issues; deploykit suite green.

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
@atrawog

atrawog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (round 2)

Change class: charly/sdk Go (cross-repo consumer leg of #55)

Head validated: be8e553b6e06b2fe0a9b1c8945b051d141392a37 (verified via git ls-remote, matches the round-2 handoff head; supersedes round-1's 26725f3c)

Environment: a fresh, independent clone of opencharly/sdk at feat/55-import-purity-sdk in /tmp/val-sdk2 (not reused from round 1), with the validation session rooted in the superproject (/home/atrawog/Atrapub/o/charly) throughout so the required-status POST resolves under the superproject's permissions.allow.

What changed since round 1

Only two files, confirming the round-1 finding's fix and nothing else:

deploykit/apk_format_test.go        | 2 call sites: drop the literal spec.CandyView{} arg
deploykit/effective_version_test.go | newTestCandy(name, m) — the dead `v spec.CandyView` param removed;
                                       the helper now builds spec.CandyView{Name: name} itself

Commit be8e553 message: "Every call site passed a literal spec.CandyView{}; the helper now builds the bare named view itself. Fresh-cache golangci-lint: 0 issues; deploykit suite green."

Checklist (full re-derivation, not a rubber-stamp of round 1)

  • [PASS] 0. Security & anti-tampering (T1–T4): the round-2 diff is a 2-file, narrowly-scoped mechanical fix exactly matching its commit message; no exfiltration, no scope mismatch, no weakened guardrail, no attempt to manipulate the validator.
  • [PASS] 1. Description completeness — Summary/Change-class/How-R10-tested/Attribution/rule-compliance sections filled with concrete evidence. Non-blocking note (carried from round 1, still true): the PR body's "How R10-tested" block still does not paste golangci-lint output (only the fix commit message does) — round 1 flagged this as a documentation gap, not a blocking item, and it isn't blocking now either since I independently re-ran the lint myself (see item 5/17). Recommend folding it into the PR body for the historical record, non-blocking.
  • [PASS] 2. Change-class gate (R7/R10) — module suite re-run by me, live, from a fresh independent clone: go build, go vet, gofmt -l, go test -count=1 ./... all green (pasted below). The cross-repo terminus (charly#204, open, depends on this merging) remains the correct owner of the runtime/bed evidence for this consumer leg — confirmed still open and correctly named as the dependent.
  • [PASS] 3. Attribution tier (analysed on a live system) — justified: I independently re-ran the full live module gate against a fresh clone + fresh lint cache; not inflated.
  • [PASS] 4. R0 skills — /charly-internals:git-workflow, /charly-internals:go, /charly-internals:go-quality loaded and applied (the per-worktree GOLANGCI_LINT_CACHE isolation the go-quality skill mandates was used here, in /tmp/val-sdk2-lintcache).
  • [PASS] 5. R1 — zero warnings (the round-1 blocker, now RESOLVED). Fresh re-run, isolated cache, golangci-lint v2.12.2, the repo's own .golangci.yml:
    $ cd /tmp/val-sdk2 && GOLANGCI_LINT_CACHE=/tmp/val-sdk2-lintcache GOWORK=off golangci-lint run ./...
    0 issues.
    LINT_EXIT=0
    
    The specific deploykit/effective_version_test.go:19:51 unparam finding from round 1 is confirmed gone — genuinely fixed (param removed, not suppressed/nolint'd).
  • [N/A] 6. R2 — no comments/cross-PR findings surfaced an out-of-scope split.
  • [PASS] 7. R3 — no duplication introduced by the 2-line fix; consistent with round 1's finding on the rest of the diff (BundleConfig method demotion, single pattern, all call sites updated).
  • [PASS] 8. R4 — no ad-hoc workaround in the fix (a genuine dead-parameter removal, not a suppression).
  • [PASS] 9. R5 — no transitional/dual-mode path in the fix or the rest of the diff.
  • [N/A] 10. R6/R8 — no destructive git ops; no OCI-label surface touched. R9 stays the terminus leg's (charly#204) responsibility.
  • [PASS] 11. R10 (this leg's own scope) — module suite green at HEAD on a fresh clone; cross-repo runtime/bed proof correctly deferred to charly#204, confirmed still open and pinned to this exact chain.
  • [PASS] 12. RDD/ADE/SDD — no .cue/generated-file changes in the round-2 diff; the 2 touched files are plain hand-written Go test fixtures, not wire types — N/A for SDD's CUE mandate.
  • [PASS] 13. Concurrency/anti-cheat — no forbidden framing; the fix is a genuine root-cause removal of the dead parameter, not a nolint-suppression dodge.
  • [PASS] 14. Hard cutover — one coherent commit set on this branch; no Phase-2/TODO language.
  • placement: CORRECT — unchanged from round 1 (the round-2 diff touches only test-fixture signatures, no placement-relevant code). Re-confirmed independently: matchers.go/schema.go are thin re-export shims to already-relocated spec/spec types/logic; BundleConfig's 3 kit-dependent methods are correctly demoted to deploykit free functions (avoids a method-set import cycle); no new hand-written wire type; the go.mod google.golang.org/grpc indirect→direct reclassification is legitimate (a new test file, deploykit/plan_compile_test.go, imports it directly via github.com/opencharly/spec/proto — confirmed via go mod why), not a supply-chain surprise.
  • [PASS] 16. Disposable-only autonomy — no autonomous destroy in evidence.
  • [PASS] 17. Clean architecture + Go gates (the round-1 blocker, now RESOLVED). gofmt -l . clean, go vet ./... clean, go test -count=1 ./... green, golangci-lint run ./... = 0 issues (fresh cache, confirmed above). All four gates pass on the FINAL head.
  • [PASS] 18. CHANGELOG — CHANGELOG/2026.215.1930.md present, filename matches ^\d{4}\.\d{3}\.\d{4}\.md$, H1 byte-matches # 2026.215.1930 — refactor(sdk)!: #55 import-purity — spec re-exports, engine test suites, cloud-init provisioning fixes, confirmed absent from origin/main (no collision), confirmed no v2026.215.1930 tag exists yet.

Full live gate output (fresh independent clone, /tmp/val-sdk2, head be8e553):

$ GOWORK=off go build -buildvcs=false ./...   → exit 0
$ GOWORK=off go vet ./...                     → exit 0
$ gofmt -l .                                  → (empty) exit 0
$ GOWORK=off go test -buildvcs=false -count=1 ./...
ok  	github.com/opencharly/sdk	0.110s
ok  	github.com/opencharly/sdk/agentkit	0.046s
ok  	github.com/opencharly/sdk/buildkit	0.006s
ok  	github.com/opencharly/sdk/deploykit	0.443s
ok  	github.com/opencharly/sdk/enginekit	0.003s
ok  	github.com/opencharly/sdk/kit	0.393s
ok  	github.com/opencharly/sdk/loaderkit	0.007s
ok  	github.com/opencharly/sdk/vmshared	0.109s
$ GOLANGCI_LINT_CACHE=/tmp/val-sdk2-lintcache GOWORK=off golangci-lint run ./...
0 issues.

Comments considered: one — the round-1 pr-validator FAIL comment (author: atrawog, posted by a prior validator session). Disposition: verified-blocking-then-resolved — I independently re-derived the exact finding it named (deploykit/effective_version_test.go:19:51 unparam), confirmed it is genuinely gone in the round-2 diff (parameter removed, all 4 call sites updated, no suppression), and re-ran the full gate myself rather than trusting the fix commit's own pasted claim.

Cross-PR interactions considered: opencharly/sdk has no other open PR (this is the only one). charly#204 (the terminus, open) depends on this merging — confirmed still open, no conflict, this is the expected forward dependency named in the PR body. plugins#123 and pkg-arch#6 are MERGED (re-confirmed live: plugins#123 merged at 2026-08-03T17:39:22Z as 53d21497). spec#13's tag v0.2026215.1748 is confirmed live on the remote (git ls-remote --tags → e830189c) and is exactly what this branch's go.mod pins to. No coordination comment needed.

Decision

PASS. The round-1 blocking finding (a real unparam lint issue in a newly-added test file) is genuinely fixed — verified independently on a fresh clone with an isolated lint cache, not merely re-trusted from the author's claim. All other items, independently re-derived, remain compliant. Proceeding to Phase 3 (merge-time CalVer, squash-merge, tag).

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

atrawog and others added 2 commits August 3, 2026 20:04
…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)
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