Skip to main content

Module pair_programming

Module pair_programming 

Expand description

pair-programming analysis.

Counts commits that carry one or more Co-Authored-By: trailers and emits per-pair pair-counts. The Co-Authored-By trailer was formalised by GitHub circa 2017 and is now standard signal for pair / mob sessions; CodeLore’s identity layer already parses it for the AI-attribution bot detection. This analysis just aggregates the pairs.

Trailers are extracted via regex over the message column at query time. Pre-extraction into a sibling table during ingest (similar to the ai_attribution field) is a potential future hardening; query-time extraction over O(N) commits is fast enough on DuckDB for the row counts users hit.

§Note on bot filtering

Ingest appends every commit to commits regardless of authorship — bot classification lives per-alias on author_aliases, and the SQL analyses exclude bots by joining through HUMAN_ALIASES_CTE. This analysis reads commits directly, so the is_bot checks below are the only thing keeping bots out of the pair counts, on both sides: the commit’s own author, and each Co-Authored-By: trailer (Renovate has historically added itself as one). Removing either check starts counting bots as pair participants.

The author-side check tests the resolved canonical identity rather than the raw alias. A .mailmap that merges a bot alias and a human alias into one canonical therefore classifies the pair by whichever identity the canonical carries — mailmap intent wins, which is the behaviour we want here.

Structs§

PairRow

Functions§

run_pair_programming
Run the pair-programming analysis. Returns rows ranked by pair-commit count DESC.