Skip to content

feat(conflict): add Analyzer extension and wire it into the batch controller#155

Merged
behinddwalls merged 1 commit into
mainfrom
sergeyb/conflict-analysis
May 27, 2026
Merged

feat(conflict): add Analyzer extension and wire it into the batch controller#155
behinddwalls merged 1 commit into
mainfrom
sergeyb/conflict-analysis

Conversation

@sbalabanov
Copy link
Copy Markdown
Contributor

Summary

  • New extension/conflict/ package: vendor-agnostic Analyzer interface (Analyze(ctx, batch, inFlight) -> []Conflict), Conflict{BatchID, Type}, and a ConflictType enum (Conservative, TargetOverlap).
  • Two stub backends to bracket behavior: all/ (conservative — every active batch becomes a dependency) and none/ (optimistic — never blocks). Mock package generated for tests.
  • Batch controller now calls the analyzer instead of hard-coding "depend on every active batch", and dedupes results by BatchID (a single (analyzed, in-flight) pair may be reported with multiple Conflict entries when different types apply). The orchestrator wires all.New() for now; the real Tango-backed analyzer will slot in later.

Test plan

  • go test ./extension/conflict/... ./orchestrator/controller/batch/...
  • New TestController_Process_AnalyzerSelectsSubset proves analyzer output (not the active-batches list) drives dependencies and that dedupe-by-BatchID works.
  • New TestController_Process_AnalyzerFailure proves the new conflict_analyzer_errors path propagates.
  • make lint, make check-tidy, make check-mocks, make check-gazelle

🤖 Generated with Claude Code

@sbalabanov sbalabanov requested review from a team and behinddwalls as code owners May 21, 2026 20:45
…troller

Introduces a vendor-agnostic conflict.Analyzer interface that takes the
candidate batch and the in-flight batches it might serialize behind, and
returns the subset that conflict along with a typed reason. Ships two
stub backends (all/ conservative, none/ optimistic) and replaces the
batch controller's hard-coded "depend on every active batch" loop with a
pluggable Analyze call plus dedupe-by-BatchID.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sbalabanov sbalabanov force-pushed the sergeyb/conflict-analysis branch from cbcb539 to 84c018e Compare May 26, 2026 22:25
@behinddwalls behinddwalls added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit 21d888e May 27, 2026
13 checks passed
@github-actions github-actions Bot deleted the sergeyb/conflict-analysis branch May 27, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants