refactor(entity): relocate analyzer/checker/pusher result types to entity#227
Draft
behinddwalls wants to merge 1 commit into
Draft
refactor(entity): relocate analyzer/checker/pusher result types to entity#227behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
…tity
Move the domain-fact data types produced by the conflict, mergechecker, and pusher extensions into entity/submitqueue, leaving each extension with only its behavioral contract (interface, Config, Factory) and sentinels:
- conflict.Conflict / ConflictType -> entity.Conflict / entity.ConflictType
- mergechecker.Result -> entity.MergeResult
- pusher.{Result,BatchOutcome,ChangeOutcome,OutcomeStatus} -> entity.{PushResult,BatchOutcome,ChangeOutcome,OutcomeStatus}
These are domain facts (a dependency-graph reason, a mergeability verdict, the commits a change produced) that the orchestrator may persist or surface. Placing them in entity/ — the universal dependency sink that storage, controllers, and extensions all already import — keeps the contract robust to future persistence without a layering inversion (storage importing a decision extension) or an import migration later. This matches what buildrunner and changeprovider already do with entity.BuildStatus / entity.ChangeInfo. The data shapes are unchanged; only their home is. pusher.ErrConflict stays in the extension (a sentinel error is part of the behavioral contract). The controllers were already type-inference-clean, so only their tests change.
This was referenced Jun 9, 2026
behinddwalls
added a commit
that referenced
this pull request
Jun 9, 2026
## Summary ### Why? Extension input granularity is inconsistent across the orchestrator pipeline: `conflict.Analyzer` takes orchestrator identity (`entity.Batch`), while `scorer` / `mergechecker` / `changeprovider` / `buildrunner` / `pusher` take controller-resolved `entity.Change`. The split caps what an extension can do — a real `target_overlap` conflict analyzer and a diff-aware heuristic scorer both cannot be written today, because the data they need is neither in the contract nor resolvable by the extension. ### What? Adds `doc/rfc/submitqueue/extension-contract.md` proposing that decision/action extensions accept thin reference entities at their pipeline-stage granularity (`entity.Request` for request-stage, `entity.Batch` / `[]entity.Batch` for batch-stage) and resolve granular content themselves via narrowly-injected `Factory` dependencies, while `storage` / `changestore` / `queueconfig` stay key/value resolution targets. `conflict.Analyzer` is the baseline. The RFC revises the BuildRunner base/head contract (`build-runner.md`) to pass batches rather than change lists. Also encodes the rule in `CLAUDE.md` so new extensions and signature changes follow it, and links the RFC from the RFC index. Documentation only — no code changes. ## Test Plan ## Issues ## Stack 1. @ #214 1. #216 1. #217 1. #218 1. #219 1. #221 1. #222 1. #223 1. #227
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
Move the domain-fact data types produced by the conflict, mergechecker, and pusher extensions into entity/submitqueue, leaving each extension with only its behavioral contract (interface, Config, Factory) and sentinels:
These are domain facts (a dependency-graph reason, a mergeability verdict, the commits a change produced) that the orchestrator may persist or surface. Placing them in entity/ — the universal dependency sink that storage, controllers, and extensions all already import — keeps the contract robust to future persistence without a layering inversion (storage importing a decision extension) or an import migration later. This matches what buildrunner and changeprovider already do with entity.BuildStatus / entity.ChangeInfo. The data shapes are unchanged; only their home is. pusher.ErrConflict stays in the extension (a sentinel error is part of the behavioral contract). The controllers were already type-inference-clean, so only their tests change.
Test Plan
Issues
Stack