Skip to content

Clean up device-detection terminology incorrectly ported to IP Intelligence - #123

Closed
Jamesr51d wants to merge 5 commits into
mainfrom
fix/incorrect-ipi-nomenclature
Closed

Jamesr51d wants to merge 5 commits into
mainfrom
fix/incorrect-ipi-nomenclature

Conversation

@Jamesr51d

Copy link
Copy Markdown
Contributor

Changes

Identifiers, Javadoc, test utilities and constants ported verbatim from
device-detection-java referenced concepts that have no meaning for IP
Intelligence (the Hash algorithm, User-Agents, Client Hints, TAC and
native model). Rename or remove them, with every renamed public main-source
type/member keeps a @Deprecated forwarder so client code gets a warning,
not a compile error.

  • IPIntelligenceDataHash -> IPIntelligenceDataOnPremise (old interface
    deprecated, extends the new one; the engine result still implements
    it so existing casts keep working)
  • IPIntelligenceDataHashDefault -> IPIntelligenceDataOnPremiseDefault
    (old class kept as a deprecated empty subclass)
  • FileUtils.getHashFile/getHashFileName -> getIpiFile/getIpiFileName
    (old methods deprecated, delegating)
  • TAC / native-model evidence constants deprecated (DD concepts)
  • Data-update download type "HashV41" -> "IPIV41" (matches
    ip-intelligence-dotnet) in engine and builder
  • @ElementBuilder alternateName "HashIPIntelligence" ->
    "IPIntelligenceOnPremise"
  • Deleted already-deprecated, unused fiftyone.ipintelligence.Enums
    (IPIntelligenceAlgorithm {Hash, Pattern})
  • Test helpers: UserAgentGenerator -> IpAddressGenerator (it always read
    evidence.csv, which contains IP addresses); ClientHintsExampleTestBase
    deleted (unused, pure DD); *Hash test classes -> *OnPremise;
    Hash test methods -> OnPremise; IPIntelligenceTests now feeds
    query.client-ip evidence instead of header.User-Agent
  • Javadoc/comments: engine description (aligned with the dotnet wording),
    MultiIPIDataCloud "(e.g. TAC)", ci/README TAC/User-Agent wording
  • Deprecated DD features that ip-intelligence-dotnet does not have:
    HardwareProfileCloudEngine + builder and MultiIPIDataCloud (the DD
    hardware-profile/TAC lookup feature) and Enums.MatchMethods (DD Hash
    match methods); removed the dead private matchMethods field from the
    on-premise result class
  • CI: workflows now use the IP_INTELLIGENCE_KEY org secret instead of DEVICE_DETECTION_KEY;
    ci/README documents IP_INTELLIGENCE_KEY and IPI_DATA_FILE_URL (the
    secret the workflows already referenced) with the corrected distributor
    URL (Type=IPIV41, Product=IPIV4Enterprise per common-metadata Products);
    removed a device-detection documentation link from
    setConcurrency Javadoc

Testing

Built and tested on JDK 11 / Maven 3.9, native engine compiled from the cxx submodules with MSVC v143 + Windows SDK 10.0.26100

  • mvn install full reactor, native library built.
  • mvn test -pl ip-intelligence.shared,ip-intelligence.cloud.
  • mvn test -pl ip-intelligence.engine.on-premise with the native lib
  • End-to-end: built ip-intelligence-java-examples against this snapshot

Risks on Release

  • Source/binary compatibility: old public names compile with deprecation warnings only. Projects with "treat warnings as errors" will need to switch to the new names (intended). Two narrow binary edges: 1. deleting the dead Enums class breaks only code that referenced it despite the existing deprecation; 2. a runtime cast to the class IPIntelligenceDataHashDefault would now fail(it was documented engine-internal and not constructible).
  • Config files: pipeline-options files using the alternate builder name literal "HashIPIntelligence" must move to "IPIntelligenceOnPremise" (or the class name, which is unchanged). No known usage.
  • Data updates: download type is now IPIV41. If any environment relied on the (wrong) HashV41 value, auto-update behaviour changes.

Out of Scope

  • TAC/native-model constants and the HardwareProfileCloudEngine trio are deprecated rather than deleted (dotnet has removed them entirely); delete them in the next major version.

Before Release

  • Add IP_INTELLIGENCE_KEY to gihub secrets. It can match the DEVICE_DETECTION_KEY.
  • Confirm IPI_DATA_FILE_URL secret exists and its value uses the corrected Type/Product (it was already referenced before this PR, but verify the value, since the README now documents Type=IPIV41&Product=IPIV4Enterprise).

jwrosewell and others added 5 commits June 12, 2026 09:42
…Align resource key and data file environment variables'

Test helpers now check the aligned 51DEGREES_RESOURCE_KEY name
(environment variable or system property) before the legacy
TestResourceKey, and the aligned 51DEGREES_IPI_PATH name before
searching the project space for a data file. Developer-facing
messages and the README now reference the aligned names.

Co-authored-by: Claude Fable 5 <[email protected]>
…nts, and constants were ported verbatim from device-detection-java and still reference device-detection-specific concepts (Hash algorithm, User-Agent, Client Hints, TAC) that have no relevance to IP Intelligence. Change where appropriate and deprecate items that aren't relevenat to ipi and aren't core to the solution.
…enclature

# Conflicts:
#	ip-intelligence.shared/src/main/java/fiftyone/ipintelligence/shared/testhelpers/FileUtils.java
…enclature

# Conflicts:
#	ip-intelligence.shared/src/main/java/fiftyone/ipintelligence/shared/testhelpers/FileUtils.java
@justadreamer

Copy link
Copy Markdown
Contributor

@Jamesr51d please compare with the changes in #126 - perhaps we want to add any missing changes from your PR into that one and merge that one? or vice versa, but then we need to fix conflicts here. Thanks

@Jamesr51d

Copy link
Copy Markdown
Contributor Author

closing as all changes are being merged and picked up in #126

@Jamesr51d Jamesr51d closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up device-detection terminology incorrectly ported to IP Intelligence

3 participants