You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated from the public diff for #1, requested by @lyc-aon. Please verify findings before merging.
P1calculator.js:5 applyDiscountCents no longer enforces the previous 0 <= discountPercent <= 100 contract. With this change, inputs like applyDiscountCents(1000, 150) now return -500, and applyDiscountCents(1000, -10) returns 1100, instead of rejecting invalid discounts. That is a production-impact money calculation regression, and the prior invalid-discount test was removed at the same time, so CI will not catch it.
P1calculator.js:13 refundAmountCents accepts any finite numbers and returns Math.min(...) directly, which means it can emit negative refund amounts. For example, refundAmountCents(5000, -100) returns -100. A refund helper should not produce a negative amount for numeric input; it should reject or clamp invalid values. In payment/refund code, allowing negative refund amounts is unsafe and can invert the money flow depending on the caller.
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
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.
Test PR for the lycaon.wtf Codex review intake E2E path. It intentionally keeps the diff tiny so the automation can review and post safely.