Skip to content

test: add plugin info-shape handlers - #683

Draft
wangyb-A wants to merge 1 commit into
mainfrom
conformance/plugin-info-shape-handlers
Draft

test: add plugin info-shape handlers#683
wangyb-A wants to merge 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

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

[P1] Exercise actual ReplayChildren mode. A normal wait only re-enters a STARTED context; it does not set ContextDetails.ReplayChildren, so every emitted isReplayingChildren value remains false. Requirement 10-23 therefore never validates the true case. Produce a context result larger than 256 KiB, then suspend after that context succeeds so the next invocation replays it with ReplayChildren enabled.

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

[P2] Include status in the attempt shape. UserFunctionStartInfo and UserFunctionEndInfo inherit OperationInfo.status, but this serializer drops it despite claiming to emit the full attempt shape. Add the status so requirement 10-21 validates that field.

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,

Comment on lines +301 to +304
PluginInvocationInfoShape:
Type: AWS::Serverless::Function
TestingMetadata:
TestDescription: ["10-19"]

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

[P2] Add unit coverage for the new handlers. Existing tests only exercise suite discovery and role injection; none imports these handlers or verifies their emitted records and replay behavior. Add focused callback/output tests for requirements 10-19 through 10-23, including a true ReplayChildren case, as required by the repository's testing rules.

@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

Found two conformance-handler correctness gaps. The five new handlers also lack focused 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.

1 participant