feat(conflict): add Analyzer extension and wire it into the batch controller#155
Merged
Conversation
behinddwalls
approved these changes
May 21, 2026
…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>
cbcb539 to
84c018e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extension/conflict/package: vendor-agnosticAnalyzerinterface (Analyze(ctx, batch, inFlight) -> []Conflict),Conflict{BatchID, Type}, and aConflictTypeenum (Conservative,TargetOverlap).all/(conservative — every active batch becomes a dependency) andnone/(optimistic — never blocks). Mock package generated for tests.BatchID(a single (analyzed, in-flight) pair may be reported with multipleConflictentries when different types apply). The orchestrator wiresall.New()for now; the real Tango-backed analyzer will slot in later.Test plan
go test ./extension/conflict/... ./orchestrator/controller/batch/...TestController_Process_AnalyzerSelectsSubsetproves analyzer output (not the active-batches list) drives dependencies and that dedupe-by-BatchID works.TestController_Process_AnalyzerFailureproves the newconflict_analyzer_errorspath propagates.make lint,make check-tidy,make check-mocks,make check-gazelle🤖 Generated with Claude Code