Skip to content

test(contract): add fuzz invariants for escrow, expiry, and balance accounting #192

Description

@arisu6804

Problem

Example tests do not cover combinations of expiry, refunds, partial settlement, and large amounts.

Objective

Deliver a production-quality improvement to contract property and lifecycle test suite that creates measurable value for correctness, security, reliability, performance, or maintainability.

Implementation scope

  • Generate lifecycle sequences and assert escrow conservation, monotonic status, safe expiry, and checked arithmetic.

Acceptance criteria

  • Fuzz failures are reproducible; all lifecycle paths participate; invariants remain enabled in CI.

Required validation

  • Deterministic fuzz tests and minimized regression 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 and explain design tradeoffs, compatibility impact, and test evidence.
  • 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

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