Skip to content

Add a page for the derived property element - #315

Merged
jwrosewell merged 4 commits into
rcfrom
docs/derived-properties
Nov 15, 2026
Merged

jwrosewell merged 4 commits into
rcfrom
docs/derived-properties

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

No page in the documentation covers the derived property element. .NET and Rust have released it, PHP has it on rc from 51degrees-php#89, Go has it on rc from 51degrees-go#132, and the cloud uses the same element to give derived.HumanConfidence and derived.IsGdpr. A reader of the Pipeline API features has no way to find it.

What the specification says

The Derived Property Element specification at c8128ca4 defines it as follows (lines 3 to 6).

The Derived Property Element produces new Property values from Property values that other Flow Elements in the Pipeline have already produced, following rules written in a script, and stores the results in its own Element Data.

The page follows the specification's sections.

  • What the element is and what belongs in a custom element instead (lines 8 to 11, and the script format reference).
  • The element data key derived, one property per script (lines 223 to 225).
  • The one rule for a property with no value, and the shape of its message (lines 133 to 171).
  • The Pipeline check, and that position is not judged (lines 101 to 131).
  • The three sources and the configuration file, with lists written as one comma-separated string (lines 245 to 373).
  • The cloud running the same element and carrying the no-value reason (lines 419 to 471).

What the page says about each language

Language Package Evidence
.NET FiftyOne.Pipeline.DerivedProperty on NuGet DerivedPropertyElementBuilder.cs lines 85, 138 and 219 for AddScript(BuiltInScript), AddScriptFile and AddScript(name, text), IDerivedPropertyData.cs line 36, and the DerivedProperty example with its configuration file
Go the elements/derivedproperty package of the github.com/51Degrees/51degrees-go/pipeline/v4 module, tagged pipeline/v4.x.y like the module's releases so far (pipeline/v4.5.173 is the newest) builder.go lines 56, 62, 76 and 97 for NewBuilder, AddBuiltInScript, AddScriptFile and AddScript, lines 211 to 219 for BuilderName and NewFromConfiguration, core/config.go lines 78 and 95 for Register and BuildFromConfiguration, element.go lines 44 and 73 for DataKey and GetAs, and engines/aspectdata.go lines 175 and 192 for Value and NoValueMessage. The tab uses IsGdpr (builtin.go line 50, a bool in its script) with the IP Intelligence cloud engine, built as the cloud example, lines 127 to 150 builds it, because Go's device-detection has no cloud engine and its on-premise engines are not flow elements (51degrees-go#30). The Pipeline check takes a cloud engine whose properties are not loaded yet as supplying them (element.go lines 283 to 288), so the Pipeline builds.
PHP 51degrees/fiftyone.pipeline.derivedproperty, not on Packagist (https://repo.packagist.org/p2/51degrees/fiftyone.pipeline.derivedproperty.json answered 404 on 14 November) DerivedPropertyElementBuilder.php lines 47, 59 and 70, and the code and configuration file in the package readme
Rust fiftyone-derived-properties on crates.io element.rs lines 154, 352, 364 and 388 for builder, add_built_in, add_script and add_script_file, and the code in the crate readme, lines 44 to 79. The tab links the derived-property example, which 51degrees-rust#419 merged into Rust's rc at 23:02 UTC on 14 November. It holds a script in the code (line 318), reads one from a file (line 315), builds the same Pipeline from an options file (lines 263 to 271) and shows a property with no value (lines 284 to 291 and 412).

The scripts table names the two scripts in derived-properties, HumanConfidence and IsGdpr. It says which engines each one needs in the Pipeline, and quotes the definition IsGdpr carries in its own Output block. It does not describe how HumanConfidence is worked out, because that belongs to the script, which the table links, and to the Human Confidence overview. For the same reason the example of a no-value message is for IsGdpr, whose one source, the country code ip.CountryCode, its own definition names, in the singular form the specification gives at lines 168 to 170 ("1 source property was not available").

Files

  • src/pipelineapi/features/derivedproperties.md, the new page, PipelineApi_Features_DerivedProperties. Its last section grabs the .NET example, DerivedProperty/Program.cs, from the published pipeline API documentation, as the agent signature page grabs its own. 51degrees-dotnet#199, on rc for the Monday release, puts the .NET examples back into that documentation, so the example appears once that release reaches main.
  • src/pipelineapi/features/index.md, which lists the page between custom elements and error handling.

The feature matrix links the page from its new derived properties row in the matrix draft, documentation#314, so this draft merges first.

When this merges

After the Monday 16 November releases reach main, because the PHP tab links tree/main/pipeline/derivedproperty, the Go tab tree/main/pipeline/elements/derivedproperty and the Rust tab blob/main/examples/pipeline-examples/src/bin/derived-property.rs, which are on each repository's rc until then.

What remains

  • Node.js (51degrees-node#98) and Python (51degrees-python#125) have the element in drafts, and Java is adding it. Each gets a tab once its change is merged, and I will add them to this draft if that happens before Monday.
  • The required examples say every reference implementation MUST provide a derived property example. .NET has one, and Rust's merged into Rust's rc from 51degrees-rust#419, which the Rust tab now links. Go's is an open draft, 51degrees-go#137, and the Go tab gets its link once that merges. PHP shows the element only in its readme, which is for that repository.

Build

Checks on the head, d7e909e, all green.

  • Preview built the documentation with Doxygen, with no warning from derivedproperties.md or features/index.md.
  • utm-link-lint found no campaign tag, as this repository's .utm-lint.json ({ "mode": "forbid" }) requires.
  • Only rc into main passed.

Says what the element is, which properties it gives and from which
elements, what a property with no value says, how the Pipeline is
checked, how scripts are configured, and how to add it in .NET, PHP and
Rust, with links to each package, its source and the .NET example. The
API features index lists the page.
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview 👀

The pipeline API documentation reads the .NET examples again, so the page
grabs the DerivedProperty example as the agent signature page grabs its
own.
Go has the element on its rc from 51degrees-go#132. The Go tab uses
IsGdpr with the IP Intelligence cloud engine, because the Go on-premise
engines do not run in a Pipeline yet and Go has no Device Detection cloud
engine. The configuration section says how Go builds it from a file.
…pt needs, and link the Rust example

The no-value message example named two of HumanConfidence's source properties. It now uses IsGdpr, whose one source, the country code, its own definition names. The table's column says which engines to add rather than what each script reads, and the Rust tab links the derived-property example that 51degrees-rust#419 added.
@jwrosewell
jwrosewell marked this pull request as ready for review November 15, 2026 00:33
@jwrosewell
jwrosewell merged commit 3728230 into rc Nov 15, 2026
3 checks passed
@jwrosewell
jwrosewell deleted the docs/derived-properties branch November 15, 2026 00:33
jwrosewell added a commit that referenced this pull request Nov 15, 2026
The derived property page, added by [#315](#315) and merged into `rc` on 15 November, links the Rust example but not Go's, because Go's was still a draft when the page was written. [51degrees-go#137](51Degrees/51degrees-go#137) merged it into Go's `rc` at 00:32 UTC on 15 November.
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.

1 participant