Skip to content

[Task]: Add Redis governance query candidate selection #34

Description

@rian-be

Summary

Add dedicated candidate selection layer for Redis backed governance queries so request reads can narrow their lookup set before loading full request documents.

Goal

Make Redis backed governance queries efficient and structurally clear by introducing an explicit candidate planning and execution path instead of pushing every query into broad document scans.

Scope

What should be implemented?

  • Add the ModularityKit.Mutator.Governance.Redis.Storage.Candidates area for query candidate selection
  • Define candidate operations for explicit ids, single set reads, unions, and intersections
  • Define candidate plan model for backed query narrowing
  • Add a candidate plan builder that translates governance queries into Redis-side lookup plans
  • Add a candidate executor that resolves request identifiers from Redis sets
  • Add a selector layer that exposes candidate reads to higher-level query services
  • Reuse keyspace conventions and identifier loading services
  • Keep final query filtering aligned with governance query evaluators after candidate narrowing

Acceptance Criteria

  • Redis query reads can narrow request candidates before loading documents
  • Candidate planning is separated from candidate execution
  • Redis side candidate selection supports explicit ids, single set reads, unions, and intersections
  • Higher level query readers can consume candidate selection through a dedicated abstraction
  • Candidate logic remains internal to the Redis provider boundary and does not leak into governance abstractions
  • Query semantics stay aligned with governance evaluators after Redis candidate narrowing

Notes

Redis query support should avoid turning every read into a full request scan. A dedicated candidate-selection layer provides a middle step between raw Redis indexes and final governance query filtering, which keeps the provider both faster and easier to reason about.

This should align with the Redis provider storage and query strategy ADR.

Related ADRs:

  • ADR-026: Governance Request Query API
  • ADR-029: Governance Redis Provider Package
  • ADR-030: Governance Redis Request Storage and Query Strategy

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions