Help us shape the future of Go! Take the 2026 Go Developer Survey

stackspeccompletion

package
v0.53.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package stackspeccompletion binds a losslessly read v1 StackSpec to one complete, explicit v2 candidate and resolves it through the governed Architecture v2 service. It deliberately sits above stackspecmigration: the migration projection remains architecture-only and cannot compile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Blocker stackspecmigration.Blocker
	Cause   error
}

Error carries the same structured blocker that was appended to Result.Report.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Input

type Input struct {
	Legacy           stackspecmigration.Document
	LegacySourceRef  string
	Candidate        []byte
	Inventory        []byte
	TargetKitProfile stackspecmigration.KitProfile
}

Input contains the losslessly classified legacy document and a complete v2 candidate supplied by the operator. TargetKitProfile is always explicit; context remains locality/hardware migration input only. Inventory is the optional observed Inventory the candidate resolves against; a Kit that binds node facts cannot resolve without it, and completion never substitutes any.

type Resolver

type Resolver interface {
	Resolve(architecturev2.ResolveInput) (architecturev2.Result, error)
}

Resolver is the exact architecture resolution boundary used by the CLI. Production callers pass *architecturev2.Service; the interface only keeps reconciliation tests independent from the embedded bundle generator.

type Result

type Result struct {
	Status                   stackspecmigration.MigrationStatus
	LegacySourceSHA256       string
	CandidateSourceSHA256    string
	CandidateIntentSHA256    string
	MigrationReportSHA256    string
	MigrationDecisionRecord  []byte
	CanonicalStackSpec       map[string]any
	CanonicalStackSpecBytes  []byte
	CanonicalStackSpecSHA256 string
	PlanHash                 string
	GeneratorEligible        bool
	Report                   stackspecmigration.Report
	ArchitectureProjection   *stackspecmigration.NormalizedArchitecture
}

Result is produced only after reconciliation and governed CUE resolution. CanonicalStackSpec is deterministic JSON for the explicit candidate. It is CUE-valid but is intentionally not described as CUE-default-expanded.

func Complete

func Complete(resolver Resolver, input Input) (Result, error)

Complete accepts no partial overlays. Candidate must be a complete explicit StackSpec v2, must preserve every deterministic v1 projection binding, and must pass the same Service.Resolve path used by the resolve CLI/API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL