Fix/infra and backend improvements#530
Merged
ogazboiz merged 4 commits intoMay 29, 2026
Merged
Conversation
Both backend and contracts CI jobs were failing when CODECOV_TOKEN was missing or invalid, even when all tests passed. Changed both upload steps to fail_ci_if_error: false so coverage upload is best-effort and does not block CI on token issues.
The getUserEvents endpoint was returning unbounded results which could grow without limit for active wallets. Added limit and offset query parameters with sensible defaults (limit: 50, max: 200) and return a paginated envelope consistent with other endpoints including data, total, hasMore, limit, and offset fields. Maintains reverse-chronological ordering and updated Swagger documentation.
Added validation to prevent RangeError when ratePerSecond is zero. The endpoint now validates that ratePerSecond and depositedAmount are greater than zero before computing endTime, returning a 400 with a clear message instead of a 500. Also added proper parsing and validation for all numeric fields to handle malformed input gracefully.
Deleted backend/src/routes/events.routes.ts which was not imported anywhere in the codebase. This file contained an unauthenticated SSE subscribe handler that could have been a security risk if accidentally re-mounted. The active authenticated version exists in routes/v1/events.routes.ts.
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.
Closes [Infra] Codecov upload step fails CI when CODECOV_TOKEN is missing (fail_ci_if_error: true) #528 - Codecov CI failures fixed
Changed fail_ci_if_error: true to false for both backend and contracts Codecov upload steps
CI will no longer fail when CODECOV_TOKEN is missing or invalid
Coverage upload is now best-effort and won't block passing tests
Closes [Backend] Add pagination to GET /v1/users/:publicKey/events #506 - Pagination added to getUserEvents
Added limit (default 50, max 200) and offset query parameters
Returns paginated envelope with data, total, hasMore, limit, and offset fields
Maintains reverse-chronological ordering
Updated Swagger documentation in user.routes.ts
Closes [Backend] Guard against division-by-zero in createStream controller endTime calculation #507 - Division-by-zero guard in createStream
Added validation to ensure ratePerSecond > 0 before computing endTime
Added validation for all numeric fields (streamId, startTime, depositedAmount)
Returns 400 with clear error messages instead of 500 on invalid input
Handles RangeError gracefully
Closes [Backend] Remove dead unauthenticated legacy SSE route file routes/events.routes.ts #508 - Dead legacy SSE route file removed
events.routes.ts
(confirmed no imports)
Removed unauthenticated SSE subscribe handler security risk
Active authenticated version remains in
events.routes.ts
Closes #528
Closes #506
Closes #507
Closes #508