Documentation
¶
Overview ¶
Package workspace atomically projects committed catalogs into the optional human-editable provider YAML workspace.
Index ¶
- Constants
- func EncodeEndpointProjection(catalog *catalogs.Catalog, identity Identity) ([]byte, error)
- func ValidateHumanLayout(path, migrationTarget string) error
- func ValidateMachineSeparation(humanPath, machinePath, machineKind string) error
- type Identity
- type InputExpectation
- type LegacyLayoutMigrationResult
- type Receipt
- type RepairResult
- type RepairStatus
Constants ¶
const ( // IssueDirty identifies a workspace whose semantic contents differ from the // last successfully projected generation. IssueDirty = "workspace_modified" )
Variables ¶
This section is empty.
Functions ¶
func EncodeEndpointProjection ¶
EncodeEndpointProjection renders the deterministic, generation-bound author/model to provider-offering projection used by workspace tooling.
func ValidateHumanLayout ¶
ValidateHumanLayout verifies that path is absent or is not a pre-plan immutable generation store. It is read-only and safe to call before construction, repair, or publication.
func ValidateMachineSeparation ¶
ValidateMachineSeparation verifies that a machine-owned lifecycle root does not equal, contain, or sit beneath the human provider-YAML workspace.
Types ¶
type InputExpectation ¶
InputExpectation records workspace presence and, once loaded, its semantic digest before candidate construction. Projection rejects a different input.
func BindInputCatalog ¶
func BindInputCatalog(input InputExpectation, catalog *catalogs.Catalog) (InputExpectation, error)
BindInputCatalog records the semantic digest of the human catalog loaded from an existing workspace before candidate construction.
func ObserveInput ¶
func ObserveInput(path string) (InputExpectation, error)
ObserveInput records the selected workspace's presence without creating or modifying it.
func (InputExpectation) RequiresSeed ¶
func (i InputExpectation) RequiresSeed() bool
RequiresSeed reports whether an explicit operation selected an absent human workspace that must be materialized even when catalog facts are unchanged.
type LegacyLayoutMigrationResult ¶
type LegacyLayoutMigrationResult struct {
WorkspacePath string
StatePath string
GenerationID string
PayloadChecksum string
WorkspaceChecksum string
RetainedCount int
}
LegacyLayoutMigrationResult describes one completed machine-store relocation and human-workspace projection.
func MigrateLegacyLayout ¶
func MigrateLegacyLayout( ctx context.Context, legacyPath string, statePath string, ) (LegacyLayoutMigrationResult, error)
MigrateLegacyLayout explicitly relocates the pre-plan filesystem generation store and projects its current generation back to the vacated human workspace path. Validation and both advisory locks complete before the first rename.
type Receipt ¶
Receipt records the exact semantic workspace projection that became visible.
type RepairResult ¶
type RepairResult struct {
Status RepairStatus
IssueCode string
}
RepairResult reports startup projection reconciliation.
type RepairStatus ¶
type RepairStatus string
RepairStatus describes startup reconciliation between the durable current generation and its optional YAML projection.
const ( // RepairStatusCurrent means workspace contents and marker already match. RepairStatusCurrent RepairStatus = "current" // RepairStatusRepaired means startup safely restored or acknowledged the // current committed generation without publishing another generation. RepairStatusRepaired RepairStatus = "repaired" // RepairStatusSkippedDirty means semantic human edits prevented automatic // replacement. RepairStatusSkippedDirty RepairStatus = "skipped_dirty" )