Conversation
ca4c5b8 to
4fab7ef
Compare
4fab7ef to
6bafe97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
context.extensions["kg_build.iri_lookup"]from the import callback URL and existing IRI so canonicalization can reuse the Knowledge Graph URL-to-IRI mappingWhy
The LendingTree duplicate FAQPage issue happens when the canonicalizer cannot see the URL-to-IRI mapping. In that case it falls back to generated IDs and can mint a different Article IRI when the title/headline differs. With the lookup in
context.extensions["kg_build.iri_lookup"], the existing URL-mapped IRI wins and the FAQPage follows that canonical Article. This PR intentionally does not change the fallback ID generation policy.Verification
poetry run pytest tests/kg_build/test_protocol.py tests/kg_build/postprocessors/processors/test_id_postprocessor.py tests/kg_build/postprocessors/processors/test_id_generator.py tests/kg_build/postprocessors/processors/test_id_allocator.py tests/kg_build/test_iri_lookup.py -q-> 82 passedCoverage note: targeted coverage was previously run on the affected scope; this update removes the fallback branch and keeps the fix focused on lookup propagation.