You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config.py exposes several types that are not wired into any operation. They accept user input and silently do nothing. This proposes removing them in v2, since removal changes the public config surface and is a breaking change.
MapConfig.item_batcher is never read. MapExecutor.from_items (src/aws_durable_execution_sdk_python/operation/map.py) consumes every other MapConfig field but not item_batcher. Items are never batched.
ItemsPerBatchUnit has no consumers. It also contains a latent bug: COUNT = ("COUNT",) defines a tuple value due to a trailing comma, and tests/config_test.py asserts the tuple.
BatchedInput is never constructed. It appears only in the map callable type hint (U | BatchedInput[Any, U] in context.py and types.py), advertising batching that does not exist.
[Docs]: Map Operations - Batching items #304 confirmed the docs side: "ItemBatcher is not implemented yet and reserved for future use." The docs section was removed but the code remained.
The JS SDK has no batching concept. MapConfig in aws-durable-execution-sdk-js/src/types/batch.ts has no itemBatcher, and MapFunc is (context, item, index, array).
Proposed change: remove ItemBatcher, ItemsPerBatchUnit, BatchedInput, and MapConfig.item_batcher. Simplify the map callable signature to Callable[[DurableContext, U, int, Sequence[U]], T], matching JS MapFunc.
2. TerminationMode
Defined in config.py with values TERMINATE, CANCEL, WAIT, ABANDON. Zero references in src/ outside its own definition. The only usage is a value-assertion test in tests/config_test.py. Neither the JS SDK nor the Java SDK has an equivalent.
Proposed change: remove the enum and its test.
3. StepFuture
Defined in config.py. Zero references in src/ outside its own definition. It mirrors the JS DurablePromise, but the Python SDK's synchronous execution model never adopted it. The only usage is a shape test in tests/config_test.py.
Proposed change: remove the class and its tests.
4. ChildConfig.item_serdes
ChildConfig.item_serdes is never read. ChildOperationExecutor (src/aws_durable_execution_sdk_python/operation/child.py) consumes serdes, sub_type, summary_generator, and is_virtual but not item_serdes. The map/parallel call sites in context.py explicitly pass item_serdes=None into the ChildConfig they build, with a comment stating the child handler should only know the parent serdes.
The "Backward Compatibility: If only 'serdes' is provided..." paragraph in the ChildConfig docstring describes the item_serdes or serdes fallback that exists in the concurrency executor for map/parallel, not in the child executor. The docstring documents behavior the class does not have.
Neither of the other SDKs has the field. JS ChildConfig is serdes, subType, summaryGenerator, errorMapper, virtualContext. Java RunInChildContextConfig is serDes and isVirtual only.
Proposed change: remove ChildConfig.item_serdes and the stale backward-compatibility docstring paragraph.
Related: WaitStrategyConfig.timeout
WaitStrategyConfig (waits.py) carries a timeout field annotated "Not implemented yet". create_wait_strategy never reads it. Recommendation: delete the field rather than implement it, as part of the WaitStrategyConfig removal already proposed in #530.
There is no backend mechanism that could enforce it. The wait strategy is entirely client-side. On the wire, StepOptions carries only NextAttemptDelaySeconds and WaitOptions carries only WaitSeconds. Only callbacks have a backend-enforced TimeoutSeconds.
The strategy callable receives only (state, attempts_made), so a wall-clock implementation would require clock reads inside replayed code. A deterministic total-time cap reduces to what max_attempts plus bounded backoff already provides.
The Java SDK has no such field. WaitStrategies.exponentialBackoff and fixedDelay bound polling by attempts only.
The JS SDK carries the identical unimplemented field (timeoutSeconds in utils/wait-strategy/wait-strategy-config.ts, commented "not implemented in this version"). It should be removed there too for three-SDK consistency. This is being raised with the JS SDK owners separately.
None of these symbols are exported from the package __init__.py. Breakage is limited to code importing them from aws_durable_execution_sdk_python.config directly. item_batcher removal also breaks callers that pass the argument to MapConfig, which is why this targets v2.
Summary
config.pyexposes several types that are not wired into any operation. They accept user input and silently do nothing. This proposes removing them in v2, since removal changes the public config surface and is a breaking change.Unused types
1.
ItemBatcher,MapConfig.item_batcher,ItemsPerBatchUnit,BatchedInputMapConfig.item_batcheris never read.MapExecutor.from_items(src/aws_durable_execution_sdk_python/operation/map.py) consumes every otherMapConfigfield but notitem_batcher. Items are never batched.ItemsPerBatchUnithas no consumers. It also contains a latent bug:COUNT = ("COUNT",)defines a tuple value due to a trailing comma, andtests/config_test.pyasserts the tuple.BatchedInputis never constructed. It appears only in themapcallable type hint (U | BatchedInput[Any, U]incontext.pyandtypes.py), advertising batching that does not exist.MapConfiginaws-durable-execution-sdk-js/src/types/batch.tshas noitemBatcher, andMapFuncis(context, item, index, array).Proposed change: remove
ItemBatcher,ItemsPerBatchUnit,BatchedInput, andMapConfig.item_batcher. Simplify themapcallable signature toCallable[[DurableContext, U, int, Sequence[U]], T], matching JSMapFunc.2.
TerminationModeDefined in
config.pywith values TERMINATE, CANCEL, WAIT, ABANDON. Zero references insrc/outside its own definition. The only usage is a value-assertion test intests/config_test.py. Neither the JS SDK nor the Java SDK has an equivalent.Proposed change: remove the enum and its test.
3.
StepFutureDefined in
config.py. Zero references insrc/outside its own definition. It mirrors the JSDurablePromise, but the Python SDK's synchronous execution model never adopted it. The only usage is a shape test intests/config_test.py.Proposed change: remove the class and its tests.
4.
ChildConfig.item_serdesChildConfig.item_serdesis never read.ChildOperationExecutor(src/aws_durable_execution_sdk_python/operation/child.py) consumesserdes,sub_type,summary_generator, andis_virtualbut notitem_serdes. The map/parallel call sites incontext.pyexplicitly passitem_serdes=Noneinto theChildConfigthey build, with a comment stating the child handler should only know the parent serdes.ChildConfigdocstring describes theitem_serdes or serdesfallback that exists in the concurrency executor for map/parallel, not in the child executor. The docstring documents behavior the class does not have.ChildConfigisserdes,subType,summaryGenerator,errorMapper,virtualContext. JavaRunInChildContextConfigisserDesandisVirtualonly.Proposed change: remove
ChildConfig.item_serdesand the stale backward-compatibility docstring paragraph.Related:
WaitStrategyConfig.timeoutWaitStrategyConfig(waits.py) carries atimeoutfield annotated "Not implemented yet".create_wait_strategynever reads it. Recommendation: delete the field rather than implement it, as part of theWaitStrategyConfigremoval already proposed in #530.StepOptionscarries onlyNextAttemptDelaySecondsandWaitOptionscarries onlyWaitSeconds. Only callbacks have a backend-enforcedTimeoutSeconds.(state, attempts_made), so a wall-clock implementation would require clock reads inside replayed code. A deterministic total-time cap reduces to whatmax_attemptsplus bounded backoff already provides.WaitStrategies.exponentialBackoffandfixedDelaybound polling by attempts only.timeoutSecondsinutils/wait-strategy/wait-strategy-config.ts, commented "not implemented in this version"). It should be removed there too for three-SDK consistency. This is being raised with the JS SDK owners separately.Out of scope
InvokeConfig.timeoutis already tracked in Remove timeout from invoke #321 with PR fix: remove timeout from Invoke Config #340 open.create_wait_strategyruntime type mismatch and exhaustion semantics are tracked in [Bug]: Wait for callback create_wait_strategy failed at runtime #530.Impact
None of these symbols are exported from the package
__init__.py. Breakage is limited to code importing them fromaws_durable_execution_sdk_python.configdirectly.item_batcherremoval also breaks callers that pass the argument toMapConfig, which is why this targets v2.