[Performance] Add bounded provider-side search for cross-module reference selectors #274

Closed
opened 2026-07-29 13:25:54 +02:00 by zemion · 1 comment
Owner

Problem

Some optional-module selectors request an entire provider directory and only then filter/cap it in the consumer. Current examples include Access-backed scope reference options and Campaign share-target catalogs. Response caps prevent oversized payloads, but they do not prevent provider-side database and memory load.

Scope

Define a shared optional capability contract for bounded search/pagination of reference options. Consumers must preserve already-selected references even when they fall outside the current search page.

Acceptance criteria

  • Providers accept a normalized query plus explicit limit/cursor or page arguments.
  • Consumers never need to materialize the full directory.
  • Existing selections remain renderable and removable.
  • Missing providers degrade cleanly without hard Access or Campaign dependencies.
  • Tests cover large directories, search, paging, stale selections, and module permutations.
## Problem Some optional-module selectors request an entire provider directory and only then filter/cap it in the consumer. Current examples include Access-backed scope reference options and Campaign share-target catalogs. Response caps prevent oversized payloads, but they do not prevent provider-side database and memory load. ## Scope Define a shared optional capability contract for bounded search/pagination of reference options. Consumers must preserve already-selected references even when they fall outside the current search page. ## Acceptance criteria - Providers accept a normalized query plus explicit limit/cursor or page arguments. - Consumers never need to materialize the full directory. - Existing selections remain renderable and removable. - Missing providers degrade cleanly without hard Access or Campaign dependencies. - Tests cover large directories, search, paging, stale selections, and module permutations. <!-- bounded-reference-provider-search-20260729 -->
Author
Owner

Codex State: done

Summary

  • Implemented and pushed the module-neutral paged reference contract in Core f3b388f, SQL-backed Access provider in a758c8f, searchable Campaign owner/share selectors in c769be3, and paged Dataflow/Workflow scope endpoints in d61e9d8 and a1654e7. All integrations are optional and retain reduced-mode fallbacks.

Verification

  • Access fixture with 120 memberships and 75 groups proves SQL-side search, 25-item cursor pages, stale selection handling, and non-admin visibility filtering.
  • Core reference/module/access suites: 136 passed; Access suite: 50 passed; Dataflow: 59 passed; Workflow: 14 passed; Campaign focused tests: 5 passed; integrated WebUI build and full startup smoke pass.
  • Existing references resolve in chunks of at most 200; selected inactive/deleted references remain renderable and removable even outside the current search page.
## Codex State: done ### Summary - Implemented and pushed the module-neutral paged reference contract in Core f3b388f, SQL-backed Access provider in a758c8f, searchable Campaign owner/share selectors in c769be3, and paged Dataflow/Workflow scope endpoints in d61e9d8 and a1654e7. All integrations are optional and retain reduced-mode fallbacks. ### Verification - `Access fixture with 120 memberships and 75 groups proves SQL-side search, 25-item cursor pages, stale selection handling, and non-admin visibility filtering.` - `Core reference/module/access suites: 136 passed; Access suite: 50 passed; Dataflow: 59 passed; Workflow: 14 passed; Campaign focused tests: 5 passed; integrated WebUI build and full startup smoke pass.` - `Existing references resolve in chunks of at most 200; selected inactive/deleted references remain renderable and removable even outside the current search page.`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-core#274