ADR-0069: AWS Durable hosts mechanical queue-async coordination ​
Context ​
The native QUEUE_ASYNC coordinator proves TPF's execution, Await, retry, DLQ, worker, release-pinning, and re-drive semantics. Hosting all of its liveness machinery directly on AWS would also require TPF to own durable suspension, callback wake-up, checkpoint replay, scheduling, and associated recovery races.
Deployed fault-injection and recovery conformance tests demonstrate that Lambda Durable Functions can own those mechanics while bounded, idempotent TPF actions and a reconstructable TPF checkpoint retain semantic authority.
Decision ​
Use AWS Lambda Durable Functions as the preferred AWS QUEUE_ASYNC coordination host.
- AWS Durable owns orchestration liveness, checkpoints, suspension, provider callback wake-up, and mechanical retry of bounded actions.
- TPF owns execution and Await identity, typed completion admission, parent release, release pinning, signed worker transitions, semantic retry and DLQ evidence, results, and operator-authorised re-drive.
- Provider callback identifiers, execution ARNs, history, and callback generations remain hosting correlations outside the provider-neutral semantic checkpoint.
- SQS remains the worker boundary until separate conformance evidence shows direct invocation preserves backpressure, redelivery, DLQ evidence, and uncertain-outcome handling.
PipelineControlPlaneremains the action contract. A coordination host invokes it; it does not introduce a parallel execution API.- The native coordinator remains the portable semantic reference, conformance implementation, and fallback architecture.
The deployed fault suite remains conformance evidence. The host, model and deployment-contract artifacts provide the supported packaging without promoting test fixtures into production code.
Rationale ​
Delegating mature checkpoint, suspension, and wake-up mechanics reduces the distributed-systems surface maintained by TPF without creating a second semantic authority. Stable TPF identities and idempotent transitions make provider replay safe, while the TPF checkpoint permits recovery after provider-history loss.
The boundary becomes invalid if callback or provider history must become the only record of a semantic transition, or if recovery requires duplicating the complete TPF state machine in provider history.
Consequences ​
AWS hosting may use provider-specific infrastructure while preserving one portable TPF execution model.
The coordination-host seam separates
PipelineControlPlaneactions and the reconstructable TPF checkpoint from native-loop or provider mechanics.FUNCTIONremains worker placement. Selecting AWS Durable changes coordination hosting, not the meaning ofFUNCTIONor the SQS worker protocol.Other providers may implement optimised hosts if they pass the same conformance properties; infrastructure uniformity is not required.
Immutable provider-generation claims and successor fences remain mechanical authority outside TPF state. Preserve them beyond callback TTL for the supported recovery lifetime; recording a successor never substitutes for replaying an unresolved provider start.
AWS callback/history contract questions remain suitable for direct provider validation, but they do not move TPF semantic authority.
The control plane may expose a bounded observation of the execution’s current semantic Await unit/primary interaction. Completed interaction status remains observable while parent consequences are pending. Generation and callback occurrence are added only by the mechanical host and do not enter that semantic observation.
Itemised observation carries a store-owned, tenant/unit-bound cursor between bounded calls. TPF rechecks selected index entries against current interaction state. The host forwards progress without interpreting a store token or inferring completion from an empty page.
A retained mechanical admission locator is written before semantic submission. When the submit acknowledgement or provider history is lost, recovery resolves an existing admission through TPF's normalised client-key read and validates pipeline, contract and Release pins. Missing admission remains retryable and does not authorise resubmission, re-drive or adoption of another Release. Input-derived keys require a separately supported recovery contract; they cannot be reconstructed by the AWS host.
The compiler's FUNCTION REST bridge buffers finite output streams as JSON arrays and its paired client restores typed stream cardinality. COMPUTE REST retains SSE. This is deployment wire adaptation, with invocation, memory and payload bounds; it introduces no new semantic step kind or provider-owned Await state.
The control plane also exposes an admitted, bounded execution observation containing tenant/execution identity, pipeline, contract, Release and current status. Native recovery and operator tooling need these same semantic facts; no provider identity, callback or DynamoDB schema enters the contract. Execution Stream images remain hints. A terminal observation may settle a disposable provider callback, but it cannot admit Await completion or authorise semantic re-drive.
Retained execution recovery locators relate those semantic identities to provider executions outside TPF state. Preserve them and generation authority for the supported recovery lifetime, independently of callback TTL. Reconstruction uses the original numbered coordinator and action code. The retained admission locator covers uncertain submission; full recovery conformance remains a separate validation gate.