Skip to content

feat: rate limiter wiring, revoke tests, admin activity page, admin guard - #1218

Merged
mftee merged 2 commits into
CodeGirlsInc:mainfrom
oladev2026-tech:feat/issues-933-935-937-942
Aug 25, 2026
Merged

feat: rate limiter wiring, revoke tests, admin activity page, admin guard#1218
mftee merged 2 commits into
CodeGirlsInc:mainfrom
oladev2026-tech:feat/issues-933-935-937-942

Conversation

@oladev2026-tech

Copy link
Copy Markdown
Contributor

Summary

Closes #942
Closes #937
Closes #935
Closes #933

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@oladev2026-tech is attempting to deploy a commit to the Mftee's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@oladev2026-tech 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

@mftee mftee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Good work:

  • Rate limiter (CT-37) wired as a real global axum::middleware::from_fn_with_state layer, backed by governor-based DefaultRateLimiter, returns 429 with a clear body. Integration tests drive the actual app() router via axum_test::TestServer and assert burst/refill behavior across routes, not just unit-level.
  • /revoke integration tests (CT-32) cover invalid hash, missing prior anchor, the happy path (verifies the cache is updated to reflect revoked: true after a successful revoke), and a Stellar-failure path returning 502.
  • Admin activity page (FE-64) rewritten from a mock-data stub to a real paginated, filterable (userId/actionType) feed with a proper 403 → 'Admin access required' state, matching the guard added to the documents page (FE-44).

Approving. Note for the merge: this branch and #1216/#1217 (already merged) both extend AppState, and this PR's test files construct AppState { ... } literals directly — I'll need to add the webhook_urls/webhook_secret fields to those test fixtures when resolving the merge conflict so the crate still compiles.

Resolve conflicts in contract/src/lib.rs and contract/src/main.rs
between the rate limiter (PR CodeGirlsInc#1218) and the webhook fields (PR CodeGirlsInc#1216):
both are additive AppState fields, so both are kept.

Also fixes a compile break in the test suite left by PR CodeGirlsInc#1216: two
pre-existing AppState test fixtures (contract/src/health.rs,
contract/src/tests/integration.rs) were never updated for the
webhook_urls/webhook_secret fields it added, so 'cargo test' has not
compiled since that PR merged. Backfilled those fixtures plus this
PR's own new fixtures (rate_limit.rs, revoke.rs) with the new fields,
using permissive rate-limiter values so existing tests are unaffected.
@mftee
mftee merged commit 07e2702 into CodeGirlsInc:main Aug 25, 2026
1 of 6 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