Menu

1 / 2

Our CI agent fixed the bug. Then it put the bug back.

DEV Community: ai·Tushar Tandon·about 8 hours ago
#dDla8viA
#devtoai#devto#dev#tests#prowl
Long article (2463 words) — no AI summary yet.
Reading 0:00
15s threshold

wo hours before the end of a 72-hour hackathon, our CI agent fixed a bug taken from the history of a real Python library. Then it took its own fix back out.

The library was boltons , and the bug was in SpooledStringIO.readline(0) , which should return an empty string and returned a whole line. prOwl, our agent, traced it to Python's codecs reader, which sizes a read as size or 72 . Zero is falsy, so a request for zero characters read up to 72. prOwl added an early return '' for length zero and ran the suite. Our guard stopped the run ( trace ):

policy: 621 tests ran but 623 ran earlier in this run; a fix may not remove or deselect tests

Enter fullscreen mode

Exit fullscreen mode

The agent's next note:

The policy says only 621 tests ran this time versus 623 earlier, so I'll undo my change and rerun to see whether the drop comes from my edit.

It removed its fix, read the file back, and ran the suite again. The bug came back, and so did the count of 623.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.