Skip to content

feat(changeset): shared batch→changes resolver in core#216

Draft
behinddwalls wants to merge 1 commit into
preetam/rethink-extension-entity-contractsfrom
preetam/ext/changeset-resolver
Draft

feat(changeset): shared batch→changes resolver in core#216
behinddwalls wants to merge 1 commit into
preetam/rethink-extension-entity-contractsfrom
preetam/ext/changeset-resolver

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add submitqueue/core/changeset, the single place the orchestrator resolves batch identity into the changes a batch contains — consolidating the batch -> requests -> changes walk that the build, merge, and score controllers each performed privately.

Resolver exposes two single-batch fidelities, both keyed per batch so callers with several batches loop and keep the per-batch boundary: ChangesForBatch returns raw changes (URIs only, no change-store read) for the build and merge stages, and DetailedForBatch returns one ChangeInfo per claimed URI with provider details read from the change store, for the score stage and detail-aware analyzers.

Ships with a store-backed implementation (depending only on the request and change stores), a programmable in-memory fake, a generated mock, and tests. The package is added unused; extensions adopt it in later branches. entity.BatchChanges is repurposed as DetailedForBatch's output (doc comment only). The mocks make-target gains the new package.

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
  9. refactor(entity): relocate analyzer/checker/pusher result types to entity #227

Add submitqueue/core/changeset, the single place the orchestrator resolves batch identity into the changes a batch contains — consolidating the batch -> requests -> changes walk that the build, merge, and score controllers each performed privately.

Resolver exposes two single-batch fidelities, both keyed per batch so callers with several batches loop and keep the per-batch boundary: ChangesForBatch returns raw changes (URIs only, no change-store read) for the build and merge stages, and DetailedForBatch returns one ChangeInfo per claimed URI with provider details read from the change store, for the score stage and detail-aware analyzers.

Ships with a store-backed implementation (depending only on the request and change stores), a programmable in-memory fake, a generated mock, and tests. The package is added unused; extensions adopt it in later branches. entity.BatchChanges is repurposed as DetailedForBatch's output (doc comment only). The mocks make-target gains the new package.
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