feat: discover Rust entity capabilities in the Python adapter - #179
Merged
Merged
Conversation
sidmohan0
marked this pull request as ready for review
September 28, 2026 23:30
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.
The Rust adapter previously rejected entity labels outside Python's fixed inventory and blocked every German locale. It now consumes Core capability contract 1 to discover text applicability, locale activation and configuration flags. Future entity labels pass through without a duplicate Python inventory. Multiple locales use singular Core scans with deterministic deduplication before existing overlap handling.
Python remains the default. Legacy result classes, aliases, allowlists, filtering order and redaction strategies are preserved. UUID is activated through explicit entity selection; structured-only PERSON selection fails clearly. Validated capability metadata is cached by native reader identity, with independent scan configurations.
Published dependency verified: Core 0.4.0 is now available on PyPI. A fresh normal registry installation passed all 352 focused adapter/legacy contract checks, installed-wheel smoke, dependency checks and the same reviewed parity results. The dependency range remains
datafog-core>=0.4.0,<0.5. Hosted CI is running on the final documentation commit. This PR remains unmerged; no DataFog Python release is authorized.Reviewed limitation: Core returns both PHONE and NPI for the same numeric span. Legacy overlap-before-filter priority keeps PHONE, so explicit NPI selection can return empty. Default legacy redaction still protects the number. Native
datafog.v5.scanretains NPI and native transformation supports selecting it. This behavior is explicitly tested; no hardcoded new-label priorities or selection-order changes were introduced.Validation:
351ab81ae575b31a6739a43e29135884ccc0d7152f01df568cd1f7608d690b1c, source60c4636, macOS ARM64 abi3 wheel.b4217c2a9834cb774d89a13b9543166dd7f38512a233b1c80984ea9c07c5162c, verified via pip installation report and PyPI metadata (Core release source133bceff0d2a53a7f6d1a75693330c1797285654).docs/core-0.4-integration.mdrecords the artifact evidence and remaining release gates. Published Core verification is complete. Cross-platform hosted CI results on the current head remain the final readiness gate.