fastify/fastify

9 rules learned from 994 merged PRs: the files and habits in fastify/fastify that kept needing a fix after merge.

Merged PRs read
994
Needed a fix
20 (2.1%)
Reverted
1
Merged between
2023-12-08 and 2026-11-07

Tested on new PRs: not enough data yet

1 of the 10 code PRs that breached a rule needed a fix (10%), against 0 of the 14 that breached none (0%).

Rules were learned from older PRs, then tested on later PRs they hadn't seen. How we tested

Fix-prone files and folders

PRs that touched these paths needed a follow-up fix more often than the 2% repo average. Counts are PRs that touched the path.

  1. Hotspot: types/instance.d.ts

    7 of 28 earlier PRs that changed this needed a fix.

    21 clean, 7 fixed (25%)
  2. Hotspot: fastify.d.ts

    6 of 26 earlier PRs that changed this needed a fix.

    20 clean, 6 fixed (23%)
  3. Hotspot: types/request.d.ts

    3 of 15 earlier PRs that changed this needed a fix.

    12 clean, 3 fixed (20%)
  4. Hotspot: types/route.d.ts

    2 of 12 earlier PRs that changed this needed a fix.

    10 clean, 2 fixed (17%)
  5. Hotspot: lib/reply.js

    5 of 41 earlier PRs that changed this needed a fix.

    36 clean, 5 fixed (12%)
  6. Fragile area: types/

    10 of 88 earlier PRs that changed this needed a fix.

    78 clean, 10 fixed (11%)
  7. Hotspot: lib/route.js

    4 of 36 earlier PRs that changed this needed a fix.

    32 clean, 4 fixed (11%)
  8. Fragile area: lib/

    14 of 195 earlier PRs that changed this needed a fix.

    181 clean, 14 fixed (7%)
  9. Fragile area: the repo root

    11 of 212 earlier PRs that changed this needed a fix.

    201 clean, 11 fixed (5%)

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.

No habit here made the list.

Recent PRs that needed a fix

Rules flagged 198 recent PRs, and 11 of those needed a fix (6%), against 3% of all recent PRs. These are the 8 that needed a fix, with the PR that fixed each.

PRTitleSizeRule it breachedWhat happened
feat: introduce log controller layer +782 -127 touches types/instance.d.ts21 clean, 7 fixed fixed in #6838, 6 days later
style(types): enforce max line length +620 -212 touches types/instance.d.ts21 clean, 7 fixed fixed in #6888, 9 days later
refactor!: remove FSTDEP023 deprecation +24 -650 touches types/instance.d.ts21 clean, 7 fixed fixed in #6965, 14 days later
feat: add request.mediaType +129 -17 touches types/request.d.ts12 clean, 3 fixed fixed in #6665, 9 days later
feat: add `Reply.prototype.mediaType` +153 -1 touches lib/reply.js36 clean, 5 fixed fixed in #6949, same day
fix: clear socket._meta after response to prevent keep-alive leaks +29 -0 touches lib/reply.js36 clean, 5 fixed fixed in #6810, 12 days later
feat: optimize content type parser by using AsyncResource.bind() +87 -41 touches lib/181 clean, 14 fixed fixed in #6266, 2 days later
chore: finally remove simple get +267 -295 touches files at the repo root201 clean, 11 fixed fixed in #6255, same day

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 fastify/fastify.