Documentation
¶
Overview ¶
Package pipeline orchestrates review pipeline phases without owning command IO.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactPaths ¶
type ArtifactPaths struct {
Dir string `json:"dir"`
DiffPatch string `json:"diff_patch"`
SlicesDir string `json:"slices_dir"`
FindingsJSON string `json:"findings_json"`
RollupMarkdown string `json:"rollup_markdown"`
AgentLogsDir string `json:"agent_logs_dir"`
}
ArtifactPaths contains per-run artifact paths.
func ArtifactPathsForRun ¶
func ArtifactPathsForRun(layout statepaths.Layout, ref gitprovider.PRRef, pr gitprovider.PR, profile, postingIdentity, runID string) (ArtifactPaths, error)
ArtifactPathsForRun returns the artifact paths for a generated run ID.
func ArtifactPathsFromDir ¶
func ArtifactPathsFromDir(dir string) ArtifactPaths
ArtifactPathsFromDir returns the artifact path set rooted at dir.
func (ArtifactPaths) AgentLog ¶
func (p ArtifactPaths) AgentLog(agentID string) (string, error)
AgentLog returns the tailable LLM log path for an agent.
func (ArtifactPaths) SlicePatch ¶
func (p ArtifactPaths) SlicePatch(agentID, filePath string) (string, error)
SlicePatch returns the artifact path for an agent/file diff slice.
type ContextBudget ¶
type ContextBudget struct {
MaxPromptBytes int
}
ContextBudget limits prompt size. A negative MaxPromptBytes disables checks.
type FilePatch ¶
type FilePatch struct {
OldPath string
Path string
Patch string
Binary bool
Deleted bool
Hunks []reviewplan.DiffHunk
}
FilePatch is one whole-file diff slice.
type NamedSessionStore ¶
type NamedSessionStore interface {
GetNamedSession(context.Context, string) (ledger.NamedSession, error)
}
NamedSessionStore reads cross-run named LLM sessions.
type Options ¶
type Options struct {
Provider ReadProvider
Adapter llm.Adapter
Store Store
NamedSessions NamedSessionStore
Layout statepaths.Layout
Warnings io.Writer
Now func() time.Time
NewRunID func() string
NewSessionRowID func() string
NewFindingID func() (review.FindingID, error)
NewActionID func(reviewplan.ActionKind) (string, error)
Budget ContextBudget
MaxAgents int
MaxConcurrency int
}
Options contains dry-run pipeline dependencies.
type ParsedDiff ¶
type ParsedDiff struct {
PlanDiff reviewplan.Diff
Patches []FilePatch
}
ParsedDiff contains planner metadata plus whole-file patches.
type ReadProvider ¶
type ReadProvider interface {
GetPR(context.Context, gitprovider.PRRef) (gitprovider.PR, error)
GetDiff(context.Context, gitprovider.PRRef) (gitprovider.UnifiedDiff, error)
GetFileAtRef(context.Context, gitprovider.PRRef, string, string) ([]byte, error)
ListTreeAtRef(context.Context, gitprovider.PRRef, string, string) ([]gitprovider.TreeEntry, error)
ListInlineThreads(context.Context, gitprovider.PRRef) ([]gitprovider.InlineThread, error)
Capabilities() gitprovider.ProviderCaps
}
ReadProvider is the PR read boundary needed by dry-run review.
type Request ¶
type Request struct {
PRRef gitprovider.PRRef
PRURL string
ProfileName string
SessionName string
Profile config.Profile
PostingIdentity gitprovider.Identity
AgentDirs []string
FailOn *review.Severity
IncludeNits bool
AllowSelfReview bool
AllowSelfApprove bool
NoResolveThreads bool
MajorRequestChanges bool
}
Request identifies one dry-run review.
type Result ¶
type Result struct {
Run ledger.Run
PR gitprovider.PR
PRKey string
Artifacts ArtifactPaths
Quota llm.Quota
QuotaSupported bool
QuotaLow bool
Catalog agents.Catalog
Selection llm.Selection
Findings []review.Finding
Rollup review.Rollup
Plan reviewplan.Plan
Sessions []ledger.Session
PlannedActions []ledger.PlannedAction
NamedSessionCandidate *ledger.NamedSession
FailOnTriggered bool
EffectiveCaps reviewplan.ProviderCaps
AgentDefsChanged bool
}
Result is the completed dry-run pipeline output.
type Store ¶
type Store interface {
ListRuns(context.Context) ([]ledger.Run, error)
DeleteRun(context.Context, string) error
AllocateRun(context.Context, ledger.AllocateRunParams) (ledger.Run, error)
InsertSession(context.Context, ledger.Session) error
InsertFinding(context.Context, ledger.Finding) error
InsertPlannedAction(context.Context, ledger.PlannedAction) error
CompleteRun(context.Context, string, ledger.Outcome, time.Time) error
}
Store is the ledger behavior required by the dry-run pipeline.