Skip to content

test(backend): establish contract-compatible API fixtures and consumer checks #70

Description

@arisu6804

Problem

Client behavior is vulnerable to unnoticed changes in error shapes, precision fields, pagination metadata, and transaction status values.

Objective

Deliver a production-quality improvement to API schemas, fixtures, and service consumers that creates measurable value for correctness, security, reliability, performance, or maintainability.

Implementation scope

  • Create versioned success and error fixtures for core vault operations.
  • Validate required fields, enum values, numeric precision, and pagination contracts in CI.
  • Exercise at least one realistic consumer against the generated contract.

Acceptance criteria

  • Breaking response changes fail CI with an actionable diff.
  • Fixtures cover success, validation, authorization, provider failure, and pending states.
  • The checks run deterministically without external chain access.

Required validation

  • Schema validation, consumer contract tests, and CI execution using isolated deterministic fixtures.
  • Existing tests and CI remain passing.
  • Add regression coverage for the original failure mode.
  • Do not weaken, delete, or skip unrelated tests to obtain a green build.

PR quality bar

  • Keep the PR focused on this issue and explain design tradeoffs.
  • Include test evidence, compatibility impact, and migration or rollout notes where relevant.
  • Avoid typo-only, documentation-only, cosmetic-only, or unrelated refactor submissions.

Out of scope

  • Broad rewrites not required by the acceptance criteria.
  • Changes to unrelated services, contracts, or user flows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GRANTFOX OSSOpen-source issue tracked by GrantFoxMAYBE REWARDEDThis issue may carry a rewardThird CampaignThird Campaign contributionenhancementNew feature or requestpriority:mediumMedium implementation priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions