Skip to content

feat(mutual-aid): add request timestamps and expiry policy - #420

Merged
3m1n3nc3 merged 2 commits into
geevapp:mainfrom
Uyoxy:feature/mutual-aid-request-expiry-408
Jul 28, 2026
Merged

feat(mutual-aid): add request timestamps and expiry policy#420
3m1n3nc3 merged 2 commits into
geevapp:mainfrom
Uyoxy:feature/mutual-aid-request-expiry-408

Conversation

@Uyoxy

@Uyoxy Uyoxy commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #408

Summary

Adds lifecycle timestamps and expiry enforcement for Mutual Aid help requests.

This introduces request creation timestamps and optional expiry timestamps, enabling deterministic handling of stale requests. Contract logic now validates request expiry during donation and cancellation flows, preventing interactions with expired requests.

What's Changed

  • Extended HelpRequest with created_at
  • Added optional expires_at field
  • Set timestamps when posting help requests
  • Enforced expiry validation during donations
  • Updated cancellation logic to respect expiry status
  • Defined behaviour for expired but unfunded requests
  • Added unit tests covering:
    • newly created requests
    • expired requests
    • funded requests
    • donation behaviour before and after expiry

Testing

cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo test --workspace
pnpm lint
pnpm test

@3m1n3nc3
3m1n3nc3 merged commit 22572c1 into geevapp:main Jul 28, 2026
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

Development

Successfully merging this pull request may close these issues.

[MutualAid] Add request timestamps and expiry policy

2 participants