Merged
Conversation
…wers (cron job, ESM, Jest)
ogazboiz
requested changes
Mar 31, 2026
Contributor
ogazboiz
left a comment
There was a problem hiding this comment.
hey @Skinny001, same issues as #683 and #674:
-
migration conflict -
1783000000013_add-loan-disputes.jsis already taken on main. next available is1784000000014. -
stray files -
backend/backend/directory,app.with-swagger.ts,swagger.esm.tsshouldn't be here. -
scope - 36 files across disputes, score decay, auth, notifications, pool, and more. the score decay logic is the new part here but it's bundled with everything from #683. please split the score decay into its own focused PR.
also you now have 3 open PRs (#674, #683, #684) that all carry the same stray files and migration conflict. would be much easier to fix the base issues once and submit clean, focused PRs from there.
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.
This pull request introduces a loan dispute/appeal mechanism to the backend, adds new admin endpoints for resolving loan disputes, and refactors Swagger documentation handling to improve ESM compatibility. It also updates and expands the test suite for the new dispute flow, adds a migration for the new database table, and makes several dependency and configuration adjustments.
Loan Dispute/Appeal Mechanism:
loan_disputestable, supporting open/resolved/rejected statuses and linking disputes to loans. This lays the groundwork for tracking and resolving loan disputes.Testing Enhancements:
loanDispute.test.ts) covering borrower and admin dispute flows, including contesting defaults, freezing penalties during disputes, and admin resolutions.loanEndpoints.test.tsfor more reliable and isolated test cases, including proper query resets and dispute checks. [1] [2] [3] [4]Swagger Documentation Refactor:
swagger.esm.ts) and updated the app to mount Swagger docs only in a dedicated entrypoint (app.with-swagger.ts). This avoids ESM/CJS issues and cleans up the main app file. [1] [2] [3] [4] [5]Configuration and Dependency Updates:
jest.config.tsfor better ESM support, custom test matching, and improved setup, and fixed Jest and TypeScript type versions for compatibility. [1] [2] [3].env.testfor test environment variables.expressas a dependency in the backend package.These changes collectively enable a full borrower dispute/appeal workflow, admin review and resolution, and robust test and documentation support for the new features.
close #535