pub fn build_diagnostic_bundle(
har_json: &str,
redaction_policy: BundleRedactionPolicy,
) -> Result<DiagnosticBundle, BundleError>Expand description
Build a DiagnosticBundle from a raw HAR payload.
Runs investigation, requirement inference, policy planning, and the built-in
probe pack. Applies the given BundleRedactionPolicy to sanitise sensitive
fields before returning.
§Errors
Returns BundleError::Har when the HAR payload is invalid.
§Example
use stygian_charon::bundle::{build_diagnostic_bundle, BundleRedactionPolicy};
let empty_har = r#"{"log":{"version":"1.2","creator":{"name":"test","version":"0"},"entries":[]}}"#;
let bundle = build_diagnostic_bundle(empty_har, BundleRedactionPolicy::Standard).unwrap();
assert!(bundle.probe_report.total > 0);