PrefectHQ/prefect
12 rules learned from 1,000 merged PRs: the files and habits in PrefectHQ/prefect that kept needing a fix after merge.
- Merged PRs read
- 1,000
- Needed a fix
- 48 (4.8%)
- Reverted
- 0
- Merged between
- 2026-05-14 and 2026-11-09
Tested on PRs the rules had never seen
9 of the 112 code PRs that breached a rule needed a fix (8%), against 2 of the 55 that breached none (4%).
Rules were learned from older PRs, then tested on later PRs they hadn't seen. How we tested
| PR | Title and the rule it breached | What happened |
|---|---|---|
| Fix `GitRepository.pull_code()` re-cloning a shallow clone on every new commitFragile area: src/prefect/ (15 of 174 earlier PRs needed a fix) | fixed in #23712, 11 days later | |
| fix silently skipped task retries in `retry_condition_fn`Fragile area: src/prefect/ (15 of 174 earlier PRs needed a fix) | fixed in #23523, 8 days later | |
| Read automations with action types this version doesn't knowFragile area: src/prefect/ (15 of 174 earlier PRs needed a fix) | fixed in #23448, same day |
Fix-prone files and folders
PRs that touched these paths needed a follow-up fix more often than the 5% repo average. Counts are PRs that touched the path.
- Hotspot: src/prefect/server/api/workers.py
3 of 8 earlier PRs that changed this needed a fix.
5 clean, 3 fixed (38%) - Hotspot: src/prefect/runner/runner.py
2 of 8 earlier PRs that changed this needed a fix.
6 clean, 2 fixed (25%) - Hotspot: src/prefect/server/api/server.py
2 of 9 earlier PRs that changed this needed a fix.
7 clean, 2 fixed (22%) - Fragile area: schemas/
2 of 9 earlier PRs that changed this needed a fix.
7 clean, 2 fixed (22%) - Hotspot: src/prefect/server/orchestration/core_policy.py
2 of 10 earlier PRs that changed this needed a fix.
8 clean, 2 fixed (20%) - Fragile area: client/
4 of 27 earlier PRs that changed this needed a fix.
23 clean, 4 fixed (15%) - Fragile area: src/integrations/
14 of 103 earlier PRs that changed this needed a fix.
89 clean, 14 fixed (14%) - Hotspot: src/integrations/prefect-dbt/prefect_dbt/core/runner.py
1 of 8 earlier PRs that changed this needed a fix.
7 clean, 1 fixed (13%) - Hotspot: pyproject.toml
4 of 36 earlier PRs that changed this needed a fix.
32 clean, 4 fixed (11%) - Fragile area: src/prefect/
29 of 350 earlier PRs that changed this needed a fix.
321 clean, 29 fixed (8%)
Conventions
Habits most PRs here follow, where PRs that broke them needed a fix more often. Counts on each bar are the PRs that broke it.
- Changes in src/prefect/ come with tests
93% of the 312 PRs that changed code in src/prefect/ also changed tests. 4 of 22 earlier PRs that broke it needed a fix, and 24 of 290 that followed it.
broken: 18 clean, 4 fixed (18%) - Changes in src/integrations/ come with tests
79% of the 94 PRs that changed code in src/integrations/ also changed tests. 5 of 20 earlier PRs that broke it needed a fix, and 9 of 74 that followed it.
broken: 15 clean, 5 fixed (25%)
Recent PRs that needed a fix
Rules flagged 55 recent PRs, and 5 of those needed a fix (9%), against 4% of all recent PRs. These are the 5 that needed a fix, with the PR that fixed each.
| PR | Title | Size | Rule it breached | What happened |
|---|---|---|---|---|
| Link to the docs at www.prefect.io/docs | +421 -415 | changes src/integrations/ without a test20 clean, 5 fixed | fixed in #23651, 2 days later | |
| chore: replace Sanity-hosted logo URLs | +54 -54 | changes src/integrations/ without a test20 clean, 5 fixed | fixed in #23353, 9 days later | |
| Fix broken docs links and stop redirecting missing pages to the homepage | +28 -29 | changes src/integrations/ without a test20 clean, 5 fixed | fixed in #23683, 2 days later | |
| [Integrations]Update classifiers in all the integrations and add 3.14 into integration tests | +22 -4 | changes src/integrations/ without a test20 clean, 5 fixed | fixed in #23431, 2 days later | |
| Fix 2.x CI: replace dead Sanity logo URLs and repoint bullseye apt sources to archive.debian.org | +176 -138 | touches src/integrations/89 clean, 14 fixed | fixed in #23409, 6 days later |
Get this for your own repo
Precall reads your repo's history the same way and comments on new PRs that touch the spots that kept breaking. Download the rules file for PrefectHQ/prefect.