Your approval button needs to remember what was approved.
Описание и применение
Панель управления локально связывает одобрения с точными условиями запроса, предотвращает дублирование при повторных попытках и отделяет запись одобрения от подтверждения доставки.
Задача
When a human approves a request, the system must ensure the approval is tied to the exact conditions presented, avoid duplicate approvals on retry, and separate approval recording from delivery confirmation.
Результат
The dashboard now reliably ties approvals to the exact request state, prevents duplicate approvals on retry, and separates approval recording from delivery confirmation, improving trust in human‑in‑the‑loop workflows.
Рабочий процесс
- 1. Dashboard displays prepared request with conditions and a Go button.
- 2. Human reviews and clicks approval button.
- 3. Client submits a hash of displayed conditions and a UUID.
- 4. Server compares hash to current request; if changed, prompts re‑review.
- 5. Server stores answer with snapshot of title, executor, action, scope, destination, materials.
- 6. Browser reuses UUID on retry if previous response uncertain, preventing duplicate approvals.
- 7. Server writes event to disk atomically with file locks.
- 8. Notification is dispatched; delivery status is recorded separately from approval status.
- 9. If notification times out, dashboard logs uncertainty without auto‑retry.
- 10. Human can inspect "Answered" before creating a new answer.
Доказательства
The server compares it with the current request before storing a new answer. If the conditions changed, the owner has to review them again.
The browser therefore reuses its UUID and exact payload after an uncertain result during the same page session.
On disk, events are separate JSON files. A temporary file, flush, fsync and atomic replace put the response on disk before notification dispatch.
A notification can time out after the destination has received it. The dashboard records that uncertainty instead of manufacturing success or automatically sending another copy.
- Дата записи: 2026-10-20T21:41:14.522Z