Skip to content

Commit 9476493

Browse files
authored
feat: Rewrite seed-demo to use ApplyManifest for structural provisioning (#1693)
* feat: Rewrite seed-demo to use ApplyManifest for structural provisioning Add volterra-energy-demo.json manifest containing all structural resources: instruments (GBP, KWH, CARBON_CREDIT), account types (ENERGY_TRADING, INVENTORY_KWH, CARBON_INVENTORY, SETTLEMENT), market data source (SEED_DEMO) and dataset (WHOLESALE_ENERGY_GBP_KWH), valuation rules, organizations (UK Power Networks DNO + 4 Grid Supply Points), and GSP KWH inventory internal accounts. Replace direct RegisterInstrument, CreateDraft/ActivateAccountType, RegisterDataSource/RegisterDataSet, and createGSPInternalAccounts calls in seed-demo with a single ApplyManifest call. Idempotent reapply returns NO_CHANGE for structural resources. Keep operational seeding via direct gRPC: customer party registration, current account creation, balance deposits, and price observations remain runtime data outside the manifest. After manifest apply, GSP internal account IDs are resolved by account code and the DNO party ID is resolved by external reference, replacing the previous approach of creating these resources imperatively. * fix: Address CodeRabbit review feedback on seed-demo manifest rewrite - Add pagination loop to resolveOrganizationPartyID to avoid false not-found errors in tenants with more than 100 parties - Add CARBON_MARKET dataset to volterra-energy-demo.json so the CARBON_CREDIT→GBP valuation rule references a declared data source rather than an undefined code --------- Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>
1 parent 862f3fd commit 9476493

2 files changed

Lines changed: 367 additions & 391 deletions

File tree

0 commit comments

Comments
 (0)