Skip to content

Development

Layout

  • <Worker>/ -- one directory per worker: src/, tests/, config/config.json, scripts/*.py, its own versions.env + CHANGELOG.md.
  • @common/scripts/ -- shared deployment tooling (same files as market-data-workers/@common/scripts, including schedule_trigger.py for the platform's Trigger service).
  • shared/ -- source compiled into several workers: per-venue names classes and the golden wire test helper (shared/tests/WireGolden.cs).
  • naming/ -- the venue fragments this repo owns (virtufin.venue.<venue>.yaml), rendered into the Naming page by the docs workflow.
  • docs/ -- this MkDocs site.
  • versions.env -- docs-only pin (API_VERSION=v1; each worker has its own LIBRARY_VERSION, no lockstep across workers).
  • Virtufin.PortfolioWorkers.slnx -- solution for the C# worker projects.

Build & test

dotnet build Virtufin.PortfolioWorkers.slnx
dotnet test Virtufin.PortfolioWorkers.slnx

Publishing

Per-worker CI workflow (.github/workflows/<worker>-nuget.yaml), each a thin caller of common's execution-worker-nuget-common.yaml: tests, then dotnet publish (which produces the worker nupkg via Worker.DevKit's VirtufinPackageWorker target, not a plain dotnet pack output, into build/<project>.nupkg/), then pushes to the Gitea NuGet feed, failing loudly if the version is already published.

Versioning

Each worker directory is versioned independently (its own versions.env + CHANGELOG.md), matching the other worker repos.

Conventions

  • Every worker's .csproj sets VirtufinPackageWorker (Worker.DevKit's shared packaging target) -- don't hand-roll packaging per worker.
  • A portfolio worker observes only: no order placement, amendment or cancellation, ever. Order and position lifecycle belong to the executors.
  • Keep a worker's pure logic (account state, JSON decode/encode) separate from its CloudEvent glue, so the former is unit-testable without any codec/engine machinery.
  • A worker binds explicit topics per instance -- never a wildcard.
  • Credentials come from worker secrets by reference, never from config or environment variables.

See AGENTS.md for the full set of repo-specific conventions.