Hacker News new | ask | show | jobs
by wmedrano 738 days ago
ChatGPT gives the following:

The code snippet has a subtle but significant issue in the default value of the id column. Here is the problematic part: ... In this line, default=str(uuid.uuid4()) is evaluated only once at the time of the class definition, not each time a new StripeCustomer instance is created....

2 comments

Presumably that's easy enough given just the snippet in question, but they hadn't narrowed the issue down to that snippet because they had no idea it was happening on the user creation, because they didn't have the logs.

I expect ChatGPT wouldn't have been able to solve the issue given the entire codebase.

They should have also asked the LLM for some integration tests.

Ensure that the revenue generating codepaths have proper logging.

This failure had very little to do with having an LLM write it.