Make My Work authorization constant-request and deadline-safe #171

Closed
opened 2026-08-07 05:48:47 +00:00 by timmy · 0 comments
Owner

Problem

My Work detail and mutation authorization currently scans up to 100 search pages sequentially via _work_contains. Valid items deep in a large assigned/review queue can exhaust the existing five-second endpoint deadline before users can inspect or complete them.

Scope

Replace page-by-page authorization with direct target metadata plus authenticated-user eligibility checks for assigned issues, assigned pull requests, and requested reviews. Reuse the fetched target where detail flows would otherwise immediately request it again.

Acceptance criteria

  • Authorization request count is bounded independently of queue depth.
  • Assigned issue/PR and requested-review eligibility is derived from direct target metadata and the authenticated login.
  • Ineligible, closed, or malformed targets return not found and never mutate Gitea.
  • Detail flows avoid duplicate target fetches where safe.
  • Existing stale-head, draft, CI, mergeability, timeout, pagination, and mutation safeguards remain green.
  • Focused behavioral tests prove RED before implementation; full suite and CI pass.
## Problem My Work detail and mutation authorization currently scans up to 100 search pages sequentially via `_work_contains`. Valid items deep in a large assigned/review queue can exhaust the existing five-second endpoint deadline before users can inspect or complete them. ## Scope Replace page-by-page authorization with direct target metadata plus authenticated-user eligibility checks for assigned issues, assigned pull requests, and requested reviews. Reuse the fetched target where detail flows would otherwise immediately request it again. ## Acceptance criteria - Authorization request count is bounded independently of queue depth. - Assigned issue/PR and requested-review eligibility is derived from direct target metadata and the authenticated login. - Ineligible, closed, or malformed targets return not found and never mutate Gitea. - Detail flows avoid duplicate target fetches where safe. - Existing stale-head, draft, CI, mergeability, timeout, pagination, and mutation safeguards remain green. - Focused behavioral tests prove RED before implementation; full suite and CI pass.
timmy self-assigned this 2026-08-07 05:48:47 +00:00
timmy closed this issue 2026-08-07 05:53:23 +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#171
No description provided.