Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candidate ¶
type Candidate struct {
// Mechanism is the human-readable causal claim. Inherited verbatim
// into VerifiedCause.Mechanism.
Mechanism string
// RootEntityID identifies the proposed root cause entity in the
// EntityGraph. Empty when the candidate is host-scope.
RootEntityID string
// Domain is which resource class this candidate is about.
Domain model.Domain
// SupportingFactIDs is the list of Fact.ID values that the
// detector cited as evidence FOR this mechanism. The verifier
// uses these for the signal-quality + temporal gates.
SupportingFactIDs []string
// AffectedEntityIDs is what the candidate claims will be affected.
// Used by the blast-radius gate (Phase 4 follow-up).
AffectedEntityIDs []string
}
Candidate is the verifier's input — a proposed causal mechanism with the root entity and the facts that support it. The hypothesis engine (Phase 4 candidate generator) produces these; the verifier classifies them. For now, AnalyzeRCA produces simple candidates directly from its RCAEntries.
type Gate ¶
type Gate interface {
// ID returns the stable gate identifier ("signal_quality",
// "ownership_consistency", etc.).
ID() string
// Evaluate returns the gate's verdict for this candidate. Facts
// and graph are read-only — never mutate them.
Evaluate(c Candidate, facts []model.Fact, graph *model.EntityGraph) model.GateResult
}
Gate evaluates a candidate against one rule. Returns a GateResult recording the verdict + the evidence used. MUST be deterministic and have no side effects.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier orchestrates a fixed sequence of gates. Construct once and reuse — the gate list is immutable after construction.
func Default ¶
func Default() *Verifier
Default returns a Verifier with the Phase 4 gate set. As more gates land they're added here in deliberate evaluation order: signal quality first (foundational), then ownership (cheap), then temporal + baseline (need fact metadata), then counter-evidence (negative checks), then the heavier remaining gates.
func (*Verifier) Verify ¶
func (v *Verifier) Verify(c Candidate, facts []model.Fact, graph *model.EntityGraph) model.VerifiedCause
Verify runs every gate against the candidate and returns a VerifiedCause with tier derived from the gate outputs.
Facts is the full slice from AnalysisResult.Facts. The verifier scans by ID — gates may look beyond SupportingFactIDs to find counter-evidence (relevant in future gates).
graph may be nil — gates that need it (ownership-consistency) will fail-closed with a clear Reason in that case.