contract

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package contract implements the Build CR contract adapter — the one-way projection from the resolved runtime spec (resolve.ResolvedBuildSpec) to the protobuf contract type (contractv1.BuildSpec).

The contract type is consumed by infrastructure-layer concerns only:

  • Execution hash computation (utils.ComputeExecutionHash)
  • Spec comparison across retry attempts
  • Audit and observability pipelines

Controllers and domain logic MUST NOT consume the returned contract value. The resolved runtime spec (resolve.ResolvedBuildSpec) is the authoritative type for all reconciliation decisions. The contract is a serialisation artifact, not a source of truth.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToBuildContract

func ToBuildContract(s *resolve.ResolvedBuildSpec) *contractv1.BuildSpec

ToBuildContract projects the resolved runtime spec into a protobuf contractv1.BuildSpec for infrastructure consumers (hashing, comparison, audit). Only non-zero fields are populated — nil sub-specs in the resolved contract produce nil fields in the output rather than empty structs.

⚠️ ONE-WAY adapter. The returned value MUST NOT be fed back into any controller or domain logic path. Controllers operate on resolve.ResolvedBuildSpec, never on the contract type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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