Documentation
¶
Overview ¶
Package fault is the agent's canonical error model: typed, wrapped errors classified by how a caller should react. The router, governor, and reconciler branch on a failure's Class, never on string matching, so behaviour stays consistent across processes (fleet/P2P) and through the event log and replay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class string
Class is how a caller should react to a failure.
const ( // Transient failures are worth retrying (network blips, rate limits, 5xx). Transient Class = "transient" // Terminal failures must not be retried (bad input, 4xx, programmer error). Terminal Class = "terminal" // NeedsApproval means a governance gate paused the action for a human. NeedsApproval Class = "needs_approval" // BudgetExceeded means the governor's token/cost ceiling was hit. BudgetExceeded Class = "budget_exceeded" // Forbidden means a governance gate denied the action outright: it is outside // the run's capability grant and must not be retried or escalated. Forbidden Class = "forbidden" // Cancelled means the context was cancelled or its deadline passed. Cancelled Class = "cancelled" )
type Error ¶
type Error struct {
Code string
Class Class
Message string
// contains filtered or unexported fields
}
Error is a classified, wrapped error. Code is a short stable identifier for the error kind (meaningful across processes and in the event log); Class is the reaction; the wrapped error, if any, is reachable via errors.Unwrap.
Click to show internal directories.
Click to hide internal directories.