Defects will automatically open when tests fail. The type will depend on a number of factors. By default, they are opened as a project defect, but if the model indicates that these failure were flaky the default type will be set to flaky.
The model for determining flakiness looks at a large number of features, such as:
Defects other than of type, ‘flaky,’ will be closed automatically when all the associated tests (tests that have failed because of this defect) pass on a commit which is a child of the commit which caused the defect.
Caused by commits are the set of commits which caused the defect.
Closed by commits are the set of commits which closed the defect.