Complete Phase 8 deterministic validators
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"gitea.maximumdirect.net/eric/audita/internal/core/config"
|
||||
"gitea.maximumdirect.net/eric/audita/internal/core/schema"
|
||||
"gitea.maximumdirect.net/eric/audita/internal/framework/proposals"
|
||||
"gitea.maximumdirect.net/eric/audita/internal/framework/validators"
|
||||
)
|
||||
|
||||
// StructuredLLMClient provides provider-agnostic structured completion.
|
||||
@@ -27,7 +28,7 @@ type TranscriptModule interface {
|
||||
// Validator evaluates candidate proposals and returns one decision per proposal index.
|
||||
type Validator interface {
|
||||
Name() string
|
||||
Validate(ctx context.Context, req ValidationRequest) ([]ValidationDecision, error)
|
||||
Validate(ctx context.Context, req ValidationRequest) (validators.Result, error)
|
||||
}
|
||||
|
||||
// StructuredCompletionRequest is a transport-neutral structured completion request.
|
||||
@@ -90,19 +91,7 @@ type ProposalRequest struct {
|
||||
}
|
||||
|
||||
// ValidationRequest is the input to validator execution.
|
||||
type ValidationRequest struct {
|
||||
ExecutionContext
|
||||
RunSpec ModuleRunSpec `json:"run_spec"`
|
||||
CandidateProposals []proposals.EnrichedCorrectionProposal `json:"candidate_proposals"`
|
||||
}
|
||||
|
||||
// ValidationDecision is one validator decision for one proposal index.
|
||||
type ValidationDecision struct {
|
||||
ProposalIndex int `json:"proposal_index"`
|
||||
Approved bool `json:"approved"`
|
||||
Confidence *float64 `json:"confidence,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
type ValidationRequest = validators.Request
|
||||
|
||||
// ResolveModuleRunSpecs deterministically resolves instance names from logical keys.
|
||||
// Repeated keys are suffixed with _<n> (1-based), while singleton keys keep their raw key.
|
||||
|
||||
Reference in New Issue
Block a user