Documentation
¶
Overview ¶
Package hints builds diagnostics.ClassifierHints from configuration.
It exists so the supervisor and the managed client classify the SAME failure the same way. Each used to (or would) hand-roll the Docker-isolation predicate, and a hand-rolled mirror has already drifted from the spawn path once (GH #1142): a `mode: "docker"` server was Docker-launched but classified as a plain host ENOENT. Since GH #1145 the classification decides whether a server is parked as terminally failed, a drift now changes retry behaviour and not just a help message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func For ¶
func For(global *config.Config, srv *config.ServerConfig, transport string) diagnostics.ClassifierHints
For builds the classifier hints for one server's failure.
The Docker predicate delegates to config.ResolveIsolation — the SAME resolver the spawn path branches on (core.IsolationManager.ShouldIsolate wraps it) — so the hint cannot drift from the launch decision. The predicate is Mode == docker, not ResolvedIsolation.Isolated: the DOCKER remediation codes describe the container LAUNCH path, which runs whenever the mode is docker.
The enrichment fields (command, image override, default images) only feed MCP-2909's runtime-aware remediation text; they never change classification.
The transport is canonicalized HERE, at the one place every production hint is built, rather than at each of the classifier's gates. Callers pass transport.DetermineTransportType's output, which returns config.Protocol VERBATIM — so the same HTTP server arrives as "http", "sse", "streamable-http" or "auto" depending only on how it was added, and the classifier's HTTP arms (gated on the literal "http") were switched off for every spelling but one. See diagnostics.CanonicalTransport.
Types ¶
This section is empty.