pub fn encode_analysis_artifact(
artifact: &AnalysisArtifact,
) -> Result<Vec<u8>, AnalysisBytesError>Expand description
Encode an analysis artifact to canonical JSON bytes.
The produced bytes should be written to analysis.json alongside the
results.out file for the same run. The file is versioned via
schema_version; callers must treat it as read-only and must not
recompute heavy analytics at render time.
If results.out (or the INP that produced it) changes, the corresponding
analysis.json must be deleted as stale before a new artifact is produced.