Repository navigation
Conversation
…alias; entity map compares legal identifiers #1615 Signed-off-by: Nik Cubrilovic <[email protected]>
…alues, raw legal identifier display, indexed edges, docs and tests #1615 Signed-off-by: Nik Cubrilovic <[email protected]>
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.
What
One Service
@iddeclared on reciprocal hreflang alternates, with the page's ownurlon each page, was reported as aurlconflict.schema/entity-conflictsnow excuses aurldisagreement only when all of these hold (conservative, identity never inferred from names):urlis the node's only disagreement (besides@type, owned by entity-type-drift). A differing name, telephone, legal identifier or anything else keeps every row for that entity.urlvalue is the address of one of the declaring pages;A verified alias is counted in
details.localizedUrlAliases. Without reciprocal alternates the pair still warns.Decision for review: legal identifiers
The entity map only compared nine properties, so a divergent
vatIDorlegalNamewas never visible to this rule (it warned only through whatever else differed). To keep "divergent legal identifiers still warn" true onceurlis excused, the builder (packages/audit-engine/src/entity-map/build.ts) now also compareslegalName,vatID,taxID,leiCode,dunsandiso6523Codeper node as extraconflictsproperties (like@type, a free string; they are not stored inproperties, no schema change). Registry numbers are compared without case, spaces, dots or hyphens; a page that omits one is not a disagreement. Side effect: those divergences now also show as their ownentity-conflictsrows on any site. Say if you would rather keep that out and drop the legal-identifier part (the alias would then be blind to them).Tests
packages/rules/tests/entity-conflicts-localized-alias-1615.test.ts(both the pages and SiteQuery paths): alias passes; no hreflang, one-way, canonical elsewhere, differing telephone, divergent provider, provider on one page only, divergent legal identifier, differing name, foreign url, page cap all still warn; cross-language alternates pass.packages/audit-engine/tests/entity-map-builder.test.tsandentity-rules-golden.test.ts: the real builder and rule end to end.schema-entity-rules,docs-rule-pages, the canonical golden,make validate, oxlint on the new code, tsgo onpackages/rulesandpackages/audit-engine. Fixtures use invented hosts and text.Docs:
docs/rules/schema/entity-conflicts.mdx,docs/guides/entity-map/format.mdxandmcp.mdx. CHANGELOG bullet under Unreleased. The squirrelscan agent skill does not need a change.Closes #1615