Skip to content

refactor(spec): relocate the InstallStep step vocabulary from sdk/deploykit → spec (#55 step-4 producer) - #7

Merged
atrawog merged 3 commits into
mainfrom
feat/55-step4-deploykit-ir-envelope
Jul 29, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/55-step4-deploykit-ir-envelope

Conversation

@atrawog

@atrawog atrawog commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

#55 step-4 — InstallStep step vocabulary → spec (PRODUCER leg, B2)

Relocates the InstallStep step vocabulary (13 concrete step structs + RepoSpec/CacheMountSpec/ArtifactRef + 65 methods + view converters + plan mechanisms) out of sdk/deploykit into spec, beside the already-hand-written InstallStep interface + InstallPlan/StepBatch container — the import-purity lever letting charly + in-tree candies reference the deploy install-timeline IR from spec.

What lands (4 NEW hand-written files)

  • spec/install_step_vocab.go — the 13 structs (OpStep/SystemPackagesStep/BuilderStep/ServicePackagedStep/LocalPkgInstallStep/ShellHookStep/ShellSnippetStep/ServiceCustomStep/FileStep/ExternalStep/RepoChangeStep/ApkInstallStep/RebootStep/ExternalPluginStep) + RepoSpec/CacheMountSpec/ArtifactRef + 65 methods + pure IR helpers.
  • spec/install_step_view.go, spec/install_plan_view.go — the view converters + plan mechanisms.
  • spec/install_step_view_test.go — TestStepView_RoundTrip (all 13 kinds), relocated from deploykit.

Hand-written relocation, NOT CUE-sourced — deliberate + SDD-correct

The 13 concrete step structs are IN-PROC IR: they never cross the process boundary; StepToView projects them onto InstallStepView, which IS the wire form and stays the SINGLE CUE source (untouched — zero CUE/schema files changed, task cue:gen stays a no-op). (1) SDD's "wire types CUE-sourced without exception" binds at the boundary contract = InstallStepView — satisfied. (2) CUE-sourcing the 13 structs would DUPLICATE the 13-kind field set already authored in #InstallStepView — two CUE sources for one dataset, the exact single-source-of-truth harm SDD prevents; hand-written structs + the one CUE View keeps a single CUE wire source. (3) Siblings of the already-hand-written InstallPlan/InstallStep/StepBatch/EmitOpts/DeployExecutor in spec. (4) 65 methods stay hand-written regardless; zero churn. A live cue exp gengotypes spike CONFIRMED CUE is feasible (os.FileMode direct; Payload via type RawBody = json.RawMessage alias) — feasible but REJECTED to avoid the #InstallStepView field-set duplication.

Verification

  • Additive only — new files; nothing renamed/removed. spec go build ./... + go test ./... green incl the relocated TestStepView_RoundTrip; gofmt clean.
  • Downstream R10 (rides the assembled tree): the full fix(exec): pass the container's OCI-spec user/HOME explicitly to podman/docker exec (#149) #55 step-4 tree passed go test ./charly/... (199s) + all-85-candy GOWORK=off vet + charly box validate + whole-tree R5=0, and the R10 beds check-pod 13/13 (204s — the deploy IR / install timeline where these exact structs execute across every DeployTarget path) + check-builder-vm 10/10 (336s), both fresh-rebuild.

Producer-first B2: this spec leg (merge + Go-module tag) → sdk require-bump → superproject charly + in-tree-candy repoint.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)

atrawog added 3 commits July 30, 2026 00:52
…loykit → spec (#55 step-4 producer)

The 13 concrete InstallStep structs + helper value types (RepoSpec/CacheMountSpec/
ArtifactRef) + 65 methods + view converters + plan mechanisms move into spec as
HAND-WRITTEN in-proc IR, beside the already-hand-written InstallStep interface +
InstallPlan/StepBatch container. Wire form (InstallStepView) stays the single CUE
source, untouched (task cue:gen no-op). SDD-correct: the wire mandate binds at the
boundary contract (InstallStepView); CUE-sourcing the in-proc structs would
duplicate its field set. deploykit keeps thin aliases (follow-on leg).

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
…ec mirrors (#55 step-4)

CacheMountView(m)/CacheMountSpec(m)/ArtifactView(a)/ArtifactRef(a) instead of
field-by-field literals (the source/dest types are field-identical; Go ignores
struct tags for conversion). Behavior-identical, guarded by TestStepView_RoundTrip.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
Merge-time CalVer finalization for the InstallStep step-vocabulary
producer leg. Renames the placeholder CHANGELOG to the merge-time UTC
stamp and rewrites its H1 to match the release tag v0.2026210.2308.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
@atrawog
atrawog merged commit 617b96e into main Jul 29, 2026
@atrawog
atrawog deleted the feat/55-step4-deploykit-ir-envelope branch July 29, 2026 23:10
atrawog added a commit that referenced this pull request Jul 30, 2026
Rename the placeholder CHANGELOG to the merge-time stamp (2026.211.0549)
and rewrite the H1; upgrade the attribution tier to fully-tested-and-validated
per the confirmed downstream assembled Cone V tree R10 (check-pod 13/13,
check-builder-vm 10/10, fresh-rebuild) — the direct step-4 (#7) precedent.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
github-actions Bot pushed a commit that referenced this pull request Aug 30, 2026
…tro (#79)

ResolveInherits is a hand-written struct literal — twice, once per
branch — and it forgot DiskLayout, Installer, InheritPackages and Raw.
Any distro declaring `inherits:` arrived at its consumer with all four
nil, and the consumer took its default path. No error, anywhere.

What that broke, all of it already merged and green:

  - the BTRFS SUBVOLUME FEATURE did nothing for any distro with a
    parent — which is every derivative, the case it was built for.
    #DiskLayout/#Subvolume (#72), plugin-vm's EmitDiskBuildScript arm
    (#6, #7) and charly's omarchy layout (#476) are all inert without
    this.
  - source.kind: iso could not resolve an installer for a derived
    distro. `charly vm build` reports "declares no installer" against a
    distro that plainly declares one — how this was found.
  - inherit_packages, the switch the whole distro TAG CHAIN rests on,
    was dropped from the resolved value, so a consumer reading it after
    resolution saw false.
  - Raw, the authored body consumers fall back to for anything this
    projection does not model, became empty for any distro with a
    parent — turning "not modelled" into "not present".

DiskLayout and Installer INHERIT, like every other optional sub-block:
a derivative adding only an installer (an Arch spin reusing archinstall)
must not have to restate its parent's whole boot chain. A child's own
value still wins.

InheritPackages and Raw are taken from the CHILD, never the parent:
inherit_packages says "expand MY tag chain through my parent", which is
a statement about this node, and Raw is this node's authored body.

Four tests. The parity pair walks every exported field of
ResolvedDistro and fails on any that arrives zero, so a future spec
addition cannot be forgotten here silently. There is one per BRANCH
deliberately: ResolveInherits has two merged literals, selected by
whether the child declares its own bootstrap, and a fix applied to only
one of them passes the other test while breaking every child that omits
bootstrap. A negative control confirms exactly that.

Negative controls, both run:

  restore the drop in both literals:
    ResolveInherits dropped 4 field(s) the child declared:
    [DiskLayout InheritPackages Installer Raw]   (both branches)

  fix only the first literal:
    Note this is the SECOND merged literal — a fix applied only to the
    first one passes the other parity test and still breaks every child
    that omits bootstrap.

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
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