pub fn bundle_run(
run: &AnalysisRun,
out_root: &Path,
run_id: &str,
label: Option<&str>,
) -> Result<PathBuf>Expand description
Materialize a completed AnalysisRun into the exact on-disk layout the local web UI
produces, then register it in <out_root>/registry.json so the local Compare / “Scan
Delta” page can pair it with other runs.
This is the shared entry point used by both the web scan flow (indirectly, via
[persist_run_artifacts]) and the oxide-sloc bundle CLI command, so the run-directory
layout and registry schema can never drift between the two.
Layout produced under <out_root>/<project_label>_<run_id>/:
index.html— offline dashboardhtml/report_<stem>.html— full HTML reportjson/result_<stem>.json— the serializedAnalysisRunjson/scan-config_<stem>.json— scan configuration snapshotpdf/report_<stem>.pdf— best-effort native PDF (skipped on failure)excel/report_<stem>.csv/.xlsx— tabular exportssubmodules/— per-submodule sub-reports (when enabled)
<stem> is <project_label>_<git_commit_short> when a commit is known, else
<project_label>. Returns the created run-directory path.
§Errors
Returns an error if the HTML report cannot be rendered or the artifacts cannot be written.