The ambiguous middle
A slow provider response does not tell you whether work has failed, is still running, or has completed without a retrievable output yet. Treating every wait as a failure can start another paid generation for the same user intent.
Two related pieces of work
The broader local Open Pomelli implementation tracks operations and attempts durably, with accounting and spend gates. A separate, narrow upstream proposal fixes polling so completion depends on a terminal provider state and an available output. These are distinct scopes.
The conceptual solution
Give the user’s operation a stable identity. Record provider job identifiers and attempt states. Poll known jobs instead of submitting a new one on every refresh. Reconcile ambiguous outcomes before deciding that another paid attempt is necessary.
What to measure
Count submitted attempts, recovered outputs, discarded results, and accepted assets. Keep failed or uncertain charges visible. The accounting must be able to explain the whole operation, including the attempts the visitor never sees.
About the evidence
Local implementation and checks. Public contribution covers the polling fix only.
Project detail and source links ↗