Skip to content

feat(dispute): add per-pair dispute flag with view, event, and boundary tests - #441

Merged
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
Baskarayelu:feature/dispute-414-418-model
Jul 30, 2026
Merged

feat(dispute): add per-pair dispute flag with view, event, and boundary tests#441
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
Baskarayelu:feature/dispute-414-418-model

Conversation

@Baskarayelu

Copy link
Copy Markdown
Contributor

Summary

The router previously had no dispute concept at all. Issues #414-#417 each describe an incremental slice of a dispute model that would need to already exist (a view onto its state, an event on its state changes, boundary tests for its logic, a helper extracted from its repeated check) — so this PR builds the minimal model those four issues collectively assume, in one cohesive change rather than four PRs that would each be incomplete/non-functional in isolation:

Tests (#416)

Boundary/behavioral coverage: default-false, flag blocks quote_route/compute_route_fee, resolve restores routing, flagging an unregistered pair panics PairNotRegistered, re-flagging doesn't duplicate the event, resolving an undisputed pair is a silent no-op, and unregister+re-register doesn't leak a stale flag.

Documentation for this model is filed separately (closes #418) since it's cleanly independent of the code change.

Test output

Same pre-existing main-at-HEAD build breakage as #409/#410/#411 (103 unrelated errors, reproducible via git stash). Confirmed this change adds zero additional errors — identical error count/set before and after.

Closes #414
Closes #415
Closes #416
Closes #417

…ry tests

Adds a minimal dispute-flagging model: flag_pair_dispute/resolve_pair_dispute
(admin-gated), is_pair_disputed (read-only view), a disp_set event guarded
against duplicate emission, and a shared read_pair_disputed helper used by
both quote_route and compute_route_fee instead of inlining the check twice.

Closes StableRoute-Org#414
Closes StableRoute-Org#415
Closes StableRoute-Org#416
Closes StableRoute-Org#417
@mikewheeleer
mikewheeleer merged commit 4ac9231 into StableRoute-Org:main Jul 30, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants