Skip to content

change: reject transfers of the full balance (AccountService compareTo <= 0) - #336

Closed
devin-ai-integration[bot] wants to merge 1 commit into
devin/1792723837-qa-playwright-e2efrom
devin/1792724881-transfer-full-balance-regression
Closed

devin-ai-integration[bot] wants to merge 1 commit into
devin/1792723837-qa-playwright-e2efrom
devin/1792724881-transfer-full-balance-regression

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Stacked on #332. A transfer that would leave the sender at exactly $0 is now rejected with Insufficient funds.

 // AccountService.transferAmount
-if (fromAccount.getBalance().compareTo(amount) < 0) {
+if (fromAccount.getBalance().compareTo(amount) <= 0) {
     throw new RuntimeException("Insufficient funds");

Only the transfer guard changes. Withdrawals (withdraw) still allow taking out the full balance.

This change conflicts with the plan. MT-040 in qa/manual-test-plan.csv says "Customer can transfer the full balance" and expects the sender at $0.00 and the recipient at $100.00. This PR leaves the plan and the MT-040 test as they are. If this rule is intended, someone needs to update MT-040's expected result. Locally against MySQL 8, MT-040 is the only row that fails (53 passed, 1 failed). The e2e check on this PR is expected to go red on MT-040.

Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/4e5ce8a64e094b30882fb37f4f9983c5
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/4e5ce8a64e094b30882fb37f4f9983c5?variant=devin
Requested by: @GarretAnd


Devin Review

Status Commit
⚪ Not started —

Run Devin Review

Enable auto-review to review your pull requests automatically.

Devin Review (Staging)


Devin Review

Co-Authored-By: Garret Andreine <garret.andreine@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

devin-ai-integration Bot added a commit that referenced this pull request Oct 23, 2026
…top)

Co-Authored-By: Garret Andreine <garret.andreine@cognition.ai>
@devin-ai-integration
devin-ai-integration Bot deleted the branch devin/1792723837-qa-playwright-e2e October 23, 2026 12:11
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