Skip to content

feat(sdk)!: adopt the spec strict-cleanup contract — repoint every sdk import onto the sliced module - #145

Merged
atrawog merged 2 commits into
mainfrom
feat/spec-cleanup-unify-consumers
Aug 20, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/spec-cleanup-unify-consumers

Conversation

@atrawog

@atrawog atrawog commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Cutover

The sdk consumer leg of the cross-repo strict-cleanup sequence spec → sdk → charly. The spec
module's cutover (W1–W5: stale-doc fixes, R3 duplication unification, R5 legacy deletion, SDD
CUE-sourcing, and the spec/spec slice into granular packages) landed as the merged producer; this
change adopts it — repointing every sdk import site onto the sliced/retyped symbols — and bumps
the require to the new spec tag.

The slice repoints (sdk consumers compile unchanged via re-export)

  • calver/ — ParseCalVer/MustCalVer/CompareCalVer/LatestSchemaCalVer/
    SchemaFloorCalVer/ParsedCalVer (kit/calver.go, kit/calver_compare.go,
    loaderkit/refs_collect.go).
  • matchers/ — MatchAll/MatchValueString/MatchValueStrings (the Matcher/
    MatcherList value types stay in spec/spec; the engine + its private helpers moved, tests
    carried).
  • merge/ — MergeUnified (loaderkit/materialize_project.go).
  • shellquote/ — ShellQuote (8 sites across kit, deploykit, buildkit).
  • loader/ — FindEntityDirs/DiscoverSkipDir/DirExists/FileExists
    (kit/loader_discover.go).
  • poll/ — PollCondition + the poll/readiness subsystem (kit/exec_aliases.go,
    vmshared/poll_reexport.go); kit.PollCond stays as the consumer-facing re-export alias of
    poll.PollCondition.
  • fleet/ — HostRooted/IsVmVenue/IsContainerVenue/DeployNestedLocalChildren + the
    17 deploy-fleet helpers (deploykit/deploy_fleet_ops_aliases.go, deploykit/bed_session.go,
    deploykit/fleet_members.go, deploykit/member_dns_preflight.go); SortedMemberKeys/
    VmDomainIdentity/FleetDelArgv stay in spec/spec.
  • http/ — HTTPClientFor/DoHTTPRequest/FormatHTTPHeaders (kit/http_do.go).
  • proc/ — EnvMapToPairs (kit/env.go).

The typed StepContract (R3)

The three-form StepContract collapsed to the single typed spec.StepContract
(Scope/Venue/Gate/Emits); the string-form capability.StepContract is deleted.
schema.go re-exports the typed form and marshals it into pb.StepContract (Scope via
Scope.String(), Venue int32, Gate as the wire string) — the plugin call sites compile unchanged.

The R5 deletions adopted

  • LocalPkg — the deleted CandyReader.LocalPkg/LocalPkgFormats adapter methods in
    deploykit/spec_candy_adapter.go are removed (the deploykit CandyModel never declared them;
    zero callers; the IR already emits LocalPkgInstallStep from Packaging()).
  • install_template — the removed #Format/#Builder field is adopted via the new
    spec.FormatPhaseTemplate(format, phase, venue) / spec.BuilderPhaseTemplate(builder, phase, venue) phase-cell accessors (no fallback arm): deploykit/candy_steps.go reads
    phase.install.container, buildkit re-exports the accessors, and the render tests assert the
    no-fallback behavior. The retained LocalPkgDef.InstallTemplate (#LocalPkg.install_template)
    is untouched.
  • ResolveTunnelConfig — deleted with zero production callers; its sdk forwarder is removed,
    TunnelConfigFromMetadata stays.
  • DeployTarget → EmitTarget — the sdk root re-export repointed; zero sdk users.
  • Casing sweep adopted — ForwardSshAgent → ForwardSSHAgent (kit/agent_forward.go,
    deploykit/deploy_state.go), VmSSH → VmSsh (vmshared/cloud_init_render.go,
    vmshared/spec_aliases.go), SshPort → SSHPort (deploykit/vm_deploy_addressing.go,
    vmshared/libvirt_helpers.go, vmshared/qemu_render.go + the vmshared VmRuntimeParams field).

go.mod

require github.com/opencharly/spec bumped from v0.2026230.2020 to the strict-cleanup tag
landed by the spec leg's validator; the temporary local replace used to compile the repoint
against the unmerged spec tree is dropped — the sdk builds against the published module exactly
as shipped.

Verification (final tree)

  • go build ./..., go vet ./..., go test ./... — all packages ok
  • gofmt -l . — nothing; golangci-lint run ./... — 0 issues; golangci-lint fmt --diff —
    nothing
  • R5 claim-keyed grep self-tests (word-boundary, working tree at commit): VmSSH,
    ForwardSshAgent, \bSshPort\b, capability.StepContract, LocalPkgFormats,
    spec.IsVmVenue/spec.IsContainerVenue/spec.DeployNestedLocalChildren/spec.HostRooted,
    spec.ShellQuote, spec.EnvMapToPairs, spec.MergeUnified, spec.MatchAll,
    spec.PollCond, exec.PollCond all CLEAN in .go files; PollCond returns only the
    retained kit.PollCond re-export alias; ResolveTunnelConfig only the migration help-text;
    InstallTemplate only the retained LocalPkgDef.InstallTemplate field.

The charly consumer leg (the version/readiness/fleet/http/loader repoints, the embedded
build-vocabulary install_template → phases: migration, and the spec submodule pointer bump)
lands next against this merged producer.

CHANGELOG: 2026.231.0001 (placeholder; the pr-validator finalizes it at merge).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

…k import onto the sliced module

The spec module's cutover (stale-doc fixes, R3 duplication unification, R5 legacy
deletion, SDD CUE-sourcing, and the spec/spec slice into granular packages) landed
as the merged producer; this change adopts it — repointing every sdk import site
onto the sliced/retyped symbols (calver, matchers, merge, shellquote, loader,
poll, fleet, http, proc) and the typed spec.StepContract — and bumps the require
to the strict-cleanup tag v0.2026232.520, dropping the temporary local replace.
sdk consumers compile unchanged via re-export.

R5 deletions adopted: CandyReader.LocalPkg/LocalPkgFormats adapter methods,
the ResolveTunnelConfig forwarder, the install_template fallback (via
spec.FormatPhaseTemplate/BuilderPhaseTemplate phase-cell accessors), the
DeployTarget→EmitTarget re-export, and the ForwardSSHAgent/VmSsh/SSHPort casing.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@atrawog

atrawog commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: code/config (sdk Go module — spec strict-cleanup adoption)

Head SHA validated: b39667e7b639ea4d920c76e7d211b9a190e4d353 (remote ref, feat/spec-cleanup-unify-consumers)

Checklist

  • [PASS] 0. Security & anti-tampering (T1–T4): no exfiltration, no scope mismatch (diff = the described repoint; 49 files, +411/−316), no weakened guardrails, no supply-chain surprise (spec bump lands on the merged producer tag v0.2026232.520 → e90cc5df). No attempt to manipulate the validator.
  • [PASS] 1. Description complete: full template; Summary of changes accounts for the diff; Verification section names the gates; body ends with the italicized *Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)* footer.
  • [PASS] 2. Change-class gate: sdk Go library change — re-ran go build ./... (exit 0), go vet ./... (exit 0), go test ./... (exit 0, 10 packages ok), gofmt -l . (nothing), golangci-lint run ./... (0 issues), golangci-lint fmt --diff (nothing). All green at the PR head with GOWORK=off GOTMPDIR=~/.cache/go-tmp.
  • [PASS] 3. Attribution tier: analysed on a live system — the changed code paths (repointed imports) executed live via the sdk's own test suite against the published spec tag; no full R10 bed applies to a library module (the charly consumer leg is the next cutover).
  • [PASS] 4. R0 skills honored: git-workflow, cutover-policy, strict-policy, go, go-quality, plugin — loaded and spot-checked against the diff.
  • [PASS] 5. R1: no failures/warnings in any re-run; no flake/transient framing.
  • [PASS] 6. R2: no pre-existing/out-of-scope split; the charly consumer leg is named as the next cutover, not parked.
  • [PASS] 7. R3: the typed spec.StepContract collapse and the slice repoints are the R3 dedup adoption; no new duplication introduced.
  • [PASS] 8. R4: no sleep/retry/magic-number/ad-hoc-command workarounds.
  • [PASS] 9. R5: claim-keyed grep self-tests (word-boundary, .go files) all CLEAN: VmSSH, ForwardSshAgent, \bSshPort\b, capability.StepContract, LocalPkgFormats, spec.IsVmVenue, spec.IsContainerVenue, spec.DeployNestedLocalChildren, spec.HostRooted, spec.ShellQuote, spec.EnvMapToPairs, spec.MergeUnified, spec.MatchAll, spec.PollCond, exec.PollCond. PollCond returns only the retained kit.PollCond = poll.PollCondition alias. InstallTemplate only the retained LocalPkgDef.InstallTemplate field. ResolveTunnelConfig hits: CHANGELOG (historical) + one deliberate file-header doc-comment in deploykit/tunnel_resolve.go:11 narrating the deletion ("was deleted entirely (zero production callers — W3)") — a historical mention, not a stale reference (same pattern the merged spec producer uses in spec/phase_template.go); assessed verified-non-blocking. No transitional/dual-mode path survives in the final code.
  • [N/A] 10. R6/R8/R9: no destructive git action, no generation change, no deployed binary in this change class.
  • [PASS] 11. R10: library change class — the build/vet/test/lint gates + R5 sweep are the gate; all green at zero warnings.
  • [N/A] 12. RDD/ADE/SDD: no candies (ADE N/A); no CUE/generated files in the diff (SDD N/A — the spec module owns the CUE source and is the merged producer); no high-risk composition (RDD N/A).
  • [N/A] 13. Concurrency: no shared-state path touched.
  • [PASS] 14. Hard cutover: one atomic commit in the PR diff (b39667e is the only commit not in origin/main); the other 17 branch commits are already merged to main via prior PRs (verified: git log origin/main..HEAD = 1 commit).
  • [PASS] 15. Architecture gate: placement CORRECT — the sdk re-exports (kit.CalVer = calver.ParsedCalVer, kit.PollCond = poll.PollCondition, deploykit.HostRooted = fleet.HostRooted, schema.StepContract = spec.StepContract, …) are the sdk's stable public API surface, not transitional shims; no new charly/ core code, no new aliases in core. Per-item trace: no charly/*.go staged (this is the sdk module).
  • [N/A] 16. Disposable-only autonomy: no destroy/rebuild in this change.
  • [PASS] 17. Clean architecture + go gates: gofmt/golangci-0/vet/test all green; repo invariants intact.
  • [PASS] 18. CHANGELOG present: CHANGELOG/2026.231.0001.md — filename matches ^\d{4}\.\d{3}\.\d{4}\.md$; H1 byte-equals # 2026.231.0001 — adopt the spec strict-cleanup contract: repoint every sdk import onto the sliced module (index and working tree agree); placeholder CalVer collides with no existing tag/entry.

Factual claims re-derived against the merged spec tree

  • Tag v0.2026232.520 exists → e90cc5df4aca2c1464f2c7c9248b9b65513527ee (the merged producer). ✓
  • Slice symbol homes verified in the published module: calver/ (ParseCalVer/MustCalVer/CompareCalVer/LatestSchemaCalVer/SchemaFloorCalVer/ParsedCalVer), matchers/ (MatchAll/MatchValueString/MatchValueStrings), merge/ (MergeUnified), shellquote/ (ShellQuote), loader/ (FindEntityDirs/DiscoverSkipDir/DirExists/FileExists), poll/ (PollCondition), fleet/ (HostRooted/IsVmVenue/IsContainerVenue/DeployNestedLocalChildren), http/ (HTTPClientFor/DoHTTPRequest/FormatHTTPHeaders), proc/ (EnvMapToPairs). ✓
  • Retained: typed spec.StepContract, spec.FormatPhaseTemplate/spec.BuilderPhaseTemplate, spec.LocalPkgDef.InstallTemplate, spec.EmitTarget, spec.TunnelConfigFromMetadata. Deleted: string-form capability.StepContract, LocalPkgFormats, ResolveTunnelConfig. ✓
  • go.mod bump v0.2026230.2020 → v0.2026232.520; no replace directive anywhere (go.mod, go.work, *.mod, *.work). Module resolves from the published tag (go mod download OK). ✓
  • Conventional Commits: feat(sdk)!: adopt the spec strict-cleanup contract — repoint every sdk import onto the sliced module with the Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) trailer. ✓

Comments considered: none (0 comments, 0 reviews).

Cross-PR interactions considered: none open on opencharly/sdk other than this PR.

Decision: PASS — the PR is in full compliance. Proceeding to merge-time CalVer finalization, squash-merge, and tag.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

Rename the placeholder CHANGELOG entry to the merge-time CalVer and rewrite
its H1 to match.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@atrawog
atrawog merged commit 023b468 into main Aug 20, 2026
@atrawog
atrawog deleted the feat/spec-cleanup-unify-consumers branch August 20, 2026 05:57
atrawog added a commit that referenced this pull request Aug 20, 2026
…tTarget

R5 follow-up to the strict-cleanup adoption (2026.232.0552, PR #145): the `DeployTarget` → `EmitTarget` rename repointed every code identifier and the deploykit re-export, but the R5 stale-reference sweep missed seven COMMENT mentions of the old name in `deploykit/install_build.go` (six) and `deploykit/compile_construct_step.go` (one).
**Comment-only; no behavior change.**
## Verification
- `gofmt -l .` — nothing (comment-only edits).
- R5 self-test: `git grep -n '\bDeployTarget\b' HEAD -- '*.go'` → no matches; whole-repo grep returns only `CHANGELOG/`.
- Documentation-only change class; `documentation reviewed` tier.

Assisted-by: Claude Code deepseek-v4-flash:cloud (documentation reviewed)
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