Expand description
Library entrypoint.
§Layering
Case + log -> Vec<Evidence> -> Diagnosis -+-> Report (human)
|-> Prompt (LLM)
+-> Prompt JSON (LLM)casesloads aCase(a sanitized HTTP transaction) from a fixture file.evidence::collect_evidencenormalizes the case and its matching log file into aVec<Evidence>. The log parser (evidence::parse_log) is also exposed so thediagnose-logsubcommand can run against a bare log without a JSON fixture.diagnose::diagnoseis a pure function over(name, &[Evidence])that produces aDiagnosis. There is no clock, no env, no fs, no randomness inside the rules — every snapshot test is reproducible on any machine.- The renderers (
render_report,render_short,render_prompt,render_prompt_json) each consume a&Diagnosisand produce user-visible output. None of them can reach back into the rawCase. This is the architectural guarantee that the LLM-facing surface cannot influence diagnostic truth.
§Re-exports
Every public item a downstream caller needs is re-exported from the
crate root, so use llm_assisted_api_debugging_lab::diagnose; works without naming the
module. The modules themselves remain pub for callers who want to
reach internal helpers (e.g. report::render_evidence used by the
tests).
Re-exports§
pub use cases::Case;pub use cases::CaseError;pub use cases::KNOWN_CASES;pub use diagnose::diagnose;pub use diagnose::Diagnosis;pub use diagnose::Severity;pub use diagnose::SeveritySource;pub use evidence::collect_evidence;pub use evidence::parse_log;pub use evidence::Evidence;pub use llm_prompt::render_prompt;pub use llm_prompt::render_prompt_json;pub use report::render_report;pub use report::render_short;