Skip to main content

agrag.ingestion.resolved_entities.write_matches_and_rebuild

write_matches_and_rebuild(decisions:list[MatchDecision], *, graph_store:GraphStore, schema:GraphSchema, members:list[Entity], pending_job_id:str | None = None, tracer:Tracer | None = None) -> RebuildResult

Persist matches and rebuild their supplied connected component.

Callers fetch the bounded affected component before invoking this function. The resolved node is always recomputed from that current membership.

Parameters:

  • decisions (list[MatchDecision]) – The confirmed matches to persist.
  • graph_store (GraphStore) – Where matches and resolved entities are written.
  • schema (GraphSchema) – The schema the members belong to.
  • members (list[Entity]) – The component members the resolved node is computed from.
  • pending_job_id (str | None) – The in-flight Cutover Job's id, tagging the match edges and resolved entity nodes until that job commits. None writes untagged, for callers outside a job.
  • tracer (Tracer | None) – Passed to description summarization.

Raises:

  • ValueError – No decisions are supplied, or a decision references a member outside the supplied component.