Make Find Work production-schema-safe and truthfully paginated #181

Closed
opened 2026-08-07 08:49:53 +00:00 by rockachopa · 0 comments
Member

Problem

Find Work treats the mere presence of Gitea’s pull_request field as proof an item is a pull request. Production issue payloads include pull_request: null, so ordinary unassigned issues are hidden and rejected during claim. It also reports the unfiltered upstream total after client-side filtering, producing sparse/false pagination.

Vertical slice

  • Treat only a non-null pull_request object as a pull request in discovery and claim validation.
  • Build a bounded, globally ranked snapshot of eligible open/unassigned issues before logical pagination.
  • Return truthful eligible totals and page boundaries, coalesce concurrent scans, retain a successful snapshot briefly, and invalidate a confirmed claim immediately.
  • Preserve retryable sanitized failures.

Acceptance tests

  1. Nullable pull_request and nullable assignees are accepted; real pull requests and assigned issues are excluded.
  2. Nullable-schema direct issue can be claimed; real pulls cannot be mutated.
  3. Eligible items across upstream pages are globally ranked and paginated with truthful total/has_more.
  4. Concurrent/page-navigation requests reuse one bounded snapshot.
  5. Successful claim disappears from retained results and decrements total.
  6. Focused and full test suites pass.

Not duplicated by #175/#176 (initial discovery/claim) or #179/#180 (preview); neither handles Gitea nullable schema or post-filter pagination.

## Problem Find Work treats the mere presence of Gitea’s `pull_request` field as proof an item is a pull request. Production issue payloads include `pull_request: null`, so ordinary unassigned issues are hidden and rejected during claim. It also reports the unfiltered upstream total after client-side filtering, producing sparse/false pagination. ## Vertical slice - Treat only a non-null `pull_request` object as a pull request in discovery and claim validation. - Build a bounded, globally ranked snapshot of eligible open/unassigned issues before logical pagination. - Return truthful eligible totals and page boundaries, coalesce concurrent scans, retain a successful snapshot briefly, and invalidate a confirmed claim immediately. - Preserve retryable sanitized failures. ## Acceptance tests 1. Nullable `pull_request` and nullable assignees are accepted; real pull requests and assigned issues are excluded. 2. Nullable-schema direct issue can be claimed; real pulls cannot be mutated. 3. Eligible items across upstream pages are globally ranked and paginated with truthful total/has_more. 4. Concurrent/page-navigation requests reuse one bounded snapshot. 5. Successful claim disappears from retained results and decrements total. 6. Focused and full test suites pass. Not duplicated by #175/#176 (initial discovery/claim) or #179/#180 (preview); neither handles Gitea nullable schema or post-filter pagination.
timmy was assigned by rockachopa 2026-08-07 08:49:53 +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#181
No description provided.