InfraForge Docs

InfraNotes Project Finance · v0

Welcome

Select a document from the sidebar to read it.

Release 5 Dev 2 Handoff

Project Finance now exposes service-owned reconciliation facts for migration validation dashboards.

API

GET /api/project-finance/migration-validation/reconciliation

Authentication, tenant isolation, RLS, and gateway entitlement behavior follow the existing Project Finance API contract.

The response includes:

  • facts: portfolio control totals and milestone billing counts.
  • freshness: portfolio_projects and milestones recency records.
  • degraded: true when sources are missing/stale or portfolio totals exclude mixed-currency projects.
  • degraded_reasons: machine-readable reason strings such as milestones:missing or portfolio_projects:mixed_currency.

Money facts include exact minor-unit values (amount_minor), major-unit strings (amount), and currency. Count facts use count.

Fact Keys

  • portfolio.project_count
  • portfolio.control_project_count
  • portfolio.mixed_currency_project_count
  • portfolio.total_budget
  • portfolio.burn_amount
  • portfolio.committed_amount
  • portfolio.total_revenue
  • portfolio.forecast_variance_amount
  • milestones.total_count
  • milestones.unbilled_count
  • milestones.overdue_unbilled_count

Deterministic Seed

Run this only for internal validation tenants:

RELEASE5_SEED_TENANT_ID=<tenant-uuid> \
RELEASE5_SEED_USER_ID=<user-uuid> \
DATABASE_URL='postgres://...' \
make seed-release5-migration-validation

Optional variables:

  • RELEASE5_SEED_PROJECT_ID: deterministic by tenant when omitted.
  • RELEASE5_SEED_PROJECT_NAME: defaults to Release 5 Migration Validation Fixture.
  • RELEASE5_SEED_TIMEOUT: defaults to the Release 3 seed timeout.

The Release 5 seed intentionally reuses the tenant-scoped Release 3 control fixture because that fixture already creates the project, milestones, and active commitment data needed by the reconciliation endpoint. The wrapper gives Release 5 validation a dedicated command name and environment contract.

Rollback

The service change is additive. Rollback by deploying the previous PF image; no schema migration is required. Seeded fixture rows can be left in staging validation tenants or reset with the same deterministic seed command.