Documentation
¶
Overview ¶
Package verify gives every CRITICAL finding a second look before it can decide a verdict.
One CRITICAL makes a spec INVALID and, under --fail-on, fails the caller's gate, so a false CRITICAL is the most expensive mistake a review can make. After the review, one more call puts every CRITICAL finding the model produced to the model again, against the same cached spec. Each is confirmed, downgraded, or rejected with the spec text that shows it is wrong. A rejection is applied only when that text is in the spec. When the call fails, the findings stand as they were.
Index ¶
Constants ¶
const ( // TagConfirmed marks a CRITICAL issue the second look upheld. A reused // issue that carries it is not checked again. TagConfirmed = "critical-confirmed" // TagDowngraded marks an issue the second look lowered from CRITICAL. TagDowngraded = "critical-downgraded" )
Tags recording the outcome on an issue.
Variables ¶
This section is empty.
Functions ¶
func Candidates ¶
Candidates reports whether report holds any finding that would be checked.
func Run ¶
Run checks the CRITICAL findings in report and applies the outcome to it in place: severities change, rejected findings and their patches are removed, and report.Meta.Verification records what happened. The summary is not recomputed; the caller does that. Run returns no error: a failed call is recorded in the metadata and leaves the findings as they were.
func Schema ¶
func Schema(enforce bool) *llm.OutputSchema
Schema returns the schema of a verification response.
Types ¶
type Input ¶
type Input struct {
Provider llm.Provider
// SystemPrompt and Prefix are the ones the review used, so the call reads
// the spec from the provider's cache.
SystemPrompt string
Prefix string
LongCache bool
MaxTokens int
Effort string
EnforceSchema bool
// Strict forbids downgrades: in strict mode any required assumption is
// CRITICAL, so "an implementer could assume" is no reason to lower one.
Strict bool
// SpecText is the spec the model was shown, used to check the quote a
// rejection gives. SpecPath is its evidence path.
SpecText string
SpecPath string
// Logf, when set, receives progress messages.
Logf func(format string, args ...any)
}
Input is what a verification call needs.