Skip to content

fix: align plugin lifecycle logging transport - #791

Merged
zhongkechen merged 9 commits into
mainfrom
fix/plugin-log-ordering-20261020
Oct 22, 2026
Merged

zhongkechen merged 9 commits into
mainfrom
fix/plugin-log-ordering-20261020

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Requirement 10-1 intermittently reports the greeting before invocation-start even though the execution succeeds and the SDK calls the start hook synchronously. The hook writes to stdout while the greeting uses Python logging, so Lambda can assign their CloudWatch timestamps through different paths. Examples: failed run and earlier identical failure.

Send the lifecycle hook records through the same root logger as the SDK step logger, preserving the top-level plugin fields and execution ARN. Enable JSON/INFO logging explicitly on this test function. Regression tests cover the initial invocation and a replay that emits the hooks again without repeating the completed greeting step.

The upstream assertions remain unchanged. Conformance PR #143 clarifies that runtime structured logging is permitted with the same top-level JSON fields; merge that wording clarification first.

Validation:

  • 13 conformance-package tests and Hatch formatting/lint checks passed after cleanup.
  • The unchanged logging fix passed all 11 cloud conformance suites, including 23/23 plugin requirements and a one-off 40/40 lifecycle stress run. Those samples had no reversed log ordering; their raw records remain in that run's conformance-report-plugin artifact.
  • Python 3.11, 3.12, 3.13, and 3.14 build jobs passed before the diagnostic tooling was removed. Fresh CI is running on the cleanup commit.

@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 20, 2026 23:39 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 21, 2026 17:13 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 22, 2026 16:47 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 22, 2026 17:03 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Review was static: tests were not executed, and Lambda/CloudWatch log ordering was not independently verified.

Reviewed commit 71a9fa69ac5cee4477a99956131fc8b6c0d1c1b7. Workflow run

@hln33

hln33 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Is this issue present in other SDK conformance test handlers or just Python?

@zhongkechen
zhongkechen merged commit 531969b into main Oct 22, 2026
33 of 34 checks passed
@zhongkechen
zhongkechen deleted the fix/plugin-log-ordering-20261020 branch October 22, 2026 20:04
@zhongkechen

Copy link
Copy Markdown
Contributor Author

Is this issue present in other SDK conformance test handlers or just Python?

I created this PR because I found a flaky test in Python. I didn't check the other SDKs.

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — 71a9fa69 Deployed Oct 22, 2026 by zhongkechen via ai-pr-review / Codex review / Generate Codex review #2056
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