Skip to main content

Module report

Module report 

Source
Expand description

Human-readable report renderer.

Pure: takes a Diagnosis, returns a String. No I/O. Output formats — both the full report (render_report) and the short summary used by the diagnose subcommand (render_short) — are pinned by snapshot tests under crates/llm-assisted-api-debugging-lab/tests/snapshots/.

§Why no sanitization here

Unlike crate::llm_prompt, this module deliberately does not pass evidence through a sanitizer. These outputs are read by humans (in a terminal, in an escalation queue), not fed to a model. A human reader benefits from seeing the literal log message exactly as it appeared, including any newlines or backticks; a model would be vulnerable to that same content as injection. The split is intentional and load-bearing — see docs/llm_assisted_workflow.md for the threat model.

Functions§

render_evidence
Format a single Evidence item as one line of human-readable text.
render_report
Full human-readable report for the report subcommand.
render_short
Compact one-screen summary used by the diagnose subcommand.