OrderKit (C# / .NET 8) is the order domain and client. It calls the pricing-service (Python 3.12) over HTTP to get the tier/volume/promo discount and the channel/region tax of an order. The two languages are one working app, built and tested from the repository root.
C# OrderKit (csharp/) Python pricing-service (python/)
┌───────────────────────────┐ POST /quote (JSON) ┌────────────────────────────────┐
│ Order, OrderLine, ... │ ────────────────────▶ │ pricing_service.server │
│ PythonPricingClient │ ◀──────────────────── │ -> PricingRules + TaxTable │
│ (Services/OrderKit.Pricing)│ quote JSON │ (packages/domain/orderlab) │
└───────────────────────────┘ GET /health └────────────────────────────────┘
contract: contracts/pricing-quote.schema.json
- Who calls whom: C# → Python, over HTTP.
PythonPricingClient.QuoteAsync(order, channel, region, promo)(csharp/src/Services/OrderKit.Pricing/PythonPricingClient.cs) sends tier, units, channel, region and subtotal; the Python service (python/services/pricing_service/src/pricing_service/server.py) answers with discount rate, net, tax and total. OrderKit tierplatinummaps to Pythongold. - Contract:
contracts/pricing-quote.schema.json(request and response fields). Both test suites check it. - Start the service by hand:
make serve-pricing(port 8081) orpython python/serve_pricing.py [port].
make build # python venv + pinned deps + editable install, then dotnet restore/build of OrderKit.sln
make test # pytest (python/), then dotnet test (csharp/)
make test includes the cross-language tests:
| Test | What it exercises |
|---|---|
csharp/tests/OrderKit.Tests/PythonPricingIntegrationTests.cs |
Spawns the real Python service as a subprocess and calls it through PythonPricingClient (gold/platinum tier, promo stacking, 422 error path) |
python/tests/test_pricing_http_integration.py |
Runs the real HTTP server and checks the response against the shared contract, plus 400/422 error paths |
The C# integration tests find Python through the PYTHON variable (the Makefile points it at the venv);
REQUIRE_PYTHON=1 makes them fail instead of skip when Python is missing.
Requirements: Python 3.12, .NET SDK 8 (csharp/global.json), GNU make.
.
├── Makefile, README.md, dataset.json, contracts/
├── .github/workflows/ci.yml one workflow: builds and tests both languages, then runs the tool audits
├── python/ pyproject.toml, packages/, services/, tests/, infra/, Tool-Triggering-Synthetic-Data/
└── csharp/ OrderKit.sln, src/, tests/, infra/, Tool-Triggering-Synthetic-Data/
Each language keeps its own folder and its own planted tool triggers and version pins
(Python 3.12 pins in python/, .NET 8 / planted NuGet CVEs in csharp/).
dataset.json at the root is the one dataset for the repository: it covers both languages and the
integration. python/dataset.json and csharp/dataset.json are sub-datasets (per-language
tool maps) that the language tool runners read; they are not separate projects.
- The
Tool-Triggering-Synthetic-Datafolder name has no spaces or parentheses; audit scripts and ToolRunner reference it by this exact name. - The C# tool runner is not vendored: CI checks it out separately and runs it with
REPO_ROOT=csharp.