Skip to content

feat(deploykit): InstallPlan step vocabulary (P4-unit-3) - #13

Merged
atrawog merged 2 commits into
mainfrom
feat/sdk-deploykit-steps
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/sdk-deploykit-steps

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Third P4 unit — introduces sdk/deploykit and moves the InstallPlan step VOCABULARY verbatim out of charly: the 13 concrete InstallStep implementations (SystemPackagesStep/BuilderStep/OpStep/FileStep/ServicePackagedStep/ServiceCustomStep/ShellHookStep/ShellSnippetStep/RepoChangeStep/ApkInstallStep/LocalPkgInstallStep/RebootStep/ExternalPluginStep) + their field-structs (RepoSpec/CacheMountSpec/ArtifactRef) + the pure classification helpers (reverseFileKindFor internal; OpStepScope/PathIsSystemScoped exported for charly).

deploykit imports only sdk/spec (the IR enums + InstallStep interface + InstallPlan container). Each concrete step implements spec.InstallStep structurally. The plugin-dispatch externalStep cluster (externalStep/externalStepKindPrefix/isExternalStepKind) stays charly-side (kernel-coupled). InstallPlan+wireView+ResolveHome stay charly for now (P4-unit-4 moves them, now that the structs they type-switch on are here).

Change class

sdk Go — new library package + moved step vocabulary (no schema surface → no schema-version bump).

How R10-tested

  • Verbatim move; charly's golden tests exercise it (the compiler/step_view/targets construct these via aliases).
  • Beds (fresh binary, source frozen): check-builder-local PASS 4/4 + check-local PASS 4/4, golangci 0 both repos, zero warnings.

Attribution tier

fully tested and validated

Compliance

  • R3: one importable home for the step vocab. R5: charly deletes its defs (paired PR), aliases only. Boundary: the step vocabulary → sdk library, importable by out-of-tree deploy plugins. Producer-first. CHANGELOG present.

Assisted-by: Claude (fully tested and validated)

Introduces sdk/deploykit and moves the InstallPlan step vocabulary out of charly:
the 13 concrete InstallStep implementations + their field-structs (RepoSpec/
CacheMountSpec/ArtifactRef) + the pure classification helpers (reverseFileKindFor
internal; OpStepScope/PathIsSystemScoped exported). deploykit imports sdk/spec (IR
enums + InstallStep interface + InstallPlan container). Each concrete step implements
spec.InstallStep structurally. The plugin-dispatch externalStep cluster stays charly.
Third P4 unit — the step vocabulary becomes importable by any out-of-tree deploy plugin.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

✅ Fresh pr-validator — PASS

Independent re-validation of feat/sdk-deploykit-steps @ 2d96feb (P4-unit-3), trusting no author claim.

Diff scope — exactly two new files: deploykit/steps.go (+857) and CHANGELOG/2026.189.1740.md (+14). schema/version.cue untouched (correct: a library-code move, no authored/wire surface → no schema bump). No stray files.

Imports — deploykit imports only os + github.com/opencharly/sdk/spec (no charly, no vmshared, no buildkit). The type/const alias block (Phase/Scope/Venue/Gate/StepKind/ReverseOp/ReverseOpKind/ApkPackageSpec/CacheMountDef=spec.CacheMount/BuilderDef/Op/LocalPkgDef) resolves to spec.* — proven by the build.

Verbatim faithfulness vs charly origin/main (76f5eb7) — normalized diff, byte-identical modulo package name + alias block + the two export renames:

  • struct/method body (13 concrete steps + RepoSpec/CacheMountSpec/ArtifactRef + reverseFileKindFor + PathIsSystemScoped) vs install_plan.go:163-938: 0 differences (776 lines each).
  • OpStepScope vs install_build.go opStepScope: identical (modulo the export rename).
  • SystemPackagesStep/FileStep/BuilderStep Reverse() spot-checks: inside the zero-diff region — no drift.
  • externalStep/externalStepKindPrefix/isExternalStepKind/stepContract cluster: absent (correctly stays charly).

Go gates — SDK: go build ✓ go vet ✓ go test ✓ gofmt -l clean ✓ golangci-lint 0 issues ✓. Consumer (charly, paired aliases + ../sdk replace @ 2d96feb): go build ./... ✓ go test ./... ✓ (install_plan_test.go / install_build_test.go construct the moved structs via the aliases).

R10 beds (fresh task build:charly, run concurrently, zero warnings) — both disposable: true, host: local:

  • check-builder-local — calver 2026.189.1802, steps=4 (deploy-add/check-live/update/cleanup) all ok → PASS (BuilderStep deploy leg).
  • check-local — calver 2026.189.1802, steps=4 (deploy-add/check-live/update/cleanup) all ok → PASS (ExternalPluginStep deploy-execute leg). Teardown replayed the reverse op (marker gone).

Merging --rebase after the merge-time CalVer stamp; sdk Go-module tag to follow.

Assisted-by: Claude (fully tested and validated)

…kit InstallPlan step vocabulary move)

Assisted-by: Claude (fully tested and validated)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DPfpGsPt7DTzUF5BQWmzqd
@atrawog
atrawog merged commit 0106208 into main Jul 8, 2026
@atrawog
atrawog deleted the feat/sdk-deploykit-steps branch July 8, 2026 18:22
atrawog added a commit that referenced this pull request Jul 24, 2026
…nt resolved-project envelope fetch

Companion to the `charly` superproject's K1-alpha blocking regression fix
(task #13): `charly bundle add --add-candy <ref>` / a deploy's
`add_candy: [<ref>]` failed at TWO independent resolved-project envelope
fetch sites for a candy never reachable from any box's own image closure
(e.g. `@github.com/opencharly/charly/candy/pod-addcandy-marker:vTAG`):

1. `bundle compile: candy "<name>" not in resolved-project envelope
   (order=[...])` — the STANDARD `--add-candy` compile path
   (`candy/plugin-bundle`'s `compileDeployPlans`).
2. `OCITarget.Emit(<name>): candy "<name>" not found` — the
   add_candy-ON-POD-OVERLAY deploy path, e.g. `check-addcandy-pod`
   (`candy/plugin-installstep`'s `getGenerator`).

Both plugins re-fetch the resolved-project envelope independently via
`HostBuild("resolved-project")`, using only the project directory — never
the add-candy ref the host's own widened scans (`scanCandiesForRef`,
`hostBuildOverlay`'s `ResolveOpts.ExtraCandyRefs`) already discovered.

Adds `extra_candy_refs?: [...string] @go(ExtraCandyRefs)` to
`#ResolvedProjectRequest` (schema/resolvedproject.cue),
`#DeployCompileRequest` (schema/seam.cue), and `#BuildEnv`
(schema/buildwire.cue) — mirroring the existing `ResolveOpts.ExtraCandyRefs`
contract (R3) — so a compile/build-emit caller can widen these plugins'
independent envelope re-fetches the same way.

`spec/cue_types_gen.go` regenerated via `task cue:gen` (reproducible, zero
drift). Standalone battery green: `go build`/`go vet`/`go test ./...`,
`golangci-lint run ./...` (0 issues), `gofmt` delta clean, `go mod tidy`/
`verify` clean. This is a pure wire-shape addition (no sdk-side behavior of
its own); the runtime bed proof (`check-addcandy-pod`,
`check-stepkind-emit-pod`) rides the charly consumer leg
(`feat/k1-unblock-wave1`), which threads these fields through
`hostBuildResolvedProject`/`compileDeployPlans`/`compileSelectionViaPlugin`
and `dispatchOCIStep`/`plugin-installstep`'s `getGenerator`.

Assisted-by: Claude Code (Anthropic Claude Opus 4.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