Queued intent can outlive the permission that created it
A user may approve a quote, then the command waits behind other work or an outage. By dispatch time the approval window, project status or required permission may have changed. Store those conditions explicitly in your own application. AISwapLab does not enforce your client-specific approval expiry, and a local queue message is not proof that the provider already accepted a generation.
What to do next
- 01
Record the approval conditions
Bind the approving party, request snapshot, spending ceiling and expiry time to the local action. Define which time zone and clock interpretation apply, and what changes invalidate approval. Keep this record separate from the provider's job state. Do not use an expiry field merely as a UI label while the worker treats every queued command as permanently authorized.
- 02
Check at the dispatch boundary
Before the creation POST, validate the current approval, project state and applicable permissions using your trusted server context. If invalid, move only the unsubmitted local action to a hold state and explain the reason. Avoid rewriting its body or issuing a new request identity automatically. If earlier submission is uncertain, reconcile that uncertainty first rather than assuming the action is still safe to dispatch.
- 03
Test both sides of acceptance
Use a controllable local clock and fixture transport. Advance time past expiry while a command waits and assert that no creation request occurs. In a separate case, accept the provider job before expiry, then advance time and confirm normal read-only recovery continues. Reauthorization of a held action should be an explicit new decision, with unchanged or newly reviewed settings clearly identified.
A concrete example
Illustrative example: an approval expires at noon while the command is waiting. At 12:05 the dispatcher holds it and asks for renewed authorization. Another job accepted at 11:55 remains eligible for status recovery; the application does not call a nonexistent cancellation route or create a replacement task.
Before you call it ready
- Expiry is enforced by the worker.
- Unsubmitted and accepted states remain distinct.
- Expired approval cannot silently create a fresh paid action.
When to stop or choose another method
Stop automatic dispatch when acceptance is uncertain or the approval clock cannot be trusted. Preserve the original action and investigate; do not use a new approval as a reason to replay an already accepted or unknown provider request.
