Documentation
¶
Overview ¶
Package execution records explicit attempts and prepares contract-valid work starts without running agents.
Index ¶
- Constants
- Variables
- type Aggregate
- type AggregateQuery
- type Attempt
- type Finish
- type FinishParams
- type Observation
- type Page
- type Query
- type RetryLink
- type StartParams
- type Store
- func (s *Store) Aggregate(ctx context.Context, q AggregateQuery) (Aggregate, error)
- func (s *Store) Close() error
- func (s *Store) Complete(ctx context.Context, p FinishParams) (Attempt, error)
- func (s *Store) Get(ctx context.Context, project string, id int64) (Attempt, error)
- func (s *Store) List(ctx context.Context, q Query) (Page, error)
- func (s *Store) SetTrackerClientFactory(factory func(context.Context, string, tracker.Config) (tracker.Client, error))
- func (s *Store) Start(ctx context.Context, p StartParams) (Attempt, error)
Constants ¶
const ( PurposeUnknown = "unknown" PurposeImplementation = "implementation" PurposeVerification = "verification" PurposeIndependentReview = "independent-review" PurposeOther = "other" )
Variables ¶
var ( ErrInvalidInput = errors.New("invalid execution input") ErrProjectNotFound = errors.New("project not found") ErrProjectArchived = errors.New("project is archived") ErrIssueNotFound = errors.New("current issue not found in project") ErrNotFound = errors.New("execution not found in project") ErrFinished = errors.New("execution already finished") ErrWorkStart = errors.New("issue work-start transition failed") )
Functions ¶
This section is empty.
Types ¶
type Aggregate ¶ added in v0.8.0
type Aggregate struct {
Project string `json:"project"`
Issue string `json:"issue"`
AttemptIDs []int64 `json:"attemptIds"`
RetryLinks []RetryLink `json:"retryLinks"`
AttemptCount int `json:"attemptCount"`
RetryCount int `json:"retryCount"`
UnlinkedAttemptCount int `json:"unlinkedAttemptCount"`
CompletedCount int `json:"completedCount"`
UnfinishedCount int `json:"unfinishedCount"`
SuccessfulCount int `json:"successfulCount"`
FailedCount int `json:"failedCount"`
CancelledCount int `json:"cancelledCount"`
RecordedDurationSeconds float64 `json:"recordedDurationSeconds"`
CoveredWallSeconds float64 `json:"coveredWallSeconds"`
ParallelOverlapSeconds float64 `json:"parallelOverlapSeconds"`
PeakConcurrency int `json:"peakConcurrency"`
IntervalCompleteness string `json:"intervalCompleteness"`
Truncated bool `json:"truncated"`
Notes []string `json:"notes"`
}
Aggregate is a read-only projection of explicit attempts. It never infers retries from ordering or overlap; RetryLinks are counted only when callers explicitly recorded retryOf.
type AggregateQuery ¶ added in v0.8.0
AggregateQuery selects the bounded attempts for one issue to summarize.
type Attempt ¶
type Attempt struct {
WorkStart *issue.WorkStart `json:"workStart,omitempty"`
ID int64 `json:"id"`
ProjectID int64 `json:"projectId"`
ProjectKey string `json:"projectKey"`
IssueKey string `json:"issueKey"`
Executor string `json:"executor"`
Host string `json:"host"`
Ownership string `json:"ownership"`
Purpose string `json:"purpose"`
RetryOf *int64 `json:"retryOf,omitempty"`
Selection string `json:"selection"`
RequestedModel *string `json:"requestedModel"`
RequestedReasoning *string `json:"requestedReasoning"`
Observation
Actor string `json:"actor"`
StartedAt time.Time `json:"startedAt"`
RecordedAt time.Time `json:"recordedAt"`
Finish *Finish `json:"finish"`
}
Attempt retains immutable start facts and, when present, a separate completion.
type FinishParams ¶
type Observation ¶
type Observation struct {
EffectiveModel *string `json:"effectiveModel"`
EffectiveReasoning *string `json:"effectiveReasoning"`
Source string `json:"source"`
EvidenceSource string `json:"evidenceSource"`
}
Observation identifies the provenance of effective values. Nil means unknown; requested values are never substituted for missing effective values.
type StartParams ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Aggregate ¶ added in v0.8.0
Aggregate returns explicit retry and interval statistics for one issue. Finished attempt intervals are treated as [started, finished); unfinished attempts cannot contribute duration or concurrency coverage.
func (*Store) Complete ¶
Complete appends exactly one terminal result. It never changes start facts or issue state.
func (*Store) List ¶
List is bounded and ordered by immutable ID. Concurrent writes do not provide a snapshot across pages.