Fixing failing tests in a repository
Give Kimi K2.6 the failing test output, the files it touches and a tool to run tests, and ask for the smallest patch that makes it pass. Review the diff and run the full suite before merging.
Example: Why does this test fail after the refactor?
Material
- Test output
- expected parseDate("2026-03-01") to be March 1, received February 28
- date.ts (after refactor)
- return new Date(input); // was: new Date(input + "T00:00:00")
PromptRead the failing test and the changed function, explain the cause, and give the smallest fix.
Sample answer · written by hand to show the reasoning
A date-only string is parsed as midnight UTC, so in time zones behind UTC it shows as the previous day. The old code appended T00:00:00, which is parsed as local time. Restore that suffix, or parse the year, month and day yourself, and run the test in a time zone behind UTC to confirm.