Move a slow synchronous call into a background job
Work done inside a request that the user does not need to wait for, moved to a job with its own tests.
The ticket
Move slow synchronous work out of the request path into a background job.
Acceptance criteria
- Request timing is measured before and after
- The job has its own tests, including its failure path
- The caller learns the outcome through a defined mechanism
- Failures are retried and surfaced rather than lost
What lands as proof
Request timings either side plus tests on the job itself, so the latency win is not paid for in lost work.
Why teams defer it
- Moving work out of the request means the user no longer learns when it fails, which needs a new mechanism.
- The synchronous version is simpler and correct, so the change is a tradeoff rather than a fix.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: move slow synchronous work out of the request path into a background job. 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 request timing before and after, the job covered by its own tests, 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.