Bound bulk notification fan-out and completion time #145

Closed
opened 2026-08-06 22:50:56 +00:00 by rockachopa · 0 comments
Member

Problem

The bulk notification-read endpoint accepts up to 50 IDs and currently starts all upstream Gitea PATCH requests at once with asyncio.gather. A full mobile “Mark all” action therefore creates a 50-request burst through the shared transport, and the endpoint has no whole-batch completion deadline. Historical issue #141 bounded cardinality but did not bound in-flight work or total response time.

Vertical slice

Process bulk notification mutations with at most five concurrent upstream requests and a single batch deadline. Preserve completed successes, report unfinished/failed IDs through the existing {marked, failed} contract, cancel and await pending work, and provide retry guidance when failures remain.

Acceptance

  • Peak upstream mutation concurrency is at most 5 for a 50-ID request.
  • Every deduplicated ID is attempted once when work completes normally.
  • The whole batch returns by its deadline; no mutation task survives the response.
  • Completed successes update the retained snapshot; failed/unfinished IDs remain retryable.
  • Response remains no-store; failures include Retry-After.
  • Focused and full test suites pass.
## Problem The bulk notification-read endpoint accepts up to 50 IDs and currently starts all upstream Gitea PATCH requests at once with `asyncio.gather`. A full mobile “Mark all” action therefore creates a 50-request burst through the shared transport, and the endpoint has no whole-batch completion deadline. Historical issue #141 bounded cardinality but did not bound in-flight work or total response time. ## Vertical slice Process bulk notification mutations with at most five concurrent upstream requests and a single batch deadline. Preserve completed successes, report unfinished/failed IDs through the existing `{marked, failed}` contract, cancel and await pending work, and provide retry guidance when failures remain. ## Acceptance - Peak upstream mutation concurrency is at most 5 for a 50-ID request. - Every deduplicated ID is attempted once when work completes normally. - The whole batch returns by its deadline; no mutation task survives the response. - Completed successes update the retained snapshot; failed/unfinished IDs remain retryable. - Response remains `no-store`; failures include `Retry-After`. - Focused and full test suites pass.
timmy was assigned by rockachopa 2026-08-06 22:50:56 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#145
No description provided.