[Epic] Deliver permission-aware global and targeted search #1

Closed
opened 2026-07-29 14:27:57 +02:00 by zemion · 5 comments
Owner

Outcome

GovOPlaN provides one global search entry point and module-scoped search views across the modules installed in the current composition, without leaking the existence, count, title, snippet, or metadata of resources the principal cannot access.

Architecture

  • govoplan-search owns query orchestration, ranking/result DTOs, saved/search UI, indexing state, and backend adapters.
  • Core owns versioned provider/index-change contracts and shell contribution points, not module-specific search logic.
  • Each domain module owns extraction, resource references, ACL inputs, result labels, deep links, and reindex/delta behavior for its records.
  • PostgreSQL full-text/trigram search is the required self-hosted baseline. OpenSearch is an optional backend, not a mandatory deployment dependency.

Acceptance criteria

  • Global and targeted query APIs support text, module/type filters, stable cursors, bounded result windows, and explainable result provenance.
  • Search permissions are fail-closed and rechecked at query time where indexed ACL material is insufficient or stale.
  • Index updates consume durable versioned change events/backfills and reconcile deletes, moves, permission changes, and module disable/uninstall.
  • The shell exposes a keyboard-accessible search surface; modules can contribute targeted search without source imports.
  • Search degrades cleanly when optional providers or an optional external backend are absent.
  • Security tests prove no result/count/snippet/timing shortcut exposes denied resources across tenants.

Supersedes the one-line routing placeholder govoplan-core#133.

## Outcome GovOPlaN provides one global search entry point and module-scoped search views across the modules installed in the current composition, without leaking the existence, count, title, snippet, or metadata of resources the principal cannot access. ## Architecture - `govoplan-search` owns query orchestration, ranking/result DTOs, saved/search UI, indexing state, and backend adapters. - Core owns versioned provider/index-change contracts and shell contribution points, not module-specific search logic. - Each domain module owns extraction, resource references, ACL inputs, result labels, deep links, and reindex/delta behavior for its records. - PostgreSQL full-text/trigram search is the required self-hosted baseline. OpenSearch is an optional backend, not a mandatory deployment dependency. ## Acceptance criteria - Global and targeted query APIs support text, module/type filters, stable cursors, bounded result windows, and explainable result provenance. - Search permissions are fail-closed and rechecked at query time where indexed ACL material is insufficient or stale. - Index updates consume durable versioned change events/backfills and reconcile deletes, moves, permission changes, and module disable/uninstall. - The shell exposes a keyboard-accessible search surface; modules can contribute targeted search without source imports. - Search degrades cleanly when optional providers or an optional external backend are absent. - Security tests prove no result/count/snippet/timing shortcut exposes denied resources across tenants. Supersedes the one-line routing placeholder `govoplan-core#133`.
Author
Owner

Codex State: progress

Summary

  • The first self-hosted Search slice is pushed in govoplan-search@c60ca27 and core shell/contracts in govoplan-core@d9b5708.
  • Search remains optional, providers fail independently, inactive modules are excluded, and the titlebar uses context contributions when a module announces them.

Next / Blocked

  • Complete #2, add source-module indexing announcements, then implement the optional OpenSearch adapter in #3.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - The first self-hosted Search slice is pushed in govoplan-search@c60ca27 and core shell/contracts in govoplan-core@d9b5708. - Search remains optional, providers fail independently, inactive modules are excluded, and the titlebar uses context contributions when a module announces them. ### Next / Blocked - Complete #2, add source-module indexing announcements, then implement the optional OpenSearch adapter in #3. Suggested status label: `status/in-progress`
zemion added
status
in-progress
and removed
status
ready
labels 2026-07-29 15:54:01 +02:00
Author
Owner

The production baseline in #2 is complete (Core 920e3c9, Search a156e3d): global/context-aware shell UI, permission-safe query orchestration, cursor API, source contracts, durable indexing lifecycle, and diagnostics are in place. #3 remains intentionally optional and is not required to run Search.

Keeping this epic open while native domain modules begin registering concrete source providers and while a live PostgreSQL CI job is added. The contract and built-in backend are ready for those integrations; missing or failing sensitive providers deny results rather than leaking stale indexed data.

The production baseline in #2 is complete (Core 920e3c9, Search a156e3d): global/context-aware shell UI, permission-safe query orchestration, cursor API, source contracts, durable indexing lifecycle, and diagnostics are in place. #3 remains intentionally optional and is not required to run Search. Keeping this epic open while native domain modules begin registering concrete source providers and while a live PostgreSQL CI job is added. The contract and built-in backend are ready for those integrations; missing or failing sensitive providers deny results rather than leaking stale indexed data.
Author
Owner

Search rollout progressed with a first governed native source and a live-dialect gate:

  • Dataflow 5f3303f registers dataflow.pipelines, performs stable tenant-bounded backfills, and rechecks Dataflow scope/governance at query time. Search results deep-link to the selected pipeline.
  • Search 6fcd9e0 adds a PostgreSQL integration test proving full-text queries remain tenant- and ACL-bounded against migrated tables.
  • Meta 3f9567a starts PostgreSQL in the module-matrix job, applies the Search migrations, runs startup smoke, and executes the dialect-specific test before the normal matrix.

The local consolidated check is green. Keeping this epic open for native source and durable delta rollout across Files, Campaign, Calendar, Mail, IDM/Postbox, and the future Wiki/Projects/Tickets modules. OpenSearch remains optional in #3 and is not part of the baseline completion path.

Search rollout progressed with a first governed native source and a live-dialect gate: - Dataflow 5f3303f registers dataflow.pipelines, performs stable tenant-bounded backfills, and rechecks Dataflow scope/governance at query time. Search results deep-link to the selected pipeline. - Search 6fcd9e0 adds a PostgreSQL integration test proving full-text queries remain tenant- and ACL-bounded against migrated tables. - Meta 3f9567a starts PostgreSQL in the module-matrix job, applies the Search migrations, runs startup smoke, and executes the dialect-specific test before the normal matrix. The local consolidated check is green. Keeping this epic open for native source and durable delta rollout across Files, Campaign, Calendar, Mail, IDM/Postbox, and the future Wiki/Projects/Tickets modules. OpenSearch remains optional in #3 and is not part of the baseline completion path.
Author
Owner

Closure audit (2026-08-03)

The PostgreSQL baseline, fail-closed orchestration, stable cursor API, global/context overlay, F3 focus, durable index-change/rebuild contracts, diagnostics, module-disable behavior, and live PostgreSQL CI gate are implemented. This epic is not yet closable.

Current native search-source registrations exist for Dataflow, Projects, Reporting, and Risk Compliance. Files, Campaign, Calendar, Mail, IDM/Postbox, and later Wiki/Tickets still need permission-rechecked providers and durable create/update/delete/permission-change deltas. The admin diagnostics/rebuild/process/reconcile endpoints also need an operator UI.

Recommended closure order: admin diagnostics UI; Files and Campaign providers; Calendar/Mail; IDM/Postbox; remaining object modules; then the cross-tenant no-leak timing/count regression matrix. OpenSearch remains optional and is not a blocker.

## Closure audit (2026-08-03) The PostgreSQL baseline, fail-closed orchestration, stable cursor API, global/context overlay, F3 focus, durable index-change/rebuild contracts, diagnostics, module-disable behavior, and live PostgreSQL CI gate are implemented. This epic is **not yet closable**. Current native search-source registrations exist for Dataflow, Projects, Reporting, and Risk Compliance. Files, Campaign, Calendar, Mail, IDM/Postbox, and later Wiki/Tickets still need permission-rechecked providers and durable create/update/delete/permission-change deltas. The admin diagnostics/rebuild/process/reconcile endpoints also need an operator UI. Recommended closure order: admin diagnostics UI; Files and Campaign providers; Calendar/Mail; IDM/Postbox; remaining object modules; then the cross-tenant no-leak timing/count regression matrix. OpenSearch remains optional and is not a blocker.
Author
Owner

Implemented and verified on main.

Key commits:

  • Search operator UI, durable event ingestion, bounded rebuild/reconcile, and permission-aware query path: govoplan-search@1bb3381, govoplan-core@7117673
  • Native providers: Files 8ec31b1, Campaign 91890fd, Calendar 04438d9, Mail 72d6f84, IDM ad37b03, Postbox 889b5e6

The implementation provides PostgreSQL-backed global/targeted search, stable filters/cursors/provenance, fail-closed source authorization with query-time rechecks, durable change-event ingestion, bounded backfills, module activation reconciliation, keyboard-accessible overlay/full-page surfaces, and an operator index console. OpenSearch remains optional.

Verification included all Search backend tests, provider-specific source tests, Core durable-consumer/module-contract tests, Search overlay/interface structural tests, the integrated Core WebUI production build and bundle budgets, manifest-shape validation, Ruff, and diff checks. Cross-tenant/denied-resource cases and provider degradation are covered by focused tests.

Implemented and verified on `main`. Key commits: - Search operator UI, durable event ingestion, bounded rebuild/reconcile, and permission-aware query path: `govoplan-search@1bb3381`, `govoplan-core@7117673` - Native providers: Files `8ec31b1`, Campaign `91890fd`, Calendar `04438d9`, Mail `72d6f84`, IDM `ad37b03`, Postbox `889b5e6` The implementation provides PostgreSQL-backed global/targeted search, stable filters/cursors/provenance, fail-closed source authorization with query-time rechecks, durable change-event ingestion, bounded backfills, module activation reconciliation, keyboard-accessible overlay/full-page surfaces, and an operator index console. OpenSearch remains optional. Verification included all Search backend tests, provider-specific source tests, Core durable-consumer/module-contract tests, Search overlay/interface structural tests, the integrated Core WebUI production build and bundle budgets, manifest-shape validation, Ruff, and diff checks. Cross-tenant/denied-resource cases and provider degradation are covered by focused tests.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-search#1