fix(dto,escrow): validate future deadline, deduplicate split validation, and separate integration specs (#171, #167, #177) - #180
Open
ghzhost wants to merge 1 commit into
Conversation
…on, and separate integration specs (MergeFi#171, MergeFi#167, MergeFi#177)
|
Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Aug 21, 2026
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 & Fixes
This PR addresses three related developer experience and data validation issues in
mergefi-backend:Future Deadline Validation (CreateMilestoneDto doesn't validate that deadline is in the future, same gap as CreateBountyDto (#108) #171):
@IsFutureDate()custom decorator and validator (src/common/validators/future-date.validator.ts) ensuring ISO-8601 deadlines on bothCreateMilestoneDtoandCreateBountyDtoare strictly in the future.future-date.validator.spec.tsandcreate-milestone.dto.spec.ts.Deduplicated Split Percentages Validation (team-split.util.ts's validateSplitPercentages and escrow.service.ts's assertValidSplits independently reimplement near-identical split-percentage validation #167):
EscrowService.assertValidSplitswith unifiedvalidateSplitPercentagesfromsrc/teams/team-split.util.ts.0 < percentage <= 100).Jest Integration Spec Separation (jest config doesn't separate DB-requiring integration specs from unit specs — npm run test fails without a live Postgres, with no clear signal why #177):
testPathIgnorePatterns: [".*\.integration\.spec\.ts$"]inpackage.jsonjest config sonpm run testexecutes fast, mock-driven unit tests without failing on missing live Postgres.test:integrationscript specifically for running DB-dependent specs.Verification
npm run lint: 0 errorsnpm run build: successfulnpm test: 22 test suites passed (171 tests passed)npm run test:cov: passed with full coverage reportCloses #171, #167, #177