Skip to main content

Terragnos Core Engine v2 Release Notes

Main news

  • Bitemporal model & time-travel - new object_versions table and object_geometries.valid_from/valid_to fields ensure that all lister and layer endpoints can be read with ISO 8601 asOf parameters. The objects_as_of(ts) view and the ObjectsService/LayersService CTE return the same state for REST, GraphQL, and federated requests.
  • Event outbox and at-least-once delivery - the OutboxService on the API side calculates a deterministic idempotency key, and the worker OutboxFlusherService pushes the events to the Postgres message queue with an exponential reset (max. 5 attempts). New integration tests (apps/api/test/object-lifecycle.spec.ts) demonstrate retry/fail paths.
  • Workflow/Rule versioning + Explain APIworkflow_versions/rule_versions tables pin the running definition, assignments/bindings can optionally point to a specific version, and explain endpoints return a full guard/rule trace.
  • Spatial constraints & quota tracking - in the spatial_constraints table, meta information can be used to describe which geometries are allowed; in the tenant_usage_counters table, we measure object, workflow and query operations (auditing and entitlement preparation) with soft limits.
  • Sensitive fields & SDK updates - property-level sensitive/encryptionPolicy flag masks REST responses, admin SDKs return them with describeObjectTypeSensitiveFields helper, which fields require a UI warning. In addition, all SDKs support the asOf parameter, the If-Match header and the rule/workflow explain helper methods.
  • Load/perf baseline tooling - the pnpm --filter @terragnos/api perf:objects script helps to look for regression on /v1/objects endpoints with average/p95/RPS indicators.

Migration guide

  1. Dependencies - pnpm install, then update the OpenAPI/GraphQL schema (pnpm --filter @terragnos/api run openapi) and SDKs (pnpm generate:sdk) to include the new endpoints.
  2. Database – run v2 migrations (most important: 010_event_outbox.sql, 011_bitemporal_model.sql, 014_spatial_constraints.sql, 015_tenant_usage_counters.sql). pnpm db:migrate is sufficient in a development environment, manual review of the migration SQLs is also recommended on production systems.
  3. Applications – rebuild and restart the API and worker (pnpm dev:api, pnpm dev:worker), then check the worker log to make sure the outbox flusher doesn't fail.
  4. Test & perf – run docker integration tests (pnpm --filter @terragnos/api test). Optionally measure baseline performance with the new perf:objects script: pnpm --filter @terragnos/api perf:objects -- --iterations=100 --concurrency=10.

Testing

  • Unit – relations service, workflow action registry, spatial constraints, schema-registry mask helper, usage tracking.
  • Integration – Docker's object lifecycle scenario covers time-travel listing, sensitive field masking, quota counters, and outbox retry and deduplication routes.
  • Contract - test/contracts.spec.ts invariably generates and compares OpenAPI and GraphQL schemas in a headless way, so the SDK pipeline always stays in sync.

Release checklist

  • pnpm install
  • pnpm db:migrate
  • pnpm --filter @terragnos/api run openapi
  • pnpm generate:sdk
  • pnpm dev:api / pnpm dev:worker
  • Tests: pnpm --filter @terragnos/api test (Docker required for integration)
  • (Optional) pnpm --filter @terragnos/api perf:objects -- --iterations=100 --concurrency=10