Skip to content

Build creator-configurable auto-resolve fallback chain #224

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

auto_resolve_rules (existing) evaluates rules but there's no documented behavior for what happens if none match — currently it's effectively a no-op. This issue adds an explicit fallback action when no rule's threshold is met by the deadline.

Technical Context

Involves types.rs (fallback_action: Option<ResolveAction> on InvoiceOptions/InvoiceExt), lib.rs auto_resolve() — after iterating auto_resolve_rules and finding no match, execute fallback_action if configured instead of leaving the invoice in limbo.

Acceptance Criteria

  • When no auto_resolve_rules entry matches and fallback_action is set, that action executes (release or refund)
  • When no fallback_action is configured, behavior is unchanged from today (no-op, documented as intentional)
  • auto_resolve() is idempotent — calling it again after resolution doesn't re-trigger
  • Test: invoice with rules that don't match and a Refund fallback correctly refunds via auto_resolve()
  • All existing cargo tests pass
  • cargo clippy passes with zero warnings

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 pts

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions