ADR-0093: Registered SYNC transition workers execute admitted Commands under verified scope and recoverable store authority ​
Context ​
In a separated Coordinator and worker topology, the shared QUEUE_ASYNC Coordinator owns durable execution records, leases, release pinning, Await admission, retries, and re-drive while keeping its classpath free of application DTOs, Connector implementations, and generated steps (ADR-0089). Standalone registered transition workers run in SYNC mode (pipeline.orchestrator.mode=SYNC with pipeline.orchestrator.worker.rest.server-enabled=true) so they do not start a second Coordinator, claim queue leases, or hold Coordinator signing keys.
Previously, CommandStepSupport unconditionally rejected every mode other than QUEUE_ASYNC. A registered SYNC transition worker executing an admitted, leased segment from the shared Coordinator could not run ordinary kind: command steps or Command callback completions, even when configured with remote Await authority.
Decision ​
Admitted, leased Command execution in registered SYNC transition workers is governed by a framework-owned worker Command authority contract across packaging, capability probing, admission, and execution:
Verified leased worker scope (
CommandWorkerExecutionScope):PipelineExecutionServiceconstructs and installs an immutableCommandWorkerExecutionScope(tenant, execution, pipeline, contract/release version, claimed execution version, transition key, leased segment step bounds, worker transport, artifact id, and artifact digest) only for portable remote transitions (policy != IN_PROCESS) when a remote worker server is enabled.CommandReexecutionScopecarries both retry/reissue admission andCommandWorkerExecutionScopein itsSnapshot, preserving them across nested invocation snapshots,CommandDeferredCompletionSupportasync Await calls, asynchronousUni<CommandDescriptor>resolution, andCommandEffectStore.find(...)worker-pool hops.- Local and in-process calls clear any worker scope; unscoped
SYNCinvocations remain rejected.
Explicit recoverable effect-store authority:
- In
SYNCmode,CommandStepSupportrequires both a presentCommandWorkerExecutionScopematchingPipelineExecutionContextand a single explicit recoverableCommandEffectStore(supportsRecovery(),supportsNativeOutcomeSnapshots(),RETRY, andREISSUE). InMemoryCommandEffectStoreandpipeline.command.effect-store.provider=memoryare rejected unconditionally for admittedSYNCworker execution.- Local
QUEUE_ASYNCbehaviour remains unchanged.
- In
Capability advertisement and admission gating (
command-authority-v1):RestTransitionWorkerResourceadvertisescommand-authority-v1inPipelineWorkerCapability.workerProtocols()only when a remote worker server is enabled and wired to a single explicit recoverableCommandEffectStore.RegisteredRestWorkerTargetschecks whether the pinned Release contract contains anykind: commandstep (root or nested) and rejects workers lackingcommand-authority-v1during both availability/admission checks and transition dispatch.
Release packaging and deployment enforcement:
AwsDurableHostedProfile.requireRestWorkerReleaserequires exactly oneaws:dynamodb:command-effectsbinding on both the deployment and theAWS_DURABLE_REST_WORKERentry when the compiled contract containskind: commandsteps (and zero otherwise).PipelineReleasePackageVerifierverifiesMETA-INF/tpf/runtime-capabilities.propertiesagainst that binding so packages built with the default in-memory store fail Release production before deployment.AwsDurableDeploymentConfigSourceFactorymaps optionaltpf.aws.durable.command-effect-tabletopipeline.command.effect-store.*for pinned workers.
Rationale ​
Separating execution leasing (Coordinator) from external effect recording (worker's explicit recoverable CommandEffectStore) preserves the app-free Coordinator boundary without forcing applications to start a second Coordinator, distribute native signing keys to workers, disguise ordinary Commands as artificial Await boundaries, or weaken durability by accepting the default in-memory store.
Consequences ​
- Ordinary
kind: commandsteps and deferred Command/Await callbacks execute cleanly on registeredSYNCREST workers while keeping the Coordinator free of application DTOs, Connector providers, and generated steps. - Captured Command/occurrence/attempt identities, duplicate replay (
RETURN_RECORDED/FAIL), deliberateRETRY_FAILED_COMMANDandREISSUE_COMMANDredrive, and uncertainAMBIGUOUSprovider reconciliation preserve the guarantees of ADR-0006, ADR-0018, ADR-0025, and ADR-0037. - Workers built with
pipeline.command.effect-store.provider=memoryfail closed at Release packaging, capability probing, admission, and execution time rather than silently losing effect history across restarts. PipelineWorkerCapabilitykeeps its existing wire schema (ADR-0050);command-authority-v1is advertised through the existingworkerProtocolslist.