Skip to main content

Module render

Module render 

Source
Expand description

Output formatters for aperion-shield --diff.

Three formats: text (humans, terminal default), markdown (CI / PR comments), and json (machine consumers, schema-stable with scripts/shield-diff.py).

Each renderer takes the same inputs – the corpus header, the decision distributions before/after, the per-rule deltas (already populated with fires_before/fires_after/flipped_lines_caused), and the flip counter – and returns a String. None of them print directly so that callers can capture the output cleanly (tests, PR-comment posting, etc.).

Functions§

render_json
render_markdown
render_text