Back to Tanya's profile
11views

Biteloop: The checkout total is wrong

Customers were charged the wrong amount on Monday. Fix the pricing against the rules and work out who's owed what.

Tanya Garg

Overview

The problem

A Wooble FastTrack work simulation for the AI-enabled Full-Stack Developer role. Customers were charged the wrong amount on Monday. Fix the pricing against the rules and work out who's owed what.

Biteloop is a fictional meal-delivery app company. The data was built for me alone and my answers were checked by Wooble; I passed on hand-in 1.

The result

Hi Neha,

What happened: Arjun's change introduced three bugs in src/pricing.js. GST was worked out on the subtotal instead of the amount after discount. Free delivery was judged on the subtotal, so coupon orders that fell under Rs 299 still shipped free. Coupon expiry compared the UTC date instead of the India date, so orders just after midnight IST were judged on the wrong day. 64 of 156 delivered orders were charged wrongly: Rs 232.92 overcharged (the refund), Rs 712.52 undercharged.

Still unresolved: I assumed charged_paise is what was actually taken, and I haven't checked how refunds will be issued.

What I'd change: test every PRICING.md rule and its boundaries, including coupon with GST and delivery, and orders near midnight IST. Run a daily replay that re-prices the previous day's orders and alerts on any difference from charged_paise. Get a second reviewer on pricing changes, and use one shared IST date helper.

Links & files

Artifacts

1