Wrap a multi-write operation that can half-succeed in one transaction
An operation that writes to three places and can stop after the first, wrapped so it either completes or does not.
The ticket
Make a multi-write operation atomic so it cannot half-succeed.
Acceptance criteria
- All writes happen in one transaction
- A test injects a failure partway and asserts nothing persisted
- Non-transactional side effects happen after the commit, not inside it
- The transaction is as short as it can be
What lands as proof
A failure-injection test proving a mid-operation crash leaves no partial state behind.
Why teams defer it
- Partial writes are rare and get repaired by hand, so the cost hides in support work.
- Wrapping it means understanding which side effects can safely sit inside a transaction, which is not obvious.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: make a multi-write operation atomic so it cannot half-succeed. 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 partial-failure test proving the whole operation rolls back, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.