Commit 3e75dd9
authored
refactor(entity): promote Change + ChangeID to shared entity/change (#240)
## Summary
### Why?
`Change` (a code change identified by provider URIs) and the
GitHub/Phabricator `ChangeID` parsers are pure identity-and-parsing
types with no domain semantics and no persisted-as-shared schema. They
are the one cluster genuinely common to every code-change pipeline —
SubmitQueue today, and Stovepipe / Runway / Tango alignment going
forward — so they belong in the shared top-level `entity/` tree rather
than inside `submitqueue/entity/`.
This is deliberately the *only* promotion: facts a domain persists (the
change-provider model embedded in `ChangeRecord`), state machines, and
pipeline types stay domain-local, since sharing them would couple every
domain's storage schema and bend their state machines toward
SubmitQueue's.
### What?
Moves the canonical `Change` struct out of
`submitqueue/entity/request.go` into a new `entity/change` package, and
relocates the parser packages to `entity/change/github` and
`entity/change/phabricator` (preserving git history). No alias shim:
every consumer now references `change.Change` and imports the new path
directly. JSON tags are unchanged, so queue payloads (`Request`,
`LandRequest`, `PushResult`) remain byte-identical across a deploy.
`submitqueue/entity` keeps its full pipeline and facts; `Request`,
`LandRequest`, and `ChangeOutcome` now embed `change.Change`.
## Test Plan
- ✅ `make build`
- ✅ `make test` (51/51 pass)
- ✅ `make fmt` / `make gazelle` (converged, no further changes)
- ✅ `make check-tidy` (go.mod / MODULE.bazel unchanged — internal move,
no new deps)1 parent 5cbd41a commit 3e75dd9
74 files changed
Lines changed: 239 additions & 146 deletions
File tree
- entity/change
- github
- phabricator
- submitqueue
- core
- changeset
- fake
- mock
- fakemarker
- entity
- extension
- buildrunner
- buildkite
- fake
- githubactions
- changeprovider
- fake
- github
- mergechecker
- fake
- github
- pusher
- fake
- git
- gateway/controller
- orchestrator/controller
- batch
- merge
- score
- start
- validate
- test/integration/submitqueue/extension/storage
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments