Stop concurrent refreshes from multiplying vendor requests
Five scheduled jobs refresh the same connector after a restart and exceed the vendor limit. Add one active refresh identity per connector and bounded Retry-After handling.
- Focused work estimate
- 2h + prerequisites
- Priority in the scenario
- Medium
- Engineering practice
- Job deduplication · Rate limits · Failure isolation
Estimated field mix
- Integrations50%
- Distributed systems30%
- Site reliability20%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional retailer receives stock from two vendor warehouses. The vendor API paginates snapshots and emits change events, but retries and deleted products have caused unexplained stock drift. Work against a local vendor simulator.
Setup prerequisites
- Create a local vendor API simulator with cursor pages and stock events.
- Use synthetic tenants, SKUs, and warehouse records; no vendor account is required.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- Concurrent refresh triggers converge on one active connector job.
- 429 responses follow capped Retry-After behavior within an overall refresh deadline.
- A failing connector does not prevent another tenant connector from progressing.
Implementation constraints
- Use deterministic job IDs and an injected clock in timing tests.
- Do not hold a database transaction during vendor waits.
Verification to include
- Submit five identical triggers and assert one vendor page sequence.
- Throttle one connector and verify another completes while the first stops at its deadline.
Deliverables
- Refresh coordination and rate-limit simulator scenarios
Rollout and recovery
Set conservative per-connector concurrency and expose pause/resume; rollback by pausing ingestion without clearing checkpoints.
Value of the work
For the engineer: Practice external contracts, cursor recovery, mapping conflicts, and reconciliation under partial failure.
For the team: Inspect whether integration changes protect inventory correctness and give operators a clear recovery path.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.