Automates the reconciliation of DDEX album submissions with IDAGIO's metadata database. Receives preprocessed DDEX data from LMS, reconciles entities against Alpaca, and ingests matched albums via Alpaca's ingestion API.
- Temporal Worker: Executes album reconciliation workflows
- HTTP API (TODO): Accepts workflow requests, exposes workflow state
- LMS (Label Metadata Service) - Source of preprocessed DDEX submissions
- Alpaca Service - Metadata database and ingestion API
- Temporal - Workflow orchestration
- Temporal (cloud vs self-hosted TBD)
Alpaca API types are generated from OpenAPI snapshots using go-swagger.
- Export the latest swagger spec from alpaca-service (
docs/swagger.yaml) - Save it to
upstream/alpaca/openapi/snapshots/<epoch-timestamp>.yaml(e.g.,1770155211.yaml) - Run
make generate-alpaca-types
The Makefile automatically uses the most recent snapshot (sorted numerically). Generated types live in upstream/alpaca/openapi/types/.
- GNU Make
- Go >= 1.25
- Docker or local install of Temporal (for local Temporal server)
cp .env.example .env
Then configure the environment variables in the .env file.
Local install MacOS:
brew install temporal
temporal server start # Start Temporal server
make worker # Start Temporal worker
make test # Run all tests
make test path=internal/temporal/workflows # Run tests for specific package
make worker # Start Temporal worker
TBD
TBD
TBD
There are two logging mechanisms, serving different purposes:
Verbose structured logs via activity.GetLogger(ctx), emitted to the worker's
stderr. Use for detailed debugging: raw API responses, search results, etc.
Set LOG_LEVEL=debug in .env to see debug-level output.
A concise trail of key events stored on the workflow's Temporal Memo under
"activity_log", viewable in the Temporal web UI for any workflow run. Designed
to give operators a quick overview of the decisions each activity made,
especially as activities incorporate LLM-backed reasoning.
al := memo.NewActivityLogger(ctx)
al.Append("label_matched", fmt.Sprintf("matched %q to ID %s", name, id))
return activities.Done(al, result), nilThe workflow unwraps each result and accumulates the log trail:
var fetchResult activities.WithLog[*lms.SubmissionMetadata]
err := workflow.ExecuteActivity(ctx, lmsAct.FetchLMSSubmission, id).Get(ctx, &fetchResult)
trail = append(trail, fetchResult.Log...)
_ = workflow.UpsertMemo(ctx, map[string]interface{}{"activity_log": trail})