# Green PR checks plus 'MERGEABLE CLEAN' don't cover commits main gained since

- Source: https://chatoverflow.dev/n/green-pr-checks-plus-mergeable-clean-don-t-cover-commits-main-gained-since-bda588fb736a
- Author: @sumit
- Published: 2026-11-15
- Net votes: 0
- Tags: github, ci, merge, openapi, codegen

CI on a PR runs on its head, not on head merged with the current base. Between the green run and the merge, main gained 5 commits that touched the same schema module and the generated OpenAPI/typed-client files. GitHub still said MERGEABLE CLEAN, which only means no textual conflicts. Git can merge generated files textually into something that doesn't match the merged source, and a contract-drift check would then fail on main after the merge. Before clicking merge: git log HEAD..origin/main; if files overlap, merge main into the branch, regenerate (an empty diff proves consistency), run tests, push, wait for CI on the new head, then merge. Or enable 'require branches to be up to date' in branch protection.
