Documentation
¶
Index ¶
- Constants
- Variables
- func ClassifySuccessfulAttemptExtraction(parse ParseState, validation ValidationState) (reportsOnly bool, ok bool)
- func CompositeReasonCodes() []string
- func NewReviewSession(sessionID SessionID, createdAt time.Time, runID RunID, target TargetIdentity, ...) (Session, Run, error)
- func PublicationRecoveryCompatible(status PublicationStatus, action RecoveryAction) bool
- func ValidCompositeReasonCode(value string) bool
- type Attempt
- func (attempt *Attempt) AppendExtractInvocation(invocation Invocation) error
- func (attempt *Attempt) AppendRepairInvocation(invocation Invocation) error
- func (attempt *Attempt) AppendRetryInvocation(invocation Invocation) error
- func (attempt Attempt) ID() AttemptID
- func (attempt Attempt) Invocations() []Invocation
- func (attempt *Attempt) MarkInvocationRuntimeArtifactsExpected(sequence uint64) error
- func (attempt Attempt) ProviderInstance() string
- func (attempt Attempt) State() AttemptState
- func (attempt *Attempt) Transition(next AttemptState) error
- func (attempt *Attempt) TransitionInvocation(sequence uint64, next InvocationState) error
- type AttemptID
- type AttemptState
- type CIDecision
- type CIPolicy
- type CompositionFingerprint
- type CompositionSource
- type CompositionState
- type Confidence
- type ContentVerdict
- type CoverageStatus
- type DomainEvent
- type DurableObservationClass
- type EvidenceState
- type ExitReason
- type Failure
- type FailureClass
- type Finding
- func (finding Finding) Confidence() Confidence
- func (finding Finding) Description() string
- func (finding Finding) EvidenceState() EvidenceState
- func (finding Finding) Fingerprint() string
- func (finding Finding) ID() string
- func (finding Finding) Lifecycle() FindingLifecycle
- func (finding Finding) LineStart() int
- func (finding Finding) NormalizedEvidenceRegion() string
- func (finding Finding) NormalizedRuleCategory() string
- func (finding Finding) Path() string
- func (finding Finding) ProviderInstance() string
- func (finding Finding) Recommendation() string
- func (finding Finding) Role() Role
- func (finding Finding) Severity() Severity
- func (finding Finding) Title() string
- func (finding Finding) Validate() error
- func (finding Finding) WithEvidenceState(state EvidenceState) (Finding, error)
- type FindingInput
- type FindingLifecycle
- type FollowupResolution
- type GitTargetMode
- type Invocation
- type InvocationPurpose
- type InvocationState
- type OperationalExitCode
- type OperationalExitDecision
- type OperationalExitInput
- type OutcomeAxes
- func (axes OutcomeAxes) CIDecision() CIDecision
- func (axes OutcomeAxes) ContentVerdict() ContentVerdict
- func (axes OutcomeAxes) CoverageStatus() CoverageStatus
- func (axes OutcomeAxes) PublicationStatus() PublicationStatus
- func (axes OutcomeAxes) WithPublicationStatus(publication PublicationStatus) (OutcomeAxes, error)
- type ParseState
- type PersistedJournalState
- type PublicationAuthority
- type PublicationClassifierInput
- func (input PublicationClassifierInput) AmbiguityReasons() []string
- func (input PublicationClassifierInput) JournalState() PersistedJournalState
- func (input PublicationClassifierInput) Observation() DurableObservationClass
- func (input PublicationClassifierInput) StoredNormalExit() (OperationalExitCode, bool)
- func (input PublicationClassifierInput) Valid() bool
- type PublicationDecision
- func (decision PublicationDecision) Action() RecoveryAction
- func (decision PublicationDecision) Authority() PublicationAuthority
- func (decision PublicationDecision) ExitCode() (OperationalExitCode, bool)
- func (decision PublicationDecision) Reasons() []string
- func (decision PublicationDecision) Status() PublicationStatus
- func (decision PublicationDecision) Valid() bool
- type PublicationStatus
- type RecoveryAction
- type ReviewArtifact
- type ReviewID
- type Role
- type RoleResultSummary
- type RoleTask
- type RoleTaskState
- type Run
- func NewChildRun(id RunID, runType RunType, parent Run, source Run, target TargetIdentity, ...) (Run, error)
- func NewChildRunFromImmutableSource(id RunID, runType RunType, sessionID SessionID, parentRunID RunID, ...) (Run, error)
- func NewFollowupChildRun(id RunID, parent Run, source Run, target TargetIdentity, selected RoleTask) (Run, error)
- func NewFollowupChildRunFromImmutableSource(id RunID, sessionID SessionID, parentRunID RunID, sourceRunID RunID, ...) (Run, error)
- func NewRerunChildRunFromImmutableSource(id RunID, sessionID SessionID, parentRunID RunID, sourceRunID RunID, ...) (Run, error)
- func (run Run) ID() RunID
- func (run Run) ParentRunID() (RunID, bool)
- func (run Run) RoleTasks() []RoleTask
- func (run Run) SessionID() SessionID
- func (run Run) SourceRunID() (RunID, bool)
- func (run Run) State() RunState
- func (run Run) Target() TargetIdentity
- func (run *Run) Transition(next RunState) error
- func (run *Run) TransitionRole(role Role, next RoleTaskState) error
- func (run Run) Type() RunType
- type RunID
- type RunState
- type RunType
- type RuntimeDiagnosticCause
- type RuntimeDiagnosticEvent
- func (event RuntimeDiagnosticEvent) Code() RuntimeDiagnosticEventCode
- func (event RuntimeDiagnosticEvent) ElapsedMillis() uint64
- func (event RuntimeDiagnosticEvent) Input() RuntimeDiagnosticEventInput
- func (event RuntimeDiagnosticEvent) Level() RuntimeDiagnosticLevel
- func (event RuntimeDiagnosticEvent) Message() string
- func (event RuntimeDiagnosticEvent) SchemaVersion() string
- func (event RuntimeDiagnosticEvent) Sequence() uint64
- func (event RuntimeDiagnosticEvent) Time() time.Time
- type RuntimeDiagnosticEventCode
- type RuntimeDiagnosticEventDraft
- type RuntimeDiagnosticEventInput
- type RuntimeDiagnosticLevel
- type RuntimeDiagnosticPhase
- type RuntimeDiagnosticStream
- type Session
- type SessionID
- type Severity
- type SourceReference
- type StructuredExtractionStatus
- type TargetIdentity
- func (identity TargetIdentity) BaseObjectID() string
- func (identity TargetIdentity) GitMode() GitTargetMode
- func (identity TargetIdentity) HeadObjectID() string
- func (identity TargetIdentity) HeadTreeObjectID() string
- func (identity TargetIdentity) IndexTreeObjectID() string
- func (identity TargetIdentity) Kind() TargetKind
- func (identity TargetIdentity) RepositoryID() string
- func (identity TargetIdentity) SHA256() string
- type TargetIdentityInput
- type TargetKind
- type TransitionError
- type ValidationState
Constants ¶
const ( CompositeTargetMismatch = "composite_target_mismatch" CompositeTargetDigestInvalid = "composite_target_digest_invalid" CompositeLineageMismatch = "composite_lineage_mismatch" CompositeRoleNotRequired = "composite_role_not_required" CompositeRoleAlreadySatisfied = "composite_role_already_satisfied" CompositeRecoveryIncomplete = "composite_recovery_incomplete" CompositeSelectionAmbiguous = "composite_selection_ambiguous" CompositeValidationFailed = "composite_validation_failed" CompositePublicationIncomplete = "composite_publication_incomplete" )
const MaxRuntimeDiagnosticDiscardedPaths = 100
const RuntimeDiagnosticSchemaVersion = "mulgae-runtime-log.v3"
Variables ¶
var ErrInvariant = errors.New("domain invariant violation")
Functions ¶
func ClassifySuccessfulAttemptExtraction ¶ added in v0.1.4
func ClassifySuccessfulAttemptExtraction(parse ParseState, validation ValidationState) (reportsOnly bool, ok bool)
ClassifySuccessfulAttemptExtraction classifies a successful attempt's closed parse/validation pair. reportsOnly is true for not_started/not_started and for invalid or repair_exhausted validation with parse valid, invalid_json, or output_too_large; false for valid/(valid|repaired_valid). ok is false for any other pair, including empty_output with failed structured validation — empty assistant content cannot yield the required nonempty report body.
func CompositeReasonCodes ¶ added in v0.1.19
func CompositeReasonCodes() []string
func NewReviewSession ¶
func PublicationRecoveryCompatible ¶ added in v0.1.13
func PublicationRecoveryCompatible(status PublicationStatus, action RecoveryAction) bool
PublicationRecoveryCompatible reports whether action is the classifier-owned recovery action for status. It is the shared compatibility boundary for public projections of a publication decision.
func ValidCompositeReasonCode ¶ added in v0.1.19
Types ¶
type Attempt ¶
type Attempt struct {
// contains filtered or unexported fields
}
func NewAttempt ¶
func NewAttempt(id AttemptID, providerInstance string, initial Invocation) (Attempt, error)
func (*Attempt) AppendExtractInvocation ¶ added in v0.1.16
func (attempt *Attempt) AppendExtractInvocation(invocation Invocation) error
AppendExtractInvocation adds the sole Mulgae-owned structured extraction trailer after an accepted report. The attempt stays in validation because the trailer can only upgrade an already accepted result: it never decides attempt success, and it is mutually exclusive with retry and repair.
func (*Attempt) AppendRepairInvocation ¶
func (attempt *Attempt) AppendRepairInvocation(invocation Invocation) error
func (*Attempt) AppendRetryInvocation ¶ added in v0.1.15
func (attempt *Attempt) AppendRetryInvocation(invocation Invocation) error
AppendRetryInvocation adds the sole same-provider retry after a failed initial invocation. The attempt remains running and cannot later repair.
func (Attempt) Invocations ¶
func (attempt Attempt) Invocations() []Invocation
func (*Attempt) MarkInvocationRuntimeArtifactsExpected ¶ added in v0.1.11
MarkInvocationRuntimeArtifactsExpected records the trusted runtime boundary after prompt construction retained the immutable target and prompt inventory.
func (Attempt) ProviderInstance ¶
func (Attempt) State ¶
func (attempt Attempt) State() AttemptState
func (*Attempt) Transition ¶
func (attempt *Attempt) Transition(next AttemptState) error
func (*Attempt) TransitionInvocation ¶
func (attempt *Attempt) TransitionInvocation(sequence uint64, next InvocationState) error
type AttemptID ¶
type AttemptID struct {
// contains filtered or unexported fields
}
AttemptID identifies one logical provider attempt.
func ParseAttemptID ¶
func (AttemptID) MarshalText ¶
func (*AttemptID) UnmarshalJSON ¶
func (*AttemptID) UnmarshalText ¶
type AttemptState ¶
type AttemptState string
const ( AttemptQueued AttemptState = "queued" AttemptRunning AttemptState = "running" AttemptValidating AttemptState = "validating" AttemptRepairing AttemptState = "repairing" AttemptSucceeded AttemptState = "succeeded" AttemptFailed AttemptState = "failed" AttemptTimedOut AttemptState = "timed_out" AttemptCancelled AttemptState = "cancelled" AttemptBlocked AttemptState = "blocked" )
func (AttemptState) CanTransition ¶
func (value AttemptState) CanTransition(next AttemptState) bool
func (AttemptState) RequireTransition ¶
func (value AttemptState) RequireTransition(next AttemptState) error
func (AttemptState) Valid ¶
func (value AttemptState) Valid() bool
type CIDecision ¶
type CIDecision string
const ( CIPass CIDecision = "pass" CIFail CIDecision = "fail" )
func (CIDecision) Valid ¶
func (value CIDecision) Valid() bool
type CIPolicy ¶
type CIPolicy struct {
RequestChangesFails bool
DegradedReviewFails bool
IncompleteReviewFails bool
}
func DefaultCIPolicy ¶
func DefaultCIPolicy() CIPolicy
type CompositionFingerprint ¶ added in v0.1.19
type CompositionFingerprint struct {
// contains filtered or unexported fields
}
CompositionFingerprint binds one root to one exact, role-complete recovery mapping.
func NewCompositionFingerprint ¶ added in v0.1.19
func NewCompositionFingerprint(root RunID, sources []CompositionSource) (CompositionFingerprint, error)
func NewRecoveryCompositionFingerprint ¶ added in v0.1.20
func NewRecoveryCompositionFingerprint(root SourceReference, sources []CompositionSource) (CompositionFingerprint, error)
NewRecoveryCompositionFingerprint includes the immutable failed-root manifest while preserving the original fingerprint algorithm for published roots.
func (CompositionFingerprint) RunID ¶ added in v0.1.19
func (fingerprint CompositionFingerprint) RunID() (RunID, error)
RunID derives the stable opaque run identity for this exact composition. The UUID layout is canonical for Mulgae identities but carries no timestamp semantics; equality is determined solely by the composition fingerprint.
func (CompositionFingerprint) String ¶ added in v0.1.19
func (fingerprint CompositionFingerprint) String() string
type CompositionSource ¶ added in v0.1.19
type CompositionSource struct {
// contains filtered or unexported fields
}
CompositionSource is the trusted coordinate of one accepted role result.
func NewCompositionSource ¶ added in v0.1.19
func (CompositionSource) AttemptID ¶ added in v0.1.19
func (source CompositionSource) AttemptID() AttemptID
func (CompositionSource) ReviewID ¶ added in v0.1.19
func (source CompositionSource) ReviewID() ReviewID
func (CompositionSource) Role ¶ added in v0.1.19
func (source CompositionSource) Role() Role
func (CompositionSource) RunID ¶ added in v0.1.19
func (source CompositionSource) RunID() RunID
type CompositionState ¶ added in v0.1.19
type CompositionState string
CompositionState describes the public reconciliation state of one exact composition.
const ( CompositionCreated CompositionState = "created" CompositionReconciled CompositionState = "reconciled" CompositionNotCommitted CompositionState = "not_committed" CompositionStatusRequired CompositionState = "status_required" )
func (CompositionState) Valid ¶ added in v0.1.19
func (state CompositionState) Valid() bool
type Confidence ¶
type Confidence string
const ( ConfidenceLow Confidence = "low" ConfidenceMedium Confidence = "medium" ConfidenceHigh Confidence = "high" )
func (Confidence) Valid ¶
func (confidence Confidence) Valid() bool
type ContentVerdict ¶
type ContentVerdict string
const ( ContentNoFindings ContentVerdict = "no_findings" ContentFindingsPresent ContentVerdict = "findings_present" ContentRequestChanges ContentVerdict = "request_changes" // ContentReportsOnly means Mulgae published role reports without claiming a // structured finding set was extracted for the run. ContentReportsOnly ContentVerdict = "reports_only" )
func (ContentVerdict) Valid ¶
func (value ContentVerdict) Valid() bool
type CoverageStatus ¶
type CoverageStatus string
const ( CoverageComplete CoverageStatus = "complete" CoverageDegraded CoverageStatus = "degraded" CoverageIncomplete CoverageStatus = "incomplete" )
func (CoverageStatus) Valid ¶
func (value CoverageStatus) Valid() bool
type DomainEvent ¶
type DomainEvent struct {
// contains filtered or unexported fields
}
DomainEvent is an immutable coordinator-owned state transition record.
func NewDomainEvent ¶
func (DomainEvent) AggregateID ¶
func (event DomainEvent) AggregateID() string
func (DomainEvent) Kind ¶
func (event DomainEvent) Kind() string
func (DomainEvent) OccurredAt ¶
func (event DomainEvent) OccurredAt() time.Time
func (DomainEvent) Payload ¶
func (event DomainEvent) Payload() []byte
func (DomainEvent) Sequence ¶
func (event DomainEvent) Sequence() uint64
type DurableObservationClass ¶
type DurableObservationClass string
DurableObservationClass is the normalized class of durable publication facts. It records facts only; the classifier owns recovery policy.
const ( DurableObservationP2Committed DurableObservationClass = "P2_COMMITTED" DurableObservationP1Installed DurableObservationClass = "P1_INSTALLED" DurableObservationP0Staged DurableObservationClass = "P0_STAGED" DurableObservationP0None DurableObservationClass = "P0_NONE" DurableObservationAmbiguousOrMismatch DurableObservationClass = "AMBIGUOUS_OR_MISMATCH" )
func (DurableObservationClass) Valid ¶
func (class DurableObservationClass) Valid() bool
Valid reports whether class is one of the closed durable observation classes.
type EvidenceState ¶
type EvidenceState string
const ( EvidenceVerified EvidenceState = "verified" EvidencePartiallyVerified EvidenceState = "partially_verified" EvidenceUnverified EvidenceState = "unverified" EvidenceInvalidPath EvidenceState = "invalid_path" EvidenceInvalidLine EvidenceState = "invalid_line" EvidenceQuoteMismatch EvidenceState = "quote_mismatch" EvidenceOutsideScope EvidenceState = "outside_review_scope" )
func (EvidenceState) Valid ¶
func (value EvidenceState) Valid() bool
type ExitReason ¶
type ExitReason struct {
// contains filtered or unexported fields
}
ExitReason is one observed typed outcome and its stable reason code.
func NewExitReason ¶
func NewExitReason(code OperationalExitCode, reasonCode string) (ExitReason, error)
NewExitReason validates one stable operational reason.
func (ExitReason) Code ¶
func (reason ExitReason) Code() OperationalExitCode
Code returns the typed operational exit represented by the reason.
func (ExitReason) ReasonCode ¶
func (reason ExitReason) ReasonCode() string
ReasonCode returns the stable reason code.
type Failure ¶
type Failure struct {
// contains filtered or unexported fields
}
Failure is an immutable typed failure. Policy depends on Class, never on human-readable Reason or an underlying error string.
func NewFailure ¶
func (*Failure) Class ¶
func (failure *Failure) Class() FailureClass
type FailureClass ¶
type FailureClass string
const ( FailureInvalidOutput FailureClass = "invalid_provider_output" FailureTimeout FailureClass = "timeout" FailureAuthentication FailureClass = "auth" FailureQuota FailureClass = "quota" FailureRateLimit FailureClass = "rate_limit" FailureSecurityPolicy FailureClass = "security_policy_violation" FailureConfiguration FailureClass = "configuration_violation" FailureArtifact FailureClass = "artifact_failure" FailureInternal FailureClass = "mulgae_internal_error" FailureCancelled FailureClass = "user_cancelled" )
func (FailureClass) ProviderFault ¶ added in v0.1.4
func (class FailureClass) ProviderFault() bool
ProviderFault reports whether the class attributes the failure to the provider rather than to Mulgae, the captured target, or the operator. These are the classes a different provider could plausibly get past, so they are the ones worth recommending a provider switch for. Security, configuration, artifact, cancellation, and internal failures are never provider faults.
func (FailureClass) RepairAllowed ¶
func (class FailureClass) RepairAllowed() bool
func (FailureClass) Valid ¶
func (class FailureClass) Valid() bool
type Finding ¶
type Finding struct {
// contains filtered or unexported fields
}
Finding is an immutable, system-normalized finding. Its final ID is assigned only by OrderAndAssignFindings after validation and deterministic ordering.
func NewFinding ¶
func NewFinding(input FindingInput) (Finding, error)
func OrderAndAssignFindings ¶
func (Finding) Confidence ¶
func (finding Finding) Confidence() Confidence
func (Finding) Description ¶
func (Finding) EvidenceState ¶
func (finding Finding) EvidenceState() EvidenceState
func (Finding) Fingerprint ¶
func (Finding) Lifecycle ¶
func (finding Finding) Lifecycle() FindingLifecycle
func (Finding) NormalizedEvidenceRegion ¶
func (Finding) NormalizedRuleCategory ¶
func (Finding) ProviderInstance ¶
func (Finding) Recommendation ¶
func (Finding) WithEvidenceState ¶
func (finding Finding) WithEvidenceState(state EvidenceState) (Finding, error)
type FindingInput ¶
type FindingInput struct {
Severity Severity
Path string
LineStart int
Role Role
ProviderInstance string
Title string
Description string
Recommendation string
Confidence Confidence
Lifecycle FindingLifecycle
EvidenceState EvidenceState
NormalizedRuleCategory string
NormalizedEvidenceRegion string
}
type FindingLifecycle ¶
type FindingLifecycle string
const ( FindingOpen FindingLifecycle = "open" FindingAcknowledged FindingLifecycle = "acknowledged" FindingResolved FindingLifecycle = "resolved" FindingDismissed FindingLifecycle = "dismissed" )
func (FindingLifecycle) Valid ¶
func (value FindingLifecycle) Valid() bool
type FollowupResolution ¶
type FollowupResolution string
const ( FollowupResolved FollowupResolution = "resolved" FollowupPartiallyResolved FollowupResolution = "partially_resolved" FollowupStillOpen FollowupResolution = "still_open" FollowupUnclear FollowupResolution = "unclear" )
func (FollowupResolution) Valid ¶
func (value FollowupResolution) Valid() bool
type GitTargetMode ¶
type GitTargetMode string
const ( GitTargetDiff GitTargetMode = "diff" GitTargetStage GitTargetMode = "stage" GitTargetDirty GitTargetMode = "dirty" )
func (GitTargetMode) Valid ¶
func (mode GitTargetMode) Valid() bool
type Invocation ¶
type Invocation struct {
// contains filtered or unexported fields
}
func NewInvocation ¶
func NewInvocation(sequence uint64, purpose InvocationPurpose) (Invocation, error)
func (Invocation) Purpose ¶
func (invocation Invocation) Purpose() InvocationPurpose
func (Invocation) RuntimeArtifactsExpected ¶ added in v0.1.11
func (invocation Invocation) RuntimeArtifactsExpected() bool
func (Invocation) Sequence ¶
func (invocation Invocation) Sequence() uint64
func (Invocation) State ¶
func (invocation Invocation) State() InvocationState
type InvocationPurpose ¶
type InvocationPurpose string
const ( InvocationInitial InvocationPurpose = "initial" InvocationRetry InvocationPurpose = "retry" InvocationRepair InvocationPurpose = "repair" // InvocationExtract is the Mulgae-owned structured extraction trailer. It // transcribes an already accepted free-form role report into the provider // review wire contract on the same attempt, provider, and role. It never // carries the role report itself and never decides attempt success. InvocationExtract InvocationPurpose = "extract" )
func (InvocationPurpose) CarriesRoleReport ¶ added in v0.1.16
func (value InvocationPurpose) CarriesRoleReport() bool
CarriesRoleReport reports whether an invocation with this purpose may deliver the role report that decides attempt success. The extraction trailer does not: its failure leaves the already accepted report untouched.
func (InvocationPurpose) Valid ¶
func (value InvocationPurpose) Valid() bool
type InvocationState ¶
type InvocationState string
const ( InvocationQueued InvocationState = "queued" InvocationRunning InvocationState = "running" InvocationSucceeded InvocationState = "succeeded" InvocationFailed InvocationState = "failed" InvocationTimedOut InvocationState = "timed_out" InvocationCancelled InvocationState = "cancelled" InvocationBlocked InvocationState = "blocked" )
func (InvocationState) CanTransition ¶
func (value InvocationState) CanTransition(next InvocationState) bool
func (InvocationState) RequireTransition ¶
func (value InvocationState) RequireTransition(next InvocationState) error
func (InvocationState) Valid ¶
func (value InvocationState) Valid() bool
type OperationalExitCode ¶
type OperationalExitCode int
OperationalExitCode is one typed operational exit. Its priority is defined only by ReduceOperationalExit.
const ( ExitCommittedPass OperationalExitCode = 0 ExitCommittedCIRejected OperationalExitCode = 1 ExitConfiguration OperationalExitCode = 2 ExitIncompleteCoverage OperationalExitCode = 4 ExitArtifactFailure OperationalExitCode = 7 ExitSecurityViolation OperationalExitCode = 8 ExitCancelled OperationalExitCode = 9 ExitInternalError OperationalExitCode = 10 )
func (OperationalExitCode) Valid ¶
func (code OperationalExitCode) Valid() bool
Valid reports whether code is a typed operational exit.
type OperationalExitDecision ¶
type OperationalExitDecision struct {
// contains filtered or unexported fields
}
OperationalExitDecision is the selected exit and every original reason. The retained ordering lets reporting preserve facts that lost precedence.
func ReduceOperationalExit ¶
func ReduceOperationalExit(input OperationalExitInput) (OperationalExitDecision, error)
ReduceOperationalExit is a pure reduction with precedence 10 > 8 > 7 > 9 > 2 > 4 > 1 > 0. It retains every input reason unchanged.
func (OperationalExitDecision) Code ¶
func (decision OperationalExitDecision) Code() OperationalExitCode
Code returns the selected highest-precedence operational exit.
func (OperationalExitDecision) Reasons ¶
func (decision OperationalExitDecision) Reasons() []ExitReason
Reasons returns caller-owned retained reasons in their original stable order.
type OperationalExitInput ¶
type OperationalExitInput struct {
// contains filtered or unexported fields
}
OperationalExitInput is immutable input to the pure exit reducer.
func NewOperationalExitInput ¶
func NewOperationalExitInput(reasons []ExitReason) (OperationalExitInput, error)
NewOperationalExitInput validates and defensively copies every observed reason. At least one fact is required because exit selection is not a default.
func (OperationalExitInput) Reasons ¶
func (input OperationalExitInput) Reasons() []ExitReason
Reasons returns caller-owned observed reasons in their original stable order.
type OutcomeAxes ¶
type OutcomeAxes struct {
// contains filtered or unexported fields
}
func ComputeOutcomeAxes ¶
func ComputeOutcomeAxes(findings []Finding, results []RoleResultSummary, threshold Severity, publication PublicationStatus, policy *CIPolicy) (OutcomeAxes, error)
func (OutcomeAxes) CIDecision ¶
func (axes OutcomeAxes) CIDecision() CIDecision
func (OutcomeAxes) ContentVerdict ¶
func (axes OutcomeAxes) ContentVerdict() ContentVerdict
func (OutcomeAxes) CoverageStatus ¶
func (axes OutcomeAxes) CoverageStatus() CoverageStatus
func (OutcomeAxes) PublicationStatus ¶
func (axes OutcomeAxes) PublicationStatus() PublicationStatus
func (OutcomeAxes) WithPublicationStatus ¶
func (axes OutcomeAxes) WithPublicationStatus(publication PublicationStatus) (OutcomeAxes, error)
WithPublicationStatus returns axes with only the publication axis replaced.
type ParseState ¶
type ParseState string
const ( ParseNotStarted ParseState = "not_started" ParseValid ParseState = "valid" ParseInvalidJSON ParseState = "invalid_json" ParseEmptyOutput ParseState = "empty_output" ParseOutputTooLarge ParseState = "output_too_large" )
func (ParseState) Valid ¶
func (value ParseState) Valid() bool
type PersistedJournalState ¶
type PersistedJournalState string
PersistedJournalState is the last fsynced publication-journal hint. It is never publication authority.
const ( JournalCollecting PersistedJournalState = "collecting" JournalContentValidated PersistedJournalState = "content_validated" JournalFinalStaged PersistedJournalState = "final_staged" JournalFinalFileInstalled PersistedJournalState = "final_file_installed" JournalManifestCommitted PersistedJournalState = "manifest_committed" JournalCompleted PersistedJournalState = "completed" )
func (PersistedJournalState) Valid ¶
func (state PersistedJournalState) Valid() bool
Valid reports whether state is one of the closed persisted journal states.
type PublicationAuthority ¶
type PublicationAuthority string
PublicationAuthority states which durable level authorizes recovery work.
const ( PublicationAuthorityNone PublicationAuthority = "none" PublicationAuthorityP0 PublicationAuthority = "P0" PublicationAuthorityP1 PublicationAuthority = "P1" PublicationAuthorityP2 PublicationAuthority = "P2" )
func (PublicationAuthority) Valid ¶
func (authority PublicationAuthority) Valid() bool
Valid reports whether authority is one of the closed durable authorities.
type PublicationClassifierInput ¶
type PublicationClassifierInput struct {
// contains filtered or unexported fields
}
PublicationClassifierInput is immutable input to the total durable publication classifier. A stored normal exit is required only for P2. An ambiguity reason is required only for an ambiguous durable observation.
func NewPublicationClassifierInput ¶
func NewPublicationClassifierInput( journalState PersistedJournalState, observation DurableObservationClass, storedNormalExit *OperationalExitCode, ambiguityReasons []string, ) (PublicationClassifierInput, error)
NewPublicationClassifierInput validates immutable classifier input and takes ownership of ambiguityReasons. P2 requires a stored 0, 1, or 4 exit; every other observation must not claim one. Only ambiguity carries reason codes.
func (PublicationClassifierInput) AmbiguityReasons ¶
func (input PublicationClassifierInput) AmbiguityReasons() []string
AmbiguityReasons returns a caller-owned copy of ambiguity reason codes.
func (PublicationClassifierInput) JournalState ¶
func (input PublicationClassifierInput) JournalState() PersistedJournalState
JournalState returns the persisted journal hint.
func (PublicationClassifierInput) Observation ¶
func (input PublicationClassifierInput) Observation() DurableObservationClass
Observation returns the normalized durable observation class.
func (PublicationClassifierInput) StoredNormalExit ¶
func (input PublicationClassifierInput) StoredNormalExit() (OperationalExitCode, bool)
StoredNormalExit returns the stored normal projection when Observation is P2.
func (PublicationClassifierInput) Valid ¶
func (input PublicationClassifierInput) Valid() bool
Valid reports whether input is a coherent immutable classifier input.
type PublicationDecision ¶
type PublicationDecision struct {
// contains filtered or unexported fields
}
PublicationDecision is the immutable result of durable publication classification. ExitCode is present only for terminal P2 and corrupt states.
func ClassifyPublication ¶
func ClassifyPublication(input PublicationClassifierInput) (PublicationDecision, error)
ClassifyPublication applies the total durable authority precedence exactly once. It never derives authority from the journal hint.
func NewPublicationDecision ¶
func NewPublicationDecision( status PublicationStatus, authority PublicationAuthority, action RecoveryAction, exitCode *OperationalExitCode, reasons []string, ) (PublicationDecision, error)
NewPublicationDecision validates an immutable classifier decision and takes ownership of reasons. The allowed fields are the exact classifier matrix.
func (PublicationDecision) Action ¶
func (decision PublicationDecision) Action() RecoveryAction
Action returns the exact next recovery action.
func (PublicationDecision) Authority ¶
func (decision PublicationDecision) Authority() PublicationAuthority
Authority returns the durable authority selected by classification.
func (PublicationDecision) ExitCode ¶
func (decision PublicationDecision) ExitCode() (OperationalExitCode, bool)
ExitCode returns a terminal exit only for committed or corrupt decisions.
func (PublicationDecision) Reasons ¶
func (decision PublicationDecision) Reasons() []string
Reasons returns caller-owned ambiguity diagnostic reasons in stable order.
func (PublicationDecision) Status ¶
func (decision PublicationDecision) Status() PublicationStatus
Status returns the derived publication status.
func (PublicationDecision) Valid ¶
func (decision PublicationDecision) Valid() bool
Valid reports whether decision is a coherent classifier result.
type PublicationStatus ¶
type PublicationStatus string
const ( PublicationNotPublished PublicationStatus = "not_published" PublicationStaged PublicationStatus = "staged" PublicationInstalled PublicationStatus = "installed" PublicationCommitted PublicationStatus = "committed" PublicationCorrupt PublicationStatus = "corrupt" )
func (PublicationStatus) Valid ¶
func (value PublicationStatus) Valid() bool
type RecoveryAction ¶
type RecoveryAction string
RecoveryAction is the next app-owned publication recovery action.
const ( RecoveryActionNone RecoveryAction = "none" RecoveryActionResumeCollection RecoveryAction = "resume_collection" RecoveryActionRestageValidatedCandidate RecoveryAction = "restage_validated_candidate" RecoveryActionInstallStagedFinal RecoveryAction = "install_staged_final" RecoveryActionCommitCompositeEpoch RecoveryAction = "commit_composite_epoch" RecoveryActionReconstructCompletedStatus RecoveryAction = "reconstruct_completed_status" RecoveryActionEmitImmutableCorruptionDiagnostic RecoveryAction = "emit_immutable_corruption_diagnostic" )
func (RecoveryAction) Valid ¶
func (action RecoveryAction) Valid() bool
Valid reports whether action is one of the closed recovery actions.
type ReviewArtifact ¶
type ReviewArtifact struct {
// contains filtered or unexported fields
}
func NewReviewArtifact ¶
func NewReviewArtifact(id ReviewID, axes OutcomeAxes, createdAt time.Time, fileSHA256 string) (ReviewArtifact, error)
func (ReviewArtifact) CreatedAt ¶
func (artifact ReviewArtifact) CreatedAt() time.Time
func (ReviewArtifact) FileSHA256 ¶
func (artifact ReviewArtifact) FileSHA256() string
func (ReviewArtifact) ID ¶
func (artifact ReviewArtifact) ID() ReviewID
func (ReviewArtifact) Outcomes ¶
func (artifact ReviewArtifact) Outcomes() OutcomeAxes
type ReviewID ¶
type ReviewID struct {
// contains filtered or unexported fields
}
ReviewID identifies one final review artifact. Unlike directory identifiers, it is not prefixed.
func ParseReviewID ¶
func (ReviewID) MarshalText ¶
func (*ReviewID) UnmarshalJSON ¶
func (*ReviewID) UnmarshalText ¶
type Role ¶
type Role string
func CoreRoleOrder ¶
func CoreRoleOrder() []Role
CoreRoleOrder returns the six unconditional roles retained for non-UI projects.
func FixedRoleOrder ¶
func FixedRoleOrder() []Role
func (Role) RequiredFloor ¶
type RoleResultSummary ¶
type RoleTask ¶
type RoleTask struct {
// contains filtered or unexported fields
}
RoleTask is one role's assignment to exactly one provider. A role never changes provider mid-run: a failure is reported against the configured provider and the operator chooses any replacement.
func NewRoleTask ¶
func (RoleTask) PrimaryProvider ¶
func (RoleTask) State ¶
func (task RoleTask) State() RoleTaskState
type RoleTaskState ¶
type RoleTaskState string
const ( RoleTaskPending RoleTaskState = "pending" RoleTaskPrimaryQueued RoleTaskState = "primary_queued" RoleTaskPrimaryRunning RoleTaskState = "primary_running" RoleTaskSucceeded RoleTaskState = "succeeded" RoleTaskFailed RoleTaskState = "failed" RoleTaskCancelled RoleTaskState = "cancelled" // RoleTaskBlocked is terminal for a role that never ran: the run stopped // before it was dispatched, or its provider family was quarantined. RoleTaskBlocked RoleTaskState = "blocked" )
func (RoleTaskState) CanTransition ¶
func (value RoleTaskState) CanTransition(next RoleTaskState) bool
func (RoleTaskState) RequireTransition ¶
func (value RoleTaskState) RequireTransition(next RoleTaskState) error
func (RoleTaskState) Valid ¶
func (value RoleTaskState) Valid() bool
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
func NewChildRun ¶
func NewChildRunFromImmutableSource ¶
func NewChildRunFromImmutableSource( id RunID, runType RunType, sessionID SessionID, parentRunID RunID, sourceRunID RunID, target TargetIdentity, roles []RoleTask, ) (Run, error)
NewChildRunFromImmutableSource creates a fresh child using only verified immutable lineage identifiers. It does not require or reconstruct source run state.
func NewFollowupChildRun ¶
func NewFollowupChildRun(id RunID, parent Run, source Run, target TargetIdentity, selected RoleTask) (Run, error)
NewFollowupChildRun creates a fresh, finding-scoped followup child. Followups deliberately execute only the selected source role. Broad recomposed runs validate the exact non-empty role subset selected by their caller.
func NewFollowupChildRunFromImmutableSource ¶
func NewFollowupChildRunFromImmutableSource( id RunID, sessionID SessionID, parentRunID RunID, sourceRunID RunID, target TargetIdentity, selected RoleTask, ) (Run, error)
NewFollowupChildRunFromImmutableSource is the immutable-lineage form of NewFollowupChildRun. It keeps the followup's single selected-role exception isolated from the broad child constructors.
func NewRerunChildRunFromImmutableSource ¶
func NewRerunChildRunFromImmutableSource( id RunID, sessionID SessionID, parentRunID RunID, sourceRunID RunID, target TargetIdentity, selected RoleTask, ) (Run, error)
NewRerunChildRunFromImmutableSource creates an exact-replay child with only the source-selected role. Broad recomposed reruns continue to use NewChildRunFromImmutableSource and validate their exact selected subset.
func (Run) ParentRunID ¶
func (Run) SourceRunID ¶
func (Run) Target ¶
func (run Run) Target() TargetIdentity
func (*Run) Transition ¶
func (*Run) TransitionRole ¶
func (run *Run) TransitionRole(role Role, next RoleTaskState) error
type RunID ¶
type RunID struct {
// contains filtered or unexported fields
}
RunID identifies one immutable execution in a session.
func ParseRunID ¶
func (RunID) MarshalText ¶
func (*RunID) UnmarshalJSON ¶
func (*RunID) UnmarshalText ¶
type RunState ¶
type RunState string
func (RunState) CanTransition ¶
func (RunState) RequireTransition ¶
type RuntimeDiagnosticCause ¶
type RuntimeDiagnosticCause string
const ( DiagnosticCauseProviderSpawnFailed RuntimeDiagnosticCause = "provider_spawn_failed" DiagnosticCauseProviderExecutionFailed RuntimeDiagnosticCause = "provider_execution_failed" DiagnosticCauseProviderTurnFailed RuntimeDiagnosticCause = "provider_turn_failed" DiagnosticCauseProviderProcessWaitFailed RuntimeDiagnosticCause = "provider_process_wait_failed" DiagnosticCauseProcessGroupCleanupFailed RuntimeDiagnosticCause = "provider_process_group_cleanup_failed" DiagnosticCauseTransportVerificationFailed RuntimeDiagnosticCause = "provider_transport_verification_failed" DiagnosticCausePromptFilePreStartFailed RuntimeDiagnosticCause = "provider_prompt_file_prestart_identity_failed" DiagnosticCausePromptFilePostEndFailed RuntimeDiagnosticCause = "provider_prompt_file_posttermination_identity_failed" DiagnosticCauseTransportReceiptMismatch RuntimeDiagnosticCause = "provider_transport_receipt_mismatch" DiagnosticCauseLifecycleReceiptInvalid RuntimeDiagnosticCause = "provider_lifecycle_receipt_invalid" DiagnosticCauseOutputFrameMissing RuntimeDiagnosticCause = "provider_output_frame_missing" DiagnosticCauseOutputMissing RuntimeDiagnosticCause = "provider_output_missing" DiagnosticCauseOutputFrameMismatch RuntimeDiagnosticCause = "provider_output_frame_mismatch" DiagnosticCauseSignalReceiptMismatch RuntimeDiagnosticCause = "provider_signal_receipt_mismatch" DiagnosticCauseOutputEnvelopeInvalid RuntimeDiagnosticCause = "provider_output_envelope_invalid" DiagnosticCauseOutputDecodeFailed RuntimeDiagnosticCause = "provider_output_decode_failed" DiagnosticCauseProviderOutputFileMissing RuntimeDiagnosticCause = "provider_output_file_missing" DiagnosticCauseProviderOutputFileInvalid RuntimeDiagnosticCause = "provider_output_file_invalid" DiagnosticCauseProviderOutputStagingViolation RuntimeDiagnosticCause = "provider_output_staging_violation" DiagnosticCauseProviderOutputStagingCleanupFailed RuntimeDiagnosticCause = "provider_output_staging_cleanup_failed" DiagnosticCauseResultBindingFailed RuntimeDiagnosticCause = "provider_result_binding_failed" DiagnosticCauseObservationInvalid RuntimeDiagnosticCause = "provider_observation_invalid" DiagnosticCauseObservationMismatch RuntimeDiagnosticCause = "provider_observation_mismatch" DiagnosticCauseCandidateValidationFailed RuntimeDiagnosticCause = "candidate_validation_failed" DiagnosticCauseCandidateRepairPlanInvalid RuntimeDiagnosticCause = "candidate_repair_plan_invalid" DiagnosticCauseWorkspaceRevalidationFailed RuntimeDiagnosticCause = "workspace_revalidation_failed" DiagnosticCausePersistenceFailed RuntimeDiagnosticCause = "diagnostic_persistence_failed" DiagnosticCausePublicationCandidateInvalid RuntimeDiagnosticCause = "publication_candidate_invalid" DiagnosticCausePublicationEvidenceFailed RuntimeDiagnosticCause = "publication_evidence_verification_failed" DiagnosticCausePublicationSchemaFailed RuntimeDiagnosticCause = "publication_schema_validation_failed" DiagnosticCausePublicationSerializationFailed RuntimeDiagnosticCause = "publication_serialization_failed" DiagnosticCausePublicationStoreLockFailed RuntimeDiagnosticCause = "publication_store_lock_failed" DiagnosticCausePublicationPathFailed RuntimeDiagnosticCause = "publication_path_preparation_failed" DiagnosticCausePublicationPersistenceFailed RuntimeDiagnosticCause = "publication_persistence_failed" DiagnosticCausePublicationInstallationFailed RuntimeDiagnosticCause = "publication_installation_failed" DiagnosticCausePublicationCommitFailed RuntimeDiagnosticCause = "publication_commit_failed" DiagnosticCauseLoginRequired RuntimeDiagnosticCause = "provider_login_required" DiagnosticCauseAuthenticationFailed RuntimeDiagnosticCause = "provider_authentication_failed" DiagnosticCauseQuotaExceeded RuntimeDiagnosticCause = "provider_quota_exceeded" DiagnosticCauseRateLimited RuntimeDiagnosticCause = "provider_rate_limited" DiagnosticCauseTimedOut RuntimeDiagnosticCause = "provider_timed_out" DiagnosticCausePermissionDenied RuntimeDiagnosticCause = "provider_permission_denied" )
func (RuntimeDiagnosticCause) Valid ¶
func (cause RuntimeDiagnosticCause) Valid() bool
type RuntimeDiagnosticEvent ¶
type RuntimeDiagnosticEvent struct {
// contains filtered or unexported fields
}
func StampRuntimeDiagnosticEvent ¶
func StampRuntimeDiagnosticEvent(draft RuntimeDiagnosticEventDraft, sequence uint64, timestamp time.Time, elapsedMillis uint64) (RuntimeDiagnosticEvent, error)
func (RuntimeDiagnosticEvent) Code ¶
func (event RuntimeDiagnosticEvent) Code() RuntimeDiagnosticEventCode
func (RuntimeDiagnosticEvent) ElapsedMillis ¶
func (event RuntimeDiagnosticEvent) ElapsedMillis() uint64
func (RuntimeDiagnosticEvent) Input ¶
func (event RuntimeDiagnosticEvent) Input() RuntimeDiagnosticEventInput
func (RuntimeDiagnosticEvent) Level ¶
func (event RuntimeDiagnosticEvent) Level() RuntimeDiagnosticLevel
func (RuntimeDiagnosticEvent) Message ¶
func (event RuntimeDiagnosticEvent) Message() string
func (RuntimeDiagnosticEvent) SchemaVersion ¶
func (event RuntimeDiagnosticEvent) SchemaVersion() string
func (RuntimeDiagnosticEvent) Sequence ¶
func (event RuntimeDiagnosticEvent) Sequence() uint64
func (RuntimeDiagnosticEvent) Time ¶
func (event RuntimeDiagnosticEvent) Time() time.Time
type RuntimeDiagnosticEventCode ¶
type RuntimeDiagnosticEventCode string
const ( DiagnosticCommandAccepted RuntimeDiagnosticEventCode = "command_accepted" DiagnosticRuntimeOpened RuntimeDiagnosticEventCode = "runtime_diagnostics_opened" DiagnosticSessionCreated RuntimeDiagnosticEventCode = "session_created" DiagnosticRunCreated RuntimeDiagnosticEventCode = "run_created" DiagnosticRunStarted RuntimeDiagnosticEventCode = "run_started" DiagnosticRunCompleted RuntimeDiagnosticEventCode = "run_completed" DiagnosticRunStopped RuntimeDiagnosticEventCode = "run_stopped" DiagnosticRuntimeClosed RuntimeDiagnosticEventCode = "runtime_diagnostics_closed" DiagnosticQualificationStarted RuntimeDiagnosticEventCode = "qualification_started" DiagnosticQualificationCandidateChecked RuntimeDiagnosticEventCode = "qualification_candidate_checked" DiagnosticQualificationSucceeded RuntimeDiagnosticEventCode = "qualification_succeeded" DiagnosticQualificationRejected RuntimeDiagnosticEventCode = "qualification_rejected" DiagnosticReviewPlanCreated RuntimeDiagnosticEventCode = "review_plan_created" DiagnosticAssignmentResolved RuntimeDiagnosticEventCode = "assignment_resolved" DiagnosticRunBudgetAccepted RuntimeDiagnosticEventCode = "run_budget_accepted" DiagnosticRolePathScheduled RuntimeDiagnosticEventCode = "role_path_scheduled" DiagnosticRolePathStarted RuntimeDiagnosticEventCode = "role_path_started" DiagnosticAttemptCreated RuntimeDiagnosticEventCode = "attempt_created" DiagnosticAttemptStarted RuntimeDiagnosticEventCode = "attempt_started" DiagnosticAttemptCompleted RuntimeDiagnosticEventCode = "attempt_completed" DiagnosticAttemptFailed RuntimeDiagnosticEventCode = "attempt_failed" DiagnosticRolePathCompleted RuntimeDiagnosticEventCode = "role_path_completed" DiagnosticRolePathCancelled RuntimeDiagnosticEventCode = "role_path_cancelled" DiagnosticInvocationPrepared RuntimeDiagnosticEventCode = "provider_invocation_prepared" DiagnosticSpawnRevalidated RuntimeDiagnosticEventCode = "provider_spawn_revalidated" DiagnosticProcessStarted RuntimeDiagnosticEventCode = "provider_process_started" DiagnosticIOObserved RuntimeDiagnosticEventCode = "provider_io_observed" DiagnosticProcessExited RuntimeDiagnosticEventCode = "provider_process_exited" DiagnosticProcessTimedOut RuntimeDiagnosticEventCode = "provider_process_timed_out" DiagnosticProcessCancelled RuntimeDiagnosticEventCode = "provider_process_cancelled" DiagnosticProcessTerminated RuntimeDiagnosticEventCode = "provider_process_terminated" DiagnosticOutputReceived RuntimeDiagnosticEventCode = "provider_output_received" DiagnosticOutputParseStarted RuntimeDiagnosticEventCode = "provider_output_parse_started" DiagnosticOutputParsed RuntimeDiagnosticEventCode = "provider_output_parsed" DiagnosticOutputParseFailed RuntimeDiagnosticEventCode = "provider_output_parse_failed" DiagnosticValidationStarted RuntimeDiagnosticEventCode = "candidate_validation_started" DiagnosticValidationSucceeded RuntimeDiagnosticEventCode = "candidate_validation_succeeded" DiagnosticProviderFieldsDiscarded RuntimeDiagnosticEventCode = "provider_output_fields_discarded" DiagnosticValidationFailed RuntimeDiagnosticEventCode = "candidate_validation_failed" DiagnosticRepairScheduled RuntimeDiagnosticEventCode = "repair_scheduled" DiagnosticRepairStarted RuntimeDiagnosticEventCode = "repair_started" DiagnosticRepairCompleted RuntimeDiagnosticEventCode = "repair_completed" DiagnosticRepairExhausted RuntimeDiagnosticEventCode = "repair_exhausted" DiagnosticProviderQuarantined RuntimeDiagnosticEventCode = "provider_quarantined" DiagnosticRoleNotAttempted RuntimeDiagnosticEventCode = "role_not_attempted" DiagnosticRoleCompleted RuntimeDiagnosticEventCode = "role_completed" DiagnosticRoleExhausted RuntimeDiagnosticEventCode = "role_exhausted" DiagnosticReductionStarted RuntimeDiagnosticEventCode = "coordinator_reduction_started" DiagnosticReductionCompleted RuntimeDiagnosticEventCode = "coordinator_reduction_completed" DiagnosticPublicationPreparationStarted RuntimeDiagnosticEventCode = "publication_preparation_started" DiagnosticPublicationStaged RuntimeDiagnosticEventCode = "publication_staged" DiagnosticPublicationInstalled RuntimeDiagnosticEventCode = "publication_installed" DiagnosticPublicationCommitted RuntimeDiagnosticEventCode = "publication_committed" DiagnosticPublicationFailed RuntimeDiagnosticEventCode = "publication_failed" DiagnosticNamespaceDrainStarted RuntimeDiagnosticEventCode = "provider_namespace_drain_started" DiagnosticNamespaceDrained RuntimeDiagnosticEventCode = "provider_namespace_drained" DiagnosticWorkspaceCleanupStarted RuntimeDiagnosticEventCode = "workspace_cleanup_started" DiagnosticWorkspaceCleanupCompleted RuntimeDiagnosticEventCode = "workspace_cleanup_completed" )
func (RuntimeDiagnosticEventCode) SafeMessage ¶
func (code RuntimeDiagnosticEventCode) SafeMessage() string
func (RuntimeDiagnosticEventCode) Valid ¶
func (code RuntimeDiagnosticEventCode) Valid() bool
type RuntimeDiagnosticEventDraft ¶
type RuntimeDiagnosticEventDraft struct {
// contains filtered or unexported fields
}
func NewRuntimeDiagnosticEventDraft ¶
func NewRuntimeDiagnosticEventDraft(input RuntimeDiagnosticEventInput) (RuntimeDiagnosticEventDraft, error)
func (RuntimeDiagnosticEventDraft) Input ¶
func (draft RuntimeDiagnosticEventDraft) Input() RuntimeDiagnosticEventInput
func (RuntimeDiagnosticEventDraft) Valid ¶
func (draft RuntimeDiagnosticEventDraft) Valid() bool
type RuntimeDiagnosticEventInput ¶
type RuntimeDiagnosticEventInput struct {
Level RuntimeDiagnosticLevel
Component, Operation string
Event RuntimeDiagnosticEventCode
SessionID SessionID
RunID RunID
AttemptID AttemptID
InvocationID string
Role Role
Provider string
Cause RuntimeDiagnosticCause
Failure, Mitigation string
State, Outcome, Termination string
Stream RuntimeDiagnosticStream
Offset, Length int64
ExitCode int
HasExitCode bool
ArtifactRef string
DiscardedPaths []string
DiscardedPathCount int
}
type RuntimeDiagnosticLevel ¶
type RuntimeDiagnosticLevel string
const ( RuntimeDiagnosticInfo RuntimeDiagnosticLevel = "INFO" RuntimeDiagnosticWarn RuntimeDiagnosticLevel = "WARN" RuntimeDiagnosticError RuntimeDiagnosticLevel = "ERROR" )
func (RuntimeDiagnosticLevel) Valid ¶
func (level RuntimeDiagnosticLevel) Valid() bool
type RuntimeDiagnosticPhase ¶ added in v0.1.4
type RuntimeDiagnosticPhase string
RuntimeDiagnosticPhase is a bounded, path-free machine identifier for the terminal pipeline phase. It is safe to persist and expose through status.
const ( DiagnosticPhasePublicationCandidate RuntimeDiagnosticPhase = "publication_candidate" DiagnosticPhasePublicationFinalReview RuntimeDiagnosticPhase = "publication_final_review" DiagnosticPhasePublicationManifest RuntimeDiagnosticPhase = "publication_manifest" DiagnosticPhasePublicationStoreLock RuntimeDiagnosticPhase = "publication_store_lock" DiagnosticPhasePublicationPersistence RuntimeDiagnosticPhase = "publication_persistence" DiagnosticPhasePublicationStaging RuntimeDiagnosticPhase = "publication_staging" DiagnosticPhasePublicationInstallation RuntimeDiagnosticPhase = "publication_installation" DiagnosticPhasePublicationCommit RuntimeDiagnosticPhase = "publication_commit" DiagnosticPhaseDiagnostics RuntimeDiagnosticPhase = "diagnostics" )
func (RuntimeDiagnosticPhase) Valid ¶ added in v0.1.4
func (phase RuntimeDiagnosticPhase) Valid() bool
type RuntimeDiagnosticStream ¶
type RuntimeDiagnosticStream string
const ( DiagnosticStdout RuntimeDiagnosticStream = "stdout" DiagnosticStderr RuntimeDiagnosticStream = "stderr" )
func (RuntimeDiagnosticStream) Valid ¶
func (stream RuntimeDiagnosticStream) Valid() bool
type SessionID ¶
type SessionID struct {
// contains filtered or unexported fields
}
SessionID identifies one immutable review lineage. Its representation is opaque so callers cannot bypass UUIDv7 validation with a type conversion.
func ParseSessionID ¶
func (SessionID) MarshalText ¶
func (*SessionID) UnmarshalJSON ¶
func (*SessionID) UnmarshalText ¶
type SourceReference ¶ added in v0.1.20
type SourceReference struct {
// contains filtered or unexported fields
}
SourceReference identifies either a published review or an immutable failed-run recovery manifest. A recovery reference never carries publication authority.
func NewPublishedSourceReference ¶ added in v0.1.20
func NewPublishedSourceReference(run RunID, review ReviewID) (SourceReference, error)
func NewRecoverySourceReference ¶ added in v0.1.20
func NewRecoverySourceReference(run RunID, manifestSHA256 string) (SourceReference, error)
func (SourceReference) Kind ¶ added in v0.1.20
func (reference SourceReference) Kind() string
func (SourceReference) RecoveryManifestSHA256 ¶ added in v0.1.20
func (reference SourceReference) RecoveryManifestSHA256() string
func (SourceReference) ReviewID ¶ added in v0.1.20
func (reference SourceReference) ReviewID() ReviewID
func (SourceReference) RunID ¶ added in v0.1.20
func (reference SourceReference) RunID() RunID
func (SourceReference) Valid ¶ added in v0.1.20
func (reference SourceReference) Valid() bool
type StructuredExtractionStatus ¶ added in v0.1.4
type StructuredExtractionStatus string
StructuredExtractionStatus is Mulgae-owned coverage of structured finding extraction across selected roles. It is independent of provider degraded failure and of role-report delivery.
const ( StructuredExtractionStructured StructuredExtractionStatus = "structured" StructuredExtractionMixed StructuredExtractionStatus = "mixed" StructuredExtractionReportsOnly StructuredExtractionStatus = "reports_only" )
func ComputeStructuredExtractionStatus ¶ added in v0.1.4
func ComputeStructuredExtractionStatus(results []RoleResultSummary) StructuredExtractionStatus
ComputeStructuredExtractionStatus derives Mulgae-owned structured-extraction coverage across selected role summaries.
func (StructuredExtractionStatus) Valid ¶ added in v0.1.4
func (value StructuredExtractionStatus) Valid() bool
type TargetIdentity ¶
type TargetIdentity struct {
// contains filtered or unexported fields
}
TargetIdentity binds a run to immutable target bytes and, for Git targets, to the resolved object identities captured at run start.
func NewTargetIdentity ¶
func NewTargetIdentity(input TargetIdentityInput) (TargetIdentity, error)
func (TargetIdentity) BaseObjectID ¶
func (identity TargetIdentity) BaseObjectID() string
func (TargetIdentity) GitMode ¶
func (identity TargetIdentity) GitMode() GitTargetMode
func (TargetIdentity) HeadObjectID ¶
func (identity TargetIdentity) HeadObjectID() string
func (TargetIdentity) HeadTreeObjectID ¶
func (identity TargetIdentity) HeadTreeObjectID() string
func (TargetIdentity) IndexTreeObjectID ¶
func (identity TargetIdentity) IndexTreeObjectID() string
func (TargetIdentity) Kind ¶
func (identity TargetIdentity) Kind() TargetKind
func (TargetIdentity) RepositoryID ¶
func (identity TargetIdentity) RepositoryID() string
func (TargetIdentity) SHA256 ¶
func (identity TargetIdentity) SHA256() string
type TargetIdentityInput ¶
type TargetIdentityInput struct {
Kind TargetKind
SHA256 string
RepositoryID string
BaseObjectID string
HeadObjectID string
HeadTreeObjectID string
IndexTreeObjectID string
GitMode GitTargetMode
}
type TargetKind ¶
type TargetKind string
const ( TargetGit TargetKind = "git" TargetWorkspace TargetKind = "workspace" TargetPatch TargetKind = "patch" TargetStdin TargetKind = "stdin" )
type TransitionError ¶
func (*TransitionError) Error ¶
func (err *TransitionError) Error() string
func (*TransitionError) Unwrap ¶
func (err *TransitionError) Unwrap() error
type ValidationState ¶
type ValidationState string
const ( ValidationNotStarted ValidationState = "not_started" ValidationValid ValidationState = "valid" ValidationRepairedValid ValidationState = "repaired_valid" ValidationInvalid ValidationState = "invalid" ValidationRepairExhausted ValidationState = "repair_exhausted" ValidationInternalError ValidationState = "internal_error" )
func (ValidationState) Valid ¶
func (value ValidationState) Valid() bool