resource-control/docs/fin-hub-resource-control-contract-v0.1.md
tegwick f8d1c542d5 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.
2026-08-14 13:15:02 +02:00

65 lines
2.9 KiB
Markdown

# fin-hub ↔ resource-control contract v0.1 — resource-control ratification
Status: authority and schema boundary accepted on 2026-08-11
Fin-hub implementation reviewed: commit `0034330`
Workplans: `RESOURCE-WP-0003-T02`, `FIN-WP-0004`
The jointly reviewed contract is maintained in fin-hub at
`docs/fin-resource-authority-contract-v0.1.md`. This record is the
resource-control-side ratification and identifies the artifacts for which this
repository is authoritative.
## Authority
- fin-hub owns booked financial facts and corrections, tax and currency
treatment, budgets, commitments, burn, runway, and viability signals.
- resource-control owns resource identity and lifecycle, technical usage,
allocation evidence, demand and cost forecasts, and optimization evidence.
- workload and platform repositories remain authoritative for native workload
identity, service requirements, provisioning, operation, and source
telemetry.
- neither repository approves contracts, executes payment, or turns planning
evidence into booked spend.
## Artifacts
- `schemas/planning-evidence.schema.json` is the authoritative
resource-control outbound schema.
- `tools/financial_exchange.py forecast` converts the existing immutable
monthly backup forecast into canonical `ForecastEvidence` records.
- `tools/financial_exchange.py reconcile` validates fin-hub booked-cost
projections and compares attributable infrastructure cost by accounting
period. Booked facts are referenced projections here, never a second ledger.
- `schemas/monthly-resource-observation.schema.json` uses
`usage_observation` for technical observations. “Booked actual” is reserved
for fin-hub facts.
Fin-hub owns its outbound `BookedCostEvidence` executable schema. This
repository validates the contract fields and arithmetic it consumes, but does
not redefine financial authority.
## Internal settlement (RESOURCE-WP-0005)
`schemas/settlement-statement.schema.json` is the outbound shape for proposed
internal transfer charges. It is planning/settlement evidence, not a booked
fact. Join keys added by the facility:
- `financial_entity_id` (`entity:…`)
- `procuring_entity_id` (V0.1: `entity:railiance`)
- `period`, `terms_version`
A recognized internal payment, when it exists, is a fin-hub booked fact
joined by `financial_fact_id` + entity + period. resource-control never
clears outstanding from its own statement.
The consumption-mode signal (`open` | `restricted`, remaining transfer-price
allowance) is published for Railiance operations. It is not a fin-hub
budget. Handoff workplans: `FIN-WP-0006`, `RAILIANCE-WP-0017`.
## Acceptance boundary
The 12-row `platform:audit-storage` forecast can complete an idempotent
planning-evidence preflight before procurement. `FIN-WP-0004-T05` and the
operational round trip remain open until an attributable provider charge or
credit exists. Fixture or synthetic money may test the seam but cannot satisfy
that evidence gate.