Context
apiContractSnapshots.ts guards backward compatibility for critical public endpoints (Issue #711). Snapshots currently cover only GET /health and GET /ready.
Problem / Gap
High-traffic vault and transaction list endpoints can break mobile and frontend clients silently. CI does not detect response-shape regressions on /api/v1/vault/* or transaction listing routes.
Proposed approach
- Add Zod schemas and committed JSON snapshots for vault summary and paginated transaction list responses.
- Extend
backend/scripts/check-schema-snapshots.ts and CI workflow to validate new endpoints.
- Document the snapshot update workflow in backend README or governance docs.
Acceptance criteria
Files/areas affected
backend/src/apiContractSnapshots.ts
backend/schema-snapshots/
backend/scripts/check-schema-snapshots.ts
.github/workflows/backend-governance.yml
Context
apiContractSnapshots.tsguards backward compatibility for critical public endpoints (Issue #711). Snapshots currently cover onlyGET /healthandGET /ready.Problem / Gap
High-traffic vault and transaction list endpoints can break mobile and frontend clients silently. CI does not detect response-shape regressions on
/api/v1/vault/*or transaction listing routes.Proposed approach
backend/scripts/check-schema-snapshots.tsand CI workflow to validate new endpoints.Acceptance criteria
Files/areas affected
backend/src/apiContractSnapshots.tsbackend/schema-snapshots/backend/scripts/check-schema-snapshots.ts.github/workflows/backend-governance.yml