cli

package
v0.53.1 Latest Latest
Warning

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

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

README

internal/cli

Thin cobra command wrappers around pkg/ functions. This package is internal and not importable by external tools.

Outstanding Questions

None at this time.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(err error)

Fatal prints the error and exits with the appropriate code.

func Run

func Run(args []string) error

Run executes the specscore CLI with the given arguments.

Types

type LifecycleTransactionReceipt added in v0.37.0

type LifecycleTransactionReceipt struct {
	ID           string
	State        string
	ProjectRoot  string
	RecoveryRoot string
	// RecoveryRootIdentity is the device/inode identity of the held recovery
	// stage directory. Protocol-v2 publishing/committed receipts require it so
	// reopening RecoveryRoot cannot silently bind another transaction's tree.
	RecoveryRootIdentity string
	BaselineDigest       string
	StagedDigest         string
	CreatedAt            string
	// PublishingIntentRequired marks protocol-v2 transactions. It is written
	// before any staged mutation so a committed receipt must retain and validate
	// its publishing intent rather than silently accepting a missing sidecar.
	PublishingIntentRequired bool
	// DeclaredWriteSet is the canonical spec-relative mutation boundary that
	// was verified against the staged output before publication.
	DeclaredWriteSet []string
}

LifecycleTransactionReceipt is the durable account of an exchanged staged project. Its predecessor is intentionally retained: an open descriptor may still write to that inode after exchange, so automatic reclamation would discard evidence that cannot safely be reconstructed.

func RunLifecycleTransaction added in v0.37.0

func RunLifecycleTransaction(realProjectRoot string, declaredWriteSet []string, op func(stagedProjectRoot string) error) (LifecycleTransactionReceipt, error)

RunLifecycleTransaction performs a lifecycle mutation in an isolated staged project. The callback receives "." while the process CWD is descriptor-anchored to that staged project; it must not retain the path after return. This makes package-level lifecycle code unable to reopen the live project during its mutation or lint pass.

The returned receipt is written before and after publication. Recovery is deliberately read-only in this first surface: raw old-FD writes remain an unavoidable operating-system limitation, so a predecessor is never removed automatically. The bounded retention limit refuses new work before writing a receipt; reclamation remains an explicit future operation.

Jump to

Keyboard shortcuts

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