Skip to content

🔖 release: v0.1.1-uphold.0 (uphold)#13

Merged
cruzdanilo merged 1 commit into
upholdfrom
changeset-release/uphold
May 13, 2026
Merged

🔖 release: v0.1.1-uphold.0 (uphold)#13
cruzdanilo merged 1 commit into
upholdfrom
changeset-release/uphold

Conversation

@cruzdanilo
Copy link
Copy Markdown
Member

@cruzdanilo cruzdanilo commented May 13, 2026

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to uphold, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

uphold is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on uphold.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@exactly/lib@0.1.1-uphold.0

Patch Changes

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Warning

Rate limit exceeded

@cruzdanilo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 32 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 113c25a2-d7f7-4d06-beed-a61cd08405d0

📥 Commits

Reviewing files that changed from the base of the PR and between 49750dc and 485ca89.

📒 Files selected for processing (3)
  • .changeset/pre.json
  • CHANGELOG.md
  • package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch changeset-release/uphold

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the library to version 0.1.1-uphold.0, adds new changesets, and updates the changelog detailing market haircuts and rounding fixes. The review identifies a critical division by zero error in the auditor's liquidity logic and suggests a minor version bump to 0.2.0 to adhere to Semantic Versioning for the new features.

Comment thread CHANGELOG.md Outdated

### Patch Changes

- [#11](https://github.com/exactly/lib/pull/11) [`be0d59c`](https://github.com/exactly/lib/commit/be0d59ccc28aae26681f13f6b527f408adb82b71) Thanks [@cruzdanilo](https://github.com/cruzdanilo)! - ✨ auditor: add optional haircuts per market
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The implementation of the haircut logic introduced in this PR (specifically in src/auditor/accountLiquidity.ts) contains a potential division by zero error. When a market has a 100% haircut (haircut === WAD) and the account has zero debt in that market (debt === 0n), the condition haircut === WAD && debt !== 0n evaluates to false, causing the code to execute divWadUp(debt, WAD - haircut), which results in divWadUp(0n, 0n).

This will cause the accountLiquidity function to throw an error, potentially breaking health factor calculations for any account associated with such a market.

Consider updating the logic in src/auditor/accountLiquidity.ts to:

adjDebt += (haircut && debt !== 0n) ? (haircut === WAD ? MAX_UINT256 : divWadUp(debt, WAD - haircut)) : debt;

Comment thread package.json
{
"name": "@exactly/lib",
"version": "0.1.0",
"version": "0.1.1-uphold.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The version bump is specified as a patch (0.1.1), but the changelog includes a new feature ('✨ auditor: add optional haircuts per market'). According to SemVer, adding a feature should trigger a minor version bump (e.g., 0.2.0-uphold.0). Since the previous version was 0.1.0 and it was categorized as a 'Minor Change', it appears the project follows standard SemVer where the second digit represents features.

Suggested change
"version": "0.1.1-uphold.0",
"version": "0.2.0-uphold.0",

@cruzdanilo cruzdanilo force-pushed the uphold branch 2 times, most recently from c24354e to 82fc258 Compare May 13, 2026 01:32
@cruzdanilo cruzdanilo changed the title 🔖 release (uphold) 🔖 release: v0.1.1-uphold.0 (uphold) May 13, 2026
@cruzdanilo cruzdanilo force-pushed the changeset-release/uphold branch from d555399 to f557d35 Compare May 13, 2026 01:34
@cruzdanilo cruzdanilo force-pushed the changeset-release/uphold branch from f557d35 to 485ca89 Compare May 13, 2026 01:52
@sentry
Copy link
Copy Markdown

sentry Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.36%. Comparing base (49750dc) to head (485ca89).
⚠️ Report is 1 commits behind head on uphold.

Additional details and impacted files
@@           Coverage Diff           @@
##           uphold      #13   +/-   ##
=======================================
  Coverage   81.36%   81.36%           
=======================================
  Files          46       46           
  Lines         735      735           
  Branches      109      109           
=======================================
  Hits          598      598           
  Misses        130      130           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cruzdanilo cruzdanilo merged commit 485ca89 into uphold May 13, 2026
4 of 5 checks passed
@cruzdanilo cruzdanilo deleted the changeset-release/uphold branch May 13, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant