Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

One Timeout Cannot Answer Two Questions: Why an AI Write's Confirmation Needs Two Windows

Описание и применение

Один таймаут не может отвечать на два вопроса: как долго ждать подтверждения и можно ли ещё решить строку. Разделив таймаут на два окна и используя атомарное условное обновление, система гарантирует, что строка либо доступна, либо истекла, но не обе сразу.

Задача

A single timeout value was used to answer two distinct questions—whether the UI should keep waiting and whether a row can still be decided—leading to inconsistent behavior where pending rows appeared actionable but were already expired, causing click failures.

Результат

The refactored timeout logic eliminates inconsistent UI states and prevents duplicate executions, ensuring that a pending row is either actionable or expired, but never both.

Рабочий процесс

  • 1. Identify that one timeout value is used for two different purposes.
  • 2. Split the timeout into two windows: 60 s in-conversation wait and 24 h offline window.
  • 3. Refactor boundary calculations so each window is computed by a single function used by both read and sweep paths.
  • 4. Replace non-atomic decision logic with a conditional database update that checks the row is still pending.
  • 5. Ensure the in-memory wait is only released after the decision has been successfully persisted.
  • 6. Update documentation and result messages to clarify that only one decision is guaranteed, not one execution.

Доказательства

We used one timeout to answer both. What that produced was a list showing "waiting on you" for a row where clicking was guaranteed to fail.

Источник

The offline window's boundary was computed twice: the read path compared timestamps in memory, and the maintenance sweep compared them in SQL.

Источник

Second, every boundary is computed by exactly one function.

Источник

What we do is a conditional update in the database, where the condition includes "the current status is still pending".

Источник

  • Дата записи: 2026-10-19T01:56:11.515Z