Documentation
¶
Overview ¶
Package changeset resolves batch identity into the changes a batch contains. It is the single place the orchestrator walks batch -> requests -> changes, consolidating what the build and merge controllers each did privately. Decision/action extensions (scorer, buildrunner, and future detail-aware conflict analyzers) take thin identity entities and resolve their granular content through an injected Resolver instead of being handed pre-resolved data by a controller.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver interface {
// ChangesForBatch resolves a batch's contained requests into their raw
// changes (URIs only; no change-store read), in batch.Contains order. A batch
// with no requests yields an empty slice. Used by the build (base/head) and
// merge stages.
ChangesForBatch(ctx context.Context, batch entity.Batch) ([]change.Change, error)
// DetailedForBatch resolves a batch into its normalized, batch-level view:
// one entity.ChangeInfo per claimed URI (URI plus the provider details read
// from the change store), aggregated across every request in the batch. For
// each URI it selects the record owned by the request, since the change store
// returns rows for all requests that ever claimed the URI. Used by the scorer
// and detail-aware analyzers.
DetailedForBatch(ctx context.Context, batch entity.Batch) (entity.BatchChanges, error)
}
Resolver turns batch identity into the changes the batch contains. Both methods operate on a single batch — callers with several batches (a build's base, a merge train) loop and keep the per-batch boundary by holding a slice per batch. The two methods differ only in fidelity: ChangesForBatch is the cheap URI-only view; DetailedForBatch reads the change store for provider details.