Skip to content

Independent R&D project · Cologne

Applied research overview

Provenance and custody

AnyTrace

A record of where a thing has been is only as good as its ability to absorb a report that arrives late, without rewriting what was already recorded.

Status: Research concept · unpublished prototype

The research question

How can the provenance and custody of a thing and its evidence stay reconstructable as events arrive, late and out of order, from different systems and organisations?

  • Where did it come from?
  • What happened to it?
  • Who held it, and from when?
  • Which evidence entered the trace, and when?

The model, interactively

A lot of green coffee moves from a cooperative to an export warehouse to a ship. The warehouse reports its receipt six hours late, after the ship has already recorded loading. Choose an ordering, then select an event.

Order events by

Select an event to see who held the lot before and after it, and what evidence came with it.

Export warehouse

Happened
10:00
Recorded
16:00
Previous holder
Cooperative
Next holder
Shipping line
Evidence attached
Warehouse receipt
Reported by
Warehouse report, sent late

Appended to the chain at 16:00 with its real time, 10:00. It enters the reconstruction in its place, and the chain still shows when it arrived. The current holder does not move back: a late report of an earlier movement does not mean the lot went back.

One scenario, step by step

What the system records when custody reports arrive out of order.

Step 1 of 5: Register the lot

  1. The lot becomes a trace case with its identifiers. Nothing is known about custody yet, and the projection says so.

  2. A custody event at 09:00. The chain gains one entry; the current holder becomes the cooperative.

  3. A custody event at 14:00 from the carrier. The current holder becomes the shipping line.

  4. At 16:00 the warehouse reports a receipt at 10:00. It is appended at the end of the chain with its real time and is_current = false, because it is older than the holder already recorded.

  5. Read by time, the custody runs cooperative, warehouse, ship. Read by chain, the late report is visibly late. Both readings come from the same records, and neither was edited.

Core primitives

  • Traceable entity

    AnyTraceEntity + kernel case

    The thing being followed, with its identifiers and a projection of who holds it now. The truth is the event chain; the projection is a convenience.

  • Custody event

    custody.recorded

    A transfer with its real time, the previous and the next holder, and an explicit flag for whether it changed the current holder.

  • Evidence source

    attach_source

    What a source said about the thing, attached with its own custody and freshness, never overwritten.

  • Lineage link

    derived_from

    One traced thing made from another. Links are typed, so a graph walk can say how things relate, not only that they do.

  • Hash-chained timeline

    kernel_events

    Every event is appended with the hash of the one before, in arrival order. Reconstruction reads time; the chain keeps order.

  • Bounded graph walk

    graph, lineage

    The neighbourhood of a case to a stated depth, without payloads, and saying when it stopped early.

What makes it different

AnyVerify

Its question

Does the evidence support a specific claim?

Why this is not that

AnyTrace records where a thing has been and what was said about it. It does not decide whether any of it is true.

AnyValid

Its question

What did an authoritative source say, and is that still current?

Why this is not that

AnyTrace asks no authority anything. Its sources are the parties in the chain.

AnyDPP

Its question

How does evidence become a published passport?

Why this is not that

A passport is one possible output of a trace. AnyTrace ends at a reconstructable record.

What exists, and what does not

In the repository

  • app/products/anytrace/service.py: register, attach source, record custody, link, graph, lineage, close
  • anytrace_entities table, over the kernel's cases, events and evidence
  • 9 authenticated routes, 404 while the module is switched off
  • tests/any_family/test_anytrace.py: identity, late custody, lineage without payloads (20 tests)
  • tests/any_family/test_cross_module_reuse.py: one story across five modules from one graph walk

Research agenda, not built

  • Connectors that receive custody events from partner systems
  • Any evidence of behaviour on a large graph
  • Detection of contradictory custody, two holders at once

Where it sits in AnyLAI

AnyTrace

  • Application kernelAdds a vocabulary to the kernel's cases, chain, evidence and links; nothing of its own below that.
  • AnyVerifyA verification case links to the trace case it verifies.
  • AnyUSMCAEach bill-of-materials line points at the trace case of that input.
  • Any2DPPA mapping run links to the trace case whose data it maps.
  • COADFThe chain carries the audit record shape COADF's rule 6 names; this is influence, not a conformance claim.
  • case link through the kernel
  • direct use of another module or system
  • shadow-mode call: recorded, never executed

Limits and non-goals

  • It records what parties reported. It does not establish that any report is true.
  • It never reorders or edits the chain. Correction is a new event, not a change to an old one.
  • The graph walk is bounded and has not been run against a large graph.
  • No partner system sends it events today.

Current state

Research status

  • Research concept · unpublished prototype
  • Unpublished: routes switched off
  • No production use, no real data
  • 20 tests in the repository

A prototype module over the shared kernel: service, table, routes and tests exist in the repository. It is switched off, has no public route, and has not been used on real data.

Test suite: python-backend/tests/any_family/test_anytrace.py

Research project · Independent R&D · Not a commercial offering