quality-intelligence-engine 2.2.3 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/.github/workflows/playwright.yml +27 -0
  2. package/.github/workflows/quality-intelligence.yml +45 -0
  3. package/CHANGELOG.md +164 -0
  4. package/REFACTORING_SUMMARY.md +417 -0
  5. package/artifacts/failure-analysis/run-1769595909824-login_with_valid_user.md +25 -0
  6. package/artifacts/failure-analysis/run-1769596445203-login_with_valid_user.md +25 -0
  7. package/artifacts/failure-analysis/run-1769596573162-login_with_valid_user.md +34 -0
  8. package/artifacts/failure-analysis/run-1769596591727-login_with_valid_user.md +25 -0
  9. package/artifacts/failure-analysis/run-1769596600117-login_with_valid_user.md +34 -0
  10. package/artifacts/failure-analysis/run-1769596782107-login_with_valid_user.md +32 -0
  11. package/artifacts/failure-analysis/run-1769596940770-login_with_valid_user.md +28 -0
  12. package/artifacts/failure-analysis/run-1769596960417-login_with_valid_user.md +28 -0
  13. package/artifacts/failure-analysis/run-1769596981303-login_with_valid_user.md +28 -0
  14. package/artifacts/failure-analysis/run-1769597351831-login_with_valid_user.md +21 -0
  15. package/artifacts/failure-analysis/run-1769597486816-login_with_valid_user.md +21 -0
  16. package/artifacts/failure-analysis/run-1769599708378-login_with_valid_user.md +22 -0
  17. package/artifacts/failure-analysis/run-1769600327960-login_with_valid_user.md +22 -0
  18. package/artifacts/failure-analysis/run-1769600596201-saucedemo__login_fails_with_wrong_password_fail.md +22 -0
  19. package/artifacts/failure-analysis/run-1769600682675-saucedemo__login_fails_with_wrong_password_fail.md +22 -0
  20. package/artifacts/failure-analysis/run-1769602090701-saucedemo__add_to_cart_button_is_hidden_fail.md +30 -0
  21. package/artifacts/failure-analysis/run-1769602090701-saucedemo__cart_count_updates_to_2_after_adding_one_item_fail.md +30 -0
  22. package/artifacts/failure-analysis/run-1769602090701-saucedemo__checkout_navigates_to_payment_page_directly_fail.md +30 -0
  23. package/artifacts/failure-analysis/run-1769602090701-saucedemo__inventory_shows_10_products_fail.md +30 -0
  24. package/artifacts/failure-analysis/run-1769602090701-saucedemo__products_sorted_high_to_low_start_with_999_fail.md +30 -0
  25. package/artifacts/failure-history/1769696674298.json +9 -0
  26. package/artifacts/failure-history/1769697768622.json +10 -0
  27. package/artifacts/failure-history/1769697923557.json +10 -0
  28. package/artifacts/failure-history/1769698160213.json +11 -0
  29. package/artifacts/failure-history/1769698353440.json +11 -0
  30. package/artifacts/failure-history/1769698763306.json +11 -0
  31. package/artifacts/failure-history/1769698878947.json +11 -0
  32. package/artifacts/failure-history/1769699909817.json +11 -0
  33. package/artifacts/failure-history/1769703130913.json +11 -0
  34. package/artifacts/failure-history/1769703142113.json +11 -0
  35. package/artifacts/failure-history/1769703158978.json +11 -0
  36. package/artifacts/failure-history/1769703406025.json +11 -0
  37. package/artifacts/failure-history/1769703422720.json +11 -0
  38. package/artifacts/failure-history/1769703518837.json +11 -0
  39. package/artifacts/failure-history/1769703530419.json +11 -0
  40. package/artifacts/failure-history/1769703577078.json +11 -0
  41. package/artifacts/failure-history/1769704067098.json +11 -0
  42. package/artifacts/failure-history/1769704074618.json +11 -0
  43. package/artifacts/failure-history/1769704084948.json +11 -0
  44. package/artifacts/failure-history/1769704091950.json +11 -0
  45. package/artifacts/failure-history/1769704435355.json +11 -0
  46. package/artifacts/failure-history/1769704832871.json +11 -0
  47. package/artifacts/failure-history/1769707051830.json +11 -0
  48. package/artifacts/failure-history/1769739820395.json +11 -0
  49. package/artifacts/failure-history/1769739820400.json +11 -0
  50. package/artifacts/failure-history/1769742422254.json +11 -0
  51. package/artifacts/failure-history/1769743106016.json +11 -0
  52. package/artifacts/failure-history/1769743121857.json +11 -0
  53. package/artifacts/failure-history/1769750875212.json +11 -0
  54. package/artifacts/failure-history/1769750880790.json +11 -0
  55. package/artifacts/failure-history/1769761177923.json +11 -0
  56. package/artifacts/failure-history/1769761191176.json +11 -0
  57. package/bin/qi.ts +37 -0
  58. package/config/agent.config.json +18 -0
  59. package/data/failures/fingerprints/0ded7b45.json +10 -0
  60. package/data/failures/fingerprints/2437666a.json +8 -0
  61. package/data/failures/fingerprints/3746e3b4.json +42 -0
  62. package/data/failures/fingerprints/533e258f.json +10 -0
  63. package/data/failures/fingerprints/56b547d3.json +10 -0
  64. package/data/failures/fingerprints/693661fa.json +10 -0
  65. package/data/failures/fingerprints/789126b1.json +8 -0
  66. package/data/failures/fingerprints/936d995e.json +10 -0
  67. package/data/failures/fingerprints/ba5f6c0a.json +10 -0
  68. package/data/failures/fingerprints/f148a261.json +56 -0
  69. package/data/failures/fingerprints/fa14440f.json +14 -0
  70. package/data/failures/registry.json +57 -0
  71. package/data/flakiness/history.json +71 -0
  72. package/dist/bin/qi.js +0 -0
  73. package/dist/src/intelligence/failure-fingerprinting/failure.classifier.js +5 -1
  74. package/dist/src/intelligence/failure-fingerprinting/failure.tracker.js +5 -0
  75. package/dist/src/playwright/qi.reporter.js +17 -0
  76. package/final.sanity.test.ts +46 -0
  77. package/input/raw-failure.json +36 -0
  78. package/input/raw-pass.json +33 -0
  79. package/output/run-2026-01-28_02-48-38-420/BACKEND_API_FAILURE-AuthController.java-/users/{id}/analysis.md +50 -0
  80. package/output/run-2026-01-28_02-48-38-420/TEST_FAILURE-Unknown--/analysis.md +50 -0
  81. package/output/run-2026-01-28_02-48-52-140/BACKEND_API_FAILURE-AuthController.java-/users/{id}/analysis.md +50 -0
  82. package/output/run-2026-01-28_02-48-52-140/TEST_FAILURE-Unknown--/analysis.md +50 -0
  83. package/output/run-2026-01-28_03-13-16-302/BACKEND_API_FAILURE-AuthController.java-/users/{id}/analysis.md +50 -0
  84. package/output/run-2026-01-28_03-13-16-302/PASS-checkout.spec.ts-API_WARNING/analysis.md +49 -0
  85. package/output/run-2026-01-28_03-13-16-302/PASS-login.spec.ts-FLAKY_PASS/analysis.md +49 -0
  86. package/output/run-2026-01-28_03-13-16-302/TEST_FAILURE-Unknown--/analysis.md +50 -0
  87. package/output/run-2026-01-28_03-29-49-786/BACKEND_API_FAILURE-AuthController.java-/users/{id}/analysis.md +50 -0
  88. package/package.json +4 -10
  89. package/playwright-results/.last-run.json +17 -0
  90. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium/error-context.md +31 -0
  91. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium/test-failed-1.png +0 -0
  92. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium/trace.zip +0 -0
  93. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium/video.webm +0 -0
  94. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium-retry1/error-context.md +31 -0
  95. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium-retry1/test-failed-1.png +0 -0
  96. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium-retry1/trace.zip +0 -0
  97. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--chromium-retry1/video.webm +0 -0
  98. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox/error-context.md +31 -0
  99. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox/test-failed-1.png +0 -0
  100. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox/trace.zip +0 -0
  101. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox/video.webm +0 -0
  102. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox-retry1/error-context.md +31 -0
  103. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox-retry1/test-failed-1.png +0 -0
  104. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox-retry1/trace.zip +0 -0
  105. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--firefox-retry1/video.webm +0 -0
  106. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit/error-context.md +31 -0
  107. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit/test-failed-1.png +0 -0
  108. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit/trace.zip +0 -0
  109. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit/video.webm +0 -0
  110. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit-retry1/error-context.md +31 -0
  111. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit-retry1/test-failed-1.png +0 -0
  112. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit-retry1/trace.zip +0 -0
  113. package/playwright-results/saucedemo-email-like-valid-d5dc6-rname-format-rejected-FAIL--webkit-retry1/video.webm +0 -0
  114. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium/error-context.md +112 -0
  115. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium/test-failed-1.png +0 -0
  116. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium/trace.zip +0 -0
  117. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium/video.webm +0 -0
  118. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium-retry1/error-context.md +112 -0
  119. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium-retry1/test-failed-1.png +0 -0
  120. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium-retry1/trace.zip +0 -0
  121. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--chromium-retry1/video.webm +0 -0
  122. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox/error-context.md +112 -0
  123. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox/test-failed-1.png +0 -0
  124. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox/trace.zip +0 -0
  125. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox/video.webm +0 -0
  126. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox-retry1/error-context.md +112 -0
  127. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox-retry1/test-failed-1.png +0 -0
  128. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox-retry1/trace.zip +0 -0
  129. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--firefox-retry1/video.webm +0 -0
  130. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit/error-context.md +112 -0
  131. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit/test-failed-1.png +0 -0
  132. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit/trace.zip +0 -0
  133. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit/video.webm +0 -0
  134. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit-retry1/error-context.md +112 -0
  135. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit-retry1/test-failed-1.png +0 -0
  136. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit-retry1/trace.zip +0 -0
  137. package/playwright-results/saucedemo-numeric-mismatch-7c4f3-to-cart-button-hidden-FAIL--webkit-retry1/video.webm +0 -0
  138. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium/error-context.md +112 -0
  139. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium/test-failed-1.png +0 -0
  140. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium/trace.zip +0 -0
  141. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium/video.webm +0 -0
  142. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium-retry1/error-context.md +112 -0
  143. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium-retry1/test-failed-1.png +0 -0
  144. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium-retry1/trace.zip +0 -0
  145. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--chromium-retry1/video.webm +0 -0
  146. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox/error-context.md +112 -0
  147. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox/test-failed-1.png +0 -0
  148. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox/trace.zip +0 -0
  149. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox/video.webm +0 -0
  150. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox-retry1/error-context.md +112 -0
  151. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox-retry1/test-failed-1.png +0 -0
  152. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox-retry1/trace.zip +0 -0
  153. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--firefox-retry1/video.webm +0 -0
  154. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit/error-context.md +112 -0
  155. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit/test-failed-1.png +0 -0
  156. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit/trace.zip +0 -0
  157. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit/video.webm +0 -0
  158. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit-retry1/error-context.md +112 -0
  159. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit-retry1/test-failed-1.png +0 -0
  160. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit-retry1/trace.zip +0 -0
  161. package/playwright-results/saucedemo-numeric-mismatch-cd423-entory-count-mismatch-FAIL--webkit-retry1/video.webm +0 -0
  162. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium/error-context.md +31 -0
  163. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium/test-failed-1.png +0 -0
  164. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium/trace.zip +0 -0
  165. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium/video.webm +0 -0
  166. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium-retry1/error-context.md +31 -0
  167. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium-retry1/test-failed-1.png +0 -0
  168. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium-retry1/trace.zip +0 -0
  169. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--chromium-retry1/video.webm +0 -0
  170. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox/error-context.md +31 -0
  171. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox/test-failed-1.png +0 -0
  172. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox/trace.zip +0 -0
  173. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox/video.webm +0 -0
  174. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox-retry1/error-context.md +31 -0
  175. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox-retry1/test-failed-1.png +0 -0
  176. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox-retry1/trace.zip +0 -0
  177. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--firefox-retry1/video.webm +0 -0
  178. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit/error-context.md +31 -0
  179. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit/test-failed-1.png +0 -0
  180. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit/trace.zip +0 -0
  181. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit/video.webm +0 -0
  182. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit-retry1/error-context.md +31 -0
  183. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit-retry1/test-failed-1.png +0 -0
  184. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit-retry1/trace.zip +0 -0
  185. package/playwright-results/saucedemo-numeric-mismatch-f085e-E-unauthorized-access-FAIL--webkit-retry1/video.webm +0 -0
  186. package/playwright.config.ts +42 -0
  187. package/quality-intelligence-engine-2.2.0.tgz +0 -0
  188. package/quality-intelligence-engine-2.2.2.tgz +0 -0
  189. package/sanity.test.ts +33 -0
  190. package/src/adapters/playwright-folder.adapter.ts +85 -0
  191. package/src/adapters/playwright-json.adapter.ts +49 -0
  192. package/src/adapters/playwright.adapter.ts +44 -0
  193. package/src/cli/qi-test.ts +20 -0
  194. package/src/cli/qi.ts +67 -0
  195. package/src/cli/ui/divider.ts +9 -0
  196. package/src/cli/ui/failureLogger.ts +33 -0
  197. package/src/configLoader.ts +70 -0
  198. package/src/console/issue-view.ts +193 -0
  199. package/src/failure-analysis/failure-analyzer.ts +43 -0
  200. package/src/final-run.ts +174 -0
  201. package/src/final-runner.ts +31 -0
  202. package/src/fixtures/networkCollector.ts +27 -0
  203. package/src/history/failure-history.store.ts +23 -0
  204. package/src/history/failure-history.types.ts +12 -0
  205. package/src/history/failure-trend.analyzer.ts +49 -0
  206. package/src/index.ts +10 -0
  207. package/src/integrations/ci/ci-annotator.ts +42 -0
  208. package/src/intelligence/confidence-calibration.engine.ts +41 -0
  209. package/src/intelligence/decision-intelligence/confidence.engine.ts +18 -0
  210. package/src/intelligence/decision-intelligence/decision.config.ts +18 -0
  211. package/src/intelligence/decision-intelligence/decision.engine.ts +30 -0
  212. package/src/intelligence/decision-intelligence/decision.types.ts +15 -0
  213. package/src/intelligence/failure-fingerprinting/failure.classifier.ts +61 -0
  214. package/src/intelligence/failure-fingerprinting/failure.store.ts +42 -0
  215. package/src/intelligence/failure-fingerprinting/failure.tracker.ts +28 -0
  216. package/src/intelligence/failure-fingerprinting/fingerprint.generator.ts +28 -0
  217. package/src/intelligence/failure-fingerprinting/fingerprint.types.ts +14 -0
  218. package/src/intelligence/flakiness-intelligence/flakiness.analyzer.ts +23 -0
  219. package/src/intelligence/flakiness-intelligence/flakiness.fingerprint.ts +14 -0
  220. package/src/intelligence/flakiness-intelligence/flakiness.store.ts +24 -0
  221. package/src/intelligence/flakiness-intelligence/flakiness.tracker.ts +42 -0
  222. package/src/intelligence/flakiness-intelligence/flakiness.types.ts +8 -0
  223. package/src/intelligence/intelligence.pipeline.ts +20 -0
  224. package/src/intelligence/llm-explainer.ts +29 -0
  225. package/src/intelligence/root-cause/rootcause.engine.ts +46 -0
  226. package/src/intelligence/trend-intelligence/trend.engine.ts +42 -0
  227. package/src/markdownWriter.ts +68 -0
  228. package/src/normalizer.ts +31 -0
  229. package/src/passAnalyzer.ts +38 -0
  230. package/src/pipeline/ai.summarizer.ts +39 -0
  231. package/src/pipeline/failure-analysis.pipeline.ts +13 -0
  232. package/src/pipeline/failure-grouping.pipeline.ts +67 -0
  233. package/src/playwright/qi.reporter.ts +26 -0
  234. package/src/reporter.ts +88 -0
  235. package/src/reporters/qi-reporter.js +34 -0
  236. package/src/rules.ts +35 -0
  237. package/src/runManager.ts +21 -0
  238. package/src/runner.ts +12 -0
  239. package/src/runtime/networkCollector.ts +36 -0
  240. package/src/stackParser.ts +22 -0
  241. package/src/test-run.ts +59 -0
  242. package/src/types/analysis-result.ts +16 -0
  243. package/src/types/failure.types.ts +28 -0
  244. package/src/types/playwright-failure.ts +10 -0
  245. package/src/types.ts +102 -0
  246. package/src/utils/artifact.locator.ts +42 -0
  247. package/src/utils/confidence-constants.ts +111 -0
  248. package/src/utils/file-utils.ts +146 -0
  249. package/src/v2/llm/llm-advisor.ts +22 -0
  250. package/src/v2/pipeline/v2-intelligence.pipeline.ts +21 -0
  251. package/src/v2/self-healing/self-healer.ts +60 -0
  252. package/src/v2/trace-intelligence/trace-analyzer.ts +42 -0
  253. package/src/v2-test-run.ts +74 -0
  254. package/tests/fixtures.ts +40 -0
  255. package/tests/saucedemo-login-validation.spec.ts +74 -0
  256. package/tsconfig.json +16 -0
  257. package/tsconfig.playwright.json +13 -0
@@ -1,14 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.classifyFailure = classifyFailure;
4
- function classifyFailure(input, runId, history) {
4
+ /* --------- IMPLEMENTATION --------- */
5
+ function classifyFailure(input, _runId, _history) {
5
6
  const haystack = JSON.stringify(input).toLowerCase();
7
+ /* ---------------- NUMERIC ---------------- */
6
8
  if (haystack.includes("numeric") ||
7
9
  haystack.includes("count") ||
8
10
  haystack.includes("mismatch") ||
9
11
  haystack.includes("total")) {
10
12
  return "NUMERIC_MISMATCH";
11
13
  }
14
+ /* ---------------- AUTH / LOGIN ---------------- */
12
15
  if (haystack.includes("login") ||
13
16
  haystack.includes("username") ||
14
17
  haystack.includes("password") ||
@@ -18,6 +21,7 @@ function classifyFailure(input, runId, history) {
18
21
  haystack.includes("do not match")) {
19
22
  return "AUTH_FAILURE";
20
23
  }
24
+ /* ---------------- SECURITY ---------------- */
21
25
  if (haystack.includes("sql") ||
22
26
  haystack.includes("injection") ||
23
27
  haystack.includes("unauthorized") ||
@@ -4,7 +4,12 @@ exports.trackFailure = trackFailure;
4
4
  const failure_classifier_1 = require("./failure.classifier");
5
5
  const failure_store_1 = require("./failure.store");
6
6
  function trackFailure(rawFailure, runId) {
7
+ /**
8
+ * Treat fingerprint input as OPAQUE.
9
+ * Do NOT assume fields. This avoids regressions.
10
+ */
7
11
  const fingerprintInput = rawFailure;
12
+ // Backward + forward compatible call
8
13
  const classification = (0, failure_classifier_1.classifyFailure)(fingerprintInput, runId, undefined);
9
14
  (0, failure_store_1.recordFailure)({
10
15
  runId,
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const failure_tracker_1 = require("../intelligence/failure-fingerprinting/failure.tracker");
4
+ class QIReporter {
5
+ onTestEnd(test, result) {
6
+ if (result.status !== "failed")
7
+ return;
8
+ const errorText = result.error?.message ||
9
+ result.error?.stack ||
10
+ "unknown error";
11
+ (0, failure_tracker_1.trackFailure)({
12
+ error: errorText,
13
+ testName: test.title
14
+ }, process.env.QI_RUN_ID ?? "local-run");
15
+ }
16
+ }
17
+ exports.default = QIReporter;
@@ -0,0 +1,46 @@
1
+ import { trackFailure } from './src/intelligence/failure-fingerprinting/failure.tracker'
2
+ import { trackFlakiness } from './src/intelligence/flakiness-intelligence/flakiness.tracker'
3
+ import { decide } from './src/intelligence/decision-intelligence/decision.engine'
4
+
5
+ // ----- SIMULATED RUN ID -----
6
+ const runId = Number(process.argv[2]) || 1
7
+
8
+ console.log('\n==============================')
9
+ console.log(`🚀 FINAL SANITY RUN: ${runId}`)
10
+ console.log('==============================\n')
11
+
12
+ // ----- DAY 7: FAILURE INTELLIGENCE -----
13
+ const failureResult = trackFailure(
14
+ {
15
+ failureType: 'assertion',
16
+ pageRoute: '/checkout',
17
+ primaryLocator: '#total',
18
+ assertionIntent: 'total price matches sum',
19
+ errorClass: 'expect'
20
+ },
21
+ runId,
22
+ 'checkout.spec.ts'
23
+ )
24
+
25
+ console.log('Day 7 → Failure:', failureResult)
26
+
27
+ // ----- DAY 8: FLAKINESS INTELLIGENCE -----
28
+ const outcome = runId % 2 === 0 ? 'PASS' : 'FAIL'
29
+
30
+ const flakinessResult = trackFlakiness(
31
+ 'checkout.spec.ts',
32
+ '/checkout',
33
+ outcome
34
+ )
35
+
36
+ console.log('Day 8 → Flakiness:', flakinessResult)
37
+
38
+ // ----- DAY 9: DECISION INTELLIGENCE -----
39
+ const decision = decide({
40
+ baseConfidence: 95,
41
+ failures: [{ type: failureResult.classification }],
42
+ flakiness: [{ severity: flakinessResult.severity }]
43
+ })
44
+
45
+ console.log('\nDay 9 → Decision Intelligence')
46
+ console.log(decision)
@@ -0,0 +1,36 @@
1
+ [
2
+ {
3
+ "errorType": "API_ERROR",
4
+ "message": "User not found",
5
+ "stackTrace": [
6
+ "at AuthController.getUser(AuthController.java:87)"
7
+ ],
8
+ "api": {
9
+ "method": "GET",
10
+ "endpoint": "/users/{id}",
11
+ "status": 404,
12
+ "response": "User not found"
13
+ }
14
+ },
15
+ {
16
+ "errorType": "API_ERROR",
17
+ "message": "User not found",
18
+ "stackTrace": [
19
+ "at AuthController.getUser(AuthController.java:87)"
20
+ ],
21
+ "api": {
22
+ "method": "GET",
23
+ "endpoint": "/users/{id}",
24
+ "status": 404,
25
+ "response": "User not found"
26
+ }
27
+ },
28
+ {
29
+ "errorType": "TEST_ERROR",
30
+ "message": "Locator not found",
31
+ "stackTrace": [
32
+ "at login.spec.ts:42"
33
+ ],
34
+ "api": null
35
+ }
36
+ ]
@@ -0,0 +1,33 @@
1
+ [
2
+ {
3
+ "test": "login.spec.ts",
4
+ "status": "PASSED",
5
+ "retries": 1,
6
+ "durationMs": 3800,
7
+ "consoleErrors": [],
8
+ "apiEvents": []
9
+ },
10
+ {
11
+ "test": "checkout.spec.ts",
12
+ "status": "PASSED",
13
+ "retries": 0,
14
+ "durationMs": 2100,
15
+ "consoleErrors": [],
16
+ "apiEvents": [
17
+ {
18
+ "method": "POST",
19
+ "endpoint": "/payment",
20
+ "status": 500,
21
+ "recovered": true
22
+ }
23
+ ]
24
+ },
25
+ {
26
+ "test": "search.spec.ts",
27
+ "status": "PASSED",
28
+ "retries": 0,
29
+ "durationMs": 1800,
30
+ "consoleErrors": [],
31
+ "apiEvents": []
32
+ }
33
+ ]
@@ -0,0 +1,50 @@
1
+ # ❌ BACKEND_API_FAILURE
2
+
3
+ **Occurrences** : 2
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : AuthController.java
10
+ - **Line** : 87
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : GET
16
+ - **Endpoint** : /users/{id}
17
+ - **Status** : 404
18
+ - **Response** : User not found
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ User not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ User not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
@@ -0,0 +1,50 @@
1
+ # ❌ TEST_FAILURE
2
+
3
+ **Occurrences** : 1
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : Unknown
10
+ - **Line** : -1
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : -
16
+ - **Endpoint** : -
17
+ - **Status** : 0
18
+ - **Response** : -
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ Locator not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ Locator not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
@@ -0,0 +1,50 @@
1
+ # ❌ BACKEND_API_FAILURE
2
+
3
+ **Occurrences** : 2
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : AuthController.java
10
+ - **Line** : 87
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : GET
16
+ - **Endpoint** : /users/{id}
17
+ - **Status** : 404
18
+ - **Response** : User not found
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ User not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ User not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
@@ -0,0 +1,50 @@
1
+ # ❌ TEST_FAILURE
2
+
3
+ **Occurrences** : 1
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : Unknown
10
+ - **Line** : -1
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : -
16
+ - **Endpoint** : -
17
+ - **Status** : 0
18
+ - **Response** : -
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ Locator not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ Locator not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
@@ -0,0 +1,50 @@
1
+ # ❌ BACKEND_API_FAILURE
2
+
3
+ **Occurrences** : 2
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : AuthController.java
10
+ - **Line** : 87
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : GET
16
+ - **Endpoint** : /users/{id}
17
+ - **Status** : 404
18
+ - **Response** : User not found
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ User not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ User not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
@@ -0,0 +1,49 @@
1
+ # ❌ TEST_FAILURE
2
+
3
+ **Occurrences** : 1
4
+ **Confidence** : 0.7
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : checkout.spec.ts
10
+ - **Line** : -1
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : -
16
+ - **Endpoint** : -
17
+ - **Status** : 0
18
+ - **Response** : -
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ POST /payment failed with 500 but recovered
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ No blocking action required
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run the test locally
34
+ 2. Observe retries or warnings
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Test passes cleanly without retries or warnings
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ POST /payment failed with 500 but recovered
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Investigate backend instability or add retry with backoff
@@ -0,0 +1,49 @@
1
+ # ❌ TEST_FAILURE
2
+
3
+ **Occurrences** : 1
4
+ **Confidence** : 0.7
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : login.spec.ts
10
+ - **Line** : -1
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : -
16
+ - **Endpoint** : -
17
+ - **Status** : 0
18
+ - **Response** : -
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ Test passed after retry
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ No blocking action required
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run the test locally
34
+ 2. Observe retries or warnings
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Test passes cleanly without retries or warnings
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ Test passed after retry
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Stabilize locator or add explicit waits
@@ -0,0 +1,50 @@
1
+ # ❌ TEST_FAILURE
2
+
3
+ **Occurrences** : 1
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : Unknown
10
+ - **Line** : -1
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : -
16
+ - **Endpoint** : -
17
+ - **Status** : 0
18
+ - **Response** : -
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ Locator not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ Locator not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
@@ -0,0 +1,50 @@
1
+ # ❌ BACKEND_API_FAILURE
2
+
3
+ **Occurrences** : 2
4
+ **Confidence** : 0.9
5
+
6
+ ---
7
+
8
+ ## 📍 Failure Location
9
+ - **File** : AuthController.java
10
+ - **Line** : 87
11
+
12
+ ---
13
+
14
+ ## 🌐 Failed API Call
15
+ - **Method** : GET
16
+ - **Endpoint** : /users/{id}
17
+ - **Status** : 404
18
+ - **Response** : User not found
19
+
20
+ ---
21
+
22
+ ## 🧠 Root Cause
23
+ User not found
24
+
25
+ ---
26
+
27
+ ## 🔁 Retry Guidance
28
+ Automated CI retry is not advised (high confidence failure).
29
+
30
+ ---
31
+
32
+ ## ▶️ Reproduction Steps
33
+ 1. Re-run the failing scenario
34
+ 2. Inspect logs and stack trace
35
+
36
+ ---
37
+
38
+ ## ✅ Expected Result
39
+ Operation completes successfully.
40
+
41
+ ---
42
+
43
+ ## ❌ Actual Result
44
+ User not found
45
+
46
+ ---
47
+
48
+ ## 🛠 Suggested Actions
49
+ - Fix underlying issue
50
+ - Add validation or stabilization
package/package.json CHANGED
@@ -1,19 +1,13 @@
1
1
  {
2
2
  "name": "quality-intelligence-engine",
3
- "version": "2.2.3",
4
- "description": "AI-powered failure intelligence for Playwright test runs",
3
+ "version": "2.2.4",
4
+ "private": false,
5
5
  "bin": {
6
6
  "qi": "dist/bin/qi.js"
7
7
  },
8
8
  "scripts": {
9
- "build": "tsc"
10
- },
11
- "files": [
12
- "dist",
13
- "README.md"
14
- ],
15
- "engines": {
16
- "node": ">=18"
9
+ "build": "tsc",
10
+ "start": "ts-node src/index.ts"
17
11
  },
18
12
  "devDependencies": {
19
13
  "@playwright/test": "^1.58.0",
@@ -0,0 +1,17 @@
1
+ {
2
+ "status": "failed",
3
+ "failedTests": [
4
+ "567a3f64ffe0ed408561-164cf5faf856dbee1426",
5
+ "53d87a7114de65c9ba7f-5a3601c9227fb5aefc99",
6
+ "53d87a7114de65c9ba7f-07bfd9671238c8f96803",
7
+ "53d87a7114de65c9ba7f-40c3987d7ee46a5559dc",
8
+ "567a3f64ffe0ed408561-c9b684efd961c1982ee2",
9
+ "53d87a7114de65c9ba7f-ec115d63e234ec160cb0",
10
+ "53d87a7114de65c9ba7f-ec2f70edffbbef2b2fa6",
11
+ "53d87a7114de65c9ba7f-b0a3d48c0eee552e9876",
12
+ "567a3f64ffe0ed408561-ca56772b20623a7fb28b",
13
+ "53d87a7114de65c9ba7f-8c865cea5db88eaa7ecd",
14
+ "53d87a7114de65c9ba7f-d7a369defa26de0a4b15",
15
+ "53d87a7114de65c9ba7f-532bbb129369a89a11fa"
16
+ ]
17
+ }
@@ -0,0 +1,31 @@
1
+ # Page snapshot
2
+
3
+ ```yaml
4
+ - generic [ref=e3]:
5
+ - generic [ref=e4]: Swag Labs
6
+ - generic [ref=e5]:
7
+ - generic [ref=e9]:
8
+ - generic [ref=e10]:
9
+ - textbox "Username" [ref=e11]: invalid-email@
10
+ - img [ref=e12]
11
+ - generic [ref=e14]:
12
+ - textbox "Password" [ref=e15]: secret_sauce
13
+ - img [ref=e16]
14
+ - 'heading "Epic sadface: Username and password do not match any user in this service" [level=3] [ref=e19]':
15
+ - button [ref=e20] [cursor=pointer]:
16
+ - img [ref=e21]
17
+ - text: "Epic sadface: Username and password do not match any user in this service"
18
+ - button "Login" [active] [ref=e23] [cursor=pointer]
19
+ - generic [ref=e25]:
20
+ - generic [ref=e26]:
21
+ - heading "Accepted usernames are:" [level=4] [ref=e27]
22
+ - text: standard_user
23
+ - text: locked_out_user
24
+ - text: problem_user
25
+ - text: performance_glitch_user
26
+ - text: error_user
27
+ - text: visual_user
28
+ - generic [ref=e28]:
29
+ - heading "Password for all users:" [level=4] [ref=e29]
30
+ - text: secret_sauce
31
+ ```