- `EnrichmentService.relink_corpora_for_keys` (`opencontractserver/enrichment/services/enrichment_service.py`) now pre-filters the EXTERNAL law-reference scan SQL-side by authority prefix before the Python `candidate_keys` root match. Previously the reactive re-link loaded every distinct `(corpus_id, canonical_key)` pair for every EXTERNAL law reference in the system into memory; on large deployments this is an unbounded cross-product. Since `candidate_keys` never crosses authorities (it only rolls a subsection up to its section root), bounding the scan to the wanted keys' authorities is safe and cannot drop matches.
