How is comment widget controlled In the core within the comment module a widget is provided by CommentWidget.php file (namespaceDrupal\comment\Plugin\Field\FieldWidget;). In this widget comment settings like open, close, hidden is provided. I am able to understand its working but not able to find from where it is being further controlled. By controlling I mean where in module (node or comment) status of comment is being processed, how the node decides whether it should show comments or not. Please tell me the file in the core where I should be looking for the code which does this processing. Thanks.
It's not being controlled, it controls.

The widget allows you to edit the comment status of a given node/entity. That is stored in the comment field, and the comment formatter, that displays the comments/comment form is then using it to decide what to show.