Skip to content

feat(audit): implement cursor-based pagination for audit logs#413

Merged
Baskarayelu merged 2 commits intoRemitwise-Org:mainfrom
martinvibes:consistent_pagination
Mar 28, 2026
Merged

feat(audit): implement cursor-based pagination for audit logs#413
Baskarayelu merged 2 commits intoRemitwise-Org:mainfrom
martinvibes:consistent_pagination

Conversation

@martinvibes
Copy link
Copy Markdown
Contributor

  • Add AuditPage struct with items, next_cursor, and count fields for stable pagination
  • Replace get_audit_log return type from Vec to AuditPage with cursor support
  • Integrate remitwise-common dependency for clamp_limit utility function
  • Use saturating arithmetic to prevent overflow panics in cursor calculations
  • Add comprehensive pagination tests covering empty logs, single/multi-page scenarios, and cursor boundary conditions
  • Enable deterministic replay of audit logs by consumers through stable cursor-based pagination

closes #254

- Add AuditPage struct with items, next_cursor, and count fields for stable pagination
- Replace get_audit_log return type from Vec<AuditEntry> to AuditPage with cursor support
- Integrate remitwise-common dependency for clamp_limit utility function
- Use saturating arithmetic to prevent overflow panics in cursor calculations
- Add comprehensive pagination tests covering empty logs, single/multi-page scenarios, and cursor boundary conditions
- Enable deterministic replay of audit logs by consumers through stable cursor-based pagination
@martinvibes
Copy link
Copy Markdown
Contributor Author

@Baskarayelu pls review :)

@Baskarayelu Baskarayelu merged commit 68857c8 into Remitwise-Org:main Mar 28, 2026
2 of 3 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.

Improve audit log pagination consistency for split contract

2 participants