Skip to content

Add a regression proving resolve_dispute cannot run while the protocol is paused or in maintenance mode #1722

Description

@Baskarayelu

📋 Description

resolve_dispute in dispute.rs can move escrowed funds toward a party. The protocol has require_not_paused (pause.rs) and require_write_allowed (maintenance.rs) gates, but there is no focused regression asserting dispute resolution respects both.

Why this matters: pause and maintenance exist to freeze fund movement during incidents. If dispute resolution slips past those gates, an operator's emergency freeze is incomplete. This locks the gate coverage for the dispute path specifically.

🎯 Requirements & Context

  • Add quicklendx-contracts/src/test_dispute_pause_maintenance.rs.
  • Open a dispute, set paused, assert resolve_dispute rejects with the pause error; unpause and assert success.
  • Repeat for maintenance mode via set_maintenance_mode.
  • Assert read paths like get_dispute_details remain callable while paused (consistent with read-only access policy).

Context & constraints

🛠️ Suggested Execution

git checkout -b test/dispute-pause-maintenance
cargo test -p quicklendx-contracts test_dispute_pause_maintenance -- --nocapture
cargo clippy -p quicklendx-contracts --all-targets -- -D warnings
  • Edge cases: paused AND maintenance both on; resolve succeeds after both cleared; reads unaffected.

Example commit message

test(disputes): assert resolve_dispute honors pause and maintenance gates

Locks that dispute fund movement is frozen during pause/maintenance while
reads stay available.

✅ Acceptance Criteria & Guidelines

Requirement Target
Pause + maintenance both asserted Required
Reads remain available Required
Coverage of gated path ≥ 95%
cargo clippy clean Required
Timeframe 96 hours from assignment

💬 Community & Support

Join Discord: https://discord.gg/VpngvTjWa — comment to claim. 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions