reviewrun

package
v0.10.257 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package reviewrun wires live review orchestration around gate, pipeline, and outbox.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Rerun      bool
	RetryPosts bool
}

Flags contains live gate-affecting CLI flags.

type Options

type Options struct {
	Store                   Store
	Provider                outbox.LiveProvider
	Planner                 Planner
	Limiter                 outbox.Limiter
	Layout                  statepaths.Layout
	Acquire                 gateio.AcquireFunc
	Now                     func() time.Time
	NewRunID                func() string
	StaleHeartbeatThreshold time.Duration
	Warnings                io.Writer
	ApprovalOverride        approvaloverride.Classifier
	Retention               datalifecycle.RetentionPolicy
	RetentionManualOnly     bool
	ResolveRepoRoot         func(context.Context) (string, error)
}

Options contains live review dependencies.

type Planner

type Planner interface {
	Live(context.Context, pipeline.Request, ledger.Run) (pipeline.Result, error)
}

Planner runs the CR-20 planning phases into a live run.

type Request

type Request struct {
	Pipeline pipeline.Request
	Flags    Flags
}

Request identifies one live review.

type Result

type Result struct {
	Status          gateio.Status
	Decision        gate.Decision
	Run             ledger.Run
	PR              gitprovider.PR
	PRKey           string
	Pipeline        *pipeline.Result
	Outbox          outbox.Result
	ExitCode        int
	Message         string
	FailOnTriggered bool
}

Result summarizes one live review invocation.

func Run

func Run(ctx context.Context, opts Options, req Request) (Result, error)

Run executes one live review invocation.

type Store

type Store interface {
	gateio.Store
	ListRuns(context.Context) ([]ledger.Run, error)
	ListFindings(context.Context, string) ([]ledger.Finding, error)
	ListSessionsForRun(context.Context, string) ([]ledger.Session, error)
	UpsertNamedSession(context.Context, ledger.NamedSession) error
}

Store is the durable state required by live review orchestration.

Jump to

Keyboard shortcuts

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