Skip to content

refactor(scorer): score entity.Batch, resolve changes internally#219

Draft
behinddwalls wants to merge 1 commit into
preetam/ext/changeproviderfrom
preetam/ext/scorer
Draft

refactor(scorer): score entity.Batch, resolve changes internally#219
behinddwalls wants to merge 1 commit into
preetam/ext/changeproviderfrom
preetam/ext/scorer

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Change Scorer.Score to take the batch identity (entity.Batch) instead of a controller-pre-resolved entity.BatchChanges, per the extension contract. The score controller drops its private collectBatchChanges walk and just hands the batch to the scorer.

The heuristic scorer and the fake gain an injected changeset.Resolver and call DetailedForBatch to resolve the batch's changes themselves; the composite scorer delegates the batch to its children unchanged. The wiring constructs one resolver from the request and change stores and injects it into every scorer it builds.

Output is unchanged (a single float64 score per batch). The scorer factory and Config are unchanged — the resolver is injected at construction.

Test Plan

Issues

Stack

  1. docs(rfc): extension contract — identity in, resolve internally #214
  2. feat(changeset): shared batch→changes resolver in core #216
  3. refactor(mergechecker): accept entity.Request, resolve change internally #217
  4. refactor(changeprovider): accept entity.Request, resolve change internally #218
  5. @ refactor(scorer): score entity.Batch, resolve changes internally #219
  6. refactor(buildrunner): trigger on batches, resolve changes internally #221
  7. refactor(pusher): push ordered batches, return per-batch outcomes #222
  8. feat(conflict): target-overlap analyzer using changeset resolver #223

Change Scorer.Score to take the batch identity (entity.Batch) instead of a controller-pre-resolved entity.BatchChanges, per the extension contract. The score controller drops its private collectBatchChanges walk and just hands the batch to the scorer.

The heuristic scorer and the fake gain an injected changeset.Resolver and call DetailedForBatch to resolve the batch's changes themselves; the composite scorer delegates the batch to its children unchanged. The wiring constructs one resolver from the request and change stores and injects it into every scorer it builds.

Output is unchanged (a single float64 score per batch). The scorer factory and Config are unchanged — the resolver is injected at construction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants