Expand description
Diagnosis of malformed JSON payloads fetched in CI. Split out of
rmcp_release_monitor.rs to stay under the PATTERNS.md module size hard
limit.
Constantsยง
- JSON_
PREVIEW_ ๐BYTES - Enough to identify what the fetch actually wrote - an ANSI escape run, an HTML error page, a GitHub API error object - without dumping a multi-hundred kilobyte payload into the CI log.
Functionsยง
- diagnose_
json_ ๐payload - Recognizes the payload shapes that actually show up when a JSON fetch goes wrong in CI, and names the fix.
- escaped_
head ๐ - Renders the first
max_bytesofpayloadas a quoted, escaped, pure-ASCII string so control characters (notably ESC) are visible in the CI log. - json_
parse_ ๐context - Builds the
anyhowcontext for a failedserde_jsonparse of a fetched payload.