NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content
Senior79 views

После оптимизации PostgreSQL запрос стал быстрее, но интеграционный тест иногда возвращает транзакции другого пользователя. До релиза один день, а исправление затрагивает фильтр Django ORM. Что выберешь первым: выпускать ускорение или остановиться на проверке корректности?

Practice

Asked at

AI answer

First, stop the release until correctness has been verified. A query that sometimes returns another user's transactions can cause a data leak; making it faster does not make up for that. Reproduce the problem, check the owner-based filtering and the generated SQL, add a regression test for user isolation, and make sure the fix is safe. If it cannot be done on time, revert the optimization or postpone the release rather than shipping a questionable filter.