Feat/phase 170 layers above subject - #214
Merged
Merged
Conversation
Article 12(1) of the draft AMLA CDD RTS defines a complex corporate structure as one with "three or more layers between the customer and the beneficial owner". _layers_signal honoured neither half of that phrase. Not "between the customer": the DFS started from every entity node in the bundle and kept the longest path found anywhere, so a chain among parties that never touch the subject satisfied the rule on the subject's behalf. In production on 2026-09-05 Shell plc's chip - and its verdict sentence, "over an ownership chain 3 layers deep" - rested on BlackRock -> Royal Dutch Shell plc -> Shell Midstream Operating LLC, three nodes none of which is the looked-up Shell plc. Because conditions (a) and (b) of the composite are scoped to evidence.longest_path, the US entity on that path also fed condition (b). Not "the beneficial owner": BODS edges run interestedParty --(owns)--> subject, so following them forwards descends into subsidiaries, and the BO is above. A GLEIF bundle listing a parent's children reported the depth of the group below the subject as the depth of the chain above it. Every other live instance was the same V through the subject - a parent, the subject, and one of its subsidiaries: Rosneft, BP, Eesti Energia (from both GLEIF and OpenSanctions) and Orsted. The shipped signal effectively meant "has at least one owner and at least one subsidiary". This is the same defect _non_eu_jurisdiction_signal was corrected for in Phase 153, for the same reason and with the same fix, which this one did not get: the walk is anchored at _subject_entity_id and follows subject -> interestedParty upwards, entity nodes only. The count still includes the subject - subject plus two holding layers is the >=3 threshold - so the anchor moved and the bar did not. It is a lower bound rather than a measured distance to a named BO: four entities up without reaching a person still means at least four layers under whoever the BO turns out to be, so no person terminus is required, which also keeps the signal alive on GLEIF and OpenCorporates, neither of which carries person statements. evidence.reaches_beneficial_owner records whether one was found, so a truncated chain and a completed one are distinguishable; evidence.subject_statement_id is new too. The evidence shape is otherwise unchanged, so signalScope.ts, bods/rdf.py, _prefer_deeper_chain and graph_shape.depth need no edits, and longest_path is now subject-first, which means the RDF annotation anchor always resolves to the subject rather than falling back to path[0]. Not dead after the fix: a self-join on the committed UK PSC bulk BODS finds 276,647 of 9,662,296 subjects with two or more entity layers above them. The signal now fires on sources that publish beneficial ownership chains and stops firing on accounting-parent-plus-subsidiary data. EXAMPLE_LEIS advertised COMPLEX_OWNERSHIP_LAYERS on BP, Rosneft, Eesti Energia and Orsted; all four claims were about the V-shaped paths above, so they are removed. None of the six curated subjects now carries the chip - finding examples with a real layered chain needs subjects whose intermediaries are themselves in the bulk BODS, which is a coverage question and its own ticket. The curated narratives cite the signal and must be regenerated after this deploys. 4 backend tests, including the Shell shape and the subsidiaries-only case.
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.
No description provided.