WIP: fix: bound My Work summary pages and parent lookups #46

Draft
KofTwentyTwo wants to merge 4 commits from fix/mywork-query-bounds-1291 into fix/attachment-transactions-1289
pull from: fix/mywork-query-bounds-1291
KofTwentyTwo commented 2026-10-22 19:33:33 +00:00 (Migrated from github.com)

My Work previously materialized all matching rows and repeated a parent lookup for every row. The new regression fixture measured 601 parent queries for 601 tasks on two parents.

Scan tasks, assignments and mentions in primary-key pages of at most 200 rows, retaining only the ten display tasks. Preserve exact caller-visible counts, due-date ordering and current parent authorization. Cache visibility only within each page; a starting maximum ID prevents new inserts from extending a scan indefinitely.

Validation: full Maven verify passes 193 tests with zero failures/errors/skips, packaging and coverage. New query-budget tests cover repeated parents, cross-page assignment/mention counts, hidden records, other users, undelivered mentions and permission changes between requests. Existing sharing/work tests pass.

Related QRun-IO/qqq#1291; stacked on attachment PR45 to preserve the verified candidate baseline. Draft: PostgreSQL query budgets, browser/N-node sustained load and failure qualification remain outstanding. This bounds row retention, not total work independently of matching data size; unique-parent authorization remains linear. See docs/MY-WORK-QUERY-BOUNDS.md.

My Work previously materialized all matching rows and repeated a parent lookup for every row. The new regression fixture measured 601 parent queries for 601 tasks on two parents. Scan tasks, assignments and mentions in primary-key pages of at most 200 rows, retaining only the ten display tasks. Preserve exact caller-visible counts, due-date ordering and current parent authorization. Cache visibility only within each page; a starting maximum ID prevents new inserts from extending a scan indefinitely. Validation: full Maven verify passes 193 tests with zero failures/errors/skips, packaging and coverage. New query-budget tests cover repeated parents, cross-page assignment/mention counts, hidden records, other users, undelivered mentions and permission changes between requests. Existing sharing/work tests pass. Related QRun-IO/qqq#1291; stacked on attachment PR45 to preserve the verified candidate baseline. Draft: PostgreSQL query budgets, browser/N-node sustained load and failure qualification remain outstanding. This bounds row retention, not total work independently of matching data size; unique-parent authorization remains linear. See docs/MY-WORK-QUERY-BOUNDS.md.
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/mywork-query-bounds-1291:fix/mywork-query-bounds-1291
git checkout fix/mywork-query-bounds-1291
Sign in to join this conversation.