Expand description
Operator-facing code-lookup surface (rch error explain).
Bridges the two parallel code namespaces in this workspace —
super::ErrorCode (RCH-E001..E599, the primary error catalog)
and super::ReliabilityReasonCode (RCH-R001..R699, the doctor
reliability surface) — into a single uniform lookup so an operator
who pastes any code from a log line into rch error explain gets a
useful answer regardless of which namespace it came from.
§Surface
rch error explain <CODE> # human form
rch error explain <CODE> --json
rch error list # all codes
rch error list --category=worker
rch error list --json§Wire shape (JSON)
{
"code": "RCH-R104",
"namespace": "reliability",
"name": "WorkerDiskPressureTelemetryGap",
"category": "disk_pressure",
"description": "Worker is missing fresh disk telemetry.",
"remediation": ["Run `rch workers probe <worker>` to refresh telemetry."],
"requires_restart": false
}Structs§
- Code
Explanation - Resolved lookup result for either namespace. Produced by
lookup.
Enums§
- Code
Namespace - Which catalog the code came from.
Functions§
- is_
known - Whether a string parses as either a known reliability or error code.
- is_
known_ category - Whether a category name matches at least one known code category.
- known_
categories - Known category names across both code namespaces, sorted for stable CLI help and JSON error payloads.
- list_
all - All known codes across both namespaces. Used by
rch error list. - list_
by_ category - Subset of
list_allfiltered to one category (matches the snake_casecategoryfield onCodeExplanation). Empty result indicates an unknown category — caller can detect that. - lookup
- Look up a code string. Accepts whitespace-padded input.
- render_
human - Render a
CodeExplanationin a paste-ready human form. Used by the CLI when--jsonis not set.