Skip to main content

RFC-010: Versioning

FieldValue
RFC010
TitleVersioning
StatusProposed
Depends onRFC-001
Updates

Abstract

This document defines versioning rules for PTI specifications, API endpoints, event catalogues, report schemas, and exchange packages. It establishes semantic versioning policy, deprecation timelines, and backward-compatibility requirements for conforming implementations.

Motivation

Trust infrastructure evolves as contexts, event types, and regulatory requirements grow. Without normative versioning, independent implementations fragment and federation breaks silently.

Background

PTI uses layered version identifiers: specification release (e.g., v1.0), API path version (/v1/), schema package_version, and derivation rule versions (@v3). This RFC harmonizes change management across layers.

Terminology

TermDefinition
Major changeBreaking incompatible change requiring consumer action
Minor changeBackward-compatible additive change
Patch changeClarification or non-functional fix
DeprecationAnnounced removal with sunset date
SunsetDate after which support ends

Specification

1. Semantic versioning

Published PTI specifications MUST use MAJOR.MINOR.PATCH:

  • MAJOR — incompatible API or schema changes
  • MINOR — additive fields, new event types, new optional endpoints
  • PATCH — documentation fixes, non-normative clarifications

2. API versioning

  • Public URLs MUST include major version prefix (/v1/).
  • Minor API additions MUST remain within same major path.
  • Breaking changes MUST increment major version and maintain prior major for deprecation window.

3. Schema evolution rules

Change typeAllowed in minor?Client requirement
New optional JSON fieldYesMUST ignore unknown fields
New required JSON fieldNo (major)MUST update client
Relaxed validationYes
Tightened validationNo (major unless flagged)MUST update producer
Removed fieldNo (major)MUST migrate

Clients MUST follow Postel's law: be conservative in sending, liberal in receiving.

4. Event catalogue versioning

  • Event catalogue MUST expose catalogue_version.
  • New event_type additions are minor changes.
  • Payload schema breaking changes MUST use new event_type suffix or major catalogue bump.

5. Report and evidence versions

  • trust_intelligence reports MUST include schema_version (e.g., trust_intelligence.v1).
  • Evidence manifests MUST include package_version per RFC-006 and RFC-012.
  • Verification MUST reject unknown major schema versions.

6. Deprecation policy

AssetMinimum deprecation notice
API major version12 months
Event type6 months with migration guide
Report schema field6 months (minor) or parallel major
Exchange profile12 months

Deprecated features MUST return Deprecation header with sunset date.

7. Federation compatibility

Operators MUST publish supported package_version and schema_version ranges in federation metadata. Receiving operators MUST negotiate down or reject incompatible packages explicitly.

8. Conformance version pinning

Certification MUST declare PTI specification version tested. Implementations MAY support multiple major API versions concurrently during deprecation window.

Security Considerations

  • Removing security fields MUST be treated as major change with accelerated migration guidance.
  • Version downgrade attacks MUST be blocked; APIs MUST NOT serve weaker schema to newer clients without explicit opt-in.

Privacy Considerations

  • New fields collecting PII MUST trigger privacy review and minor version note in changelog.
  • Erasure workflows MUST remain functional across minor upgrades.

Examples

Deprecation header

Deprecation: true
Sunset: Sat, 01 Jul 2028 00:00:00 GMT
Link: </v2/reports/generate>; rel="successor-version"

Event type migration

loan_repayment v1 payload adds optional channel. v2 requires channel → introduced as new catalogue major with dual acceptance period.

Implementation Notes

  • Automate compatibility tests in CI against golden fixtures per version.
  • Maintain public changelog with RFC references.
  • Feature flags SHOULD NOT bypass version contract in production federation paths.

Future Work

  • Machine-readable compatibility matrix between operators
  • Automated client SDK generation from versioned OpenAPI
  • Long-term support (LTS) designation for government deployments