Commit dbc92a6
authored
fix(workspace): make cross-repo co-change a bounded session-share signal (#758)
* fix(workspace): make cross-repo co-change a bounded session-share signal
The cross-repo co-change list was dominated by noise: a progress diary
paired with everything (103 of 200 edges), strengths were unbounded sums
(up to 91.6 against an API contract of 0..1), one repo pair consumed the
whole edge budget, and same-person commits under different git emails
never matched at all.
Reworked detect_cross_repo_co_changes:
- Chain each author's commits into work sessions (gap or span > window
starts a new one). A session credits each cross-repo file pair once,
killing the quadratic commit-pair inflation that let one diary file
reach frequency 322 from 38 commits.
- Match authors by normalized author name with email fallback, so the
same person committing as 'Jane Doe' and 'JaneDoe' with different
emails still links their repos.
- Drop ubiquitous files (>20% of a repo's scanned commits, only when
>=30 commits of history) plus changelogs via the static noise list.
- strength = decayed co-sessions / (less-active file's decayed sessions
+ 1), a bounded [0, 1) share; require >=2 co-sessions. frequency now
means distinct co-sessions.
- Cap sessions at 20 files per side selected by session centrality, not
alphabetically (which systematically evicted src/** in busy sessions),
and cap edges per repo pair (50) before the global cap (200).
Overlay version bumped to 2; load_overlay and CrossRepoEnricher ignore
v1 files so stale unbounded scores never reach consumers. The CLAUDE.md
workspace generator now reads through load_overlay instead of parsing
the JSON three times. UI shows strength as a percentage with an updated
tooltip, and the min_strength API bound (le=1.0) is now truthful.
Dogfood validation across repowise+backend+frontend: 0 diary edges (was
116/200), strengths 0.52-0.78, all three repo pairs represented (was 1).
* fix(upgrade): sync bundled changelog with docs1 parent 732b105 commit dbc92a6
10 files changed
Lines changed: 763 additions & 353 deletions
File tree
- packages
- cli/src/repowise/cli/commands
- core/src/repowise/core/workspace
- server/src/repowise/server/mcp_server
- ui/src/workspace
- web/src/app/workspace/co-changes
- tests/unit
- server
- workspace
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | 206 | | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
279 | 263 | | |
280 | 264 | | |
281 | 265 | | |
| |||
0 commit comments