From 66c135c7c21e03bb1b1867f01c2837a93e296b2d Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Sat, 1 Aug 2026 00:03:54 +0000 Subject: [PATCH] style: format plugin conformance handlers --- .../main/java/plugin/PluginFaultyAndHealthy.java | 6 +++--- .../main/java/plugin/PluginParallelBranchHooks.java | 4 ++-- .../src/main/java/plugin/PluginReplayFlags.java | 8 ++++---- .../src/main/java/plugin/PluginRetryExhaustion.java | 4 ++-- .../src/main/java/plugin/PluginSupport.java | 13 ++++++++----- .../main/java/plugin/PluginWaitOperationHooks.java | 4 ++-- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/conformance-tests/src/main/java/plugin/PluginFaultyAndHealthy.java b/conformance-tests/src/main/java/plugin/PluginFaultyAndHealthy.java index 744b6aa1f..34ca77378 100644 --- a/conformance-tests/src/main/java/plugin/PluginFaultyAndHealthy.java +++ b/conformance-tests/src/main/java/plugin/PluginFaultyAndHealthy.java @@ -18,9 +18,9 @@ * *

A single greeting step configured with TWO plugins registered together, in order: first a faulty plugin whose * every exercised hook (invocation-start, operation-start, attempt-start, attempt-end, operation-end, invocation-end) - * logs a record then throws, then a healthy plugin that logs the corresponding six records normally. The SDK's {@code - * PluginRunner} isolates each plugin at every hook boundary (swallows the faulty plugin's exceptions), so the healthy - * plugin still receives every hook and the execution result/history are identical to running without the faulty + * logs a record then throws, then a healthy plugin that logs the corresponding six records normally. The SDK's + * {@code PluginRunner} isolates each plugin at every hook boundary (swallows the faulty plugin's exceptions), so the + * healthy plugin still receives every hook and the execution result/history are identical to running without the faulty * plugin. Attempt boundaries are the real user-function hooks ({@code onUserFunctionStart}/{@code onUserFunctionEnd}, * filtered to step attempts); the healthy attempt-end reports the SDK's real success/failure outcome. */ diff --git a/conformance-tests/src/main/java/plugin/PluginParallelBranchHooks.java b/conformance-tests/src/main/java/plugin/PluginParallelBranchHooks.java index f4292c447..4931c2e3b 100644 --- a/conformance-tests/src/main/java/plugin/PluginParallelBranchHooks.java +++ b/conformance-tests/src/main/java/plugin/PluginParallelBranchHooks.java @@ -20,8 +20,8 @@ * *

A parallel operation named "parallel" with two branches (max-concurrency 1, so they run sequentially in index * order); each branch returns a constant directly. The plugin, filtering to parallel-branch operations, logs fn-start - * and fn-end (with outcome) from the real user-function hooks, carrying the branch operation id and the parallel - * parent id. These hooks run on the branch's own thread, so start-before-end order per branch is deterministic. + * and fn-end (with outcome) from the real user-function hooks, carrying the branch operation id and the parallel parent + * id. These hooks run on the branch's own thread, so start-before-end order per branch is deterministic. */ @SuppressWarnings("deprecation") public class PluginParallelBranchHooks extends DurableHandler> { diff --git a/conformance-tests/src/main/java/plugin/PluginReplayFlags.java b/conformance-tests/src/main/java/plugin/PluginReplayFlags.java index 0a061f76a..73e8b49fd 100644 --- a/conformance-tests/src/main/java/plugin/PluginReplayFlags.java +++ b/conformance-tests/src/main/java/plugin/PluginReplayFlags.java @@ -17,10 +17,10 @@ /** * 10-13: Non-terminal operations replay with replay=true; terminal operations are not re-emitted. * - *

Two sequential steps. Step A succeeds on its first attempt (terminal before the retry invocation). Step B fails - * on its first attempt and succeeds on the second, using the SDK's built-in exponential-backoff retry strategy - * (~1s delay). The plugin, filtering to step-type operations, logs operation-start with the SDK's is-replayed - * indicator ({@code OperationInfo#isReplay()}) and operation-end with the terminal status. + *

Two sequential steps. Step A succeeds on its first attempt (terminal before the retry invocation). Step B fails on + * its first attempt and succeeds on the second, using the SDK's built-in exponential-backoff retry strategy (~1s + * delay). The plugin, filtering to step-type operations, logs operation-start with the SDK's is-replayed indicator + * ({@code OperationInfo#isReplay()}) and operation-end with the terminal status. */ @SuppressWarnings("deprecation") public class PluginReplayFlags extends DurableHandler { diff --git a/conformance-tests/src/main/java/plugin/PluginRetryExhaustion.java b/conformance-tests/src/main/java/plugin/PluginRetryExhaustion.java index 642f99a03..782d22474 100644 --- a/conformance-tests/src/main/java/plugin/PluginRetryExhaustion.java +++ b/conformance-tests/src/main/java/plugin/PluginRetryExhaustion.java @@ -18,8 +18,8 @@ /** * 10-15: Attempt hooks fire for every attempt until exhaustion, then operation-end reports FAILED. * - *

A single step that always throws, configured with the SDK's built-in exponential-backoff retry strategy allowing - * 2 total attempts (1 initial + 1 retry, ~1s delay). The plugin, filtering to step-type operations, logs attempt-start + *

A single step that always throws, configured with the SDK's built-in exponential-backoff retry strategy allowing 2 + * total attempts (1 initial + 1 retry, ~1s delay). The plugin, filtering to step-type operations, logs attempt-start * and attempt-end (with outcome) from the real user-function hooks (which carry the 1-based attempt number) and * operation-end when the step reaches its terminal FAILED status. */ diff --git a/conformance-tests/src/main/java/plugin/PluginSupport.java b/conformance-tests/src/main/java/plugin/PluginSupport.java index 7260a0c43..474f94e6c 100644 --- a/conformance-tests/src/main/java/plugin/PluginSupport.java +++ b/conformance-tests/src/main/java/plugin/PluginSupport.java @@ -5,16 +5,19 @@ /** * Shared helpers for the plugin conformance handlers (requirements 10-8..10-18). * - *

Every plugin captures the durable execution ARN from the invocation-start hook's info parameter and stamps it as - * a top-level {@code durableExecutionArn} field on every stdout JSON record, so the runner's execution-scoped - * CloudWatch filter ({@code $.durableExecutionArn = ""}) locates the records. These helpers only format that - * field and classify operation types reported by the real SDK; no behavior is fabricated here. + *

Every plugin captures the durable execution ARN from the invocation-start hook's info parameter and stamps it as a + * top-level {@code durableExecutionArn} field on every stdout JSON record, so the runner's execution-scoped CloudWatch + * filter ({@code $.durableExecutionArn = ""}) locates the records. These helpers only format that field and + * classify operation types reported by the real SDK; no behavior is fabricated here. */ final class PluginSupport { private PluginSupport() {} - /** Operation type token for step operations as reported by {@code OperationInfo#type()} (AWS SDK {@code OperationType}). */ + /** + * Operation type token for step operations as reported by {@code OperationInfo#type()} (AWS SDK + * {@code OperationType}). + */ static boolean isStep(String type) { return "STEP".equals(type); } diff --git a/conformance-tests/src/main/java/plugin/PluginWaitOperationHooks.java b/conformance-tests/src/main/java/plugin/PluginWaitOperationHooks.java index ab0fe671b..94b7ea5c3 100644 --- a/conformance-tests/src/main/java/plugin/PluginWaitOperationHooks.java +++ b/conformance-tests/src/main/java/plugin/PluginWaitOperationHooks.java @@ -16,8 +16,8 @@ * 10-10: Plugin operation-start and operation-end hooks fire for wait-type operations. * *

A single 2-second wait. The plugin, filtering to wait-type operations, logs operation-start when the wait's - * STARTED checkpoint is observed and operation-end with the terminal status. The type token is normalized to - * upper-case (WAIT). + * STARTED checkpoint is observed and operation-end with the terminal status. The type token is normalized to upper-case + * (WAIT). */ @SuppressWarnings("deprecation") public class PluginWaitOperationHooks extends DurableHandler {