test(map): assert iteration Name in 9-13 so item namer is actually verified - #55
Merged
Merged
Conversation
…rified 9-13 asserted the two MapIteration events by placeholder id only and never checked Name, so an SDK that accepts an item namer and silently ignores it still passed. Name is an assertable top-level field on ContextStarted and ContextSucceeded events (confirmed against a recorded map execution history, where MapIteration events carry Name on both start and succeed). Assert Name literally on all six context events: named-items for the Map context, item-1 / item-2 for the two iterations. Both the JS and Python handlers already emit exactly these names, so this is a tightening of the assertion rather than a behavior change. Also drop the stale note claiming the Java MapConfig has no item-namer field; Java is adding MapConfig.itemNamer, so the requirement is no longer permanently Java-uncovered.
wangyb-A
marked this pull request as ready for review
July 31, 2026 20:57
wangyb-A
temporarily deployed
to
ai-pr-review-runtime
July 31, 2026 20:57 — with
GitHub Actions
Inactive
wangyb-A
temporarily deployed
to
ai-pr-review-runtime
July 31, 2026 20:57 — with
GitHub Actions
Inactive
Contributor
Claude AI reviewReview — PR #55: assert iteration
|
Contributor
Codex AI reviewNo actionable findings. Residual risk: cross-SDK integration coverage is required to confirm successful context events consistently emit the asserted Reviewed commit |
nvasiu
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Requirement 9-13 (map with a custom item namer) identified its two
MapIterationevents by placeholder id (
${ITER0},${ITER1}) and never assertedName. Therunner only checks keys present in the expected event and ignores extra actual keys,
so an SDK that accepted an item namer and then silently ignored it still passed
9-13. The requirement only proved that setting the option did not break results or
history shape.
Change
Nameis an assertable top-level field onContextStarted/ContextSucceeded.9-13 now asserts it literally on all six context events:
named-itemsitem-1item-2Iteration ids stay as placeholders — the name is what the feature controls, the id
is not.
Validation
Ran the full map suite against us-west-2 for all three SDKs with a runner built
from this branch:
The recorded histories confirm the assertion is genuinely exercised rather than
skipped — all three SDKs emit identical names:
Source-level confirmation that each SDK forwards the namer's return value verbatim
rather than decorating it:
map-handler.tssetsname: config.itemNamer(item, index);concurrent-execution-handler.tsresolvesitem.name || item.idoperation/map.pysetsname=config.item_namer(item, i);concurrency/executor.pyreturns the bound name when present, else{prefix}{index}MapOperationpassesitemNamer.apply(item, i)straight toenqueueItem111 runner unit tests pass.
Also
Dropped the stale note claiming the Java
MapConfighas no item-namer field andthat 9-13 is therefore expected to be permanently uncovered for Java. Java now
covers it via aws/aws-durable-execution-sdk-java#576.