The site
Every page exists at /fa/ and /en/. RTL is real, not a mechanical mirror.
Languages
The language switch is not decoration. The site, the app, and the agent are designed for both.
41 def charge(order, wallet): 42 tax = order.subtotal * 0.09 43 total = order.subtotal + tax 44 if wallet.balance < total: 45 raise InsufficientFunds(total) 46 wallet.debit(total) 47 return Receipt(order.id, total)
Split regional tax from the hardcoded rate, and check coverage before debit.
Read 6 files · 2 searches · 1 test
charge still hard-codes 0.09. tax_for(region) exists. I will wire can_cover to the wallet.
12-line patch across two files. Review the diff.
Before touching checkout, write the approach for multi-region tax.
Plan · product shell and edits are limited
Freeze the tax_for contract, then change charge, then update test_charge.
Plan is ready. I switch to Agent after you confirm.
Where does charge take tax from, and which test pins it?
Ask · read only
The rate is checkout.py:42. test_charge asserts the same 0.09.
Nothing was written.
InsufficientFunds also fires for tax-exempt orders. Evidence first.
Debug · reproduce before the fix
It fails when the region is exempt and wallet.can_cover still sees the flat rate.
Failure trail is ready. The fix waits for your OK.
- tax = order.subtotal * 0.09 + tax = order.tax_for(region) - if wallet.balance < total: + if not wallet.can_cover(total, region): wallet.debit(total)
Every page exists at /fa/ and /en/. RTL is real, not a mechanical mirror.
The desktop UI ships in English and Persian, with logical layout for RTL.
Write in Persian and it answers in Persian. Technical terms stay when a forced translation would hurt.
Code stays left to right. Product and site copy follow the language direction.