Repository navigation
Conversation
|
@p3ris0n is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@PERIXN 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! 🚀 |
This branch has not been deployed
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.
Pull Request: Post-Wave Production Infrastructure, Security & API Hardening
Summary
This PR delivers key infrastructure, security, API reliability, and architecture decoupling enhancements across the platform backend, resolving four issues from the Web3 Student Lab Post-Wave Production Deployment Initiative.
Closes #1621
Closes #1618
Closes #1620
Closes #1619
Key Changes & Implementations
1. Automated Production Smoke Test & Canary Deployment Verifier ([BE-049])
scripts/canary-smoke-test.sh: Standalone canary runner that executes immediately post-deploy, asserting API health, synthetic user login, DB read/write probes, and Soroban RPC responsiveness within a strict< 60sbudget..github/workflows/production-deploy.yml: Post-deploy orchestration workflow featuring automatic rollback to the previous commit SHA upon canary failure, coupled with immediate alerts dispatched to Discord and Slack webhooks.backend/tests/smoke.test.ts: Automated E2E test verifying synthetic account authentication, DB query verification, RPC checks, and WASM compilation/sandbox execution.2. Real-Time Session Inactivity & Idle Timeout Invalidation Engine ([BE-046])
backend/src/middleware/sessionActivityTracker.ts: Middleware sliding Redis TTL keys per authenticated request to track live user activity.backend/src/services/sessionMonitorService.ts: Active background monitor identifying sessions with > 30 minutes of inactivity; revokes access/refresh tokens in Redis and broadcasts WebSocket disconnect events instructing the client UI to lock and require re-authentication.backend/tests/sessionMonitor.test.ts: Unit and concurrency tests ensuring precise 30-minute timeout revocation and WebSocket event dispatch.3. Microservice IPC Message Broker for Decoupled Modules ([BE-048])
backend/src/messaging/messageBroker.ts: Robust NATS JetStream / RabbitMQ client abstraction handling consumer groups, exponential backoff reconnects, and at-least-once message delivery with explicit acknowledgments (ack()).backend/src/messaging/publishers/exercisePublisher.ts: Dispatches domain events (exercise.submitted,certificate.requested,governance.voted) asynchronously into dedicated message streams.backend/src/messaging/subscribers/auditSubscriber.ts: Isolated consumer worker ingesting domain events independently of the user-facing request cycle.4. OpenAPI 3.1 Auto-Generation & Strict Schema Validation ([BE-047])
backend/src/config/swagger.ts: Centralized OpenAPI 3.1 specification configuration utilizing Zod schemas andswagger-jsdocto host the interactive Swagger UI at/api/v1/docs.backend/src/middleware/validation.ts: Strict request validation and response filtering middleware that strips undeclared parameters and rejects invalid client payloads before route execution.backend/src/routes/index.ts: Route mounting and documentation registry ensuring 100% route coverage and schema synchronization.Verification & Testing
scripts/canary-smoke-test.shcompleted all sanity checks in< 45sagainst local/staging test instances.SESSION_TIMEOUTWebSocket messages./api/v1/docs.