Skip to main content
Version: 0.0.5 (stable)

agrag.candidates.review.reject_candidates

reject_candidates(graph_store:GraphStore, *, keys:Sequence[str] | None = None, query:CandidateQuery | None = None, now:datetime | None = None) -> ReviewOutcome

Reject selected candidate groups and retain them as suppression records.

Pass exactly one of keys or query. Query selection deduplicates keys before attempting the pending-to-rejected transition.

Parameters:

  • graph_store (GraphStore) – Store containing candidate groups.
  • keys (Sequence[str] | None) – Explicit group keys to reject.
  • query (CandidateQuery | None) – Filters used to select groups to reject.
  • now (datetime | None) – Decision time, or the current UTC time when omitted.

Returns:

  • ReviewOutcome – Keys rejected and keys skipped with their reasons.

Raises:

  • ValueError – If both or neither of keys and query are supplied.