Small fixes and debugging in a repo
Send the error, the failing test and the related files together, and have Gemini 4 Hydrogen find the direct cause and propose a fix that touches only the lines that need it. Run the tests again after the change.
Example: Why did this test suddenly fail?
Material
- test_price.py
- Expected format_price(1999) to return "$19.99", got "$1999.00".
- price.py
- format_price(cents) returns f"${cents:.2f}" directly.
- Latest commit
- Renamed the parameter from dollars to cents; the unit is now cents.
PromptExplain the direct cause of the failing test, give the smallest fix, and point out which callers need to change with it.
Sample answer · written by hand to show the reasoning
Now that the parameter is in cents, the function never divides by 100. Change it to f"${cents / 100:.2f}". Any caller still passing dollars has to switch to cents too, or amounts will come out 100 times too small.