You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(scorer): score batches over typed change details
## Summary
### Why?
The scorer took entity.Change (just URIs), so it could not score on real
change size — the example heuristic counted URIs as a placeholder. With
typed change details now persisted on change records, the scorer can score a
batch on its actual lines/files changed.
### What?
- Add entity.BatchChanges — the normalized, batch-level view of all changes
in a batch (BatchID, Queue, []ChangeInfo) with aggregation helpers.
- Scorer.Score now takes entity.BatchChanges; the heuristic ValueFunc and the
composite scorer operate over it.
- The score controller resolves each request's change records, flattens their
details into BatchChanges, and scores the batch once — replacing the
per-request multiplicative product over len(URIs).
- Example wiring buckets by total lines changed.
Consumes the typed details persisted by the change-details change.
## Test Plan
- ✅ `make build`, `make test`, `make lint`, `make check-mocks/gazelle/tidy`
- ✅ `make integration-test`, `make e2e-test` (start -> validate enrich ->
score normalizes the batch and scores on real change size)
0 commit comments