Development
Layout
<Worker>/-- one directory per worker:src/,tests/,config/config.json, its ownversions.env+CHANGELOG.md.shared/-- source compiled into several workers: per-venue names classes and the golden wire test helper (shared/tests/WireGolden.cs).- No
naming/: the worker types are declared in each venue's fragment (virtufin.venue.<venue>), which market-data-devkit owns. docs/-- this MkDocs site.versions.env-- docs-only pin (API_VERSION=v1; each worker has its ownLIBRARY_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 worker-nuget-common.yaml (worker_name: <Worker>):
tests, then virtufin-worker build <Worker> (dotnet publish, whose
Worker.DevKit VirtufinPackageWorker target writes the worker nupkg to
build/<Worker>/, not a plain dotnet pack output), then
virtufin-worker publish <Worker>, which fails loudly if the version is
already published. Locally, the same
commands build and publish a worker
(common/AGENTS.md#worker-cli).
Versioning
Each worker directory is versioned independently (its own
versions.env + CHANGELOG.md), matching the other worker repos.
Conventions
- Every worker's
.csprojsetsVirtufinPackageWorker(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.