upgradebundle

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package upgradebundle loads bounded offline release evidence through the signature-backed trust factories. Bundle paths and inventory indexes are transport hints, never previous-version or trust-root authority.

Index

Constants

View Source
const IndexFormat = "hikyo.dev/offline-upgrade-bundle/v1"
View Source
const PlatformIndexFormat = "hikyo.dev/offline-upgrade-bundle/v2"

Variables

This section is empty.

Functions

func CopyNightlyPlatformRelease

func CopyNightlyPlatformRelease(ctx context.Context, directory, releasesDirectory string, snapshot releasetrust.Snapshot, platform string) (releasetrust.VerifiedRelease, error)

CopyNightlyPlatformRelease retains only the verified platform selection.

func CopyNightlyRelease

func CopyNightlyRelease(ctx context.Context, directory, releasesDirectory string, snapshot releasetrust.Snapshot) (releasetrust.VerifiedRelease, error)

CopyNightlyRelease writes beneath a private assembler staging directory. Payloads on the same filesystem share storage with the download cache. They must be treated as immutable; removing either directory keeps the other valid. Each payload is rehashed through the verified envelope. The caller authenticates the complete staged bundle before atomic public publication.

func VerifyNightlyDirectory

func VerifyNightlyDirectory(ctx context.Context, directory string, snapshot releasetrust.Snapshot) (releasetrust.VerifiedRelease, error)

VerifyNightlyDirectory authenticates a complete flat GitHub release download. Only the manifest and its signature are excluded from the signed inventory. Policy and Sigstore roots are payloads too; the recovery-signed snapshot must independently authorize their exact policy digest.

func VerifyNightlyPlatformDirectory

func VerifyNightlyPlatformDirectory(ctx context.Context, directory string, snapshot releasetrust.Snapshot, platform string) (releasetrust.VerifiedRelease, error)

VerifyNightlyPlatformDirectory verifies the closed selection for one platform.

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

Bundle holds immutable authenticated documents, not mutable downloaded artifact paths. The executor must separately pin and verify each payload.

func Load

Load uses caller-pinned installation/build trust and persisted rollback floors. A root or public key packaged as an archive member cannot override it. Only fixed filenames below digest-named release/bridge directories are read.

func (Bundle) GenesisManifests

func (b Bundle) GenesisManifests(engine releaseidentity.Engine) []upgradecompat.InstalledSource

GenesisManifests exposes signed candidate declarations for inspection. The caller must compare every candidate against the actual database catalog and goose history; this list itself does not identify the installed source.

func (Bundle) MatchBuild

func (b Bundle) MatchBuild(embeddedDeclaration []byte) (upgradecompat.VerifiedNode, error)

MatchBuild binds the embedded declaration's exact bytes to an authenticated release envelope. The manifest's own digest cannot be embedded recursively.

func (Bundle) MaterialDigest

func (b Bundle) MaterialDigest() releaseidentity.Digest

MaterialDigest binds every loaded public document, including index and signatures. Authenticated manifests independently bind loaded payload bytes.

func (Bundle) Plan

func (Bundle) ReferencedReleases

func (b Bundle) ReferencedReleases(engine releaseidentity.Engine) ([]releaseidentity.Identity, error)

ReferencedReleases returns a bounded, deterministic set of exact release identities named by authenticated source edges and recovery bridges for this engine. References are discovery hints, not authenticated release envelopes or an execution route. Fetch exact matching proofs and call Plan after inspection.

func (Bundle) Release

func (Bundle) Snapshot

func (b Bundle) Snapshot() releasetrust.Snapshot

func (Bundle) Sources

Sources lists independently authenticated inspection candidates. The caller must measure the actual database, then call Plan with that observed source.

func (Bundle) Valid

func (b Bundle) Valid() bool

type Index

type Index struct {
	Format          string                   `json:"format"`
	NightlyPlatform string                   `json:"nightly_platform,omitempty"`
	PrimaryKeyIDs   []string                 `json:"primary_key_ids"`
	Releases        []ReleaseEntry           `json:"releases"`
	Bridges         []releaseidentity.Digest `json:"bridges"`
}

type ReleaseEntry

type ReleaseEntry struct {
	Profile        releaseidentity.Profile `json:"profile"`
	ManifestSHA256 releaseidentity.Digest  `json:"manifest_sha256"`
}

Directories

Path Synopsis
Package testfixture writes ephemeral, genuinely signed offline bundles for integration tests.
Package testfixture writes ephemeral, genuinely signed offline bundles for integration tests.

Jump to

Keyboard shortcuts

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