feat: operational resource procurement facility

Implement RESOURCE-WP-0005: entity register, V0.1 terms parameters,
entity association on inventory and planning records, transfer-price
and credit-state arithmetic, monthly settlement, and entity views on
the portfolio report. Live close emits nothing until delivered cost
is known. Handoffs are FIN-WP-0006 and RAILIANCE-WP-0017.
This commit is contained in:
tegwick 2026-08-14 13:15:02 +02:00
parent 325a505980
commit f8d1c542d5
37 changed files with 1316 additions and 28 deletions

View file

@ -3,6 +3,10 @@
"record_id": "forecast:apps-pg:2026-09:base:v1",
"record_type": "forecast",
"resource_id": "resource:railiance:apps-pg",
"financial_entity_id": null,
"procuring_entity_id": "entity:railiance",
"entity_gap": "shared platform service; coulomb share is allocated, no single consumer",
"transfer_price": null,
"resource_class": "shared_platform_service",
"period": "2026-09",
"created_at": "2026-08-14T00:00:00Z",

View file

@ -0,0 +1,54 @@
{
"schema_version": "0.1",
"terms_version": "0.1",
"entities": [
{
"id": "entity:binky",
"display_name": "Binky",
"role": "umbrella",
"credit_limit_eur": "1000.00",
"account_ref": null,
"status": "active"
},
{
"id": "entity:frontier",
"display_name": "Frontier",
"role": "consumer",
"credit_limit_eur": "1000.00",
"account_ref": null,
"status": "active"
},
{
"id": "entity:railiance",
"display_name": "Railiance",
"role": "provider",
"credit_limit_eur": null,
"account_ref": null,
"status": "active"
},
{
"id": "entity:netkingdom",
"display_name": "Netkingdom",
"role": "consumer",
"credit_limit_eur": "1000.00",
"account_ref": null,
"status": "active"
},
{
"id": "entity:helixforge",
"display_name": "Helixforge",
"role": "consumer",
"credit_limit_eur": "1000.00",
"account_ref": null,
"status": "active"
},
{
"id": "entity:coulomb",
"display_name": "Coulomb",
"role": "consumer",
"credit_limit_eur": "1000.00",
"account_ref": null,
"status": "active"
}
]
}

View file

@ -2,6 +2,9 @@
"schema_version": "0.2",
"record_scope": "inventory",
"id": "resource:railiance:apps-pg",
"financial_entity_id": null,
"procuring_entity_id": "entity:railiance",
"entity_gap": "shared allocation; coulomb-social maps to entity:coulomb; vergabe-teilnahme has no financial entity",
"resource_class": "database",
"status": "active",
"management_model": "self_managed",
@ -104,7 +107,13 @@
"mode": "shared",
"cost_attribution_key": "platform:apps-pg",
"driver": "database_gb",
"method_version": "apps-pg-dbbytes-v1"
"method_version": "apps-pg-dbbytes-v1",
"entity_shares": [
{
"financial_entity_id": "entity:coulomb",
"note": "coulomb-social database_gb share 0.5386 under apps-pg-dbbytes-v1"
}
]
}
},
"cost": {

View file

@ -1,6 +1,10 @@
{
"schema_version": "0.2", "record_scope": "inventory",
"id": "resource:tenant:friendly:binky:rapp-qonto", "resource_class": "self_managed_service",
"id": "resource:tenant:friendly:binky:rapp-qonto",
"financial_entity_id": "entity:binky",
"procuring_entity_id": "entity:railiance",
"entity_gap": null,
"resource_class": "self_managed_service",
"status": "active", "management_model": "shared_capacity",
"provider": {"name": "Railiance", "account_ref": null, "product_ref": "rail-knative", "provider_resource_id": "knative:rapp-qonto/rapp-qonto"},
"service": {"name": "Binky Qonto assistant", "service_id": "rapp-qonto", "class": "tenant Knative application with dedicated egress proxy", "capacity_model": "elastic"},

View file

@ -1,6 +1,10 @@
{
"schema_version": "0.2", "record_scope": "inventory",
"id": "resource:tenant:coulomb:coulomb-social", "resource_class": "self_managed_service",
"id": "resource:tenant:coulomb:coulomb-social",
"financial_entity_id": "entity:coulomb",
"procuring_entity_id": "entity:railiance",
"entity_gap": null,
"resource_class": "self_managed_service",
"status": "active", "management_model": "shared_capacity",
"provider": {"name": "Railiance", "account_ref": null, "product_ref": "coulomb-social", "provider_resource_id": "kubernetes:coulomb-social/deployment/coulomb-social"},
"service": {"name": "Coulomb Social production", "service_id": "coulomb-social", "class": "tenant application", "capacity_model": "shared"},

View file

@ -1,6 +1,10 @@
{
"schema_version": "0.2", "record_scope": "inventory",
"id": "resource:hosteurope:railiance01", "resource_class": "compute_instance",
"id": "resource:hosteurope:railiance01",
"financial_entity_id": null,
"procuring_entity_id": "entity:railiance",
"entity_gap": "no allocation driver; cost remains a Railiance residual",
"resource_class": "compute_instance",
"status": "active", "management_model": "provider_managed",
"provider": {"name": "Host Europe", "account_ref": null, "product_ref": null, "provider_resource_id": null},
"service": {"name": "railiance01", "service_id": "railiance01", "class": "virtual server", "capacity_model": "fixed"},

View file

@ -2,6 +2,9 @@
"schema_version": "0.2",
"record_scope": "inventory",
"id": "resource:platform:audit-storage",
"financial_entity_id": "entity:railiance",
"procuring_entity_id": "entity:railiance",
"entity_gap": null,
"resource_class": "storage",
"status": "proposed",
"management_model": "provider_managed",

View file

@ -1,6 +1,10 @@
{
"schema_version": "0.2", "record_scope": "inventory",
"id": "resource:railiance:forgejo", "resource_class": "shared_platform_service",
"id": "resource:railiance:forgejo",
"financial_entity_id": null,
"procuring_entity_id": "entity:railiance",
"entity_gap": "no allocation driver; cost remains a Railiance residual",
"resource_class": "shared_platform_service",
"status": "active", "management_model": "self_managed",
"provider": {"name": "Railiance", "account_ref": null, "product_ref": "forgejo-11.0.3", "provider_resource_id": "kubernetes:forgejo/deployment/forgejo-gitea"},
"service": {"name": "Forgejo source and package forge", "service_id": "forgejo", "class": "shared source forge and package registry", "capacity_model": "shared"},

View file

@ -1,6 +1,10 @@
{
"schema_version": "0.2", "record_scope": "inventory",
"id": "resource:railiance:reef-railiance:k3s", "resource_class": "kubernetes_capacity",
"id": "resource:railiance:reef-railiance:k3s",
"financial_entity_id": null,
"procuring_entity_id": "entity:railiance",
"entity_gap": "no allocation driver; cost remains a Railiance residual",
"resource_class": "kubernetes_capacity",
"status": "active", "management_model": "self_managed",
"provider": {"name": "Railiance", "account_ref": null, "product_ref": "k3s", "provider_resource_id": "k3s://239.62.205.92.host.secureserver.net"},
"service": {"name": "reef-railiance k3s", "service_id": "reef-railiance", "class": "single-node Kubernetes runtime", "capacity_model": "shared"},

View file

@ -0,0 +1,15 @@
{
"schema_version": "0.1",
"terms_version": "0.1",
"currency": "EUR",
"markup_rate": "0.20",
"railiance_self_markup_rate": "0.00",
"settlement_period": "calendar_month",
"payment_term_days": 10,
"interest_rate_per_year": "0.05",
"interest_convention": "simple_monthly",
"default_credit_limit_eur": "1000.00",
"restricted_monthly_consumption_eur": "50.00",
"procuring_entity_id": "entity:railiance",
"labor_rate_eur_per_hour": "60.00"
}