execution

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package execution owns the held-root installation transaction used by the Architecture v2 authority boundary. It is internal so callers cannot bypass plan verification or redirect generated output through raw filesystem paths.

Index

Constants

Variables

This section is empty.

Functions

func ApplyRetiredOutputGC

func ApplyRetiredOutputGC(workspace *confinedfs.Transaction, expected RetiredOutputGCInspection) error

ApplyRetiredOutputGC executes at most the exact action returned by inspect. It re-inspects under the same held transaction and therefore cannot mutate a different tombstone after an operator copied an old action string.

func InstallManagedOutput

InstallManagedOutput performs the held-root stage/verify/swap transaction. Go's nested internal boundary permits calls only from the architecturev2 package tree; callers outside that authority cannot reach this raw mutation.

func RequireNoPendingOutputTransaction

func RequireNoPendingOutputTransaction(workspace *confinedfs.Transaction, outputRoot string) error

RequireNoPendingOutputTransaction is the shared fail-closed admission check for Generate, Plan, Apply, and Verify. The caller must already own the exact output lock; this function never acquires or weakens that lease.

func ValidateWorkspaceRoot

func ValidateWorkspaceRoot(root string) (string, error)

ValidateWorkspaceRoot canonicalizes the path-name assertion used only to match an already-held authorization root. Installation itself never reopens this pathname.

Types

type Error

type RetiredOutputGCAction

type RetiredOutputGCAction string

RetiredOutputGCAction is the one bounded mutation which may be taken for a retired output-transaction tombstone. Its value is intentionally echoed by the caller before mutation so inspection cannot accidentally become cleanup.

const (
	RetiredOutputGCRemoveStage   RetiredOutputGCAction = "remove-retired-stage"
	RetiredOutputGCRemoveJournal RetiredOutputGCAction = "remove-retired-journal"
)

type RetiredOutputGCInspection

type RetiredOutputGCInspection struct {
	TransactionID string                `json:"transactionId"`
	Action        RetiredOutputGCAction `json:"action"`
}

RetiredOutputGCInspection is a non-secret, exact report for one retired transaction namespace. Active journals and generated output are never read.

func InspectRetiredOutputGC

func InspectRetiredOutputGC(workspace *confinedfs.Transaction, transactionID string) (RetiredOutputGCInspection, error)

InspectRetiredOutputGC identifies exactly one permitted cleanup action for a deterministic retired transaction namespace. A journal is authority only when it is a complete immutable journal; malformed or partial evidence fails closed instead of being treated as deletion permission.

Jump to

Keyboard shortcuts

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