Documentation
¶
Overview ¶
Package releasecontract defines the public, provider-neutral identity chain for a coordinated SecondBox release.
Index ¶
- Constants
- func AcceptImmutableRetry(existing, staged []byte) error
- func ArtifactManifestLocation(version string) string
- func BinaryLocation(version, name, platform string) string
- func Digest(data []byte) string
- func ParseTag(tag string) (string, error)
- func QualificationAttestationLocation(version string) string
- func ReleaseIndexLocation(version string) string
- func SourceFreeSuiteLocation(version string) string
- func ValidateRuntimeCombination(manifest ArtifactManifest, controlPlane, runner, guest Identity) error
- func VerifyFinalRelease(indexBytes, manifestBytes, qualificationBytes []byte) (ReleaseIndex, ArtifactManifest, QualificationAttestation, error)
- type ArtifactManifest
- type BinaryArtifact
- type Identity
- type MicroVMArtifact
- type OCIArtifact
- type OpenAPIArtifact
- type PlatformMatrix
- type ProtocolWindow
- type QualificationAttestation
- type QualifiedGuest
- type Reference
- type ReleaseIndex
- type RunnerEnvironment
- type SDKArtifact
- type SignedComponent
- type StandardBundleArtifact
- type StandardProfileIdentity
Constants ¶
const ( ArtifactManifestSchema = "secondbox.release/artifact-manifest/v2" QualificationAttestationSchema = "secondbox.release/qualification-attestation/v1" ReleaseIndexSchema = "secondbox.release/release-index/v1" TypeScriptPackage = "@secondstack-ai/secondbox" GoModule = "github.com/SecondStack-AI/SecondBox" ControlPlaneImage = "ghcr.io/secondstack-ai/secondbox/control-plane" RunnerImage = "ghcr.io/secondstack-ai/secondbox/runner" MicroVMImage = "ghcr.io/secondstack-ai/secondbox/microvm-artifacts" )
Variables ¶
This section is empty.
Functions ¶
func AcceptImmutableRetry ¶
AcceptImmutableRetry permits a publication retry only when the bytes already present at an immutable coordinate are identical to the staged candidate.
func BinaryLocation ¶
func ReleaseIndexLocation ¶
func SourceFreeSuiteLocation ¶
func ValidateRuntimeCombination ¶
func ValidateRuntimeCombination(manifest ArtifactManifest, controlPlane, runner, guest Identity) error
ValidateRuntimeCombination applies the v1 mixed-version policy. Until a future schema records explicit cross-release evidence, all runtime members must carry the artifact manifest's exact coordinated identity.
func VerifyFinalRelease ¶
func VerifyFinalRelease(indexBytes, manifestBytes, qualificationBytes []byte) (ReleaseIndex, ArtifactManifest, QualificationAttestation, error)
VerifyFinalRelease binds the exact public index bytes to the exact manifest and qualification bytes fetched independently by the caller.
Types ¶
type ArtifactManifest ¶
type ArtifactManifest struct {
SchemaVersion string `json:"schemaVersion"`
Identity
OpenAPI OpenAPIArtifact `json:"openapi"`
RunnerProtocol ProtocolWindow `json:"runnerProtocol"`
GuestProtocol ProtocolWindow `json:"guestProtocol"`
Platforms PlatformMatrix `json:"platforms"`
GoSDK SDKArtifact `json:"goSdk"`
TypeScriptSDK SDKArtifact `json:"typeScriptSdk"`
ControlPlane OCIArtifact `json:"controlPlane"`
Runner OCIArtifact `json:"runner"`
MicroVM MicroVMArtifact `json:"microvm"`
Binaries []BinaryArtifact `json:"binaries"`
SBOMs []Reference `json:"sboms"`
ArtifactAttestations []Reference `json:"artifactAttestations"`
SourceFreeSuite Reference `json:"sourceFreeSuite"`
StandardBundles []StandardBundleArtifact `json:"standardBundles"`
}
ArtifactManifest contains immutable artifact identity only. Qualification is deliberately separate so the final index has no digest cycle.
func DecodeArtifactManifest ¶
func DecodeArtifactManifest(data []byte) (ArtifactManifest, error)
func (ArtifactManifest) Validate ¶
func (manifest ArtifactManifest) Validate() error
type BinaryArtifact ¶
type Identity ¶
type Identity struct {
Version string `json:"version"`
Tag string `json:"tag"`
SourceCommit string `json:"sourceCommit"`
}
Identity is repeated on every independently inspectable release object.
type MicroVMArtifact ¶
type MicroVMArtifact struct {
Identity Identity `json:"identity"`
ImageReference string `json:"imageReference"`
SignedManifestDigest string `json:"signedManifestDigest"`
SigningKeyFingerprint string `json:"signingKeyFingerprint"`
RuntimeBundle SignedComponent `json:"runtimeBundle"`
ToolchainBundle SignedComponent `json:"toolchainBundle"`
}
type OCIArtifact ¶
type OpenAPIArtifact ¶
type PlatformMatrix ¶
type ProtocolWindow ¶
type QualificationAttestation ¶
type QualificationAttestation struct {
SchemaVersion string `json:"schemaVersion"`
Identity
ArtifactManifest Reference `json:"artifactManifest"`
Suite string `json:"suite"`
SuiteDigest string `json:"suiteDigest"`
Architecture string `json:"architecture"`
RunnerProtocolVersion uint32 `json:"runnerProtocolVersion"`
GuestProtocolGeneration uint32 `json:"guestProtocolGeneration"`
Guest QualifiedGuest `json:"guest"`
RunnerEnvironment RunnerEnvironment `json:"runnerEnvironment"`
Result string `json:"result"`
CompletedAt string `json:"completedAt"`
}
QualificationAttestation proves source-free use of one exact manifest.
func DecodeQualificationAttestation ¶
func DecodeQualificationAttestation(data []byte) (QualificationAttestation, error)
func (QualificationAttestation) Validate ¶
func (attestation QualificationAttestation) Validate() error
type QualifiedGuest ¶
type ReleaseIndex ¶
type ReleaseIndex struct {
SchemaVersion string `json:"schemaVersion"`
Identity
ArtifactManifest Reference `json:"artifactManifest"`
Qualification Reference `json:"qualificationAttestation"`
}
ReleaseIndex is the last artifact published. Its presence is the release completeness signal consumed by normal deployments.
func DecodeReleaseIndex ¶
func DecodeReleaseIndex(data []byte) (ReleaseIndex, error)
func (ReleaseIndex) Validate ¶
func (index ReleaseIndex) Validate() error
type RunnerEnvironment ¶
type SDKArtifact ¶
type SignedComponent ¶ added in v0.1.3
type SignedComponent struct {
ArtifactID string `json:"artifactId"`
ManifestDigest string `json:"manifestDigest"`
MandatoryGuestFeatures []string `json:"mandatoryGuestFeatures"`
}
SignedComponent is one independently selected component bound by the signed top-level microVM manifest.
type StandardBundleArtifact ¶
type StandardBundleArtifact struct {
Identity Identity `json:"identity"`
Name string `json:"name"`
Document Reference `json:"document"`
Profiles []StandardProfileIdentity `json:"profiles"`
}