Skip to content

Release candidate - #240

Draft
jwrosewell wants to merge 173 commits into
mainfrom
rc
Draft

jwrosewell wants to merge 173 commits into
mainfrom
rc

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Version: 4.6, set once this rc is ready for review.

Context

This pull request releases rc into main for 51degrees-python, the repository that holds every 51Degrees Python package. ci/packages.json lists 20 packages under pipeline/, device-detection/, ip-intelligence/ and location/, of which 16 are published. The three examples packages and the new fiftyone_pipeline_derivedproperty are not.

The last release was #114, merged into main on 13 November 2026 at 06:22 UTC. Since then 127 pull requests have merged into rc, whose head is 435ae8cd.

The on-premise engines build against the 51degrees-cxx commit under review in 51degrees-cxx#191, and the cxx release is reviewed first. The cxx submodule here is 699a9789, the head of cxx rc since 51degrees-cxx#212 merged into it at 09:41 UTC on 23 November, from the cxx review. It moved there from 560de81e, the head before, in #269, which changes only the submodule line. #212 changes one C++ file that the Device Detection engine compiles, src/dd/hash/ValueMetaDataCollectionForProfileHash.cpp, which finds a profile's value by name. Once the cxx release tags its head, the submodule moves to the tag.

Most of the changes bring the packages into line with the 51Degrees specifications. The groups run from packaging and CI to the engines, data updates, examples, tests and documentation. In each group the numbers in the Files, Tests and Pull requests lines match its numbered items.

Changes

1. Packaging and the release plan

  1. A package is released only for a change that counts. Changes to documentation, tests, examples, manifest metadata and tox.ini no longer release a package, and ci/packages.ps1 then takes the release plan from common-ci's steps/release-plan.ps1 in place of its own copy.
  2. A release of one package is labeled with its version, where [-1] took the last character of the one version string.
  3. Packages require the sibling releases that hold the names they import, because a package upgraded alone kept an older dependency and failed to import. ci/write-package-versions.ps1 stops a build whose plan gives a package less than another requires. The second pull request corrects the test's rows after the names in them were removed, so four packages also require the fiftyone_pipeline_core this release publishes.
  • Files: (1) ci/packages.ps1, ci/packages.json, ci/release-plan-filter.*, AGENTS.md. (2) ci/get-next-package-version.ps1. (3) six setup.py files, ci/write-package-versions.ps1, two tox.ini files.
  • Tests: (1) ci/packages.Tests.ps1, ci/dispatch.Tests.ps1. (2) ci/get-next-package-version.Tests.ps1. (3) ci/write-package-versions.Tests.ps1, pipeline/fiftyone_pipeline_engines/tests/test_package_requirements.py.
  • Pull requests: (1) #60 then #47, (2) #54, (3) #231 then #257

2. CI and workflows

  1. A pull request is built on the configurations its changes need, measured against the branch it merges into, where every pull request ran all 15 and its diff with main selected every product. macOS and the performance tests run only for rc and releases.
  2. A new workflow runs every ci/*.Tests.ps1 on a pull request or push that changes ci/ or any file under .github/workflows, so a new or changed workflow meets the key name tests of group 3.
  3. Publish takes allow-early-release for common-ci's check that refuses a release within a week of the last.
  4. The Cloud 51Did Tests run on pull requests into rc, so a 51Did change meets the live cloud before it merges into rc.
  5. The workflows stop passing three inputs that were always empty, the four product .github folders GitHub never runs are removed, and the example assets update moves to the root.
  6. The performance step measures on the free files, Device Detection on the Lite file when the TAC file is missing, and IP Intelligence with a new benchmark where it skipped.
  7. The integration tests run with no Resource Key, skipping only the tests that need one, where each script stopped before running anything.
  8. The Only rc into main job declares the permissions it uses, contents: read and pull-requests: read, because the shared check asks for both and a called workflow can only be given what its caller has.
  9. The integration and publish scripts take no Keys option. common-ci now puts each key in the environment under its own name and no longer passes Keys to the step scripts. The scripts here declared Keys as mandatory, so each stopped before it did anything and the release build failed at the integration step.
  • Files: (1) ci/select-options.ps1, ci/packages.ps1, ci/dispatch.ps1, .github/workflows/. (2) to (5) .github/workflows/, with ci-script-tests.yml for (2), and ci/fetch-assets.ps1 and the product .github/ folders for (5). (6) the product ci/run-performance-tests.ps1, ip-intelligence/fiftyone_ipintelligence_examples/performance-tests/. (7) the four product ci/run-integration-tests.ps1. (8) .github/workflows/only-rc-into-main.yml. (9) ci/run-integration-tests.ps1, ci/publish-package.ps1 and the same two scripts in device-detection/ci, ip-intelligence/ci, location/ci and pipeline/ci.
  • Tests: (1) ci/select-options.Tests.ps1. (6) ci/device-detection-performance.Tests.ps1, ci/ip-intelligence-performance.Tests.ps1. (7) ci/run-integration-tests.Tests.ps1. (2) to (5) are shown by the workflow runs their pull requests name. (8) the Only rc into main check on its pull request. (9) ci/common-ci-options.Tests.ps1 (new), which checks that no CI script declares Keys, that each call to a common-ci script passes only the parameters that script declares, and that the integration step runs every product in a build's options, with the stand-ins in ci/key-names.Tests.ps1 and ci/run-integration-tests.Tests.ps1 losing Keys.
  • Pull requests: (1) #33, (2) #117 then #264, (3) #118, (4) #88, (5) #121, (6) #237, #238, (7) #239, (8) #260, (9) #265

3. Environment variable names and keys

  1. Only the current _51DEGREES_ names in common-ci's list are read, by the packages, examples and tests.
  2. CI and the tests read every key under its _51DEGREES_ name. Workflows that call common-ci pass their keys on whole, every tox.ini passes _51DEGREES_*, and a live cloud test with no key skips and names the variable.
  3. Every name the packages, tests, examples and CI scripts read or set is a _51DEGREES_ name for one setting, and none gets its value from another. Cloud tests read _51DEGREES_RESOURCE_KEY_BESPOKE, and a test that runs an example passes the key as _51DEGREES_RESOURCE_KEY, the name people set. Cloud tests and examples call the service _51DEGREES_CLOUD_ENDPOINT names, or the public service when it is not set. The web examples listen on _51DEGREES_EXAMPLE_HTTP_PORTS, or on 5151. The browser contract run gives the example's address and language as _51DEGREES_EXAMPLE_URL and _51DEGREES_EXAMPLE_LANG, and ci/packages.ps1 finds common-ci through _51DEGREES_COMMON_CI_DIR. The performance example and the web benchmark read 20000 Evidence Records.yml, which the example takes with --evidence_file. ci/check-environment-variable-names.ps1 fails on any name read or set that does not start _51DEGREES_, apart from a short list the platform defines.
  4. Every resource key is read from an organization secret. Every _51DEGREES_RESOURCE_KEY_* name is an organization secret and none is an organization variable, so a vars. read gets an empty value. cloud-51did.yml reads _51DEGREES_RESOURCE_KEY_51DID and _BASIC as secrets., and AGENTS.md, the four product CI READMEs and the warnings in their run-integration-tests.ps1 call the resource keys organization secrets. _51DEGREES_CLOUD_ENDPOINT stays an organization variable. The first pull request read these keys from variables and the second replaced it.
  • Files: (1) pipeline/fiftyone_pipeline_cloudrequestengine/, pipeline/fiftyone_pipeline_did/, the examples, ci/check-environment-variable-names.ps1. (2) .github/workflows/, the product ci/ folders, tox.ini files. (3) ci/check-environment-variable-names.ps1, ci/packages.ps1, the four product ci/ folders, both key_utils.py, the examples' example_utils.py and web app.py files, onpremise/performance.py, pipeline/fiftyone_pipeline_cloudrequestengine/src/fiftyone_pipeline_cloudrequestengine/constants.py, pipeline/fiftyone_pipeline_did/src/fiftyone_pipeline_did/did_client.py, .github/workflows/, AGENTS.md. (4) .github/workflows/cloud-51did.yml, AGENTS.md, the four product ci/run-integration-tests.ps1 and ci/README.md files.
  • Tests: (1) ci/check-environment-variable-names.Tests.ps1, test_environment_names.py. (2) ci/key-names.Tests.ps1, ci/run-integration-tests.Tests.ps1. (3) ci/check-environment-variable-names.Tests.ps1, ci/key-names.Tests.ps1, both test_environment_names.py, test_onpremiseperformance.py, the web example port tests, test_did_client.py, pipeline/fiftyone_pipeline_did/tests/test_live_cloud.py. (4) ci/key-names.Tests.ps1, which expects both keys from the organization secrets of their own names, and whose read no _51DEGREES_RESOURCE_KEY name as an organization variable in any workflow fails on a vars. or vars[...] read of any resource key in any workflow.
  • Pull requests: (1) #251, (2) #254, (3) #259, (4) #262 then #263

4. Pipeline core

  1. A built Pipeline cannot be changed, holding its elements in a tuple and its lookup by data key in a read-only mapping.
  2. The Pipeline describes the Evidence it accepts, through a new Pipeline.get_evidence_key_filter(), made once when the Pipeline is created. The first pull request also makes usage sharing and on-premise Device Detection read Evidence keys in any letters.
  3. A Flow Data keeps its Element Data in a linked list, added to with no lock, and refuses writes once processing has finished. The third pull request makes a write through a view of finished Element Data fail too, as the first two disagreed and failed the core unit tests.
  4. Element Data is reused through a bounded pool for each Flow Element, as the specification asks.
  5. The web integration elements are added only when the caller has not added them, and a Set Header name whose identifier starts in lower case is read.
  6. One element in several Pipelines keeps each Pipeline's state, for the Set Headers Element and the JSON Builder. The JSON Builder keeps an element's delayed execution information only once the element has properties, so a cloud engine whose discovery failed gets it later.
  7. The request view carries server.request-query, the query string whole and undecoded.
  8. The engine cache key is the same for any Evidence order or key case.
  9. The documentation says what is safe with threads, for Element Data and for a Flow Data, which is used by one thread at a time, and the web examples read their values inside a with block.
  • Files: pipeline/fiftyone_pipeline_core/, with share_usage.py and devicedetection_onpremise.py for (2), the on-premise packages for (4), pipeline/fiftyone_pipeline_engines/engine.py for (8) and the web examples for (9).
  • Tests: in each package's tests/. (1) test_pipeline_read_only.py. (2) test_pipeline_evidence_key_filter.py, test_evidence_key_case.py. (3) test_flowdata_element_data_list.py, test_finished_writes.py. (4) test_element_data_pools.py. (5) test_web_integration_elements.py, test_setheader.py. (6) test_setheader.py, test_jsonbundler_pipelines.py, test_jsonbundler_delayexecution.py. (7) test_request_line.py. (8) test_engines.py. (9) test_elementdata_documentation.py, test_flow_data_threads_documentation.py.
  • Pull requests: (1) #184, (2) #139, #252, (3) #250, #247, #256, (4) #248, (5) #140, (6) #185, #200, #179, (7) #208, (8) #182, (9) #84, #244

5. Properties and values

  1. A value with no value and no reason raises with "This instance does not have a set value", and the text "noValue" given as a value is that value.
  2. A missing property raises. The pull request gave each reason in the specification's order with the table's messages. The last pull request of group 6 item 2 restores the released messages and keeps the rule that on-premise data raises for a property its tier lists and its result lacks.
  • Files: (1) pipeline/fiftyone_pipeline_core/aspectproperty_value.py. (2) the missing property services of the engines, cloud and on-premise packages.
  • Tests: (1) test_aspectproperty_value.py. (2) test_missing_property_raises.py in both on-premise packages.
  • Pull requests: (1) #134, #173, (2) #221

6. Usage sharing

  1. Usage sharing runs last, and a Pipeline that puts it anywhere else is refused. The product builders added it before the engine. Core finds it by the marker is_usage_sharing_element.
  2. A query string or form parameter is shared only when its name starts 51D_ or a Flow Element of the Pipeline accepts it, and no cookie but 51D_ ones is shared, whatever the settings. The first pull request followed specifications#155, sharing every parameter by default, and the third followed specifications#191.
  3. query_whitelist and header_blacklist given as one string are split at commas, the form a configuration file gives.
  4. A key found in the web request and the Evidence is shared once, whatever its letters.
  5. The record names every 51Degrees package in use and writes the values that do not change only now and then. It gains ServerIP, looked up in the background, reads the session id and sequence in any letters, and names the elements of the request's Pipeline.
  6. A sequence counts only when it is a whole number or digits, where int() turned 2.0, True and signed text into numbers, and no Error is logged.
  7. Closing goes on sending after a failed send until the failures start a pause. The same pull request has the IP Intelligence engine work out its reported address in one place.
  • Files: pipeline/fiftyone_pipeline_engines_fiftyone/, with pipeline/fiftyone_pipeline_core/ and the product builders for (1), the missing property services for (2), and ip-intelligence/fiftyone_ipintelligence_onpremise/client_ip.py for (7).
  • Tests: in pipeline/fiftyone_pipeline_engines_fiftyone/tests/ unless named. (1) test_share_usage_position.py, test_usage_sharing_last.py. (2) test_share_usage_rules.py, test_share_usage_evidencekeyfilter.py, test_usage.py. (3) test_share_usage_lists.py. (4) test_share_usage_accepts_no_evidence.py. (5) test_share_usage_record_fields.py, test_share_usage_invariant_values.py, test_share_usage_packages.py, test_share_usage_pipelines.py. (6) test_share_usage_record_fields.py. (7) test_usage.py, test_client_ip.py.
  • Pull requests: (1) #245, (2) #201, #218 then #246, (3) #183, (4) #120, (5) #132, #193, #202, (6) #234, (7) #129

7. Cloud Request Engine and cloud engines

  1. Discovery happens when the engine is built, so a refused key fails the build and an unreachable service gives a warning and is asked again on first use. Each warnings entry is given as a warning.
  2. Every cloud request has a timeout, 2 seconds unless timeout_seconds says otherwise, where a service that never answered held the build or a request for ever.
  3. The engine's data can be read under cloud-response, as the specification names it, as well as under cloud.
  4. Each entry of the cloud's errors list is its own error.
  5. The engine can be built from a saved copy of its discovery, given by discovery_state(), for a host that starts often.
  6. A cloud engine refuses a Pipeline with another Cloud Request Engine, where it took that engine's properties for every Pipeline.
  7. Each cloud hardware profile is Aspect Data, read as profile.hardwarevendor as device data is.
  8. A Property key is found in a dictionary-backed result in any letters. The same pull request makes three smaller fixes to a test name, a docstring and two links.
  9. CountriesTranslationCloud reads the translated country names, with WeightedCloudEngine and a console example.
  10. The tests expect the address the engine's order gives. The Cloud Request Engine takes an address given in code or configuration first, then _51DEGREES_CLOUD_ENDPOINT, then https://cloud.51degrees.com/api/v4/. Four tests expected the public service and failed when CI set the variable to another service, so a new tests/classes/endpoint.py gives each test the address that order gives, and two new tests cover a blank variable and a variable without a trailing slash.
  • Files: pipeline/fiftyone_pipeline_cloudrequestengine/, with device-detection/fiftyone_devicedetection_cloud/ for (7) and (8), pipeline/fiftyone_pipeline_engines/aspectdata_dictionary.py for (8) and ip-intelligence/fiftyone_ipintelligence_cloud/ for (9).
  • Tests: (1) test_discovery_at_build.py. (2) test_timeout.py, test_builder_timeout.py. (3) test_cloud_response_key.py. (4) test_cloud_errors.py. (5) test_discovery_state.py. (6) test_cloudengine_pipelines.py. (7) test_hardwareprofile_cloud.py. (8) test_aspectdata_dictionary.py. (9) test_countries_translation_cloud.py. (10) test_cloudresponse.py, test_credentials.py, and testConfigEndPoint_BlankEnvironmentVariable and testConfigEndPoint_EnvironmentVariableWithoutSlash in test_cloudrequestengine.py.
  • Pull requests: (1) #147, (2) #177, (3) #178, (4) #204, (5) #206, (6) #198, (7) #186, (8) #126, (9) #122, (10) #267

8. On-premise engines

  1. The engines build on 51degrees-cxx 699a9789, the commit under review named in the context above. The first pull request moved the pointer to 178371ac, the nightly submodule update moved it back to 7992af70, and the third put it back. The fourth moved it to ad2ccae5, which keeps a file name across a refresh from memory, so the data files refresh from their file with refreshData() again. The fifth moves it the ten commits on to 560de81e, and the sixth to 699a9789, the head of cxx rc after the cxx review, each changing only the submodule line, so the SWIG wrappers here are unchanged.
  2. Reading a results instance takes no lock, and the documentation says it is not safe for several threads. A lock added for each read was removed before any release, because every request paid for it. A test and the documentation show that loading either native module on free-threaded Python turns the GIL back on.
  3. A refresh lets go of the GIL, so other threads go on processing while data loads.
  4. An engine in several Pipelines builds its native engine and registers its data file once.
  5. The engines read their Evidence keys after every refresh, take restricted_properties as a comma-separated string, and keep their Evidence key filter until the keys change.
  6. The match metrics follow the specification, in their metadata, a UserAgents list with each User-Agent once and empty when not recorded, and method as a name. A new get_components() lists the Metrics component.
  7. A License Key is needed only for the updates that download.
  • Files: device-detection/fiftyone_devicedetection_onpremise/ and ip-intelligence/fiftyone_ipintelligence_onpremise/, with cxx for (1), pipeline/fiftyone_pipeline_core/elementdata.py and .github/workflows/ for (2), pipeline/fiftyone_pipeline_engines/engine.py for (4), and the cloud and core filters for (5).
  • Tests: (1) the full build on the new native code. (2) test_swig_data_threads.py, test_free_threaded.py, ci/free-threaded-python.Tests.ps1. (3) test_processing_during_refresh.py. (4) test_engine_in_pipelines.py. (5) test_keys_and_property_list.py, test_basiclist_evidence_keyfilter.py. (6) test_properties.py, test_update_matched_useragent.py, test_devicedetection.py. (7) test_licence_key_rule.py, test_watcher_without_licence_key.py.
  • Pull requests: (1) #189, #225, #228, #242, #266, #269, (2) #80 then #241, #243, (3) #196, (4) #203, (5) #143, #180, (6) #145, #168, #133, #229, (7) #136

9. Data updates

  1. One update of a data file runs at a time, with one pending check for each file.
  2. A download cut short is an error accessing the service whatever urllib3 is installed, and the data in use is kept.
  3. An error in a polled check is caught, logged and reported, and the next check is still scheduled.
  4. A DataFile refreshes its engine with its own identifier when the service gives none.
  5. An update from memory gives its result to its caller alone. A file the service wrote is not refreshed again by the watcher, and a failed write is a warning, with the engine refreshed from the bytes given.
  6. The other checks report as the errors table gives. A programmatic check raises a failure to its caller, a refresh is tried 10 times, a watched file being written is waited for, the module REFRESH_TRIES stays as deprecated, and the update on start-up schedules the next check.
  7. An engine always builds its data file, so a programmatic update works with every update option off, and both data update examples show one.
  8. A License Key that holds several products gets the data file in use. When an update request names no product, the distributor answers such a key with status 300 and a URI for each product, and the service treated that as a failed check. The first request is unchanged. On a 300 that lists AvailableUris, the service repeats its first request to the configured address with Product added, naming the product of the loaded data file, which each data file names from its engine's tier (V4TAC for the TAC file, V4Enterprise for the Device Detection Enterprise file, IPIV4Enterprise for the IP Intelligence Enterprise file, through DataFile.get_data_update_product()), with the same If-Modified-Since date. When no product offered matches, or no data file is loaded yet, the check fails with AUTO_UPDATE_HTTPS_ERR and names the products offered (#268). FIX: Ask for the product of the data file in use when a license key holds several #268 first followed the URI the distributor offered, and #270 changed that to repeat the request, as the data updates specification is being changed to say (specifications#194). data_update_product_type, when set, names the product on every request, the first included, and a 300 to such a request is not followed. With none set, no Product parameter is sent. Both update examples name a product only when given one as their third argument, and the Device Detection example's test passes V4TAC, which device-detection/ci/fetch-assets.ps1 also links under its own name.
  • Files: pipeline/fiftyone_pipeline_engines/, chiefly datafile_update_service.py, with the on-premise data file classes for (5) and the on-premise engines and data update examples for (7).
  • Tests: in pipeline/fiftyone_pipeline_engines/tests/ unless named. (1) test_datafile_update_guard.py. (2) (3) (5) and (6) test_datafile_update_http.py, with test_public_names.py and test_engine_in_pipelines.py for (6). (4) test_datafile_refresh.py. (7) test_programmatic_update.py in both on-premise packages. (8) the 11 SeveralProductsTests in test_datafile_update_http.py, against a local server that answers as the distributor does, test_data_update_product.py in both on-premise packages, test_datafileupdate_product.py in both examples packages, and test_onpremise_datafileupdate_console.
  • Pull requests: (1) #87, (2) #131, (3) #137, (4) #146, (5) #169, #172, #175, (6) #188, #220, #230, #233, (7) #223, #224, (8) #268, #270

10. 51Did

  1. A null factor reads as a Mismatch, and a short Payload is refused for its version.
  2. The layout names that fod_id and did_client offered are deprecated, read through the private _layout module.
  • Files: pipeline/fiftyone_pipeline_did/.
  • Tests: (1) and (2) test_fodid.py, test_did_client.py.
  • Pull requests: (1) #141, (2) #174

11. Derived properties

  1. A new fiftyone_pipeline_derivedproperty package offers a DerivedPropertyElement that runs every script of derived-properties, taken as a submodule, so a Python Pipeline can offer HumanConfidence and IsGdpr. It is not published yet.
  2. A derived property element refuses a second Pipeline.
  3. An example needs no key, data file or network.
  • Files: pipeline/fiftyone_pipeline_derivedproperty/, .gitmodules, ci/packages.json.
  • Tests: (1) test_shared_cases.py, test_built_in_scripts.py, test_element.py. (2) test_one_pipeline.py. (3) test_derived_property_example.py.
  • Pull requests: (1) #125, (2) #197, (3) #187

12. Examples

None of these changes a published package.

  1. Every cloud example ends cleanly with no Resource Key, naming _51DEGREES_RESOURCE_KEY and linking to where a key is created, and the two web examples print their Find out more section when they stop early.
  2. Every example ends with a "Find out more" section.
  3. More examples run on the free data files and take their settings from the environment, and CI runs the examples no test ran, a missing data file's download and two more examples with no settings.
  4. Three examples show how to create Flow Elements, a simple one, an on-premise engine and a cloud engine.
  5. The IP Intelligence web examples hand the web request to the Pipeline, the on-premise one shares usage, and the usage sharing example sends with certificate checks on.
  6. The web examples listen on port 5151 by default.
  7. A new Human Confidence web example asks the cloud service for HumanConfidence, passing the request's evidence unchanged, and redeems the value the page's 51Degrees client script returns. Its live tests ask the cloud for HumanConfidenceSource by name, because keys made before that property existed list HumanConfidence alone and the source went unchecked. They check that the Bespoke key gets the source Passive and a plain level, and that a key in _51DEGREES_RESOURCE_KEY_BASIC gets no source.
  • Files: the examples packages and the examples/ folders of the other packages.
  • Tests: (1) test_cloud_examples_without_key.py, test_examples_without_key.py, test_cloud_mixed_without_key.py, test_creator_context_without_key.py. (2) test_find_out_more.py. (3) test_examples_without_settings.py, test_package_gettingstarted_from_root.py, test_datafiledownload.py, test_onpremiseperformance.py. (4) test_simple_flow_element_example.py, test_simple_onpremise_engine_example.py, test_simple_cloud_engine.py. (5) test_web_examples_hand_over_request.py, test_usage_sharing_comments.py, test_shareusage_certificate_checks.py. (6) the *_port*.py tests. (7) test_cloud_humanconfidence_web*.py, including test_passive_source_and_level_come_from_the_cloud and test_a_basic_key_gets_no_source.
  • Pull requests: (1) #123, #219, #235, (2) #127, (3) #130, #167, #128, #190, (4) #142, (5) #119, #205, #116, (6) #253, (7) #255, #258, #261

13. Tests and test infrastructure

  1. Tests of rules the code already met, in usage sharing, IP Intelligence data, Pipeline metadata and configuration, and an engine given no Property names.
  2. Two usage sharing tests and the location web example test no longer fail at random, as they wait for no other test's thread and ask again when the cloud's lookup is slow.
  3. A test of what minifying the JavaScript adds, with its limit set from every runner's measurement.
  • Files: test files only.
  • Tests: (1) test_share_usage_pause.py, test_data_model.py, test_pipeline_properties.py, test_pipeline_configuration.py, test_share_usage_held_rules.py, test_keys_and_property_list.py. (2) test_usage.py, test_usagesharing_example.py, location/tests/test_web_example.py. (3) test_javascriptbuilder_minify_performance.py.
  • Pull requests: (1) #144, #194, #210, (2) #192, #209, (3) #195

14. Documentation

  1. AGENTS.md points at common-ci's list of environment variable names, says a test that fails on timing is fixed, and says the IP Intelligence example runs on the Lite file.
  2. Configuration page links use 51degrees.com/configure, in READMEs, comments, example output and the package messages.
  3. Each user-facing function that raises says what it raises, in the core, engines and Cloud Request Engine packages.
  4. context7.json tells Context7 how to list the repository.
  • Files: (1) AGENTS.md. (2) 40 files. (3) docstrings in three packages. (4) context7.json.
  • Tests: (3) test_documented_errors.py in each of the three packages. The others change no code.
  • Pull requests: (1) #109, #115, #124, (2) #107, (3) #207, (4) #249

Housekeeping

  • The nightly schedule's comment names the Node.js nightly's new start time (#135).

Breaking changes

  1. The old environment variable names are ignored. Set _51DEGREES_CLOUD_ENDPOINT for FOD_CLOUD_API_URL, cloud_endpoint and CLOUD_ENDPOINT, _51DEGREES_CLOUD_REQUEST_ORIGIN for cloud_request_origin, _51DEGREES_DD_PATH for 51DEGREES_DD_PATH, _51DEGREES_IPI_PATH for IPINTELLIGENCEDATAFILE, _51DEGREES_LICENSE_KEY for LICENSE_KEY and license_key, _51DEGREES_RESOURCE_KEY for RESOURCE_KEY and resource_key, and _51DEGREES_RUN_PERFORMANCE_TESTS for run_performance_tests. Constants.MESSAGE_OLD_ENDPOINT_VARIABLE is gone (#251).
  2. Four packages require the fiftyone_pipeline_core this release publishes, and four the matching fiftyone_pipeline_engines or fiftyone_pipeline_cloudrequestengine, so drop a lower pin before upgrading (#231, #257).
  3. A built Pipeline's flow_elements and flow_elements_display_list are tuples, so compare list(pipeline.flow_elements). Changing them raises, and pickle and copy.deepcopy refuse a Pipeline (#184).
  4. FlowData.data is not a dict, so call flowdata.data.copy() for one. Removing Element Data raises TypeError, and a view keeps the list it saw (#250).
  5. Adding Evidence, Element Data or an error to a finished Flow Data raises, as do a second process() and a write to finished Element Data (#247, #256).
  6. Element Data held after its Flow Data is closed can show another request's values, so read or copy values before closing (#248).
  7. A caller's own web integration elements are not added again, and a lower-case Set Header identifier gives its header where it raised (#140). setheader_properties is a copy (#185).
  8. An element first met on a later request now gets its delayed execution information, where reading it raised KeyError (#179).
  9. The engine cache key has a new form, so a cache shared with an earlier version misses its old entries (#182).
  10. A value with no value and no reason raises "This instance does not have a set value", not "None" (#134), and AspectPropertyValue(value="noValue") holds "noValue" (#173).
  11. On-premise data raises for a property its tier lists and its result lacks, where get returned None (#246).
  12. A Pipeline with usage sharing anywhere but last raises ValueError. Add ShareUsage last, and upgrade fiftyone_pipeline_core with the Device Detection and IP Intelligence packages (#245).
  13. A query string or form parameter that neither starts 51D_ nor is accepted by a Flow Element is never shared, and query_whitelist and share_all_query_string_parameters do nothing. With share_all=True a cookie that does not start 51D_ is not shared (#201, #246).
  14. header_blacklist given as a string is split at commas, and reads back as a list (#183).
  15. Only the first usage sharing record, the first each hour and the first once the address is known carry the invariant values and the new Package elements, so a reader ties records together by the new ProcessId (#193). An element is named by its key's prefix in lower case (#139), and a sequence that is not a whole number or digits is left out (#234).
  16. Building a CloudRequestEngine sends two requests, and a refused key raises CloudRequestException then (#147).
  17. Every cloud request times out after 2 seconds unless timeout_seconds is set, and a replaced requests.request must accept timeout (#177).
  18. Read the Cloud Request Engine's data as flowdata.get("cloud-response"), as cloud is deprecated, and flowdata.data holds it under both keys (#178).
  19. One errors entry is raised with its text alone, and several raise one CloudRequestException with each in exceptions (#204).
  20. A cloud engine in Pipelines with different Cloud Request Engines raises, so build one for each (#198). A cloud hardware profile finds a name in any letters (#186).
  21. On-premise Device Detection uses Evidence such as Header.User-Agent (#139). restricted_properties as a string is a comma-separated list, and the caller's list is left alone (#143).
  22. The match metrics have the category Device Metrics and component Metrics, UserAgents is a string[] (#145) and [] with update_matched_useragent=False (#168), and method is a name such as PERFORMANCE (#133).
  23. An on-premise engine builds with no License Key when nothing downloads, and refuses to build when a download is asked for with no key (#136).
  24. A change made in place to an engine's evidence_keys_list or a used filter's list is no longer seen, so set a new list (#180).
  25. update_from_memory calls no update complete callback, raises DataUpdateException for a failed refresh, and turns a failed write into a warning and a refresh from the bytes (#169, #175). Upgrade fiftyone_pipeline_engines with the on-premise packages (#175).
  26. update_data_file raises a failed check to its caller (#188). A refresh is tried 10 times and AUTO_UPDATE_TIMEOUT can be reported (#220), and the module REFRESH_TRIES warns as deprecated (#230). A callback can run during the Pipeline build for a failed update on start-up (#233).
  27. A null 51Did factor is FactorResult.MISMATCH, and a Payload of 1 to 4 bytes naming version 1, 2 or 3 reports UNSUPPORTED_PAYLOAD_VERSION (#141). The fod_id and did_client layout names warn as deprecated, so use the accessors on FodId (#174).
  28. The web examples default to port 5151, where they used 5000, 5001 and 5100 (#253). _51DEGREES_EXAMPLE_HTTP_PORTS sets another, and PORT is no longer read (#259).
  29. The constants that held old names are removed, being LEGACY_RESOURCE_KEY_ENV_VAR, LEGACY_LICENSE_KEY_ENV_VAR, ENDPOINT_ENV_VAR, DATA_FILE_ENV_VAR, ORIGIN_ENV_VAR and the IP Intelligence RESOURCE_KEY_ENV_VAR on the example helpers, UPDATE_EXAMPLE_LICENSE_KEY_NAME in the data file update examples, Constants.FOD_CLOUD_API_URL in fiftyone_pipeline_cloudrequestengine, did_client.ENDPOINT_VARIABLE in fiftyone_pipeline_did and UA_FILE_NAME in fiftyone_devicedetection_shared. Use the constant beside each. KeyUtils.get_named_key reads the name it is given and no other, and performance.py takes --evidence_file in place of --user_agents_file (#259).

Still open

  1. No pull request is open into rc.
  2. The release build at 435ae8c is running. Its Release Pull Request run started at 12:28 UTC on 23 November. The run at d5b223b8, the first with cxx at 699a9789, was cancelled at 12:29 UTC when rc moved, with 14 of the 15 Build and Test entries passed and Ubuntu Python 3.10 still running, which it had been since 10:32 UTC.
  3. The run before failed in one test. In the run at 0f1ccdb9, every test in the Ubuntu 3.13 log passed but test_onpremise_datafileupdate_console, where the data update service refused the request because the example asked for V4Enterprise and the License Key CI gives it holds the TAC data file. Section 9 item 8 changes that test to ask for V4TAC.
  4. The Cloud Request Engine's own order differs from the advised order in two cases, in pipeline/fiftyone_pipeline_cloudrequestengine/src/fiftyone_pipeline_cloudrequestengine/cloudrequestengine.py. A cloud_endpoint setting is used whenever it is given, so a blank setting never falls through to _51DEGREES_CLOUD_ENDPOINT, and only an empty variable counts as blank, so a variable of spaces is used as an address. No pull request changes this yet.
  5. Follow-up work the pull requests above name.
    • Packages. #154 publishing the derived property package, #153 a script comparing a property with text, #164 Property metadata defaults, #211 a Set Header value of "noValue", #212 and #213 removing deprecated 51Did names, #214 the cloud data key, #215 a temporary copy left behind, #216 the cost of minifying, #217 what the other packages raise, #222 CloudRequestFailed, #226 a data file given as None.
    • Tests and CI. #151 the Device Detection download in other builds, #152 a reload with Properties in another order, #165 test_value_types.

Closes #11. Closes #18. Closes #51. Closes #105. Closes #149. Closes #150. Closes #155. Closes #156. Closes #157. Closes #159. Closes #160. Closes #161. Closes #162. Closes #163. Closes #166. Closes #170. Closes #171. Each was closed by a pull request into rc, which GitHub does not act on until the change reaches main.

jwrosewell and others added 30 commits November 13, 2026 08:17
…54)

* Label a one-package release with its version, not its last character

When the release plan holds one package, $plan.Version is a single string,
Sort-Object hands it back as a string, and [-1] took its last character, so
a plan releasing 4.5.3 alone gave the run the label 3, which the publish's
version check refuses. The sort is now collected into an array first.

* Test the publish label for a plan of one package, several packages and none
* DOC: Point at the one list of environment variable names

AGENTS.md gains a section linking common-ci's list of environment variable
names (environment-variables.md, made from environment-variables.json) at
commit 18f9a570, and saying the list decides.

Documentation only.

* DOC: Link the list of environment variable names at d8a9c596

The list at that commit holds the names review found missing.

* Keep one Releases section in AGENTS.md
Pull requests go to rc, so a 51Did change was first checked against the live cloud only when the release pull request into main opened.
…ation, tests, examples and manifest metadata (#60)

Reviewed and approved at head ec8b2fd. The pull request body says what changed and how it was tested.
Reviewed and approved at head 2e8d370. The pull request body says what changed and how it was tested.
Reviewed and approved at head 60b4036. The pull request body says what changed and how it was tested.
Step 1 of [common-ci#306](51Degrees/common-ci#306). The release plan in `ci/packages.ps1`, which works out which packages a publish releases and at which version, moved to common-ci as `steps/release-plan.ps1` in [common-ci#307](51Degrees/common-ci#307), and the rule that documentation, tests and examples do not count was added there by [common-ci#310](51Degrees/common-ci#310). Both reached common-ci's `main`, which the workflows here use, in common-ci's release of 12 November. This repository then uses the shared step in place of its own copy, so that the rule is written once for every package repository.
…les (#119)

The Usage Sharing Element accepts no Evidence, and shares what it finds in the web request that the web integration adds as `server.http-request`, together with the Evidence given to the Pipeline (`found_evidence` in [`share_usage.py` lines 432 to 458 at 5b5a833](https://github.com/51Degrees/51degrees-python/blob/5b5a833239d435676a1ab0450be22bce0c0807a2/pipeline/fiftyone_pipeline_engines_fiftyone/src/fiftyone_pipeline_engines_fiftyone/share_usage.py#L432-L458)). `webevidence` in [`pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py` line 139](https://github.com/51Degrees/51degrees-python/blob/5b5a833239d435676a1ab0450be22bce0c0807a2/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py#L139) adds it for every request it reads.
Each must end without an error, naming the environment variable to set and
giving a tagged link to the page where a key is created.
Each examples package, location and the pipeline packages that hold
examples gain test_find_out_more.py. It reads every example file and fails,
naming the file, when the file has no Find out more section, meaning a list
of links whose 51degrees.com addresses carry a utm_term starting with
find-out-more and a utm_content naming that file, and a link to the
product's folder in this repository. Where an example can stop early
without a key, a data file or the network, the test also runs it to that
end and checks the section is printed there.

The existing tests that capture what an example prints, or the page a web
example serves, now also check for the section. The device lines check of
the TAC and native model lookups leaves out the section's links, which are
indented as device lines are.

These fail until the examples print the section, which the next commits
add.
…letters (#120)

`ShareUsage.found_evidence` merges the values of the web request, which the web integration adds as `server.http-request`, with every Evidence value in the Flow Data, so that a key found in both places is shared once with the Evidence value ([`share_usage.py` lines 432 to 458 at 32ffdcf](https://github.com/51Degrees/51degrees-python/blob/32ffdcf1205a5ce593fb55f5be733de5a18dffde/pipeline/fiftyone_pipeline_engines_fiftyone/src/fiftyone_pipeline_engines_fiftyone/share_usage.py#L432-L458)). It merged on the exact key. `webevidence` writes each header's key in lower case ([`web.py` line 91](https://github.com/51Degrees/51degrees-python/blob/32ffdcf1205a5ce593fb55f5be733de5a18dffde/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py#L91)), so a header an application added by hand in other letters, such as `header.User-Agent`, was found twice and both values were shared.
…s the Lite file (#124)

[AGENTS.md](https://github.com/51Degrees/51degrees-python/blob/175ca4a/AGENTS.md) said the IP Intelligence on-premise `gettingstarted_console` "with no argument looks for the Asn file", shows registration values only once given the Lite file, and prints "This property is not present in the data file." for a property the file lacks. None of that is what the example does on `rc` at 175ca4a.
The creator context demo's exit message with no resource key named the
environment variable only. It now gives a tagged link to the configuration
page, where a resource key is created.
…gence cloud web example has none

The IP Intelligence cloud web example logged nothing and raised an exception
with no key. It now logs the message the cloud console examples log, with
tagged links to the resource keys page and the configuration page, and
returns.
…Find out more section

The custom flow element example ends its page with the Build your own
page, the Pipeline API documentation and this repository's pipeline
folder. The usage sharing example prints the usage sharing documentation,
the Pipeline API documentation and the pipeline folder last, and its
expected output comment says the section follows. The 51Did example
prints the 51Did page, its documentation, the 51Did inspector, the
pipeline folder and the specifications repository after a successful run.
The mixed cloud console printed its section only after a run. Writing the
section moves into GettingStartedConsole.print_find_out_more, which run
still calls, and main now calls it too when there is no key and when the
pipeline cannot be built, so each of the example's ends finishes with it.
Each example now lists its own links, the Device Detection page, the
resource keys documentation and pricing for the cloud examples, the
Device Detection page and where to ask about the Enterprise data file for
the on-premise ones, then this repository's device-detection folder, and
51degrees-cxx where the example uses the native engine. ExampleUtils gains
print_find_out_more, which writes the section in the form the mixed cloud
console uses, a line of "=" then "Find out more:" then each label and link
on a tab-indented line.

The section is printed at every clean end. A cloud console prints it after
its results, and from main when there is no resource key. An on-premise
console prints it from main, so it follows the results or the message that
no data file was found. The data file update example prints it whether it
updated the file, had no licence key or was stopped before downloading.
The CSV and profile metadata examples write it where their progress
messages go, so JSON on standard output stays valid. The offline
processing example prints it to the console, because its results go to a
file. The web examples end their pages with the section and print it to
the console when the server stops, and the cloud ones also when there is
no resource key. The scripts, failuretomatch, performance and the
getting started example in fiftyone_devicedetection, print it last.
Each example now lists its own links, the IP Intelligence page, the
resource keys documentation and pricing for the cloud examples, the IP
Intelligence page and where to ask about the Enterprise data file for the
on-premise ones, then this repository's ip-intelligence folder, and
51degrees-cxx where the example uses the native engine. The mixed examples
add the Device Detection page and folder. ExampleUtils gains
print_find_out_more, which writes the section in the form the mixed cloud
console uses, and get_find_out_more_html, which gives the same links as
the end of a web example's page.

Each console prints the section from main, which every clean end reaches,
so it follows the results, the message that there is no resource key or no
data file, the message that the data file lacks the properties the example
needs, and the message that the device detection package is not installed.
The data file update example prints it whether it updated the file, had no
licence key or was stopped before downloading. The offline processing
example writes its results as YAML on standard output, so it writes the
section as YAML comments. The compare example's results go to a file, so
it prints the section to the console.

The web examples end their pages with the section. The on-premise one also
prints it when the server stops. The cloud web example's handling of a
missing resource key is left as it is, because another change replaces
it.
Both cloud examples list the Geolocation page, the resource keys
documentation, pricing and this repository's location folder. The getting
started example prints the section last, after the result or after the
message that there is no resource key. The web example prints it after
that message, and ends its page with the same links. Its page is served by
flask run, so there is no point at which the example could print the
section when the server stops.
For [specifications#61](51Degrees/specifications#61), "Results and threads". [thread-safety.md, Element Data](https://github.com/51Degrees/specifications/blob/6570727d2af6967390d3c4fbec77b9cf0540d3f3/pipeline-specification/features/thread-safety.md#L59-L66), lines 59 to 66, says "Some Element Data writes into something it holds when it is read, such as an on-premise Engine's Aspect Data, which reads its values from native results that each read writes into. Such Element Data MUST let only one thread at a time read from its results, for example by holding a lock for each read". A native results instance is used by one thread at a time, because reading a value writes into it and the first read of a component can walk its graph.
The test of the location web example with no resource key failed to import
it, because the web integration in fiftyone_pipeline_core imports Flask and
location's test environment did not have it. The same lines are in the
change that tests the examples no test ran.
The Find out more test runs location's web example with no resource key,
and the example imports the web integration in fiftyone_pipeline_core,
which imports Flask, which location's test environment did not have. The
same four lines are in the changes that test the examples with no key and
that test the examples no test ran.
…k out the reported IP address in one place (#129)

Two smaller fixes from the list of deferred work for this release.
…eUtils, as the other IP Intelligence examples do
jwrosewell and others added 18 commits November 21, 2026 16:43
Results instances are not thread-safe, so reads take no lock. Reviewed at def9267 with no high finding open, and all 3 checks on that head passing.
)

Refuse writes to a finished Flow Data and to finished Element Data. Reviewed at 2bc91de with no high finding open, and all 3 checks on that head passing.
…reated (#252)

Build the Pipeline's evidence key filter once, when the Pipeline is created. Reviewed at e8ffe2e with no high finding open, and all 3 checks on that head passing.
Test and document the on-premise packages on free-threaded Python. Reviewed at c7a07ee with no high finding open, and all 9 checks on that head passing.
Reuse Element Data through a bounded pool for each Flow Element. Reviewed at 04a81a2 with no high finding open, and all 3 checks on that head passing.
… without one (#254)

Read every key under its _51DEGREES_ name, and skip a live cloud test without one. Reviewed at 3455f44 with no high finding open, and all 10 checks on that head passing.
…e level, runs the browser tests and redeems the sealed active level (#255)

Add a Human Confidence web example that asks the cloud for the passive level, runs the browser tests and redeems the sealed active level. Reviewed at 8ae821c with no high finding open, and all 5 checks on that head passing.
…ata (#256)

BUG: Refuse writes through a view of a finished Flow Data's Element Data. Reviewed at 07497d9 with no high finding open, and all 7 checks on that head passing.
…es four packages import (#257)

BUG: Require fiftyone_pipeline_core at the version that holds the names four packages import. Reviewed at 7aaa1b2 with no high finding open, and all 9 checks on that head passing.
…, and accept the level Unknown (#258)

BUG: Expect a Human Confidence source only from a key that carries it, and accept the level Unknown. Reviewed at faec395 with no high finding open, and all 5 checks on that head passing.
BUILD: Declare the permissions each workflow needs. Reviewed at 792c63b with no high finding open, and all 3 checks on that head passing.
BUILD: Read every setting under one _51DEGREES_ name. Reviewed at 73348a5 with no high finding open, and all 10 checks on that head passing.
* BUILD: Read the three resource keys from organization variables

The three resource keys _51DEGREES_RESOURCE_KEY_51DID, _BASIC and _BESPOKE are organization variables, as every other resource key is, so the workflows read them from vars. A name holds one thing, and the shared export step stops a job that finds one name both as a secret and as a variable.

* BUILD: Say and check that the resource keys are organization variables

ci/key-names.Tests.ps1 now requires _51DEGREES_RESOURCE_KEY_51DID and
_51DEGREES_RESOURCE_KEY_BASIC to come from the organization variable of the
same name, rather than the secret. The Cloud 51Did workflow's comments and
error messages, the CI READMEs of device-detection, ip-intelligence,
location and pipeline, and the warnings in their run-integration-tests.ps1
now say the resource keys are organization variables and the license keys
organization secrets.
Check the Human Confidence example returns its source. Reviewed at 35d830f with no high finding open, and all 5 checks on that head passing.
cloud-51did.yml now reads _51DEGREES_RESOURCE_KEY_51DID and _51DEGREES_RESOURCE_KEY_BASIC as secrets, because every resource key is an organization secret. The workflow comments and messages, AGENTS.md, the CI READMEs and the run-integration-tests.ps1 warnings say the same.

key-names.Tests.ps1 expects both keys from the secret of their own names, and gains a test that fails when any workflow reads a _51DEGREES_RESOURCE_KEY name as vars.
)

BUILD: Run the integration and publish steps without a Keys option. Reviewed at 69c080f with no high finding open, and all 5 checks on that head passing.
* BUILD: Move the cxx submodule to the head of cxx rc

Moves the cxx submodule to the head of 51degrees-cxx rc (560de81e), the commit under review for the cxx release, so every language builds and tests against the same C code. When the cxx release adds a tag, the submodule moves to the tagged commit.

* BUILD: Move the cxx submodule to the head of cxx rc

Restores every file from rc. Only the cxx submodule pointer differs from rc.
BUILD: Run the CI script tests on a change to any workflow. Reviewed at ac6f4f3 with no high finding open, and all 5 checks on that head passing.
TEST: Expect the cloud address the endpoint order gives. Reviewed at a869226 with no high finding open, and all 5 checks on that head passing.
…olds several (#268)

FIX: Ask for the product of the data file in use when a license key holds several. Reviewed at 66c827f with no high finding open, and all 9 checks on that head passing.
BUILD: Build against cxx 699a9789. Reviewed at 4626ba3 with no high finding open, and all 7 checks on that head passing.
… says (#270)

FIX: Repeat the update request with the product, as the specification says. Reviewed at 8e4b940 with no high finding open, and all 7 checks on that head passing.
TEST: Check the cloud hardware lookup examples return devices. Reviewed at 28fb20d with no high finding open, and all 3 checks on that head passing.
… once (#273)

TEST: Check the hardware lookup examples when the property list fails once. Reviewed at e4c2424 with no high finding open, and all 3 checks on that head passing.
Mykhailo51D and others added 4 commits November 23, 2026 22:55
…g thread (#275)

BUG: Release the usage sharing element without waiting for its sending thread. Reviewed at 7ea46ad with no high finding open, and all 7 checks on that head passing.
…#277)

TEST: Run the Human Confidence source tests against the staging cloud. Reviewed at cbf04fe with no high finding open, and all 6 checks on that head passing.
…276)

TEST: Require values for a known address from the IP cloud examples. Reviewed at d33f646 with no high finding open, and all 3 checks on that head passing.
…e files they use (#278)

BUILD: Say when no staging test ran, and run the staging tests for the files they use. Reviewed at a6d3405 with no high finding open, and all 6 checks on that head passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment