liveBook · Manning

Provenance

As explained in Data-Oriented Programming in Java

Provenance is information describing the origin and sequence of steps that produced a result or movement of data.

Provenance records where a result or data movement came from and which steps produced it. It turns an unexplained answer into an inspectable explanation: why an account reached a sales organization, why traffic passed a firewall, or where a test fixture originated. section 8.6 section 8.2

Two practical designs make provenance visible:

  • Return a result that carries both the decision and its explanation, such as matched, expected, and found values. section 8.6
  • Generate integration-test inputs inside the test, so assertions connect to declared data rather than an unexplained hard-coded file. section 12.2
  • Preserve the same rule data while changing the interpreter, allowing increasingly detailed explanations without changing the rules themselves. section 8.6

Explaining a failed rule

A rule may require country=US, while an account contains country=BE. Instead of returning only false, the evaluator returns matched=false, expected=(country=US), and found=(country=BE). Compound AND, OR, and NOT rules can preserve the same structure across the whole decision.

Making test data traceable

Rather than loading path/to/report.csv, a test generates rows, selects the relevant subset, serializes the rows, uploads the resulting file, and compares ingested accounts with expected identifiers. The same approach can scale to much larger inputs.

How Data-Oriented Programming in Java covers it

How deep it goes
Builds result types and interpreters for nested explanations, while stopping short of solving raw-string compile-time safety.
Examples
Shows rule explanations for account assignment and generated CSV fixtures whose expected identifiers remain visible in the test.
What it assumes
Assumes intermediate Java knowledge and introduces records, pattern matching, interpreters, and data-oriented rule modeling as implementation tools.
What you can do after
Build interpreters that report why rules matched or failed, and create integration tests with explicit, scalable input provenance.
How it connects
Connects interpreters with business rules, data orientation, integration testing, and generated test data.

Also explained in

Compare how 18 books explain provenance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data-Oriented Programming in Java. The section links point to the parts of the book it draws on.