← Back to context

Comment by stavros

3 days ago

> did you not run into this problem described by ilya below

I used to run into a related issue, where fixing a bug would add more bugs, to the point where it would not be able to progress past a given codebase complexity. However, Codex is much better at not doing that. There are some cases where the model kept going back and forth between two bugs, but I discovered that that was because I had misunderstood the constraints and was telling the model to do something impossible.

> how did you discover that and why it slip out.

Sentry alerted me but I thought it was an edge case, and I didn't pay attention until hours later.

I use a spiral allocation algorithm to allocate plots, so new users are clustered around the center. Sometimes plots are emptied (when the user isn't active), so you can have gaps in the spiral, which the algorithm tries to fill, and it's meant to go to the next plot if the current one can't be assigned.

For one specific plot, however, conditions were such that the database was giving an integrity error. The exception handling code that was supposed to handle that didn't take into account that it needed to roll back before resuming, so the entire request failed, instead of resuming gracefully. Just adding an atomic() context manager fixed it.

> looks like site wasn't working at all when you posted that comment?

It was working for a few hundreds (thousands?) of visitors, then the allocation code hit the plot that caused the bug, and signup couldn't proceed after that.

> Just adding an atomic() context manager fixed it.

ok looks like you are intimately familiar with the code that is being produced and are AI as code generator rather than pure vibe coding. That makes sense to me.

Btw did AI add that line when you explained what the error was or did you add that in manually.

  • No, I paste the trace back, ask it to explain the error, judge whether it makes sense, and either ask it to fix it or say "that makes no sense, please look again/change the fix/etc".

    Specifically here, the AI added that line.