test: add plugin info-shape handlers - #683
Conversation
| return "x" | ||
|
|
||
|
|
||
| def branch_a(context: DurableContext) -> str: |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
32e260f to
a65a42e
Compare
This comment has been minimized.
This comment has been minimized.
|
|
||
| def branch_a(context: DurableContext) -> str: | ||
| context.step(inner(), name="inner") | ||
| context.wait(Duration.from_seconds(2)) |
There was a problem hiding this comment.
Codex AI review
This only replays a STARTED context. info.is_replay_children becomes true only after a context succeeds with an oversized result checkpointed as ReplayChildren; all results here are small, so every emitted value remains false and 10-23 never tests the true case. Produce an oversized context result, then force a later invocation with a wait after that context completes.
|
|
||
| def _emit(record: dict[str, Any], execution_arn: str | None) -> None: | ||
| if execution_arn is not None: | ||
| record = {"durableExecutionArn": execution_arn, **record} |
There was a problem hiding this comment.
Codex AI review
durableExecutionArn is the runner's correlation key, not the canonical camelCase projection of InvocationInfo.execution_arn. Unlike the operation-change handler, 10-19 never emits executionArn, so it cannot validate that invocation-info field. Retain the correlation key and emit executionArn too.
| record = {"durableExecutionArn": execution_arn, **record} | |
| record = { | |
| "durableExecutionArn": execution_arn, | |
| "executionArn": execution_arn, | |
| **record, | |
| } |
| "id": info.operation_id, | ||
| "type": info.operation_type.name, | ||
| "isReplay": info.is_replayed, |
There was a problem hiding this comment.
Codex AI review
UserFunctionStartInfo and UserFunctionEndInfo inherit the non-optional status field from OperationInfo, but the advertised full attempt shape drops it. Consequently 10-21 can pass without validating this public field. Include the status in the common record.
| "id": info.operation_id, | |
| "type": info.operation_type.name, | |
| "isReplay": info.is_replayed, | |
| "id": info.operation_id, | |
| "type": info.operation_type.name, | |
| "status": info.status.name, | |
| "isReplay": info.is_replayed, |
Codex AI reviewThree conformance handlers fail to fully exercise their advertised hook-info contracts. Residual risk remains around cloud-only hook ordering, which lacks local unit coverage. Reviewed commit |
Summary
10-19through10-23Requirement mappings
10-19→ invocation start/end info shape10-20→ operation start/end info shape10-21→ attempt start/end info shape with real SDK retry behavior10-22→ operation-change delta item info shape10-23→ context subtype and children-replay info shapeValidation
sam validate --lintfor the plugin templateThe live AWS conformance validator was not run locally.