@@ -50,21 +50,25 @@ private DurableContext(
5050 durableConfig .getLoggerConfig ().suppressReplayLogs ());
5151 }
5252
53- /** Creates a root context with the given contextId and registers the current thread. */
53+ /**
54+ * Creates a root context and registers the current thread for execution coordination.
55+ *
56+ * <p>The context itself always has a null contextId (making it a root context). The thread is registered with the
57+ * ExecutionManager using the default {@link #ROOT_CONTEXT} identifier.
58+ *
59+ * @param executionManager the execution manager
60+ * @param durableConfig the durable configuration
61+ * @param lambdaContext the Lambda context
62+ * @return a new root DurableContext
63+ */
5464 static DurableContext createRootContext (
55- ExecutionManager executionManager , DurableConfig durableConfig , Context lambdaContext , String contextId ) {
65+ ExecutionManager executionManager , DurableConfig durableConfig , Context lambdaContext ) {
5666 var ctx = new DurableContext (executionManager , durableConfig , lambdaContext , null );
57- executionManager .registerActiveThread (contextId , ThreadType .CONTEXT );
58- executionManager .setCurrentContext (contextId , ThreadType .CONTEXT );
67+ executionManager .registerActiveThread (ROOT_CONTEXT , ThreadType .CONTEXT );
68+ executionManager .setCurrentContext (ROOT_CONTEXT , ThreadType .CONTEXT );
5969 return ctx ;
6070 }
6171
62- /** Creates a root context with the default "Root" contextId and registers the current thread. */
63- static DurableContext createRootContext (
64- ExecutionManager executionManager , DurableConfig durableConfig , Context lambdaContext ) {
65- return createRootContext (executionManager , durableConfig , lambdaContext , ROOT_CONTEXT );
66- }
67-
6872 /**
6973 * Creates a child context without registering the current thread. Thread registration is handled by
7074 * ChildContextOperation, which registers on the parent thread before the executor runs and sets the context on the
0 commit comments