prfix

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 29 Imported by: 0

README

Historical Go PR-fix reference

This package preserves the previous Go application's deterministic regression and parity fixtures. The stock CLI does not import this package, register its actions, wrap native sessions with it, or provide the previous pr-fix command. Legacy YAML and sample settings live under testdata and are excluded from the stock init distribution.

The legacy agent-turn and checklist-follow-up fixtures set a five-minute lifecycle-handler deadline for durable checkpoints on slow race-test hosts. This uses the existing workflow setting; the engine's default stays unchanged.

Use the portable Python/YAML example for new workflows. Its current contract documents deliberate compatibility changes; historical Go tests alone establish no portable parity.

Documentation

Overview

Package prfix materializes PR maintenance as ordinary workflows. Actions in this package implement individual operations; only YAML chooses execution order.

Index

Constants

View Source
const Implementation = "prfix-v13-dk-workflows-5.2.0"
View Source
const Version = "5.2.0"

Variables

This section is empty.

Functions

func BuiltinAdapters

func BuiltinAdapters(role string) map[string]Adapter

func LoadAdapters

func LoadAdapters(path string) (map[string]Adapter, error)

Types

type Account

type Account struct {
	Host string `json:"host"`
	ID   int64  `json:"id"`
}

type ActionInput

type ActionInput struct {
	Agent      string   `json:"agent,omitempty"`
	Receipt    *Receipt `json:"receipt,omitempty"`
	Plan       string   `json:"plan"`
	Occurrence string   `json:"occurrence,omitempty"`
	Claim      string   `json:"claim,omitempty"`
	Cycle      string   `json:"cycle,omitempty"`
	Attempt    int      `json:"attempt,omitempty"`
	Round      int      `json:"round,omitempty"`
	Payload    string   `json:"payload,omitempty"`
	Kind       string   `json:"kind,omitempty"`
	Intent     string   `json:"intent,omitempty"`
}

type ActionOutput

type ActionOutput struct {
	Agent     string         `json:"agent,omitempty"`
	TaskInput map[string]any `json:"task_input,omitempty"`
	Round     int            `json:"round"`
	Receipt   *Receipt       `json:"receipt,omitempty"`
	Claim     string         `json:"claim"`
	Invoke    bool           `json:"invoke"`
	Settled   bool           `json:"settled"`
	Recheck   bool           `json:"recheck"`
	Cycle     string         `json:"cycle"`
	Prompt    string         `json:"prompt"`
	Complete  bool           `json:"complete"`
	Ready     bool           `json:"ready"`
	Report    string         `json:"report"`
	Items     []IntentRef    `json:"items"`
	Repair    bool           `json:"repair"`
	Deferred  bool           `json:"deferred"`
	State     string         `json:"state"`
}

type Adapter

type Adapter struct {
	Writes        []string `json:"writes,omitempty" yaml:"writes,omitempty"`
	Reads         []string `json:"reads,omitempty" yaml:"reads,omitempty"`
	Identity      string   `json:"identity" yaml:"identity"`
	Version       string   `json:"version" yaml:"version"`
	Kind          string   `json:"kind" yaml:"kind"`
	Procedure     [][]Pass `json:"procedure" yaml:"procedure"`
	Controls      []string `json:"controls" yaml:"controls"`
	Options       []string `json:"options" yaml:"options"`
	Resources     []string `json:"resources" yaml:"resources"`
	History       bool     `json:"history" yaml:"history"`
	HeadSensitive bool     `json:"head_sensitive" yaml:"head-sensitive"`
	Cacheable     bool     `json:"cacheable" yaml:"cacheable"`
}

type AudienceReport

type AudienceReport struct {
	Fingerprint string   `json:"fingerprint"`
	Audience    string   `json:"audience"`
	Suitable    bool     `json:"suitable"`
	Evidence    []string `json:"evidence"`
}

type Authorization

type Authorization struct {
	RequestID   string `json:"request_id"`
	Instruction string `json:"instruction"`
	Source      string `json:"source"`
}

func (Authorization) Validate

func (a Authorization) Validate() error

type CICheck

type CICheck struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Status     string `json:"status"`
	Conclusion string `json:"conclusion"`
	URL        string `json:"url"`
	Attempt    int    `json:"attempt"`
}

type CIClassification

type CIClassification struct {
	CheckID   string `json:"check_id"`
	RunID     string `json:"run_id"`
	JobID     string `json:"job_id"`
	Attempt   int    `json:"attempt"`
	Kind      string `json:"kind"`
	Workflow  string `json:"workflow"`
	Job       string `json:"job"`
	Test      string `json:"test,omitempty"`
	Signature string `json:"signature,omitempty"`
	Issue     string `json:"issue,omitempty"`
	Rule      string `json:"rule,omitempty"`
}

type CIExecution

type CIExecution struct {
	Run        string `json:"run"`
	Generation int64  `json:"generation"`
}

This small provenance pin distinguishes a live selected CI observation from the same checkpoint reused after an interrupted execution.

type CIObservation

type CIObservation struct {
	Execution *CIExecution      `json:"execution,omitempty"`
	Verified  []CIProof         `json:"verified,omitempty"`
	Logs      map[string]string `json:"logs,omitempty"`
	Head      string            `json:"head"`
	Checks    []CICheck         `json:"checks"`
	Evidence  string            `json:"evidence"`
}

func (CIObservation) Success

func (c CIObservation) Success() bool

type CIProof

type CIProof struct {
	Head            string             `json:"head"`
	CheckID         string             `json:"check_id"`
	RunID           string             `json:"run_id"`
	JobID           string             `json:"job_id"`
	Attempt         int                `json:"attempt"`
	Classifications []CIClassification `json:"classifications"`
	Evidence        []string           `json:"evidence"`
	Exempt          bool               `json:"exempt"`
}

type CIReport

type CIReport struct {
	RerunReason     string             `json:"rerun_reason,omitempty"`
	Repair          bool               `json:"repair,omitempty"`
	RepairReason    string             `json:"repair_reason,omitempty"`
	Classifications []CIClassification `json:"classifications,omitempty"`
	Head            string             `json:"head"`
	Status          string             `json:"status"`
	Checks          []string           `json:"checks"`
	Exceptions      []Finding          `json:"exceptions"`
	Evidence        []string           `json:"evidence"`
}

type CIRerunVerifier

type CIRerunVerifier interface {
	VerifyRerun(context.Context, Intent) error
}

Reruns are guarded before dispatch, not merely recognized after the write.

type CIVerifier

type CIVerifier interface {
	VerifyCI(context.Context, Identity, string, []CIClassification, map[string]map[string]any) (CIProof, error)
}

type Candidate

type Candidate struct {
	Finding  Finding `json:"finding"`
	Original string  `json:"original"`
}

type Check

type Check struct {
	ID       string   `json:"id"`
	Status   string   `json:"status"`
	Evidence []string `json:"evidence,omitempty"`
	Reason   string   `json:"reason,omitempty"`
}

type ChecklistItem

type ChecklistItem struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

type Cleanup

type Cleanup struct {
	Outcome         string            `json:"outcome"`
	ReviewedHead    string            `json:"reviewed_head"`
	FinalHead       string            `json:"final_head"`
	FinalTree       string            `json:"final_tree"`
	Commits         map[string]string `json:"commits"`
	BoundaryReasons []string          `json:"boundary_reasons"`
	RecoveryRef     string            `json:"recovery_ref"`
	Validation      []string          `json:"validation"`
	Receipt         string            `json:"receipt,omitempty"`
}

type CommitPolicyHandoff

type CommitPolicyHandoff struct {
	Prompt        *string  `json:"policy_prompt"`
	Configuration any      `json:"configuration"`
	Context       string   `json:"context"`
	Providers     []string `json:"providers"`
}

A handoff contains the actual accepted provider instructions and immutable context, resource and engine references, not just a configured identity.

type Configuration

type Configuration struct {
	Options      map[string]any    `json:"options"`
	Sources      []string          `json:"sources"`
	CheckedPaths []string          `json:"checked_paths"`
	Provenance   map[string]string `json:"provenance"`
}

type DispatchDiagnostic

type DispatchDiagnostic struct {
	Phase          string `json:"phase"`
	At             string `json:"at"`
	ExitStatus     *int   `json:"exit_status"`
	HTTPStatus     *int   `json:"http_status"`
	ResponseHash   string `json:"response_sha256"`
	ResponseLength int    `json:"response_length"`
}

type DispatchExecution

type DispatchExecution struct {
	Intent     Intent                  `json:"intent"`
	CreatedAt  string                  `json:"created_at"`
	Dispatched string                  `json:"dispatch_intent_at"`
	Action     workflows.ActionContext `json:"action"`
}

func (*DispatchExecution) UnmarshalJSON

func (execution *DispatchExecution) UnmarshalJSON(data []byte) error

type DispatchResponse

type DispatchResponse struct {
	Intent   Intent         `json:"intent"`
	Response map[string]any `json:"response"`
}

func (*DispatchResponse) UnmarshalJSON

func (r *DispatchResponse) UnmarshalJSON(data []byte) error

type FeedbackSource

type FeedbackSource struct {
	Kind     string `json:"kind"`
	ID       string `json:"id"`
	URL      string `json:"url"`
	ThreadID string `json:"thread_id,omitempty"`
}

The feedback being answered can differ from the inline root used for routing.

type FileChange

type FileChange struct {
	Path   string `json:"path"`
	Before string `json:"before"`
	After  string `json:"after"`
}

type Finding

type Finding struct {
	ID          string         `json:"id"`
	Text        string         `json:"text"`
	Sources     []string       `json:"sources"`
	Disposition string         `json:"disposition,omitempty"`
	Reason      string         `json:"reason,omitempty"`
	Acceptance  *Authorization `json:"acceptance,omitempty"`
}

type GitHub

type GitHub struct{ Root string }

func (*GitHub) Capture

func (g *GitHub) Capture(ctx context.Context, id Identity) (PREvidence, error)

func (*GitHub) Execute

func (g *GitHub) Execute(ctx context.Context, i Intent) (Receipt, error)

func (*GitHub) InspectReply

func (g *GitHub) InspectReply(ctx context.Context, i Intent, receipt Receipt) (ReplyObservation, error)

func (*GitHub) InspectReviewRequest

func (g *GitHub) InspectReviewRequest(ctx context.Context, i Intent) (ReviewRequestObservation, error)

func (*GitHub) MergeReady

func (g *GitHub) MergeReady(ctx context.Context, id Identity, head string) (MergeProof, error)

func (*GitHub) ObserveCI

func (g *GitHub) ObserveCI(ctx context.Context, id Identity, head string) (CIObservation, error)

func (*GitHub) PullRequestNumbers

func (g *GitHub) PullRequestNumbers(ctx context.Context, id Identity) ([]string, error)

func (*GitHub) Reconcile

func (g *GitHub) Reconcile(ctx context.Context, i Intent) (string, Receipt, error)

func (*GitHub) VerifyCI

func (g *GitHub) VerifyCI(ctx context.Context, id Identity, head string, classes []CIClassification, rules map[string]map[string]any) (CIProof, error)

func (*GitHub) VerifyRerun

func (g *GitHub) VerifyRerun(ctx context.Context, i Intent) error

type Identity

type Identity struct {
	URL        string `json:"url"`
	Repository string `json:"repository"`
	Host       string `json:"host"`
	Owner      string `json:"owner"`
	Name       string `json:"name"`
	Number     int    `json:"number"`
}

func ParseIdentity

func ParseIdentity(raw string) (Identity, error)

type Intent

type Intent struct {
	Source         *FeedbackSource   `json:"source,omitempty"`
	CreatedAt      string            `json:"created_at,omitempty"`
	Replaces       *ReplyReplacement `json:"replaces,omitempty"`
	CreatedHead    string            `json:"created_head,omitempty"`
	ActorID        int64             `json:"actor_id,omitempty"`
	Before         map[string]any    `json:"before,omitempty"`
	Discussion     string            `json:"discussion,omitempty"`
	ID             string            `json:"id"`
	Run            string            `json:"run"`
	Kind           string            `json:"kind"`
	PR             Identity          `json:"pr"`
	Head           string            `json:"head"`
	Lease          string            `json:"lease"`
	Target         string            `json:"target"`
	Branch         string            `json:"branch"`
	HeadRepository string            `json:"head_repository"`
	Payload        map[string]any    `json:"payload"`
	Authorization  Authorization     `json:"authorization"`
	Sources        []string          `json:"sources"`
	AudienceClaim  string            `json:"audience_claim,omitempty"`
}

func (Intent) Fingerprint

func (i Intent) Fingerprint() string

type IntentRef

type IntentRef struct {
	ID string `json:"id"`
}

type Invocation

type Invocation struct {
	Skill        string         `json:"skill,omitempty" yaml:"skill,omitempty"`
	Instructions string         `json:"instructions,omitempty" yaml:"instructions,omitempty"`
	Options      map[string]any `json:"options,omitempty" yaml:"options,omitempty"`
	Required     *bool          `json:"required,omitempty" yaml:"required,omitempty"`
	Agent        map[string]any `json:"agent,omitempty" yaml:"agent,omitempty"`
}

func (Invocation) IsRequired

func (i Invocation) IsRequired() bool

type Ledger

type Ledger struct {
	Root string
	// contains filtered or unexported fields
}

func OpenLedger

func OpenLedger(root string) (*Ledger, error)

func (*Ledger) Active

func (l *Ledger) Active(ctx context.Context, pr string) (string, error)

func (*Ledger) Admission

func (l *Ledger) Admission(ctx context.Context, run, plan, fingerprint, requested string) (string, error)

func (*Ledger) Close

func (l *Ledger) Close() error

func (*Ledger) Continue

func (l *Ledger) Continue(ctx context.Context, run string, a Authorization, cycles int) (int, error)

func (*Ledger) Deadline

func (l *Ledger) Deadline(ctx context.Context, run, head string, now time.Time, timeout time.Duration) (time.Time, error)

func (*Ledger) Execution

func (l *Ledger) Execution(ctx context.Context, run, request, plan, engine string) error

func (*Ledger) Extend

func (l *Ledger) Extend(ctx context.Context, run, head string, extension time.Duration, maximum int) (time.Time, bool, error)

func (*Ledger) Intent

func (l *Ledger) Intent(ctx context.Context, run, id string) (Intent, error)

func (*Ledger) LatestExecution

func (l *Ledger) LatestExecution(ctx context.Context, run string) (string, string, error)

func (*Ledger) Plan

func (l *Ledger) Plan(ctx context.Context, id string) (Plan, error)

func (*Ledger) PrepareIntent

func (l *Ledger) PrepareIntent(ctx context.Context, p Plan, intent Intent, source string) error

func (*Ledger) Reserve

func (l *Ledger) Reserve(ctx context.Context, run, kind, scope, operation, reason string) error

func (*Ledger) SavePlan

func (l *Ledger) SavePlan(ctx context.Context, p Plan) (string, error)

func (*Ledger) Started

func (l *Ledger) Started(ctx context.Context, run, head string) (time.Time, error)

type Limits

type Limits struct {
	ReviewCycles int `json:"review_cycles"`
	Retries      int `json:"retries_per_task"`
	CIRepairs    int `json:"ci_repairs_per_cycle"`
	CIReruns     int `json:"ci_reruns_per_head"`
}

func (Limits) Validate

func (l Limits) Validate() error

type MergeProof

type MergeProof struct {
	Head      string
	Satisfied bool
	Evidence  []string
}

type MergeReadiness

type MergeReadiness interface {
	MergeReady(context.Context, Identity, string) (MergeProof, error)
}

type Occurrence

type Occurrence struct {
	InheritedResources    []string        `json:"inherited_resources,omitempty"`
	InheritedInstructions []string        `json:"inherited_invocation_instructions,omitempty"`
	PolicyProviders       []string        `json:"policy_providers,omitempty"`
	ID                    string          `json:"id"`
	Kind                  string          `json:"kind"`
	Call                  Resolved        `json:"call"`
	Adapter               Adapter         `json:"adapter"`
	Pass                  Pass            `json:"pass"`
	Required              bool            `json:"required"`
	Review                bool            `json:"review"`
	History               bool            `json:"history"`
	HeadSensitive         bool            `json:"head_sensitive"`
	Cacheable             bool            `json:"cacheable"`
	Checklist             []ChecklistItem `json:"checklist"`
	MaxChecks             int             `json:"max_checks"`
}

type PREvidence

type PREvidence struct {
	Metadata PRMetadata       `json:"metadata"`
	Viewer   string           `json:"viewer"`
	ViewerID int64            `json:"viewer_id"`
	Comments []map[string]any `json:"comments"`
	Reviews  []map[string]any `json:"reviews"`
	Inline   []map[string]any `json:"inline"`
	Threads  []map[string]any `json:"threads"`
}

func (*PREvidence) UnmarshalJSON

func (e *PREvidence) UnmarshalJSON(data []byte) error

type PRMetadata

type PRMetadata struct {
	URL         string `json:"html_url"`
	NodeID      string `json:"node_id"`
	Number      int    `json:"number"`
	State       string `json:"state"`
	Draft       bool   `json:"draft"`
	Merged      bool   `json:"merged"`
	MergeCommit string `json:"merge_commit_sha"`
	MergedBy    struct {
		ID int64 `json:"id"`
	} `json:"merged_by"`
	Title   string `json:"title"`
	Body    string `json:"body"`
	Updated string `json:"updated_at"`
	User    struct {
		ID    int64  `json:"id"`
		Login string `json:"login"`
	} `json:"user"`
	Head           PRRef  `json:"head"`
	Base           PRRef  `json:"base"`
	MergeableState string `json:"mergeable_state"`
}

type PRRef

type PRRef struct {
	SHA  string `json:"sha"`
	Ref  string `json:"ref"`
	Repo struct {
		FullName string `json:"full_name"`
		CloneURL string `json:"clone_url"`
		HTMLURL  string `json:"html_url"`
	} `json:"repo"`
}

type Pass

type Pass struct {
	ID         string   `json:"id" yaml:"id"`
	Role       string   `json:"role" yaml:"role"`
	Assignment string   `json:"assignment" yaml:"assignment"`
	Evidence   []string `json:"evidence" yaml:"evidence"`
}

type Plan

type Plan struct {
	Version        string                   `json:"version"`
	LogicalRun     string                   `json:"logical_run"`
	Identity       Identity                 `json:"identity"`
	Selection      Selection                `json:"selection"`
	Snapshot       Snapshot                 `json:"snapshot"`
	Instructions   string                   `json:"instructions"`
	MaintainOther  *Authorization           `json:"maintain_other,omitempty"`
	Authorizations map[string]Authorization `json:"authorizations"`
	Roles          json.RawMessage          `json:"roles"`
	Occurrences    []Occurrence             `json:"occurrences"`
	Groups         map[string][][]string    `json:"groups"`
	Omitted        []string                 `json:"omitted"`
	Sources        map[string]string        `json:"sources"`
	Options        map[string]any           `json:"options"`
	Upstream       string                   `json:"upstream"`
	Adapters       map[string]Adapter       `json:"adapters"`
	ConfigPath     string                   `json:"config_path"`
	Ref            string                   `json:"ref"`
	Fingerprint    string                   `json:"fingerprint"`
}

func ReadPlan

func ReadPlan(path string) (Plan, error)

func (Plan) Occurrence

func (p Plan) Occurrence(id string) (Occurrence, error)

type PreferenceDecision

type PreferenceDecision struct {
	ID         string   `json:"id"`
	Applicable bool     `json:"applicable"`
	Paths      []string `json:"paths"`
	Reason     string   `json:"reason"`
	Sources    []string `json:"sources"`
}

type PrepareRequest

type PrepareRequest struct {
	Resume         bool
	RequestID      string
	Capabilities   func(string) (workflows.ProviderCapabilities, error)
	PR             string
	Run            string
	Instructions   string
	Upstream       string
	Options        map[string]any
	Adapters       map[string]Adapter
	Role           string
	Config         clirunner.Config
	ConfigPath     string
	MaintainOther  *Authorization
	Authorizations map[string]Authorization
}

func ResumeRequest

func ResumeRequest(p Plan, cfg clirunner.Config) PrepareRequest

ResumeRequest rebuilds preparation inputs without importing plugin histories or granting permissions. The caller may apply explicit current invocation edits.

type Prepared

type Prepared struct {
	LogicalRun   string          `json:"logical_run"`
	Workflow     string          `json:"workflow"`
	Plan         string          `json:"plan"`
	Roles        json.RawMessage `json:"roles"`
	Inputs       map[string]any  `json:"inputs"`
	RequestID    string          `json:"request_id"`
	Omitted      []string        `json:"omitted"`
	EngineLimits map[string]int  `json:"engine_limits"`
	Warnings     []string        `json:"warnings"`
}

func Prepare

func Prepare(ctx context.Context, root string, provider Provider, req PrepareRequest) (Prepared, error)

type Provider

type Provider interface {
	Capture(context.Context, Identity) (PREvidence, error)
	ObserveCI(context.Context, Identity, string) (CIObservation, error)
	Execute(context.Context, Intent) (Receipt, error)
	Reconcile(context.Context, Intent) (string, Receipt, error)
}

Provider methods perform one observation or one external operation. They must never decide which workflow stage runs next.

type PullRequestInventory

type PullRequestInventory interface {
	PullRequestNumbers(context.Context, Identity) ([]string, error)
}

PullRequestInventory supplies a complete private baseline before split writes.

type Receipt

type Receipt struct {
	ID       string         `json:"id"`
	Kind     string         `json:"kind"`
	PR       string         `json:"pr"`
	Head     string         `json:"head"`
	Result   map[string]any `json:"result"`
	Evidence []string       `json:"evidence"`
}

func (*Receipt) UnmarshalJSON

func (r *Receipt) UnmarshalJSON(data []byte) error

type ReplyDisposition

type ReplyDisposition struct {
	Decision    string   `json:"decision"`
	Reason      string   `json:"reason"`
	Inspection  string   `json:"inspection"`
	Observation string   `json:"observation"`
	Sources     []string `json:"sources"`
}

type ReplyInspector

type ReplyInspector interface {
	InspectReply(context.Context, Intent, Receipt) (ReplyObservation, error)
}

type ReplyObligation

type ReplyObligation struct {
	ID        string   `json:"id"`
	Text      string   `json:"text"`
	Required  bool     `json:"required"`
	Reason    string   `json:"reason"`
	Sources   []string `json:"sources"`
	CommentID string   `json:"comment_id,omitempty"`
	ThreadID  string   `json:"thread_id,omitempty"`
}

type ReplyObservation

type ReplyObservation struct {
	Intent   Intent         `json:"intent"`
	Receipt  Receipt        `json:"receipt"`
	PR       PREvidence     `json:"pr"`
	Original map[string]any `json:"original"`
	Status   string         `json:"status"`
}

func (ReplyObservation) Fingerprint

func (o ReplyObservation) Fingerprint() string

func (*ReplyObservation) UnmarshalJSON

func (o *ReplyObservation) UnmarshalJSON(b []byte) error

type ReplyReplacement

type ReplyReplacement struct {
	Run           string        `json:"run"`
	ID            string        `json:"id"`
	Inspection    string        `json:"inspection"`
	Observation   string        `json:"observation"`
	Decision      string        `json:"decision"`
	Reason        string        `json:"reason"`
	Sources       []string      `json:"sources"`
	Authorization Authorization `json:"authorization"`
}

A replacement is a new, separately authorized effect. Its reassessment is bound to an immutable observation; the historical intent/receipt stay intact.

type ReplyResponse

type ReplyResponse struct {
	ID         string         `json:"id"`
	Outcome    string         `json:"outcome"`
	Reason     string         `json:"reason"`
	Sources    []string       `json:"sources"`
	Operation  string         `json:"operation,omitempty"`
	Acceptance *Authorization `json:"acceptance,omitempty"`
}

type Report

type Report struct {
	ReplyDisposition         *ReplyDisposition         `json:"reply_disposition,omitempty"`
	ReviewRequestDisposition *ReviewRequestDisposition `json:"review_request_disposition,omitempty"`
	PolicyPrompt             string                    `json:"policy_prompt,omitempty"`
	ReplyObligations         []ReplyObligation         `json:"reply_obligations,omitempty"`
	Responses                []ReplyResponse           `json:"responses,omitempty"`
	Audience                 *AudienceReport           `json:"audience,omitempty"`
	Scope                    *ScopeReport              `json:"scope,omitempty"`
	Changes                  []FileChange              `json:"changes,omitempty"`
	Deliverables             map[string]string         `json:"deliverables,omitempty"`
	PreferenceDecisions      []PreferenceDecision      `json:"preference_decisions,omitempty"`
	CommitMessage            string                    `json:"commit_message,omitempty"`
	Complete                 bool                      `json:"complete"`
	Findings                 []Finding                 `json:"findings"`
	Checklist                []Check                   `json:"checklist"`
	Evidence                 []string                  `json:"evidence"`
	Blockers                 []string                  `json:"blockers"`
	Operations               []Intent                  `json:"operations,omitempty"`
	NoReply                  []Finding                 `json:"no_reply,omitempty"`
	Cleanup                  *Cleanup                  `json:"cleanup,omitempty"`
	CI                       *CIReport                 `json:"ci,omitempty"`
}

type Resolved

type Resolved struct {
	Invocation    Invocation     `json:"invocation"`
	Configuration *Configuration `json:"configuration"`
}

type ReviewRequestDisposition

type ReviewRequestDisposition struct {
	Decision    string   `json:"decision"`
	Reason      string   `json:"reason"`
	Observation string   `json:"observation"`
	Sources     []string `json:"sources"`
}

type ReviewRequestInspector

type ReviewRequestInspector interface {
	InspectReviewRequest(context.Context, Intent) (ReviewRequestObservation, error)
}

type ReviewRequestObservation

type ReviewRequestObservation struct {
	Intent               Intent               `json:"intent"`
	PR                   PREvidence           `json:"pr"`
	Requested            map[string]any       `json:"requested"`
	Timeline             []map[string]any     `json:"timeline"`
	Dispatch             *DispatchResponse    `json:"dispatch,omitempty"`
	Execution            *DispatchExecution   `json:"execution"`
	HistoricalFailure    *DispatchDiagnostic  `json:"historical_failure"`
	ReconciliationErrors []DispatchDiagnostic `json:"reconciliation_errors"`
}

Inspection establishes current context, never whether the historical POST reached GitHub. Timeline events and reviews cannot prove delivery identity.

func (ReviewRequestObservation) Fingerprint

func (o ReviewRequestObservation) Fingerprint() string

func (*ReviewRequestObservation) UnmarshalJSON

func (o *ReviewRequestObservation) UnmarshalJSON(b []byte) error

type Runtime

type Runtime struct {
	BeforeCheckpoint func(string, ActionOutput) error
	Root             string
	Store            *workflows.SQLiteStore
	Workers          *workflows.WorkerManager
	Provider         Provider
	Now              func() time.Time
	PollInterval     time.Duration
	// contains filtered or unexported fields
}

func (*Runtime) Register

func (r *Runtime) Register(registry *workflows.ActionRegistry) error

type ScopeReport

type ScopeReport struct {
	AddedLines   int             `json:"added_lines"`
	Threshold    int             `json:"threshold"`
	EvacuateMode string          `json:"evacuate_unrelated"`
	RelatedMode  string          `json:"split_related"`
	Enabled      bool            `json:"enabled"`
	Assessment   string          `json:"assessment"`
	Boundaries   []SplitBoundary `json:"boundaries"`
	Evidence     []string        `json:"evidence"`
}

type Selection

type Selection struct {
	Invocation  Invocation                         `json:"invocation"`
	Config      Configuration                      `json:"config"`
	Tasks       [][]Resolved                       `json:"tasks"`
	Finalizers  [][]Resolved                       `json:"finalizers"`
	Hooks       map[string][][]Resolved            `json:"hooks"`
	Children    map[string]map[string][][]Resolved `json:"children"`
	Accounts    []Account                          `json:"accounts"`
	Preferences map[string]any                     `json:"preferences"`
	Settings    map[string]any                     `json:"settings"`
}

func (Selection) Limits

func (s Selection) Limits() Limits

type Snapshot

type Snapshot struct {
	RepositoryInstructions    map[string]string `json:"repository_instruction_resources"`
	CompletedEffects          []string          `json:"completed_effects,omitempty"`
	ResourceDigests           map[string]string `json:"resource_digests"`
	RoleDigests               map[string]string `json:"role_digests"`
	ReviewPreferences         string            `json:"review_preferences"`
	ImplementationPreferences string            `json:"implementation_preferences"`
	Identity                  Identity          `json:"identity"`
	Author                    string            `json:"author"`
	Viewer                    string            `json:"viewer"`
	HeadRepository            string            `json:"head_repository"`
	HeadBranch                string            `json:"head_branch"`
	TargetBranch              string            `json:"target_branch"`
	Target                    string            `json:"target"`
	Base                      string            `json:"base"`
	Head                      string            `json:"head"`
	LocalHead                 string            `json:"local_head"`
	TargetTree                string            `json:"target_tree"`
	BaseTree                  string            `json:"base_tree"`
	HeadTree                  string            `json:"head_tree"`
	LocalTree                 string            `json:"local_tree"`
	Diff                      string            `json:"diff"`
	History                   string            `json:"history"`
	Discussion                string            `json:"discussion"`
	Decisions                 string            `json:"decisions"`
	Instructions              string            `json:"instructions"`
	Settings                  string            `json:"settings"`
	TaskSettings              string            `json:"task_settings,omitempty"`
	Resources                 string            `json:"resources"`
	Paths                     []string          `json:"paths"`
	Evidence                  string            `json:"evidence"`
	Open                      bool              `json:"open"`
	Draft                     bool              `json:"draft"`
}

func (Snapshot) Fingerprint

func (s Snapshot) Fingerprint(history, head bool) string

type SplitBoundary

type SplitBoundary struct {
	Branch      string   `json:"branch"`
	Head        string   `json:"head"`
	Base        string   `json:"base"`
	Behavior    string   `json:"behavior"`
	Paths       []string `json:"paths"`
	Reason      string   `json:"reason"`
	Evidence    []string `json:"evidence"`
	RecoveryRef string   `json:"recovery_ref"`
}

Jump to

Keyboard shortcuts

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