Bugs that depend on the environment
Send Qwen4-Max the bug report, the code on the call path and what changed in deployment, and ask for the root cause and one fix. Add a test for the edge case it finds, and run the full suite before merging.
Example: Why are some orders invoiced for the wrong month?
Material
- billing.py
- invoice_month() formats order.created_at in the server’s local timezone.
- Bug report
- An order placed at 23:30 UTC on October 31 was invoiced for November.
- Deploy note
- The billing server moved to a region that runs on UTC+8.
PromptExplain why the order was invoiced for the wrong month, propose one fix, and describe a test that would have caught it.
Sample answer · written by hand to show the reasoning
23:30 UTC on October 31 is 07:30 on November 1 in UTC+8, so invoice_month() now returns November. Convert created_at to UTC (or the customer’s billing timezone) before formatting, and add a test with an order at 23:30 UTC on the last day of a month.