Help us shape the future of Go! Take the 2026 Go Developer Survey

runstatus

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package runstatus acquires publication-first run status without transport projection or filesystem access.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidScope = errors.New("run status resolution returned an invalid scope")

Functions

func SolelyWraps

func SolelyWraps(err, target error) bool

SolelyWraps accepts a complete cause tree containing only target leaves. Ordinary and typed single wrappers, single-child joins and missing-only joins remain eligible; every non-target sibling makes the tree mixed.

Types

type Kind

type Kind uint8

Kind distinguishes publication, diagnostic-only and unavailable acquisition.

const (
	Publication Kind = iota
	Diagnostic
	Unavailable
)

type Phase

type Phase uint8

Phase identifies where acquisition failed, for transport-specific wrapping.

const (
	Resolve Phase = iota
	ResolveScope
	PublicationRead
	DiagnosticRead
	SessionDiagnosticRead
)

type PublicationQuery

type PublicationQuery interface {
	ResolveRun(context.Context, ports.AnchoredRoot, domain.RunID) (ports.PublicationRun, error)
	ReadRunStatus(context.Context, ports.PublicationRun) (PublicationStatus, error)
}

PublicationQuery supplies only run resolution and safe status reads.

type PublicationStatus

type PublicationStatus struct {
	FailedRunRecovery    recovery.Status
	SessionID            string
	RunID                string
	RunState             domain.RunState
	HasRunState          bool
	PublicationState     domain.PublicationStatus
	RecoveryAction       domain.RecoveryAction
	FinalArtifactURI     string
	HasFinalArtifact     bool
	ContentVerdict       domain.ContentVerdict
	CoverageStatus       domain.CoverageStatus
	CIDecision           domain.CIDecision
	HasAxes              bool
	RoleReportURIs       []RoleReportURI
	DiagnosticSummary    ports.RuntimeDiagnosticSummary
	HasDiagnosticSummary bool
}

PublicationStatus contains the safe query fields used by status transports. Final artifacts, axes and role reports require independently verified P2 support. Transports retain their field-presence and projection validation.

type Result

type Result struct {
	Kind       Kind
	Phase      Phase
	Run        ports.PublicationRun
	Status     PublicationStatus
	Diagnostic ports.RuntimeDiagnosticRunStatus
}

Result retains the resolved scope and the original error's phase. A missing diagnostic after missing publication returns Unavailable and the original publication error. Diagnostic state eligibility belongs to the transport.

type RoleReportURI

type RoleReportURI struct {
	Role string
	URI  string
}

RoleReportURI is one verified project-relative role-report identity.

type Service

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

Service owns acquisition policy through narrow query capabilities. A nil diagnostic query disables fallback and enrichment for the CLI's optional group.

func New

func New(publication PublicationQuery, diagnostics ports.RuntimeDiagnosticQuery) *Service

func (*Service) Read

func (service *Service) Read(ctx context.Context, root ports.AnchoredRoot, runID domain.RunID) (Result, error)

Read preserves original query errors; it adds no operational failure wrapper.

Jump to

Keyboard shortcuts

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