Version: latest
agrag.ingestion.match_blocks.admit_decisions
admit_decisions(decisions:list[MatchDecision], *, group_of:dict[UUID, set[UUID]], blocked_partners:dict[UUID, set[UUID]], digit_tokens:dict[UUID, frozenset[str]]) -> tuple[list[MatchDecision], list[MatchDecision]]
Split decisions into admitted and refused, preserving input order.
A decision is refused when its two current groups already contain a blocked pair, or when the groups hold different number tokens. Groups are shared set objects: an admitted decision merges its two groups in place so later decisions in the same call see the updated membership.
Parameters:
- decisions (
list[MatchDecision]) – Match decisions to check, in the order they were decided. - group_of (
dict[UUID, set[UUID]]) – Current committed component for each entity. - blocked_partners (
dict[UUID, set[UUID]]) – Keep apart partners for each entity. - digit_tokens (
dict[UUID, frozenset[str]]) – Number tokens from each entity's name.
Returns:
tuple[list[MatchDecision], list[MatchDecision]]– The admitted decisions and the refused decisions, each in input order.