soothfast v0.1.0

soothfast-report API reference#

Generated by cargo soothfast docs reference Measurements and verified claims come from the latest baseline; CI gates them.

soothfast_report#

soothfast_report::badges#

badge function#

rust · ignore
pub fn badge(label: &str, message: &str, color: &str) -> Value

Raw shields.io endpoint JSON: {schemaVersion, label, message, color}.

coverage_badge function#

rust · ignore
pub fn coverage_badge(label: &str, pct: u32) -> Value

Green ≥ 90, yellow ≥ 70, red below.

gate_badge function#

rust · ignore
pub fn gate_badge(passed: Option<bool>) -> Value

None means no recorded gate verdict — say so rather than guess green.

svg_from function#

rust · ignore
pub fn svg_from(value: &Value) -> String

Render endpoint JSON (as produced by the builders above) as a flat SVG badge: dark instrument-panel label segment, evidence-colored message.

soothfast_report::changelog#

ApiSection enum#

rust · ignore
pub enum ApiSection<'a>

What the API section has to report.

The two cases are separate types rather than an empty-string convention: "nothing changed" and "there was nothing to compare against" read the same in prose but mean opposite things, and a changelog that confuses them reports calm where it had no input at all.

Change struct#

rust · ignore
pub struct Change

One merged change, read off a conventional-commit subject.

DraftInputs struct#

rust · ignore
pub struct DraftInputs<'a>

Inputs already computed by the CLI (API section, two baselines).

Icons struct#

rust · ignore
pub struct Icons

Section icons, keyed by the lowercased section name a release renders (features, fixes, performance, documentation, internal).

A repo overrides any subset through [changelog.icons] in its soothfast.toml; whatever it leaves out keeps the shipped default, so a consumer never has to restate the whole vocabulary to change one glyph.

PerfThresholds struct#

rust · ignore
pub struct PerfThresholds

Per-metric movement a delta table is willing to report, as percentages.

These mirror the gate's own thresholds and are passed in rather than defined here, so the changelog reports exactly what the gate would have flagged instead of drifting from it.

Only deterministic metrics have thresholds, because a changelog is a permanent record: walltime moves 15-20% between two runs of identical code on a shared CI runner, so recording it means rewriting the section on every merge to say nothing. Walltime regressions are gate's job, where a human reads the verdict against a live noise floor.

changes_from_subjects function#

rust · ignore
pub fn changes_from_subjects(subjects: &[String]) -> Vec<Change>

Parse type: subject (#N) subjects. Release commits and the bots that regenerate derived artifacts are dropped, since a release listing its own paperwork is noise.

draft function#

rust · ignore
pub fn draft(inputs: &DraftInputs) -> String

Render the "Unreleased" draft section: API surface + perf table.

soothfast_report::llms#

SurfaceEntry struct#

rust · ignore
pub struct SurfaceEntry

One public item as fed by the CLI (from the docs-engine surface).

render function#

rust · ignore
pub fn render(pkg: &str, entries: &[SurfaceEntry], baseline: &Value) -> String

Render llms.txt: every public item grouped by crate, with its full doc comment and measured facts attributed via covers (or direct id) matching.

verified claims
complexityclaimed O(n); growth drift x0.94 over sizes [64, 256, 1024] (limit x2.5)
measured as `soothfast_report::bench_llms_render`
median walltime (ns)320725
p99 walltime (ns)334474
allocations/iter7191
allocated bytes/iter1197537

soothfast_report::perf_table#

Row struct#

rust · ignore
pub struct Row

One measured item's metrics, each None when that backend didn't run.

html function#

rust · ignore
pub fn html(baseline: &Value) -> String

rows rendered as a plain <table> for embedding in the docs site.

markdown function#

rust · ignore
pub fn markdown(baseline: &Value) -> String

rows rendered as a GitHub-flavored markdown table.

verified claims
complexityclaimed O(n); growth drift x0.98 over sizes [64, 256, 1024] (limit x2.5)
measured as `soothfast_report::bench_perf_table`
median walltime (ns)836430
p99 walltime (ns)865920
allocations/iter8204
allocated bytes/iter465747

rows function#

rust · ignore
pub fn rows(baseline: &Value) -> Vec<Row>

One Row per measured item in the baseline, in baseline (map) order.

soothfast_report::trend_chart#

METRICS constant#

rust · ignore
pub const METRICS: &[(&[&str

(metric key path in baseline items, display name, mover threshold in percent drift, fleet_relative). Walltime is fleet-relative: runner-speed shifts move every item together, so each series divides out the fleet median before anything is called a mover. Counter metrics are deterministic and compare directly against their first point.

render function#

rust · ignore
pub fn render( points: &[Value], key: &[&str; 2], title: &str, threshold_pct: f64, fleet_relative: bool, ) -> Option<String>

Render one metric's chart; None when fewer than 2 points exist.

built with cargo soothfast docs build source