Documentation
¶
Overview ¶
Package fixes mines fix commits into findings — the lesson source that exists in every repository, review culture or none. A fix commit is a correction the author themselves labeled: the patch shows the mistake being undone, which makes it distillation material even when the commit message says nothing useful (validated empirically: two anonymous "fix: PR review" commits grouped correctly on patch content alone).
Classification is tiered and precise over complete — a miss degrades, a false positive corrupts — and every finding declares its derivation in Source, like every call edge declares its resolution. Duplicates are removed by patch identity (cherry-picks and backports are one event), and fixes that were later reverted are excluded: a fix bad enough to undo teaches the wrong lesson.
Index ¶
Constants ¶
const DefaultWindow = 365 * 24 * time.Hour
DefaultWindow is the mining recency window — measured on the test repos as the span that keeps a meaningful corpus (~50-70 findings) without resurrecting ancient history.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Window is how far back to mine. Staleness defense: a years-old fix
// pattern on since-rewritten code must not enter the corpus. Zero
// means DefaultWindow.
Window time.Duration
// Logf receives progress; nil discards it.
Logf func(format string, args ...any)
}
Options bounds a fix-mining pass.