Skip to content

test: add plugin info-shape handlers - #683

Merged
wangyb-A merged 1 commit into
mainfrom
conformance/plugin-info-shape-handlers
Aug 27, 2026
Merged

test: add plugin info-shape handlers#683
wangyb-A merged 1 commit into
mainfrom
conformance/plugin-info-shape-handlers

Conversation

@wangyb-A

Copy link
Copy Markdown
Contributor

Summary

  • add Python conformance handlers for existing plugin requirements 10-19 through 10-23
  • emit canonical hook-info field shapes directly from each SDK hook's own info object
  • register each handler in the plugin SAM template

Requirement mappings

  • 10-19 → invocation start/end info shape
  • 10-20 → operation start/end info shape
  • 10-21 → attempt start/end info shape with real SDK retry behavior
  • 10-22 → operation-change delta item info shape
  • 10-23 → context subtype and children-replay info shape

Validation

  • Ruff lint and format checks
  • conformance package unit tests: 10 passed
  • documented handler build assembly
  • import smoke test for all five built handlers
  • sam validate --lint for the plugin template
  • Gate B substantive requirement review: PASS

The live AWS conformance validator was not run locally.

@wangyb-A
wangyb-A deployed to ai-pr-review August 25, 2026 23:42 — with GitHub Actions Active
@wangyb-A
wangyb-A had a problem deploying to ai-pr-review-runtime August 25, 2026 23:45 — with GitHub Actions Failure
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime August 25, 2026 23:45 — with GitHub Actions Inactive
return "x"


def branch_a(context: DurableContext) -> str:

This comment was marked as outdated.

@github-actions

This comment has been minimized.

@wangyb-A
wangyb-A force-pushed the conformance/plugin-info-shape-handlers branch from 32e260f to a65a42e Compare August 26, 2026 23:35
@wangyb-A
wangyb-A deployed to ai-pr-review August 26, 2026 23:35 — with GitHub Actions Active
@wangyb-A
wangyb-A had a problem deploying to ai-pr-review-runtime August 26, 2026 23:48 — with GitHub Actions Failure
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime August 26, 2026 23:48 — with GitHub Actions Inactive
@github-actions

This comment has been minimized.

@wangyb-A
wangyb-A marked this pull request as ready for review August 27, 2026 19:50
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime August 27, 2026 19:50 — with GitHub Actions Inactive
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime August 27, 2026 19:50 — with GitHub Actions Inactive
@wangyb-A
wangyb-A had a problem deploying to ai-pr-review-runtime August 27, 2026 19:50 — with GitHub Actions Failure
@wangyb-A
wangyb-A merged commit 5b5b096 into main Aug 27, 2026
34 of 36 checks passed
@wangyb-A
wangyb-A deleted the conformance/plugin-info-shape-handlers branch August 27, 2026 19:53

def branch_a(context: DurableContext) -> str:
context.step(inner(), name="inner")
context.wait(Duration.from_seconds(2))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
record = {"durableExecutionArn": execution_arn, **record}
record = {
"durableExecutionArn": execution_arn,
"executionArn": execution_arn,
**record,
}

Comment on lines +41 to +43
"id": info.operation_id,
"type": info.operation_type.name,
"isReplay": info.is_replayed,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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,

@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

Three 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 a65a42ee58b8f4f9f510cceabfce584cbc453a62. Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants