feat: per-route metrics, audit events, stellar transfer test, and risk gauge - #1217
Merged
Merged
Conversation
Contributor
|
@walexjnr is attempting to deploy a commit to the Mftee's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@walexjnr 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! 🚀 |
mftee
approved these changes
Aug 25, 2026
mftee
left a comment
Contributor
There was a problem hiding this comment.
Reviewed. Strong PR:
- Fixes a genuine pre-existing compile bug in
stellar.rs::check_connection(referenced an undefinedresultvariable — this wouldn't have compiled). Good catch. - Rewrites
verify_hashtests to match the real HorizonmanageDataaccount-lookup implementation instead of a stale/transactions?memo=approach the old tests assumed. - New per-route request metrics (
requests_total_by_route{route=...}, CT-40) wired into verify/submit/revoke/transfer/batch-verify, with isolation tests. - New audit-event log (CT-39):
record_audit_eventappends to a capped cache-backed list,GET /auditreads it back reversed (most recent first), failures are logged and never break the request path — good defensive design for an audit trail. RiskGauge: clean inline-SVG gauge, clamps out-of-range scores, includes an sr-only text equivalent for accessibility, solid test coverage.
Approving.
Resolve conflicts in contract/src/lib.rs between the webhook dispatch (PR CodeGirlsInc#1216) and the audit-event log (PR CodeGirlsInc#1217): both are additive and independent, so both calls run at each of the four write sites (transfer, verify, submit, revoke).
4 tasks
This was referenced Aug 25, 2026
mftee
added a commit
to zakariyaufarida5-wq/SMALDA
that referenced
this pull request
Aug 25, 2026
Resolve a trivial conflict in contract/src/stellar.rs: both this PR and the already-merged CodeGirlsInc#1217 independently made the identical check_connection fix and test rewrite, so the only real conflict was a comment-text difference in a section header. Kept the more descriptive (ticketed) version.
mftee
added a commit
that referenced
this pull request
Aug 25, 2026
…-938-939 Merging per repo maintainer review. Trivial conflict in contract/src/stellar.rs resolved: both this PR and the already-merged #1217 independently made the identical check_connection fix, so the only conflict was a comment-text difference. Pre-existing CI failures otherwise predate these PRs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
record_transfernow incrementsrequest_count, and a new per-route counter (requests_total_by_route) distinguishes verify/submit/revoke/transfer volume in/metrics, with tests.event.rsinto the crate as a real audit module: addedAuditError/Resulttoerror.rs, declaredpub mod event, emit anEventper verify/submit/revoke/transfer request persisted via the cache backend, and added aGET /auditendpoint to read events back.anchor_transferactually submits a transaction (account fetch +POST /transactions) instead of trivially returningOk, plus a failure-path test.RiskGaugecomponent (inline SVG arc, colour-banded green/yellow/red,riskScore+riskFlagsprops, screen-reader text) with component render tests.Closes #945
Closes #944
Closes #940
Closes #926