Documentation
¶
Overview ¶
Package engine runs NoSlop's risk-proportional front-stage pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentReviewer ¶
type AgentReviewer struct {
// contains filtered or unexported fields
}
AgentReviewer adapts an existing no-slop agent to the NoSlop reviewer seam.
func NewAgentReviewer ¶
func NewAgentReviewer(ag agent.Agent, onChunk func(string)) *AgentReviewer
NewAgentReviewer constructs a structured lens reviewer.
func (*AgentReviewer) Review ¶
func (r *AgentReviewer) Review(ctx context.Context, request ReviewRequest) ([]Finding, error)
Review asks the agent to inspect the repository and return named findings.
type Change ¶
type Change struct {
Path string
BaselinePath string
Status risk.ChangeStatus
Added int
Deleted int
AddedContent string
CurrentContent string
BaselineContent string
BaselineContext string
}
Change contains the revision content each mechanical check needs.
type Config ¶
type Config struct {
Risk risk.Config
Blocklist []string
RefuseLeakExemptions bool
OutboundPaths []string
AITellWords []string
TestCountFloor bool
TestCommand string
TierOverride risk.Tier
ForceTier bool
ThreadURL string
EvidenceRoot string
}
Config controls classification and mandatory artifact checks.
type Dependencies ¶
type Dependencies struct {
Reviewer Reviewer
ReviewerFactory func(context.Context) (Reviewer, error)
Tests TestRunner
ThreadReader prose.ThreadReader
OnDecision func(risk.Decision)
OnLeakExemptions func([]leakscan.Exemption)
}
Dependencies are adapters at the engine's external seams.
type Input ¶
type Input struct {
WorkDir string
Branch string
DefaultBranch string
BaseRef string
HeadRef string
Intent string
Files []Change
Config Config
}
Input is the complete gate request.
type MandatoryCheck ¶
MandatoryCheck records whether a tier-independent check ran and how many findings it produced.
type Result ¶
type Result struct {
Decision risk.Decision
Findings []Finding
LeakExemptions []leakscan.Exemption
MandatoryChecks []MandatoryCheck
Tests []TestResult
ReviewRan bool
ReviewRounds int
Passed bool
}
Result contains the visible route and every named finding.
type ReviewRequest ¶
type ReviewRequest struct {
WorkDir string
Branch string
BaseRef string
HeadRef string
Intent string
Tier risk.Tier
Round ReviewRound
PriorFindings []Finding
Prompt string
}
ReviewRequest is the narrow reviewer seam.
type ReviewRound ¶
type ReviewRound string
ReviewRound identifies one pass in a tier's reviewer protocol.
const ( ReviewRoundLensReview ReviewRound = "lens-review" ReviewRoundAdversarialChallenge ReviewRound = "adversarial-challenge" )
type Reviewer ¶
type Reviewer interface {
Review(context.Context, ReviewRequest) ([]Finding, error)
}
Reviewer runs the AI-authorship lens pass.
type ShellTestRunner ¶
type ShellTestRunner struct{}
ShellTestRunner executes an explicitly configured command with the same descendant-reaping policy as the inherited pipeline.
func (ShellTestRunner) Run ¶
func (ShellTestRunner) Run(ctx context.Context, workDir, command string) (TestResult, error)
Run captures output and represents an ordinary nonzero exit in TestResult.
type TestResult ¶
TestResult is the configured command's captured result.
type TestRunner ¶
TestRunner executes the configured full-tier test command.