@bugzy-ai/bugzy 1.17.0 → 1.18.0

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.
package/dist/index.js CHANGED
@@ -5626,7 +5626,19 @@ After analyzing test results, triage each failure to determine if it's a product
5626
5626
 
5627
5627
  **IMPORTANT: Do NOT report bugs without triaging first.**
5628
5628
 
5629
- For each failed test:
5629
+ ### 1. Check Failure Classification
5630
+
5631
+ **Before triaging any failure**, read \`new_failures\` from the latest \`test-runs/*/manifest.json\`:
5632
+
5633
+ | \`new_failures\` State | Action |
5634
+ |------------------------|--------|
5635
+ | Non-empty array | Only triage failures listed in \`new_failures\`. Do not investigate, fix, or create issues for \`known_failures\`. |
5636
+ | Empty array | No new failures to triage. Output "0 new failures to triage" and skip the rest of this step. |
5637
+ | Field missing | Fall back: triage all failed tests (backward compatibility with older reporter versions). |
5638
+
5639
+ ### 2. Triage Each Failure
5640
+
5641
+ For each failed test (from \`new_failures\` or all failures if field is missing):
5630
5642
 
5631
5643
  1. **Read failure details** from JSON report (error message, stack trace)
5632
5644
  2. **Classify the failure:**
@@ -5655,14 +5667,22 @@ For each failed test:
5655
5667
  - Broken navigation flows
5656
5668
  - Validation not working as expected
5657
5669
 
5658
- **Document Classification:**
5670
+ ### 3. Document Results
5671
+
5659
5672
  \`\`\`markdown
5660
- ### Failure Triage
5673
+ ### Failure Triage Summary
5674
+
5675
+ **New failures triaged: N** | **Known failures skipped: M**
5661
5676
 
5662
5677
  | Test ID | Test Name | Classification | Reason |
5663
5678
  |---------|-----------|---------------|--------|
5664
5679
  | TC-001 | Login test | TEST ISSUE | Selector brittle - uses CSS instead of role |
5665
5680
  | TC-002 | Checkout | PRODUCT BUG | 500 error on form submit |
5681
+
5682
+ #### Skipped Known Failures
5683
+ | Test ID | Test Name | Last Passed Run |
5684
+ |---------|-----------|-----------------|
5685
+ | TC-003 | Search | 20260210-103045 |
5666
5686
  \`\`\``,
5667
5687
  tags: ["execution", "triage", "analysis"]
5668
5688
  };
@@ -6220,10 +6240,36 @@ npx tsx reporters/parse-results.ts --input <file-or-url> [--timestamp <existing>
6220
6240
  }
6221
6241
  ]
6222
6242
  }
6243
+ ],
6244
+ "new_failures": [
6245
+ {
6246
+ "id": "<test case id>",
6247
+ "name": "<test name>",
6248
+ "error": "<error message or null>",
6249
+ "lastPassedRun": "<timestamp of last passing run or null>"
6250
+ }
6251
+ ],
6252
+ "known_failures": [
6253
+ {
6254
+ "id": "<test case id>",
6255
+ "name": "<test name>",
6256
+ "error": "<error message or null>",
6257
+ "lastPassedRun": null
6258
+ }
6223
6259
  ]
6224
6260
  }
6225
6261
  \`\`\`
6226
- 4. For each failed test, create:
6262
+ 4. **Classify failures** \u2014 after building the manifest, classify each failed test as new or known:
6263
+ - Read \`BUGZY_FAILURE_LOOKBACK\` env var (default: 5)
6264
+ - List previous \`test-runs/*/manifest.json\` files sorted by timestamp descending (skip current run)
6265
+ - For each failed test in the manifest:
6266
+ - If it passed in any of the last N runs \u2192 \`new_failures\` (include the timestamp of the last passing run in \`lastPassedRun\`)
6267
+ - If it failed in ALL of the last N runs \u2192 \`known_failures\`
6268
+ - If the test doesn't exist in any previous run \u2192 \`new_failures\` (new test)
6269
+ - If no previous runs exist at all (first run) \u2192 all failures go to \`new_failures\`
6270
+ - Write the \`new_failures\` and \`known_failures\` arrays into the manifest
6271
+
6272
+ 5. For each failed test, create:
6227
6273
  - Directory: \`test-runs/{timestamp}/{testCaseId}/exec-1/\`
6228
6274
  - File: \`test-runs/{timestamp}/{testCaseId}/exec-1/result.json\` containing:
6229
6275
  \`\`\`json
@@ -6235,8 +6281,8 @@ npx tsx reporters/parse-results.ts --input <file-or-url> [--timestamp <existing>
6235
6281
  "testFile": "<file path if available>"
6236
6282
  }
6237
6283
  \`\`\`
6238
- 5. Print the manifest path to stdout
6239
- 6. Exit code 0 on success, non-zero on failure
6284
+ 6. Print the manifest path to stdout
6285
+ 7. Exit code 0 on success, non-zero on failure
6240
6286
 
6241
6287
  **Incremental mode** (\`--timestamp\` + \`--test-id\` provided):
6242
6288
  1. Read existing \`test-runs/{timestamp}/manifest.json\`