Skip to content

End-to-end integration test suite across all three contracts #75

Description

@joelpeace48-cell

Problem

Even once each crate has unit tests, nothing exercises the three together. The
protocol's value is the composition — attest, meter, settle — and that is
where the interesting bugs live: mismatched assumptions at the seams between
contracts that each behave correctly alone.

What to do

Add an integration-tests workspace member registering all three contracts in
one Env:

  • Full happy path: register model → attest → meter → open escrow → window
    elapses → release. Assert balances and state at each step.
  • Dispute path: attest → meter → dispute raised → adjudicated split → both
    parties paid correctly.
  • Adversarial paths: metering an attestation twice, settling an escrow twice,
    disputing after the window, superseding an already-settled attestation.
  • Assert cross-contract invariants: total settled never exceeds total
    metered; every settlement traces to an attestation.

Acceptance criteria

  • Integration crate registering all three contracts
  • Happy path, dispute path, and adversarial paths covered
  • Cross-contract invariants asserted
  • Runs in CI on every pull request

Notes

The invariant assertions are the durable part. Individual test cases go stale;
"total settled never exceeds total metered" stays true for the life of the
protocol and will catch changes nobody thought to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSThird CampaignCampaign: Third Campaignarea:workspaceWorkspace, build, releasedifficulty:hardDesign judgement required; subtle failure modespriority:highNeeded for the next milestonetype:testTest coverage

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions