Skip to content

Close unfiled bad-min testcases after clean trunk and hold retry locks - #5651

Open
hunsche wants to merge 3 commits into
masterfrom
fix/progression-unfiled-bad-min-and-retries
Open

hunsche wants to merge 3 commits into
masterfrom
fix/progression-unfiled-bad-min-and-retries

Conversation

@hunsche

@hunsche hunsche commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Follows #5645 (Part 2 of 3). While #5645 prevents triage from filing stale unverified reproducible testcases, unfiled testcases whose latest trunk revision (max_revision) passes cleanly and whose starting revision (min_revision) fails check_for_bad_build would otherwise remain open in daily progression runs, and fresh (<= 14d) non-crashing retries could briefly clear progression_pending between confirmation attempts.

This PR closes only truly unfiled automated bad-min_revision testcases after two clean latest-trunk runs while leaving all filed, group-linked, and manually uploaded bugs untouched.

Changes

  • passed_on_latest tracking: Record passed_on_latest = True and max_revision on ProgressionTaskOutput only when max_revision is the uncapped latest trunk build (max_revision > known_crash_revision and min_index < max_index) and runs cleanly without crashing.
  • Unfiled bad-min_revision closure: In handle_progression_bad_build, when passed_on_latest is True and _is_unfiled_auto_close_candidate(testcase) holds (processed automated fuzzer testcase with no bug_information, group_bug_information, github_issue_num, has_bug_flag, uploader_email, or analyze_pending), retry once on another bot (progression_bad_min_build_retry) while keeping progression_pending set, then close (open = False, fixed = 'NA') and emit TestcaseRejectionEvent (PROGRESSION_MIN_REVISION_BAD_BUILD). Filed, group-linked, and manual testcases stay open as before.
  • Preserve last_tested_crash_revision in build_manager.get_revisions_list: Exempt last_tested_crash_revision alongside testcase.crash_revision when filtering bad_revisions so the confirmation attempt still observes a bad starting build even after testcase.crash_revision ages out of GCS.
  • Retry-lock and redo_testcase hygiene:
    • Keep progression_pending set across non-terminal confirmation retries in handle_progression_no_crash and custom_binary progression checks, and clear progression_pending atomically with mark_unreproducible_if_flaky on the final flaky attempt.
    • Reset progression_retry and progression_bad_min_build_retry across crash_on_latest, fallback handle_progression_bad_build, failed reschedule paths (_clear_pending_and_persist), symmetric no_crash/bad_min_build transitions, and tasks.redo_testcase.
    • Guard unset last_progression_min and last_progression_max values against None on first-midpoint bisection errors.

Tests

  • butler.py format and butler.py lint
  • Unit tests in progression_task_test.py, build_manager_test.py, tasks_test.py, and events_test.py
  • Deployed and verified end-to-end in clusterfuzz-development

@decoNR
decoNR removed their request for review November 24, 2026 21:30
hunsche added a commit that referenced this pull request Nov 25, 2026
## Overview

#5587 started clearing `progression_pending` inside `handle_progression_bad_build` so new crashes hitting dynamic-linker or bad-build failures would not stall in triage. However, `triage` previously had no crash-freshness check for reproducible testcases. Clearing `progression_pending` on bad-build errors could therefore unlock stale reproducible testcases without a recent trunk reproduction and auto-file already-fixed crashes.

To keep the rollout small and independently revertible, this first PR isolates the App Engine `triage` crash-freshness gate (zero worker, protobuf, or testcase-closure changes). Follow-up draft PRs (#5651 and #5652) handle closing unfiled bad-`min_revision` testcases after clean trunk runs and skipping broken starting revisions during bisection.

## Changes

- **`triage.py` crash-freshness gate**: Require reproducible testcases to have a confirmed crash timestamp (`testcase.timestamp`, `testcase.created`, or `last_tested_crash_time`) within the 14-day freshness window (`reproducible_testcase_freshness_deadline` in `IssueTrackerConfig`, defaulting to `FILE_CONSISTENT_UNREPRODUCIBLE_TESTCASE_DEADLINE`, with `<= 0` disabling the gate) before auto-filing or publishing `new` Pub/Sub issue notifications.
- **Concurrent-closure guard and metrics**: Skip testcases that closed concurrently during a `triage` run, clear `stuck_in_triage`, record a `triage_message` explaining why filing was held back, and emit `stale_unverified` on `untriaged_testcase_age` and `untriaged_testcase_count`.

## Tests

- Added unit tests in `triage_test.py` covering fresh, refreshed, stale, expired-progression, one-time, concurrently closed, Pub/Sub-only, missing/malformed-timestamp, and custom-deadline testcases.
Base automatically changed from fix/progression-bad-build-stale-triage to master November 25, 2026 15:20
@hunsche
hunsche force-pushed the fix/progression-unfiled-bad-min-and-retries branch from 0fc6d72 to 80496c9 Compare November 25, 2026 15:25
@hunsche
hunsche marked this pull request as ready for review November 25, 2026 15:26
@hunsche
hunsche requested a review from a team as a code owner November 25, 2026 15:26
- Drop historical bad_revisions gap heuristic from find_fixed_range.
- Clear stale bad-min-build retry metadata in fallback bad-build handling
  and clear regular progression retry metadata symmetrically.
- Clear retry metadata if rescheduling fails across confirmation retries.
- Clear progression_pending after update_testcase_comment on terminal
  flaky attempts so it saves atomically with mark_unreproducible_if_flaky.
@hunsche
hunsche force-pushed the fix/progression-unfiled-bad-min-and-retries branch from aa04479 to 6410661 Compare November 26, 2026 01:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants