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

Make the Free Server a Lease-Bound Executor Before Your Agent Double-Fires

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

Паттерн гарантирует, что внешние действия выполняются только один раз, даже если процесс на бесплатном сервере перезапускается, за счёт хранения лизинга и статуса действия в внешнем хранилище.

Задача

AI agents on disposable free-tier servers lose in-memory state on reboot, causing duplicate side-effects when a model call is retried after a crash.

Результат

By persisting lease and side-effect status outside the disposable server, the pattern guarantees at-most-once execution of side-effects, eliminating duplicates caused by process restarts.

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

  • Place task in durable queue via orchestrator
  • Free server acquires lease in external storage
  • Write side-effect record as pending
  • Call model endpoint (retryable)
  • Apply external side-effect (e.g., create GitHub issue)
  • Mark side-effect record as done
  • If server dies, lease expires and orchestrator re-enqueues task
  • New executor checks side-effect status: skip if done, finish if pending, start from step 3 if absent

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

The executor writes a side-effect record with status pending to the same external store.

Источник

If the server dies after applying effect, before marking done, the new executor sees pending and re-applies the effect.

Источник

  • Дата записи: 2026-09-10T03:02:10.687Z