Consolidate duplicated fixtures into one factory
The same test object built by hand in twenty files, replaced with one factory the suite shares.
The ticket
Replace hand-built duplicate fixtures with a single factory and migrate every test that used them.
Acceptance criteria
- One factory covers every current variation, with overrides for the differences
- Every test that built the object by hand now uses it
- All touched tests still pass unchanged in what they assert
- The factory lives with the test helpers, not inside one suite
What lands as proof
The deleted duplication in the diff, and every migrated suite still passing without a changed assertion.
Why teams defer it
- Copying the fixture into a new test takes seconds and extracting it takes an hour, so the copies keep winning.
- When the shape changes, twenty files change with it, and that pain arrives long after the person who copied it has moved on.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: replace hand-built duplicate fixtures with a single factory and migrate every test that used them. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.
- How do I know the work is done?
- The pull request carries the evidence, not only the diff. Here that means every touched test still passes, the duplicates are gone, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- None is required before the run starts. Every claim this ticket makes can be checked by machine, so the agent works straight through and a person reviews the finished pull request like any other.