diagnostics

package
v0.75.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package diagnostics implements the stable error-code catalog used by mcpproxy to surface human-readable, fixable failure states to the user.

Every terminal (non-automatically-recoverable) error in the upstream, OAuth, Docker, config, and network paths is classified into a stable code of the form MCPX_<DOMAIN>_<SPECIFIC>. Once shipped, a code is never renamed; deprecation is the only allowed transition. See spec 044.

Index

Constants

View Source
const (
	TransportStdio = "stdio"
	TransportHTTP  = "http"
)

Canonical transport families the classifier reasons about.

ClassifierHints.Transport carries whatever the resolver produced, and that is NOT a closed set: transport.DetermineTransportType returns config.Protocol VERBATIM when it is set, and "streamable-http" when it is not. Config validation accepts "http", "sse", "streamable-http" and "auto" (internal/config/config.go), and all of them are live in the field — the registry add path, the Claude Code and Gemini config importers and the Add-Server modal write "http", while a URL server added without an explicit protocol resolves to "streamable-http". One transport, four spellings.

View Source
const (
	OutcomeSuccess = "success"
	OutcomeFailed  = "failed"
	OutcomeBlocked = "blocked"
)

Outcome constants used in FixResult.Outcome.

View Source
const (
	ModeDryRun  = "dry_run"
	ModeExecute = "execute"
)

Mode constants used in FixRequest.Mode.

Variables

View Source
var ErrUnknownFixer = errors.New("diagnostics: unknown fixer key")

ErrUnknownFixer is returned when InvokeFixer cannot find a registered fixer.

Functions

func CanonicalTransport added in v0.66.0

func CanonicalTransport(t string) string

CanonicalTransport folds every spelling of the HTTP transport family down to TransportHTTP, and passes anything else through lower-cased.

It is the single definition of "this failure came over HTTP", used by hints.For (so every production consumer is normalized at the source) and by classifyHTTP itself (so a hand-built ClassifierHints cannot reintroduce the bug). Gating the HTTP arms on the exact string "http" meant a server whose protocol happened to be "streamable-http" — the default for a URL server with no explicit protocol — had its status, timeout and status-text arms switched off, and those failures landed in MCPX_UNKNOWN_UNCLASSIFIED.

The EMPTY string is deliberately NOT a member. It reaches hints.For only on the supervisor's config-unavailable path, where nothing at all is known about the transport — and "unknown" must not be spelled "HTTP", because three of the four arms this gate unlocks carry no HTTP-specific evidence at all: context.DeadlineExceeded, its stringified form, and context.Canceled are transport-agnostic, and the status-text arm reads a stdio child's stderr TAIL, which routinely quotes an HTTP status the CHILD saw. Folding "" in therefore turned a stdio handshake timeout into MCPX_HTTP_TIMEOUT and a stdio exit whose stderr mentioned "status 503" into MCPX_HTTP_5XX. Passing "" through leaves those on MCPX_UNKNOWN_UNCLASSIFIED — exactly where they were before this change — while the four HTTP spellings still fold together, which is the whole point. Predicates on the same HTTP family already exist elsewhere in the codebase (config.auth_broker, oauth.config) and agree on the member set.

func FixerKeys

func FixerKeys() []string

FixerKeys returns a sorted slice of all registered fixer keys (for tests and `doctor list-codes`).

func Has

func Has(c Code) bool

Has reports whether a code is registered in the catalog.

func IsPermanent added in v0.64.0

func IsPermanent(c Code) bool

IsPermanent reports whether a failure carrying this code is deterministic and unrecoverable — the same attempt will fail identically until a human changes the configuration, the image, or the machine.

It is the single permanence signal for the retry policy in internal/upstream/types (GH #1145). Declaring a NEW code permanent is a one-line `Retry: RetryPermanent,` in that code's existing register(...) call — there is deliberately no second list to keep in sync and no if-branch to add.

Unregistered and unknown codes return false. That is the safe default and the reason MCPX_UNKNOWN_UNCLASSIFIED (which carries the zero RetryClass) stays retryable: failing to recognise an error is not evidence that retrying it is futile.

func PermanentFailureReason added in v0.64.0

func PermanentFailureReason(c Code, rawError string) string

PermanentFailureReason renders the user-facing cause of a permanent park: the catalog message written to tell a user how to fix exactly this code. It falls back to the raw error, and then to a generic sentence, so a parked server is never surfaced without a reason (GH #1145).

func Register

func Register(key string, f FixerFunc)

Register installs a fixer keyed by its FixStep.FixerKey. Subsequent calls with the same key overwrite the previous registration (useful for tests).

func RuntimeAwareRemediation added in v0.43.0

func RuntimeAwareRemediation(code Code, hints ClassifierHints) string

RuntimeAwareRemediation returns an enriched, context-specific remediation message for codes that support per-server enrichment, or "" to fall back to the static CatalogEntry.UserMessage.

Today it enriches only DockerExecNotFound (MCP-2909): the in-container interpreter was missing because the chosen Docker image lacks it. The field report that motivated this — a `uvx` server pinned via a per-server `isolation.image: "python:3.11"` override — failed at exec time because stock `python:3.11` has no `uvx` (uv is a separate Astral tool). The static catalog message is too generic to self-resolve, so we name (a) the detected runtime, (b) the recommended runtime-default image, and (c) when a per-server image override is the likely culprit.

This is diagnostics-only: it never changes classification or image selection.

func WrapConfigDeprecatedField

func WrapConfigDeprecatedField(err error) error

WrapConfigDeprecatedField marks a use of a deprecated config field.

func WrapConfigMissingSecret

func WrapConfigMissingSecret(err error) error

WrapConfigMissingSecret marks a missing / unresolved secret reference.

func WrapConfigParseError

func WrapConfigParseError(err error) error

WrapConfigParseError marks a configuration-parse failure.

func WrapDockerDaemonDown

func WrapDockerDaemonDown(err error) error

WrapDockerDaemonDown marks a Docker daemon unreachable error.

func WrapDockerImagePullFailed

func WrapDockerImagePullFailed(err error) error

WrapDockerImagePullFailed marks a Docker image-pull failure.

func WrapDockerNoPermission

func WrapDockerNoPermission(err error) error

WrapDockerNoPermission marks a Docker permission-denied error.

func WrapError

func WrapError(code Code, err error) error

WrapError attaches a stable Code to an existing error so the classifier can recognise it without falling back to free-text matching. Producers in the OAUTH / DOCKER / CONFIG / QUARANTINE domains should wrap their terminal (non-automatically-recoverable) errors with WrapError at the point the failure is first observed. Spec 044.

The returned error preserves the original via errors.Unwrap(), so callers that still inspect typed error chains (errors.Is / errors.As) continue to work unchanged.

func WrapOAuthDiscoveryFailed

func WrapOAuthDiscoveryFailed(err error) error

WrapOAuthDiscoveryFailed marks an OAuth authorization-server discovery failure.

func WrapOAuthRefresh403

func WrapOAuthRefresh403(err error) error

WrapOAuthRefresh403 marks an error as an OAuth refresh 403 / invalid_grant.

func WrapOAuthRefreshExpired

func WrapOAuthRefreshExpired(err error) error

WrapOAuthRefreshExpired marks an error as the refresh-token-expired code.

func WrapQuarantinePendingApproval

func WrapQuarantinePendingApproval(err error) error

WrapQuarantinePendingApproval marks a tool-quarantine rejection.

func WrapQuarantineToolChanged

func WrapQuarantineToolChanged(err error) error

WrapQuarantineToolChanged marks a tool-description-changed rejection.

Types

type CatalogEntry

type CatalogEntry struct {
	Code        Code      `json:"code"`
	Severity    Severity  `json:"severity"`
	UserMessage string    `json:"user_message"`
	FixSteps    []FixStep `json:"fix_steps"`
	DocsURL     string    `json:"docs_url"`
	// Retry declares whether an automatic reconnect can ever fix a failure
	// carrying this code. Omitted (zero value) means transient/retryable — see
	// RetryClass. Consumed by IsPermanent.
	Retry      RetryClass `json:"retry,omitempty"`
	Deprecated bool       `json:"deprecated,omitempty"`
	ReplacedBy Code       `json:"replaced_by,omitempty"`
}

CatalogEntry is the authoritative description of one error code.

func All

func All() []CatalogEntry

All returns a stable-sorted copy of every registered catalog entry. The ordering is by code lexicographically so output is deterministic.

func Get

func Get(c Code) (CatalogEntry, bool)

Get looks up a catalog entry by code. Returns (zero, false) for unknown codes.

type ClassifierHints

type ClassifierHints struct {
	Transport string // "stdio", "http", "sse", "docker", etc.
	ServerID  string
	// DockerIsolated is true when the failing server is launched through Docker
	// isolation (`docker run …` over the stdio transport). It lets the
	// classifier route ENOENT-class spawn failures to DOCKER codes (CLI missing
	// per #696, in-container interpreter missing) instead of a generic
	// MCPX_STDIO_SPAWN_ENOENT. See classifyDockerIsolatedSpawn.
	DockerIsolated bool

	// DockerCommand is the configured stdio command for a Docker-isolated
	// server (e.g. "uvx", "npx"). The detected runtime type is derived from it.
	// Empty when unknown or for non-isolated servers.
	DockerCommand string

	// DockerImageOverride is the per-server isolation.image override, if any.
	// When set, the DockerExecNotFound remediation flags it as the likely
	// culprit (a stock image that lacks the runtime interpreter).
	DockerImageOverride string

	// DockerDefaultImages is the global default_images map (runtime → image).
	// Used to name the recommended image for the detected runtime.
	DockerDefaultImages map[string]string

	// DockerArgs is the configured stdio args for a Docker-isolated server.
	// The DockerMissingToolchain remediation reads it to tell a git-dependency
	// server (`--from …git+https://…`) apart from any other missing tool, so it
	// can say whether mcpproxy's automatic git-capable image selection already
	// covers the failure (#1143).
	DockerArgs []string
}

ClassifierHints lets callers nudge the classifier when context is known (e.g., "this error came from the stdio spawn path").

type Code

type Code string

Code is a stable error-code identifier. Immutable across releases once shipped.

const (
	STDIOSpawnENOENT Code = "MCPX_STDIO_SPAWN_ENOENT"
	STDIOSpawnEACCES Code = "MCPX_STDIO_SPAWN_EACCES"
	// STDIOSpawnExecFormat: the stdio binary exists but is the wrong CPU
	// architecture / not an executable format (ENOEXEC — "exec format error").
	// Distinct from a Docker/OCI exec-format failure, which is
	// MCPX_DOCKER_OCI_RUNTIME under the docker-isolation hint.
	STDIOSpawnExecFormat      Code = "MCPX_STDIO_SPAWN_EXEC_FORMAT"
	STDIOExitNonzero          Code = "MCPX_STDIO_EXIT_NONZERO"
	STDIOExitBeforeInitialize Code = "MCPX_STDIO_EXIT_BEFORE_INITIALIZE"
	STDIOHandshakeTimeout     Code = "MCPX_STDIO_HANDSHAKE_TIMEOUT"
	STDIOHandshakeInvalid     Code = "MCPX_STDIO_HANDSHAKE_INVALID"
)

STDIO domain — stdio-transport MCP server failures.

const (
	OAuthLoginRequired    Code = "MCPX_OAUTH_LOGIN_REQUIRED"
	OAuthReauthRequired   Code = "MCPX_OAUTH_REAUTH_REQUIRED"
	OAuthRefreshExpired   Code = "MCPX_OAUTH_REFRESH_EXPIRED"
	OAuthRefresh403       Code = "MCPX_OAUTH_REFRESH_403"
	OAuthDiscoveryFailed  Code = "MCPX_OAUTH_DISCOVERY_FAILED"
	OAuthCallbackTimeout  Code = "MCPX_OAUTH_CALLBACK_TIMEOUT"
	OAuthCallbackMismatch Code = "MCPX_OAUTH_CALLBACK_MISMATCH"
	// OAuthTokenUndecryptable: the stored OAuth row cannot be decrypted with
	// the configured key (Spec 123 FR-031) — no key, another key, or an
	// envelope that fails authentication. Not a login state: a login cannot
	// overwrite the row, so the fix is to restore the key or discard the row.
	OAuthTokenUndecryptable Code = "MCPX_OAUTH_TOKEN_UNDECRYPTABLE"
)

OAUTH domain — OAuth 2.1 / PKCE flow failures.

OAuthLoginRequired and OAuthReauthRequired are actionable user-states, NOT faults: they describe a server waiting for the user to sign in, so they must never drive a "file a bug" CTA. Login-required is the first-time sign-in (amber/degraded); re-auth-required is a previously-working token that broke (red/unhealthy). See MCP-1820.

const (
	HTTPDNSFailed  Code = "MCPX_HTTP_DNS_FAILED"
	HTTPTLSFailed  Code = "MCPX_HTTP_TLS_FAILED"
	HTTPUnauth     Code = "MCPX_HTTP_401"
	HTTPForbidden  Code = "MCPX_HTTP_403"
	HTTPNotFound   Code = "MCPX_HTTP_404"
	HTTPServerErr  Code = "MCPX_HTTP_5XX"
	HTTPConnRefuse Code = "MCPX_HTTP_CONN_REFUSED"
	HTTPTimeout    Code = "MCPX_HTTP_TIMEOUT"
	// HTTPConnReset: the TCP connection was reset by the peer (ECONNRESET) —
	// an idle-timeout kill by a proxy/load balancer in front of the MCP server,
	// or the upstream closing mid-response. Distinct from CONN_REFUSED (nothing
	// listening at all) and transient by nature, so it must never be parked.
	HTTPConnReset Code = "MCPX_HTTP_CONN_RESET"
	// HTTPRateLimited: the server returned 429 Too Many Requests. Its own
	// category rather than a generic 4xx because the remediation is "wait / slow
	// down", never "fix your config" — and mcpproxy already honours the
	// Retry-After header on this status (internal/transport/retry_after.go).
	HTTPRateLimited Code = "MCPX_HTTP_RATE_LIMITED"
	// HTTPClientErr: the enumerated client-error statuses that have no more
	// specific code of their own — 400, 408, 409, 410 and 451. (401, 403, 404
	// and 429 each keep their own code; every other 4xx still falls through
	// deliberately, see DiagnoseHTTPStatus.) The bucket exists so a named status
	// stops landing in MCPX_UNKNOWN_UNCLASSIFIED with its "file a bug report"
	// CTA: the exact status travels in DiagnosticError.Cause, the raw error text.
	HTTPClientErr Code = "MCPX_HTTP_4XX"
	// HTTPCanceled: the attempt was canceled before it finished — shutdown, a
	// config reload replacing the client, or a user-initiated disconnect. Not a
	// fault, hence severity info: it describes mcpproxy's own decision to stop
	// waiting, and telling the user to file a bug about it is noise.
	HTTPCanceled Code = "MCPX_HTTP_CANCELED"
	// HTTPLegacySSE: the endpoint rejected the streamable-HTTP `initialize`
	// POST with a 4xx. That is the signature of a server that only speaks the
	// older SSE transport, so the fix is a transport change in config — not a
	// credential or reachability problem, which is why it must not fall through
	// to a generic MCPX_HTTP_4xx or to MCPX_UNKNOWN_UNCLASSIFIED.
	HTTPLegacySSE Code = "MCPX_HTTP_LEGACY_SSE"
)

HTTP domain — HTTP/SSE transport failures.

const (
	DockerDaemonDown      Code = "MCPX_DOCKER_DAEMON_DOWN"
	DockerImagePullFailed Code = "MCPX_DOCKER_IMAGE_PULL_FAILED"
	DockerNoPermission    Code = "MCPX_DOCKER_NO_PERMISSION"
	DockerSnapAppArmor    Code = "MCPX_DOCKER_SNAP_APPARMOR"
	// DockerCLINotFound: isolation was requested but the `docker` binary could
	// not be resolved on the spawn PATH (issue #696 — Docker Desktop installed
	// without the admin-gated CLI shim, or a LaunchAgent's minimal PATH).
	DockerCLINotFound Code = "MCPX_DOCKER_CLI_NOT_FOUND"
	// DockerExecNotFound: the container started but its entrypoint interpreter
	// is missing from the image (e.g. `uvx` absent in `python:3.11`). Distinct
	// from a HOST stdio ENOENT, which is MCPX_STDIO_SPAWN_ENOENT.
	DockerExecNotFound Code = "MCPX_DOCKER_EXEC_NOT_FOUND"
	// DockerOCIRuntime: the OCI runtime (runc) failed to start the container —
	// e.g. an `exec format error` (image/host architecture mismatch).
	DockerOCIRuntime Code = "MCPX_DOCKER_OCI_RUNTIME"
	// DockerMissingToolchain: the container started and its entrypoint ran, but
	// a tool the server shells out to is absent from the image — git for a
	// `uvx --from …git+https://…` server, or any `<tool>: not found` on the
	// container's stderr. Distinct from DockerExecNotFound, which is the
	// ENTRYPOINT interpreter missing (an OCI exec failure, before the process
	// runs). Container stderr is its own failure surface, and everything the
	// image lacked used to land in MCPX_UNKNOWN_UNCLASSIFIED — i.e. a
	// "please file a bug report" CTA on an image/config problem (#1144).
	DockerMissingToolchain Code = "MCPX_DOCKER_MISSING_TOOLCHAIN"
)

DOCKER domain — Docker isolation subsystem failures.

const (
	ConfigDeprecatedField Code = "MCPX_CONFIG_DEPRECATED_FIELD"
	ConfigParseError      Code = "MCPX_CONFIG_PARSE_ERROR"
	ConfigMissingSecret   Code = "MCPX_CONFIG_MISSING_SECRET"
	// ConfigInvalidCommand: the server's stdio `command`/`args` pair cannot
	// spawn anything useful — e.g. a package-runner (`npx`, `uvx`) with no
	// package to run. mcpproxy detects this itself before spawning, so the
	// message is ours and the user can fix it in mcp_config.json; surfacing it
	// as UNKNOWN told them to file a bug against us instead.
	ConfigInvalidCommand Code = "MCPX_CONFIG_INVALID_COMMAND"
)

CONFIG domain — configuration parsing and validation failures.

const (
	QuarantinePendingApproval Code = "MCPX_QUARANTINE_PENDING_APPROVAL"
	QuarantineToolChanged     Code = "MCPX_QUARANTINE_TOOL_CHANGED"
)

QUARANTINE domain — security quarantine failures.

const (
	NetworkProxyMisconfig Code = "MCPX_NETWORK_PROXY_MISCONFIG"
	NetworkOffline        Code = "MCPX_NETWORK_OFFLINE"
)

NETWORK domain — network environment failures.

const (
	UpdateAppcastFailed  Code = "MCPX_UPDATE_APPCAST_FAILED"
	UpdateDownloadFailed Code = "MCPX_UPDATE_DOWNLOAD_FAILED"
	UpdateInstallFailed  Code = "MCPX_UPDATE_INSTALL_FAILED"
	UpdateOtherFailed    Code = "MCPX_UPDATE_OTHER_FAILED"
)

UPDATE domain — desktop auto-update session failures reported by the tray (spec 095). One code per stage of the closed `appcast|download|install|other` enum: the stage is the ONLY failure information that ever leaves the tray, so these codes carry no error text, URL, or version. Unlike every other domain, they are never attached to a server's stateview — they exist purely as counters in the heartbeat's error_code_counts_24h map, which admits keys by catalog membership. Registration below is therefore what makes them transmissible.

const (
	UnknownUnclassified Code = "MCPX_UNKNOWN_UNCLASSIFIED"
)

UNKNOWN — fallback when no specific classification applies.

func Classify

func Classify(err error, hints ClassifierHints) Code

Classify maps a raw error to a stable Code. It prefers typed-error inspection via errors.Is / errors.As over string matching; falls back to string matching only when the underlying library does not expose structured error types.

The hints parameter lets callers nudge the classifier with context ("this error came from the stdio spawn path", etc.).

If no specific classification applies, Classify returns UnknownUnclassified.

func DiagnoseHTTPStatus

func DiagnoseHTTPStatus(status int) Code

DiagnoseHTTPStatus maps an HTTP status code to a Code. Returns empty if the status is not a known failure.

The 4xx set is enumerated rather than ranged. A blanket `status >= 400 && status < 500` would swallow statuses whose remediation is genuinely different — and, more importantly, would claim the ones an upstream layer resolves better than a status number can (a 401 that is really a deferred OAuth sign-in, a 4xx on the initialize POST that is really a legacy-SSE server). Each status listed here is one whose only honest advice is "read the status and the body"; the rest keep falling through.

func ParkableCode added in v0.64.0

func ParkableCode(err error, hints ClassifierHints) (Code, bool)

ParkableCode classifies a connection failure and reports whether that classification is strong enough to STOP retrying it.

The returned Code is exactly Classify's, so the message the user reads is unchanged. The boolean answers the narrower question the retry policy asks: may this be treated as PROVEN permanent and the server parked?

Both conditions must hold:

  1. the code is declared RetryPermanent in the catalog, and
  2. the same code is reachable from a typed/structured signal ALONE — a code a producer attached with WrapError, or a real *exec.Error carrying an errno from mcpproxy's own spawn syscall.

Condition (2) is the whole point. Classify's stdio and docker fallbacks are deliberately broad substring matches, and the string they match is not ours: core.enrichTransportClosedError folds the CHILD PROCESS'S captured stderr into the error ("... recent stderr:\n<child output>"). Without (2) a server that crashed transiently having printed "no such file or directory", "permission denied" or "command not found" is classified with a permanent code and parked forever on the strength of text it wrote about itself. Broad matching is right for a help message and wrong for a decision that stops automatic recovery, so the two are separated here instead of by narrowing the classifier and degrading every message with it.

The coverage this costs is real and deliberate. A non-Docker stdio command is spawned through a login shell (core.wrapWithUserShell) precisely so it inherits the user's PATH, which means a genuinely missing binary reaches us as shell text, never as an *exec.Error, and is no longer parked — it retries on the normal ladder as it did before GH #1145. Restoring that coverage is a job for the spawn path (emitting a first-party coded error it can stand behind), not for the classifier trusting a child's stderr.

type DiagnosticError

type DiagnosticError struct {
	Code     Code     `json:"code"`
	Severity Severity `json:"severity"`
	Cause    string   `json:"cause,omitempty"`
	// Remediation is an optional runtime-aware, context-specific user message
	// that overrides the static CatalogEntry.UserMessage when present (MCP-2909).
	// Empty when the generic catalog message is sufficient.
	Remediation string    `json:"remediation,omitempty"`
	CauseType   string    `json:"cause_type,omitempty"`
	ServerID    string    `json:"server_id"`
	DetectedAt  time.Time `json:"detected_at"`
}

DiagnosticError is the runtime record attached to a server's stateview snapshot while the server has an active failure.

type FixRequest

type FixRequest struct {
	ServerID string
	Mode     string // "dry_run" or "execute"
}

FixRequest is the input to a registered fixer.

type FixResult

type FixResult struct {
	Outcome    string // "success" | "failed" | "blocked"
	Preview    string // populated for dry_run
	FailureMsg string
}

FixResult is the output of a registered fixer.

func InvokeFixer

func InvokeFixer(ctx context.Context, key string, req FixRequest) (FixResult, error)

InvokeFixer runs the registered fixer with the given key. Returns ErrUnknownFixer if no fixer is registered. Respects req.Mode — the fixer is responsible for not mutating state when req.Mode == ModeDryRun.

type FixStep

type FixStep struct {
	Type        FixStepType `json:"type"`
	Label       string      `json:"label"`
	Command     string      `json:"command,omitempty"`
	URL         string      `json:"url,omitempty"`
	FixerKey    string      `json:"fixer_key,omitempty"`
	Destructive bool        `json:"destructive,omitempty"`
}

FixStep is one actionable remediation suggestion attached to a CatalogEntry.

type FixStepType

type FixStepType string

FixStepType tells the UI how to render a fix step.

const (
	FixStepLink    FixStepType = "link"    // external URL; clickable
	FixStepCommand FixStepType = "command" // shell command; copyable
	FixStepButton  FixStepType = "button"  // triggers a registered fixer via /api/v1/diagnostics/fix
)

type FixerFunc

type FixerFunc func(ctx context.Context, req FixRequest) (FixResult, error)

FixerFunc is the signature every registered fixer implements.

type RetryClass added in v0.64.0

type RetryClass string

RetryClass says whether an automatic retry of a failure carrying a given code can ever succeed without a human changing something first.

The zero value is deliberately RetryTransient: a code is retryable until it is EXPLICITLY declared otherwise. An unclassified or newly added failure must never be mistaken for proof of permanence (GH #1145).

const (
	// RetryTransient (the zero value) means the condition can clear on its own —
	// a daemon starting, a registry recovering, a secret appearing in the
	// keyring, a network coming back. Keep retrying on the usual ladder.
	RetryTransient RetryClass = ""
	// RetryPermanent means the condition is a config/toolchain fact: the exact
	// same attempt will fail identically forever until a human edits something.
	// Retrying it burns CPU, disk and network and floods the log for no chance
	// of success (GH #1145: 55 identical container spawns over 19 hours).
	RetryPermanent RetryClass = "permanent"
)

type Severity

type Severity string

Severity drives UI badge colour and CLI formatting.

const (
	SeverityInfo  Severity = "info"
	SeverityWarn  Severity = "warn"
	SeverityError Severity = "error"
)

Directories

Path Synopsis
Package hints builds diagnostics.ClassifierHints from configuration.
Package hints builds diagnostics.ClassifierHints from configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL