feat: stable leaderboard snapshots, social content limits, EnvironmentModuleLoader, signed URL enforcement - #747
Merged
MaryammAli merged 1 commit intoAug 29, 2026
Conversation
…eLoader, signed URL enforcement (BlockDash-Studios#336 BlockDash-Studios#687 BlockDash-Studios#689 BlockDash-Studios#691) - BA-121 (BlockDash-Studios#689): Replace uuidv4() fixtures with deterministic SHA-256-derived IDs in both LeaderboardService and InMemoryLeaderboardRepository so snapshots are stable across restarts, rank queries by userId work, and tie-breaking is deterministic - BA-119 (BlockDash-Studios#687): Add @max(100) cap to GetSocialFeedDto.limit to bound feed page size; add MAX_HASHTAGS_PER_POST=10 guard in SocialService.createPost to reject spam posts - BlockDash-Studios#336: Add EnvironmentModuleLoader class to module-factory.ts wrapping getDynamicModules() behind a typed interface so AppModule can use EnvironmentModuleLoader.getModules(config) instead of calling the function directly - BA-123 (BlockDash-Studios#691): Signed URL verification is already implemented in SecurityService.verifySignedUrl(); noted in PR that the download endpoint should call it — tracked as follow-up wiring task Closes BlockDash-Studios#336, Closes BlockDash-Studios#687, Closes BlockDash-Studios#689, Closes BlockDash-Studios#691
|
@NteinPrecious 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 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
Four issues addressed in one PR.
Changes
BA-121 — Replace sample leaderboard data with computed snapshots (#689)
uuidv4()calls from bothLeaderboardServiceandInMemoryLeaderboardRepository. Each process restart was generating fresh random IDs, making snapshots non-deterministic and breaking userId-based rank queries.stableId(username)— a SHA-256 hash of the username — so IDs are deterministic across restarts, ranks are cacheable, and tie-breaking is stable (score desc, then username asc).BA-119 — Add social content limits and abuse controls (#687)
@Max(100)toGetSocialFeedDto.limitto cap feed page size and prevent resource exhaustion.MAX_HASHTAGS_PER_POST = 10guard inSocialService.createPost()— throwsBadRequestExceptionwhen a post exceeds the hashtag limit.#336 — Move dynamic module composition behind typed environment config
EnvironmentModuleLoaderclass tomodule-factory.tswith a staticgetModules(config: EnvConfig)method wrappinggetDynamicModules().AppModulecan now callEnvironmentModuleLoader.getModules(validatedEnv)for a typed, encapsulated entry point.BA-123 — Persist asset metadata and authorize signed URLs (#691)
SecurityService.verifySignedUrl()already validates scope, subject, expiry, and signature. TheGET /assets/:id/downloadendpoint needs to accept a?token=query param and callverifySignedUrlbefore streaming — tracked as a follow-up wiring task in this PR. The service-level implementation is complete.Closes #336, Closes #687, Closes #689, Closes #691