Skip to content

feat(git): coupling score weights -> config (bo-y1kd)#34

Merged
scbrown merged 1 commit into
mainfrom
bo-y1kd-coupling-weights-config
Jun 28, 2026
Merged

feat(git): coupling score weights -> config (bo-y1kd)#34
scbrown merged 1 commit into
mainfrom
bo-y1kd-coupling-weights-config

Conversation

@scbrown

@scbrown scbrown commented Jun 28, 2026

Copy link
Copy Markdown
Owner

What

calculate_coupling_score (src/index/git.rs) hardcoded 0.7*freq + 0.3*recency with a 30-day recency knee. Surfaces both as [git] config:

  • coupling_freq_weight (default 0.7; recency weight = 1 - this)
  • coupling_recency_days (default 30.0; recency decay knee — a pair last changed N days ago scores 0.5 on recency)

Affects bobbin related + PPR seeding scores.

How

Threaded the two weights through analyze_couplingcalculate_coupling_score, and through reindex_coupling in the calibrate path. Index + calibrate call sites read from config.git.

Safety

  • Defaults reproduce prior behavior exactly — zero score change with default config.
  • Non-positive coupling_recency_days falls back to 30 to guard the decay denominator.

Tests

test_calculate_coupling_score extended: default weights (3 cases, unchanged), custom recency-dominant weights, and custom 60-day knee. Config round-trip + legacy-git-config tests green. Docs [git] block updated.

🤖 Generated with Claude Code

calculate_coupling_score baked in 0.7*freq + 0.3*recency with a 30-day
recency knee. Surface both as [git] config:

- coupling_freq_weight (default 0.7; recency weight = 1 - this)
- coupling_recency_days (default 30.0; recency decay knee)

Threaded through analyze_coupling + reindex_coupling (calibrate). Defaults
reproduce prior behavior exactly (zero change). Non-positive recency_days
falls back to 30 to guard the decay. Tests cover default + custom weights
and custom knee; docs updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GuQ96t4m1vzFQ6v72btayV
@scbrown
scbrown merged commit 815cb67 into main Jun 28, 2026
5 checks passed
@scbrown
scbrown deleted the bo-y1kd-coupling-weights-config branch June 28, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant