Apache Sourcelume Registry: reference registry for AI training-data provenance records

Clone this repo:
  1. a1292b2 Merge pull request #27 from CalvinKirs/fix/immutable-record-type by Achim Nierbeck · 25 hours ago main
  2. 438441e Merge pull request #26 from vignesh-manel/cleanup/typedefs-path-and-stale-notes by Achim Nierbeck · 25 hours ago
  3. df0bf87 Reject record type changes for incomplete records by Calvin Kirs · 28 hours ago
  4. 9965eec List sourcelume_model in the demo's overview too by Vignesh Nayak Manel · 28 hours ago
  5. f37c151 Read the typedefs path from config and drop stale notes by Vignesh Nayak Manel · 28 hours ago

Apache Sourcelume Registry (sourcelume-registry)

Overview

The Apache Sourcelume Registry persists, indexes, and queries signed Sourcelume provenance records for AI training datasets.

Per the dev-list consensus (September 2026, thread “Apache Sourcelume Registry repo creation, and initial discussion”) the codebase is organized as a framework-independent Core/API with Runtime modules layered on top:

  • Java 21 baseline (latest LTS)
  • Adapter isolation: backend operations behind a backend-neutral AtlasAdapter SPI; only Sourcelume types in the interface, no backend SDK types in the core
  • Pluggable record validation: a RecordValidator SPI in the core; validation stages ship as separate plugin modules discovered via ServiceLoader, wired into the Quarkus runtime (fail-on-start) and exposed as a pre-flight POST /records/validate endpoint (see docs/validation.md). The spec's record types are supported end to end: ProvenanceRecord persists as sourcelume_dataset, TrainingProvenanceRecord as sourcelume_model (see docs/ingest.md)
  • CDI-style runtime, leaning Quarkus (see dev-list thread)

Layout

ModulePurpose
sourcelume-registry-typedefsBackend type definitions (JSON resources)
sourcelume-registry-commonDTOs mapped from sourcelume-spec, Jakarta Validation annotations, exceptions, spec resource loader — framework-free (Jakarta API + Jackson only)
sourcelume-registry-coreBackend-neutral AtlasAdapter SPI (API), the RecordValidator validation SPI, and the ingest SPI (IngestService) — no framework, no backend SDK dependencies
sourcelume-registry-validation-jsonschemaValidation plugin: “json-schema” stage (networknt, draft 2020-12, format assertions)
sourcelume-registry-validation-shaclValidation plugin: “shacl” stage (Apache Jena, offline context inlining)
sourcelume-registry-atlas-adapterThin REST AtlasAdapter implementation over the core SPI (JDK HttpClient), used by the Quarkus REST runtime
sourcelume-registry-runtime-quarkusQuarkus REST runtime: dataset and type REST APIs (/api/v1/datasets, /api/v1/types), ingest endpoints (POST /records, GET /records/{id}), pre-flight validation endpoint, startup bootstrap (spec verification + typedef registration), SmallRye Health readiness, Docker packaging

Runtime modules build on the framework-free core as separate modules and own their framework dependencies (the Quarkus BOM is imported in the runtime module only). Validation follows the same principle: the core defines the RecordValidator chain, the plugin modules own their validation machinery (networknt, Jena) — see docs/validation.md for the architecture, the shipped stages, and the parity rationale against the Python reference validator (sourcelume-spec tools/validate.py).

Building

Requires JDK 21 and Maven 3.9+. The sourcelume-spec artifact must be available (build apache/sourcelume-spec first with mvn install, see its SETUP.md).

mvn clean install

On Windows, see the “Running on Windows” section of dev-support/README.md for WSL2/Git Bash/PowerShell guidance.

Running the Quarkus runtime

Against a local Atlas (default http://localhost:21000, see dev-support/README.md for standing one up):

mvn -pl sourcelume-registry-runtime-quarkus quarkus:dev

Or as a container next to Atlas via the shared sourcelume-network:

mvn clean package
docker compose build
docker compose up -d

Health & Observability

  • Readiness (Atlas connectivity): http://localhost:8082/q/health/ready
  • Liveness probe: http://localhost:8082/q/health/live
  • Prometheus metrics: http://localhost:8082/q/metrics
  • OpenAPI document: http://localhost:8082/q/openapi
  • Swagger UI: http://localhost:8082/q/swagger-ui

Configuration lives under the sourcelume.atlas.* properties (sourcelume-registry-runtime-quarkus/src/main/resources/application.properties).

REST API Endpoints

The Quarkus runtime exposes REST endpoints on port 8082:

Datasets (/api/v1/datasets)

Read-only views. A record is written only via POST /records; the dataset endpoints read what it stored.

# Publish a dataset record (the only way to write one)
curl -s -X POST http://localhost:8082/records \
  -H "Content-Type: application/ld+json" \
  --data-binary @examples/simple-demo/sample-provenance-record.jsonld | jq .

# Query by qualifiedName (the record's id; query parameter)
curl -s "http://localhost:8082/api/v1/datasets?qualifiedName=https://sourcelume.apache.org/records/rec-glasgow-hackathon-001" | jq .

# Query by internal Atlas GUID
curl -s "http://localhost:8082/api/v1/datasets/guid/<ASSIGNED_GUID>" | jq .

Types & Models (/api/v1/types)

# Inspect all registered Sourcelume typedefs
curl -s http://localhost:8082/api/v1/types/typedefs | jq .

# Inspect the sourcelume_dataset entity definition
curl -s http://localhost:8082/api/v1/types/dataset | jq .

# Inspect the sourcelume_model entity definition
curl -s http://localhost:8082/api/v1/types/model | jq .

Examples

  • Simple Demo (examples/simple-demo): A self-contained, automated walkthrough (referencing the Community Over Code Glasgow 2026 Hackathon) demonstrating registry health verification, Atlas typedef inspection, dataset registration, and query resolution. See examples/simple-demo/README.md.

Get involved

License

This project is licensed under Apache License, Version 2.0.