Paul Kehrer | 0839aa8 | 2014-02-11 22:36:51 -0600 | [diff] [blame^] | 1 | Reviewing/Merging Patches |
| 2 | ========================= |
| 3 | |
| 4 | Because cryptography is so complex, and the implications of getting it wrong so |
| 5 | devastating, ``cryptography`` has a strict code review policy: |
| 6 | |
| 7 | * Patches must *never* be pushed directly to ``master``, all changes (even the |
| 8 | most trivial typo fixes!) must be submitted as a pull request. |
| 9 | * A committer may *never* merge their own pull request, a second party must |
| 10 | merge their changes. If multiple people work on a pull request, it must be |
| 11 | merged by someone who did not work on it. |
| 12 | * A patch that breaks tests, or introduces regressions by changing or removing |
| 13 | existing tests should not be merged. Tests must always be passing on |
| 14 | ``master``. |
| 15 | * If somehow the tests get into a failing state on ``master`` (such as by a |
| 16 | backwards incompatible release of a dependency) no pull requests may be |
| 17 | merged until this is rectified. |
| 18 | * All merged patches must have 100% test coverage. |
| 19 | |
| 20 | The purpose of these policies is to minimize the chances we merge a change |
| 21 | that jeopardizes our users' security. |
| 22 | |
| 23 | When reviewing a patch try to keep each of these concepts in mind: |
| 24 | |
| 25 | Architecture |
| 26 | ------------ |
| 27 | |
| 28 | * Is the proposed change being made in the correct place? Is it a fix in a |
| 29 | backend when it should be in the primitives? |
| 30 | |
| 31 | Intent |
| 32 | ------ |
| 33 | |
| 34 | * What is the change being proposed? |
| 35 | * Do we want this feature or is the bug they're fixing really a bug? |
| 36 | |
| 37 | Implementation |
| 38 | -------------- |
| 39 | |
| 40 | * Does the change do what the author claims? |
| 41 | * Are there sufficient tests? |
| 42 | * Has it been documented? |
| 43 | * Will this change introduce new bugs? |
| 44 | |
| 45 | Grammar/Style |
| 46 | ------------- |
| 47 | |
| 48 | These are small things that are not caught by the automated style checkers. |
| 49 | |
| 50 | * Does a variable need a better name? |
| 51 | * Should this be a keyword argument? |