{"id":479916,"date":"2026-05-15T19:05:22","date_gmt":"2026-05-15T19:05:22","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=479916"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=479916","title":{"rendered":"FlakyDetector 2.0: \u041a\u0430\u043a \u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b \u0441\u044b\u0440\u043e\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 AST, ML \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u043c\u2026"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p><em>\u2014 \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0430\u0434\u0430\u0435\u0442 \u00ab\u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435\u00bb, \u0438 \u043a\u0430\u043a \u044f \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443.<\/em><\/p>\n<\/blockquote>\n<h3>\u00a0\u041b\u0438\u0434: \u0427\u0430\u0441 \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0438\u043b\u0434\u0430 \u2014 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430?<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c: \u043f\u044f\u0442\u043d\u0438\u0446\u0430, \u0432\u0435\u0447\u0435\u0440. \u0422\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c CI \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430, \u0438\u0434\u0451\u0448\u044c \u043d\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0444\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0448\u044c\u0441\u044f\u2026 \u0430 \u0431\u0438\u043b\u0434 \u0443\u043f\u0430\u043b. \u041e\u0434\u0438\u043d \u0442\u0435\u0441\u0442. \u0422\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442. \u00ab\u0424\u043b\u0430\u043a\u0438\u00bb, \u2014 \u0432\u0437\u0434\u044b\u0445\u0430\u0435\u0448\u044c \u0442\u044b \u0438 \u0441\u0442\u0430\u0432\u0438\u0448\u044c \u043b\u0435\u0439\u0431\u043b\u00a0<code>flaky<\/code>. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u0442\u043e\u043c \u0435\u0449\u0451 \u0440\u0430\u0437.<\/p>\n<p>\u041c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u0447\u0442\u043e\u00a0<strong>\u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u2014 \u044d\u0442\u043e \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e\u0435 \u0437\u043b\u043e<\/strong>. \u0418\u0445 \u043b\u043e\u0432\u044f\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0430\u043c\u0438, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043e\u0432\u0435\u0437\u0451\u0442  \u0432\u044b\u0440\u0435\u0437\u0430\u044e\u0442. \u041d\u043e \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0431\u0435\u0441\u0438\u0442? \u0412 80% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0411\u0435\u0437 \u043b\u043e\u0433\u043e\u0432 CI, \u0431\u0435\u0437 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e AST \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430\u0437\u0432\u0430\u043b \u0435\u0433\u043e\u00a0<strong>FlakyDetector<\/strong>. \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u043c (\u043f\u0440\u043e \u043d\u0435\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430\u00a0<a href=\"https:\/\/habr.com\/ru\/articles\/969354\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>). \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442: CLI, \u0432\u0435\u0431-\u0434\u0430\u0448\u0431\u043e\u0440\u0434, CI-\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0438 \u0434\u0430\u0436\u0435 React-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434. \u0418 \u0434\u0430, \u043e\u043d open source.<\/p>\n<p><strong><em>  <\/em><\/strong><em>\u0414\u0430\u0432\u0430\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e<\/em>.<\/p>\n<h3>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442: \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 flaky test \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u0445 \u043d\u0435 \u043b\u0435\u0447\u0430\u0442 \u043b\u043e\u0433\u0433\u0435\u0440\u0430\u043c\u0438?<\/h3>\n<p>Flaky-\u0442\u0435\u0441\u0442 \u2014 \u044d\u0442\u043e \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439\u00a0<strong>\u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/strong>\u00a0\u043c\u043e\u0436\u0435\u0442 \u0438 \u0443\u043f\u0430\u0441\u0442\u044c, \u0438 \u043f\u0440\u043e\u0439\u0442\u0438. \u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430:<\/p>\n<ul>\n<li>\n<p><code>time.sleep(0.5)<\/code>\u00a0\u2014 \u0430 \u043d\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043d\u0443\u0436\u043d\u043e 0.7.<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/datetime.now\" rel=\"noopener noreferrer nofollow\"><code>datetime.now<\/code><\/a><code>()<\/code>\u00a0\u2014 \u0430 \u0437\u0430\u0432\u0442\u0440\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0438\u0437-\u0437\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043b\u0435\u0442\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00a0<code>counter<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u0443\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u0441\u0442\u044b \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 API \u0431\u0435\u0437 \u043c\u043e\u043a\u0430 \u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u0435\u0441\u0442\u044c, \u0442\u043e \u043d\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e: \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0431\u0438\u043b\u0434. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u00a0<code>pytest-rerunfailures<\/code>. \u041d\u043e \u044d\u0442\u043e\u00a0<strong>\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u043f\u0442\u043e\u043c\u043e\u0432<\/strong>, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0438\u043d\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442\u00a0<code>time.sleep<\/code>. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u00ab\u0437\u0430\u043f\u0430\u0445\u043e\u043c\u00bb \u0446\u0438\u043a\u043b\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u0435\u0441\u0442\u0435? \u0418\u043b\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f? \u041f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<\/p>\n<p><em>\u041d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0443\u043c\u043d\u0435\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0<\/em><strong><em>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 + ML<\/em><\/strong><em>.<\/em><\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f64\/e0d\/d22\/f64e0dd22eddfe6c3676286b6a35ca13.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430.\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430.\" width=\"1585\" height=\"1349\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f64\/e0d\/d22\/f64e0dd22eddfe6c3676286b6a35ca13.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f64\/e0d\/d22\/f64e0dd22eddfe6c3676286b6a35ca13.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430.<\/figcaption><\/div>\n<\/figure>\n<h3>\u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438: \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0438\u0442 \u0433\u0440\u044f\u0434\u0443\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<p><em>FlakyDetector \u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u0432\u043e\u0439 \u0442\u0435\u0441\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043d\u043e \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u0438. \u041e\u043d:<\/em><\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0430\u0440\u0441\u0438\u0442 \u043a\u043e\u0434 \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (AST)<\/strong>\u00a0\u2014 \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e Python \u0441\u0442\u0440\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b<\/strong>\u00a0\u2014\u00a0<code>time.sleep<\/code>, \u0432\u044b\u0437\u043e\u0432\u044b\u00a0<a href=\"http:\/\/datetime.now\" rel=\"noopener noreferrer nofollow\"><code>datetime.now<\/code><\/a><code>()<\/code>, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0435\u0437\u0430\u043c\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0435\u0449\u0451 8 \u0432\u0438\u0434\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/strong>\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0446\u0438\u043a\u043b\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043a \u043b\u043e\u0433\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u0440\u043c\u0438\u0442 \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c CatBoost<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0434\u0430\u0451\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u0444\u043b\u0430\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h4>AST-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b: \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u00a0time.sleep<\/h4>\n<p><em>\u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u044e\u00a0<\/em><strong><em>11 \u0432\u0438\u0434\u043e\u0432 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432<\/em><\/strong><em>, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/em><\/p>\n<ul>\n<li>\n<p><strong>Timing<\/strong>\u00a0\u2013\u00a0<code>sleep<\/code>,\u00a0<code>time.time<\/code>,\u00a0<a href=\"http:\/\/datetime.now\" rel=\"noopener noreferrer nofollow\"><code>datetime.now<\/code><\/a>,\u00a0<code>threading.Timer<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>State<\/strong>\u00a0\u2013 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (<code>os.environ<\/code>),\u00a0<code>random<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>Network<\/strong>\u00a0\u2013 \u0432\u044b\u0437\u043e\u0432\u044b\u00a0<code>requests.get<\/code>,\u00a0<code>httpx<\/code>\u00a0\u0431\u0435\u0437 \u043c\u043e\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>Concurrency<\/strong>\u00a0\u2013\u00a0<code>threading<\/code>,\u00a0<code>asyncio.create_task<\/code>\u00a0\u0431\u0435\u0437 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><em>\u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u00a0<\/em><strong><em>severity<\/em><\/strong><em>\u00a0(LOW\/MEDIUM\/CRITICAL) \u0438\u00a0<\/em><strong><em>confidence<\/em><\/strong><em>\u00a0(\u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0432\u0435\u0440\u0435\u043d \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430).<\/em><\/p>\n<hr\/>\n<h4>Feature Engineering: \u043e\u0442 AST \u043a 37 \u0447\u0438\u0441\u043b\u0430\u043c<\/h4>\n<p><em>\u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u043c\u0430\u043b\u043e. \u041c\u043e\u0434\u0435\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\u00a0<\/em><strong><em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/em><\/strong><em>\u00a0\u0438\u00a0<\/em><strong><em>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442<\/em><\/strong><em>. \u042f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b 37-\u043c\u0435\u0440\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440:<\/em><\/p>\n<ul>\n<li>\n<p>16 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 AST-\u0443\u0437\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>9 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0430\u043b\u043b\u043e\u0432 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c (Timing, State, Network).<\/p>\n<\/li>\n<li>\n<p><strong>\u0426\u0438\u043a\u043b\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c<\/strong>\u00a0\u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0435\u0441\u043b\u0438 &gt;10 \u2014 \u0437\u0430\u043f\u0430\u0445).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438:\u00a0<code>ast_to_log_ratio<\/code>\u00a0(\u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043c\u0430\u043b\u043e \u043b\u043e\u0433\u043e\u0432 \u2014 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e),\u00a0<code>pattern_diversity<\/code>.<\/p>\n<\/li>\n<li>\n<p>8 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f, \u0441\u0440\u0435\u0434\u043d\u044f\u044f, \u0440\u0430\u0437\u0431\u0440\u043e\u0441.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h4>\u041c\u043e\u0434\u0435\u043b\u044c: CatBoost \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0451\u0440\u043d\u043e\u0433\u043e \u044f\u0449\u0438\u043a\u0430<\/h4>\n<p><em>\u042f \u0432\u044b\u0431\u0440\u0430\u043b CatBoost, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d:<\/em><\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438<\/strong>\u00a0(\u0443 \u043d\u0430\u0441 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c).<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0451\u0442\u00a0<strong>Feature Importance<\/strong>\u00a0\u2014 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0435\u0441\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043d \u0444\u043b\u0430\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041b\u0435\u0433\u043a\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0<code>.cbm<\/code>\u00a0\u0438 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430\u00a0<strong>\u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435<\/strong>\u00a0(\u0441\u043c\u0435\u0441\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 + \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u043a\u0438-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b). \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u2014\u00a0<strong>87%<\/strong>\u00a0(\u043f\u0440\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0435 82%). \u041d\u0435 \u0442\u043e\u043f, \u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e. \u0410 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014\u00a0<strong>\u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c\u043e<\/strong>.<\/p>\n<hr\/>\n<h3>\u0426\u0438\u0444\u0440\u044b, \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p><em>\u0427\u0442\u043e\u0431\u044b \u0442\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u043c\u0430\u0441\u0448\u0442\u0430\u0431:<\/em><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">AST-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">11+<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">37<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041c\u043e\u0434\u0435\u043b\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">CatBoost (gradient boosting)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">~50 \u043c\u0441 (\u043d\u0430 Core i5)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u042f\u0437\u044b\u043a\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">Python 3.12+<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">CLI, REST API, React Dashboard<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">GitHub Actions, Docker, pre-commit<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u044b?<\/strong><br \/>\u0415\u0441\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043a flake8 (<code>flake8-flaky-tests<\/code>), \u043d\u043e \u043e\u043d\u0438 \u0438\u0449\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>time.sleep<\/code>\u00a0\u0438\u00a0<code>pytest.mark.flaky<\/code>. \u0415\u0441\u0442\u044c\u00a0<code>pytest-repeat<\/code>, \u043d\u043e \u043e\u043d \u043d\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434. \u0410 ML-\u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 open source \u044f \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0432\u043e\u043e\u0431\u0449\u0435. FlakyDetector \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d.<\/p>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435: \u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f<\/h3>\n<p>\u0414\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2014 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0438 \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445.<\/p>\n<h4>CLI-\u0441\u043a\u0430\u043d\u0435\u0440 (\u0431\u044b\u0441\u0442\u0440\u043e)<\/h4>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/Artem7898\/flakydetectorcd flakydetectoruv venv --python 3.12source .venv\/bin\/activateuv pip install -e \".[dev]\"python scripts\/train_model.py  # \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044cuv run python scripts\/scan_folder.py .\/my_project\/tests\/<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 \u2014 \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 (\u0441\u043f\u0430\u0441\u0438\u0431\u043e\u00a0<code>rich<\/code>):<\/p>\n<pre><code class=\"bash\">\ud83d\udcc2 Scanning: .\/my_project\/tests\/ ...                               Flaky Patterns Detected\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\u2503 File           \u2503 Line  \u2503 Pattern       \u2503 Severity \u2503 Confidence\u2503\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\u2502 test_api.py    \u2502    42 \u2502 time_sleep    \u2502 MEDIUM   \u2502       90% \u2502\u2502 test_db.py     \u2502    15 \u2502 global_mutate \u2502 CRITICAL \u2502       95% \u2502\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>Docker + \u0432\u0435\u0431-\u0434\u0430\u0448\u0431\u043e\u0440\u0434 (\u0434\u043b\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432)<\/h4>\n<pre><code class=\"bash\">docker-compose up --build# \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 http:\/\/localhost:8001cd dashboard_frontend &amp;&amp; npm install &amp;&amp; npm run dev# \u0444\u0440\u043e\u043d\u0442 \u043d\u0430 http:\/\/localhost:3000<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><em>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0448\u044c \u2014 \u0430 \u0442\u0430\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f severity, \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u2014 \u0443\u0432\u0438\u0434\u0438\u0448\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u0434\u0430.<\/em><\/p>\n<h4>CI\/CD: \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c PR \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/h4>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c \u0432\u00a0<code>.github\/workflows\/flaky_detection.yml<\/code>:<\/p>\n<pre><code class=\"yaml\">- name: Run FlakyDetector  run: uv run python scripts\/scan_folder.py .\/tests --fail-on-critical<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u044b \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u0441\u044e\u0434\u0430 \u2014 \u0441\u043f\u0430\u0441\u0438\u0431\u043e. \u0422\u044b \u0443\u0436\u0435 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u044b\u0448\u0435 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0431\u0438\u043b\u0434 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434.<\/p>\n<p>FlakyDetector \u2014 \u044d\u0442\u043e \u043c\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 ML. \u041e\u043d \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u0435\u043d, \u043d\u043e \u043e\u043d \u0443\u0436\u0435\u00a0<strong>\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u044f<\/strong>. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0442\u0435\u0441\u0442\u044b. \u0423\u0432\u0435\u0440\u0435\u043d, \u043d\u0430\u0439\u0434\u0451\u0448\u044c \u043f\u0430\u0440\u0443 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432.<\/p>\n<p> \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:\u00a0<a href=\"https:\/\/github.com\/Artem7898\/flakydetector\" rel=\"noopener noreferrer nofollow\">github.com\/Artem7898\/flakydetector<\/a><br \/>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f (\u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f):\u00a0<a href=\"https:\/\/habr.com\/ru\/articles\/969354\/\" rel=\"noopener noreferrer nofollow\">habr.com\/ru\/articles\/969354<\/a><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1035782\/\">https:\/\/habr.com\/ru\/articles\/1035782\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2014 \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0430\u0434\u0430\u0435\u0442 \u00ab\u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435\u00bb, \u0438 \u043a\u0430\u043a \u044f \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443.\u00a0\u041b\u0438\u0434: \u0427\u0430\u0441 \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0438\u043b\u0434\u0430 \u2014 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430?\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c: \u043f\u044f\u0442\u043d\u0438\u0446\u0430, \u0432\u0435\u0447\u0435\u0440. \u0422\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c CI \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430, \u0438\u0434\u0451\u0448\u044c \u043d\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0444\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0448\u044c\u0441\u044f\u2026 \u0430 \u0431\u0438\u043b\u0434 \u0443\u043f\u0430\u043b. \u041e\u0434\u0438\u043d \u0442\u0435\u0441\u0442. \u0422\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442. \u00ab\u0424\u043b\u0430\u043a\u0438\u00bb, \u2014 \u0432\u0437\u0434\u044b\u0445\u0430\u0435\u0448\u044c \u0442\u044b \u0438 \u0441\u0442\u0430\u0432\u0438\u0448\u044c \u043b\u0435\u0439\u0431\u043b\u00a0flaky. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u0442\u043e\u043c \u0435\u0449\u0451 \u0440\u0430\u0437.\u041c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u0447\u0442\u043e\u00a0\u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u2014 \u044d\u0442\u043e \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e\u0435 \u0437\u043b\u043e. \u0418\u0445 \u043b\u043e\u0432\u044f\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0430\u043c\u0438, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043e\u0432\u0435\u0437\u0451\u0442  \u0432\u044b\u0440\u0435\u0437\u0430\u044e\u0442. \u041d\u043e \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0431\u0435\u0441\u0438\u0442? \u0412 80% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430.\u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0411\u0435\u0437 \u043b\u043e\u0433\u043e\u0432 CI, \u0431\u0435\u0437 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e AST \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.\u041d\u0430\u0437\u0432\u0430\u043b \u0435\u0433\u043e\u00a0FlakyDetector. \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u043c (\u043f\u0440\u043e \u043d\u0435\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430\u00a0\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435). \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442: CLI, \u0432\u0435\u0431-\u0434\u0430\u0448\u0431\u043e\u0440\u0434, CI-\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0438 \u0434\u0430\u0436\u0435 React-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434. \u0418 \u0434\u0430, \u043e\u043d open source.  \u0414\u0430\u0432\u0430\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e.\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442: \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 flaky test \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u0445 \u043d\u0435 \u043b\u0435\u0447\u0430\u0442 \u043b\u043e\u0433\u0433\u0435\u0440\u0430\u043c\u0438?Flaky-\u0442\u0435\u0441\u0442 \u2014 \u044d\u0442\u043e \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439\u00a0\u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\u00a0\u043c\u043e\u0436\u0435\u0442 \u0438 \u0443\u043f\u0430\u0441\u0442\u044c, \u0438 \u043f\u0440\u043e\u0439\u0442\u0438. \u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430:time.sleep(0.5)\u00a0\u2014 \u0430 \u043d\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043d\u0443\u0436\u043d\u043e 0.7.datetime.now()\u00a0\u2014 \u0430 \u0437\u0430\u0432\u0442\u0440\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0438\u0437-\u0437\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043b\u0435\u0442\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00a0counter, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u0443\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u0441\u0442\u044b \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 API \u0431\u0435\u0437 \u043c\u043e\u043a\u0430 \u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u0435\u0441\u0442\u044c, \u0442\u043e \u043d\u0435\u0442.\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e: \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0431\u0438\u043b\u0434. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u00a0pytest-rerunfailures. \u041d\u043e \u044d\u0442\u043e\u00a0\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u043f\u0442\u043e\u043c\u043e\u0432, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b.\u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0438\u043d\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442\u00a0time.sleep. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u00ab\u0437\u0430\u043f\u0430\u0445\u043e\u043c\u00bb \u0446\u0438\u043a\u043b\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u0435\u0441\u0442\u0435? \u0418\u043b\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f? \u041f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.\u041d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0443\u043c\u043d\u0435\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 + ML.\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430.\u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438: \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0438\u0442 \u0433\u0440\u044f\u0434\u0443\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044bFlakyDetector \u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u0432\u043e\u0439 \u0442\u0435\u0441\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043d\u043e \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u0438. \u041e\u043d:\u041f\u0430\u0440\u0441\u0438\u0442 \u043a\u043e\u0434 \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (AST)\u00a0\u2014 \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e Python \u0441\u0442\u0440\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439.\u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b\u00a0\u2014\u00a0time.sleep, \u0432\u044b\u0437\u043e\u0432\u044b\u00a0datetime.now(), \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0435\u0437\u0430\u043c\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0435\u0449\u0451 8 \u0432\u0438\u0434\u043e\u0432.\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0446\u0438\u043a\u043b\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043a \u043b\u043e\u0433\u0430\u043c.\u041a\u043e\u0440\u043c\u0438\u0442 \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c CatBoost, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0434\u0430\u0451\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u0444\u043b\u0430\u043a\u0438.AST-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b: \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u00a0time.sleep\u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u044e\u00a011 \u0432\u0438\u0434\u043e\u0432 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:Timing\u00a0\u2013\u00a0sleep,\u00a0time.time,\u00a0datetime.now,\u00a0threading.Timer.State\u00a0\u2013 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (os.environ),\u00a0random.Network\u00a0\u2013 \u0432\u044b\u0437\u043e\u0432\u044b\u00a0requests.get,\u00a0httpx\u00a0\u0431\u0435\u0437 \u043c\u043e\u043a\u0430.Concurrency\u00a0\u2013\u00a0threading,\u00a0asyncio.create_task\u00a0\u0431\u0435\u0437 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f.\u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u00a0severity\u00a0(LOW\/MEDIUM\/CRITICAL) \u0438\u00a0confidence\u00a0(\u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0432\u0435\u0440\u0435\u043d \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430).Feature Engineering: \u043e\u0442 AST \u043a 37 \u0447\u0438\u0441\u043b\u0430\u043c\u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u043c\u0430\u043b\u043e. \u041c\u043e\u0434\u0435\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\u00a0\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u00a0\u0438\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u042f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b 37-\u043c\u0435\u0440\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440:16 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 AST-\u0443\u0437\u043b\u043e\u0432.9 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0430\u043b\u043b\u043e\u0432 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c (Timing, State, Network).\u0426\u0438\u043a\u043b\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u00a0\u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0435\u0441\u043b\u0438 &gt;10 \u2014 \u0437\u0430\u043f\u0430\u0445).\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438:\u00a0ast_to_log_ratio\u00a0(\u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043c\u0430\u043b\u043e \u043b\u043e\u0433\u043e\u0432 \u2014 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e),\u00a0pattern_diversity.8 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f, \u0441\u0440\u0435\u0434\u043d\u044f\u044f, \u0440\u0430\u0437\u0431\u0440\u043e\u0441.\u041c\u043e\u0434\u0435\u043b\u044c: CatBoost \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0451\u0440\u043d\u043e\u0433\u043e \u044f\u0449\u0438\u043a\u0430\u042f \u0432\u044b\u0431\u0440\u0430\u043b CatBoost, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d:\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438\u00a0(\u0443 \u043d\u0430\u0441 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c).\u0414\u0430\u0451\u0442\u00a0Feature Importance\u00a0\u2014 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0435\u0441\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043d \u0444\u043b\u0430\u043a\u0438.\u041b\u0435\u0433\u043a\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0.cbm\u00a0\u0438 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0434.\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430\u00a0\u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435\u00a0(\u0441\u043c\u0435\u0441\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 + \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u043a\u0438-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b). \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u2014\u00a087%\u00a0(\u043f\u0440\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0435 82%). \u041d\u0435 \u0442\u043e\u043f, \u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e. \u0410 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014\u00a0\u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c\u043e.\u0426\u0438\u0444\u0440\u044b, \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u0427\u0442\u043e\u0431\u044b \u0442\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u043c\u0430\u0441\u0448\u0442\u0430\u0431:\u041c\u0435\u0442\u0440\u0438\u043a\u0430\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435AST-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043211+\u0420\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u043037\u041c\u043e\u0434\u0435\u043b\u044cCatBoost (gradient boosting)\u0412\u0440\u0435\u043c\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430~50 \u043c\u0441 (\u043d\u0430 Core i5)\u042f\u0437\u044b\u043a\u0438Python 3.12+\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044bCLI, REST API, React Dashboard\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438GitHub Actions, Docker, pre-commit\u041a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u044b?\u0415\u0441\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043a flake8 (flake8-flaky-tests), \u043d\u043e \u043e\u043d\u0438 \u0438\u0449\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e\u00a0time.sleep\u00a0\u0438\u00a0pytest.mark.flaky. \u0415\u0441\u0442\u044c\u00a0pytest-repeat, \u043d\u043e \u043e\u043d \u043d\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434. \u0410 ML-\u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 open source \u044f \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0432\u043e\u043e\u0431\u0449\u0435. FlakyDetector \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d.\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435: \u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0414\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2014 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0438 \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445.CLI-\u0441\u043a\u0430\u043d\u0435\u0440 (\u0431\u044b\u0441\u0442\u0440\u043e)git clone https:\/\/github.com\/Artem7898\/flakydetectorcd flakydetectoruv venv &#8212;python 3.12source .venv\/bin\/activateuv pip install -e &#171;.[dev]&#187;python scripts\/train_model.py  # \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044cuv run python scripts\/scan_folder.py .\/my_project\/tests\/\u0412\u044b\u0432\u043e\u0434 \u2014 \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 (\u0441\u043f\u0430\u0441\u0438\u0431\u043e\u00a0rich):\ud83d\udcc2 Scanning: .\/my_project\/tests\/ &#8230;                               Flaky Patterns Detected\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\u2503 File           \u2503 Line  \u2503 Pattern       \u2503 Severity \u2503 Confidence\u2503\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\u2502 test_api.py    \u2502    42 \u2502 time_sleep    \u2502 MEDIUM   \u2502       90% \u2502\u2502 test_db.py     \u2502    15 \u2502 global_mutate \u2502 CRITICAL \u2502       95% \u2502\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518Docker + \u0432\u0435\u0431-\u0434\u0430\u0448\u0431\u043e\u0440\u0434 (\u0434\u043b\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432)docker-compose up &#8212;build# \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 http:\/\/localhost:8001cd dashboard_frontend &amp;&amp; npm install &amp;&amp; npm run dev# \u0444\u0440\u043e\u043d\u0442 \u043d\u0430 http:\/\/localhost:3000\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0448\u044c \u2014 \u0430 \u0442\u0430\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f severity, \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u2014 \u0443\u0432\u0438\u0434\u0438\u0448\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u0434\u0430.CI\/CD: \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c PR \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0414\u043e\u0431\u0430\u0432\u044c \u0432\u00a0.github\/workflows\/flaky_detection.yml:- name: Run FlakyDetector  run: uv run python scripts\/scan_folder.py .\/tests &#8212;fail-on-critical\u0415\u0441\u043b\u0438 \u0442\u044b \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u0441\u044e\u0434\u0430 \u2014 \u0441\u043f\u0430\u0441\u0438\u0431\u043e. \u0422\u044b \u0443\u0436\u0435 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u044b\u0448\u0435 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0431\u0438\u043b\u0434 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434.FlakyDetector \u2014 \u044d\u0442\u043e \u043c\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 ML. \u041e\u043d \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u0435\u043d, \u043d\u043e \u043e\u043d \u0443\u0436\u0435\u00a0\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0442\u0435\u0441\u0442\u044b. \u0423\u0432\u0435\u0440\u0435\u043d, \u043d\u0430\u0439\u0434\u0451\u0448\u044c \u043f\u0430\u0440\u0443 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432. \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:\u00a0github.com\/Artem7898\/flakydetector\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f (\u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f):\u00a0habr.com\/ru\/articles\/969354\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1035782\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-479916","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/479916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=479916"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/479916\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=479916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=479916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=479916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}