Skip to main content

Module release_cadence

Module release_cadence 

Expand description

Release-cadence analysis — inter-release gap statistics from git tags.

§What it measures

Tags are a proxy for releases, not deployments. A team that cuts hotfix tags frequently will show short gaps; a team with long-lived release branches will show large gaps. The trend signal (accelerating / stable / slowing) helps detect drift in release velocity over time without requiring any external ticketing or deployment data.

§Algorithm

  1. Fetch all tags via Repo::tags (sorted ascending by date).
  2. Filter to names matching opts.release_tag_glob (default v*).
  3. Compute days_since_prev for each tag as the float difference between consecutive tag dates. The first tag has None.
  4. Compute summary statistics over the gap series:
    • median (middle gap for odd N; average of two middle for even N).
    • IQR (Q3 − Q1; P75 − P25 by linear interpolation).
    • trend: sign of the ordinary-least-squares slope fitted to the gap sequence (x = 0-based index, y = days), judged relative to the repo’s own median gap (see [TREND_SLOPE_FRACTION]) rather than an absolute day count — a slope whose magnitude exceeds TREND_SLOPE_FRACTION * median is a meaningful trend: positive → "slowing", negative → "accelerating", within the threshold → "stable". Scale-relative because a fixed absolute cutoff conflates a yearly-cadence repo with a two-day-cadence one — the same 1-day slope drift is noise for the former and a real trend for the latter. See [classify_trend].
  5. Emit per-tag rows sorted by date ascending, then a synthetic tag = "__summary__" row carrying median, IQR, and trend in the days_since_prev field (median) and the date field (IQR as a formatted string) and trend field. See ReleaseCadenceRow docs.

Structs§

ReleaseCadenceRow
One tag in the release timeline, plus a synthetic summary row.

Functions§

run_release_cadence
Run the release-cadence analysis.