Stop a saved record and its message from diverging
A row written and a message published separately, replaced so the two cannot diverge.
The ticket
Replace a dual write with an outbox so the row and the message commit together.
Acceptance criteria
- The message is written in the same transaction as the row
- A relay publishes from the outbox with at-least-once delivery
- A failure injected between the two produces no divergence
- Consumers already handle duplicates, or that is fixed first
What lands as proof
A failure-injection test showing the row and the message cannot end up out of step.
Why teams defer it
- Divergence is rare, silent, and only discovered when somebody reconciles two systems by hand.
- An outbox adds a relay to operate, which is a real ongoing cost against a rare failure.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: replace a dual write with an outbox so the row and the message commit together. 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 failure-injection test proving the two cannot diverge, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- The run stops for the plan, and the review bar is raised afterwards so that smaller suggestions block the merge too, not only serious findings.