Skip to content

feat: record reasons for dispute resolutions - #481

Merged
shakurJJ merged 1 commit into
shakurJJ:mainfrom
Joyyyb:feat/dispute-resolution-reasons
Aug 29, 2026
Merged

feat: record reasons for dispute resolutions#481
shakurJJ merged 1 commit into
shakurJJ:mainfrom
Joyyyb:feat/dispute-resolution-reasons

Conversation

@Joyyyb

@Joyyyb Joyyyb commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Implement the dispute-resolution reason feature requested in the issue.

What changed:

  • Add the serializable ResolutionReason enum with ProofValid, ProofInvalid, ProofLate, InsufficientEvidence, and MutualSettlement variants.
  • Extend resolve_dispute with an optional reason argument and use ProofValid or ProofInvalid as sensible defaults when omitted.
  • Extend batch_resolve_disputes so each resolution can carry its own optional reason.
  • Persist the selected reason under a versioned per-shipment and per-milestone storage key.
  • Add get_dispute_resolution_reason for off-chain and contract consumers to query the recorded reason.
  • Extend the legacy dispute_resolved tuple by appending the reason while retaining all existing outcome fields.
  • Add the reason to the structured dispute_resolved event without changing its existing keys.
  • Preserve meaningful defaults for timeout, panel, finality, and mediation resolution events.

This closes the issue requiring arbiter decisions to expose why they were made while keeping outcome-only consumers compatible. Tests were intentionally not run per request.

Closes: #370

Implement the dispute-resolution reason feature requested in the issue.

What changed:
- Add the serializable ResolutionReason enum with ProofValid, ProofInvalid, ProofLate, InsufficientEvidence, and MutualSettlement variants.
- Extend resolve_dispute with an optional reason argument and use ProofValid or ProofInvalid as sensible defaults when omitted.
- Extend batch_resolve_disputes so each resolution can carry its own optional reason.
- Persist the selected reason under a versioned per-shipment and per-milestone storage key.
- Add get_dispute_resolution_reason for off-chain and contract consumers to query the recorded reason.
- Extend the legacy dispute_resolved tuple by appending the reason while retaining all existing outcome fields.
- Add the reason to the structured dispute_resolved event without changing its existing keys.
- Preserve meaningful defaults for timeout, panel, finality, and mediation resolution events.

This closes the issue requiring arbiter decisions to expose why they were made while keeping outcome-only consumers compatible. Tests were intentionally not run per request.
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Joyyyb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@shakurJJ
shakurJJ merged commit 4a3db90 into shakurJJ:main Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: structured dispute resolution rationale codes

2 participants