Skip to content

CONTRIBUTING: review and merge conventions#438686

Merged
wolfgangwalther merged 3 commits intoNixOS:masterfrom
wolfgangwalther:contributing-push-to-pr
Sep 2, 2025
Merged

CONTRIBUTING: review and merge conventions#438686
wolfgangwalther merged 3 commits intoNixOS:masterfrom
wolfgangwalther:contributing-push-to-pr

Conversation

@wolfgangwalther
Copy link
Contributor

While squash-merges have been discouraged from already, they become impossible to do when the Merge Queue is enabled. In certain scenarios it was tolerated to use these, however, thus we introduce an acceptable replacement instead.

By making explicit that pushing to contributors PRs is allowed by default, it should be easier for committers to do so.

Related:


By making blocking comments explicit, it will be easier to discard certain nits.

Suggested in NixOS/org#122 (comment).

Things done

I put these into a single PR, because I introduce a single headline for them. I could also split these up, if either is controversial enough.


Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: policy discussion Discuss policies to work in and around Nixpkgs labels Aug 30, 2025
@nix-owners nix-owners bot requested a review from infinisil August 30, 2025 18:08
This is explicitly defined below the header, but wasn't used.
@wolfgangwalther wolfgangwalther force-pushed the contributing-push-to-pr branch from 7fd1e52 to ede2553 Compare August 31, 2025 11:04
@wolfgangwalther
Copy link
Contributor Author

I addressed the first round of feedback, thanks everyone, so far! Hopefully I was able to balance everyone's requests.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 31, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 31, 2025
While squash-merges have been discouraged from already, they become
impossible to do when the Merge Queue is enabled. In certain scenarios
it was tolerated to use these, however, thus we introduce an acceptable
replacement instead.

By making explicit that pushing to contributors PRs is allowed by
default, it should be easier for committers to do so.
By making blocking comments explicit, it will be easier to discard
certain nits.
@wolfgangwalther wolfgangwalther force-pushed the contributing-push-to-pr branch from ede2553 to 0ba0575 Compare August 31, 2025 19:36
@ofborg ofborg bot added the ofborg-internal-error Ofborg encountered an error label Aug 31, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Sep 1, 2025
Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the direction here; it's one I've long advocated, despite the real hurt feelings effect that the big ❌ produces. The alternative, being ambiguous about what's needed to move forward, is worse.

@numinit numinit requested a review from mdaniels5757 September 1, 2025 19:39
@numinit
Copy link
Contributor

numinit commented Sep 1, 2025

This is a long-awaited step toward optimistic merging in nixpkgs. 👍

(aside, looks like we have a majority of ✔️, can we get a supermajority? 😄)

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, let's do it!

@wolfgangwalther wolfgangwalther merged commit 2c4cd11 into NixOS:master Sep 2, 2025
28 checks passed
@wolfgangwalther wolfgangwalther deleted the contributing-push-to-pr branch September 2, 2025 08:19
@wolfgangwalther
Copy link
Contributor Author

Thanks for the feedback and constructive discussion everyone!

Now the question is how well the transition period works: Obviously older review comments have not been made with these rules in mind. Also, going forward, not everyone knows about this, yet.

Should we do some kind of announcement to make it easier to see? Maybe a pinned issue? Or maybe even... pinging all committers in here and then locking the thread?

@philiptaron
Copy link
Contributor

Let's do something at NixCon.

@numinit
Copy link
Contributor

numinit commented Sep 3, 2025

Yes, and it has to be at least this bombastic. 😄

@emilazy
Copy link
Member

emilazy commented Sep 12, 2025

I meant to comment on this PR before it was merged, but failed to allocate the time for it. (Not that I object to it! I think it is a definite overall improvement and any nits I might have relate to parts of our review process we don't really have strong consensus about at present.)

Instead, I ended up writing up a lot of related thoughts about the problems with our review culture and considerations about optimistic merging for Nixpkgs in NixOS/org#122 (comment). Linking that here to try and trick people into spending comparable amounts of time reading it as I did writing it :)

@philiptaron
Copy link
Contributor

Thanks for writing that up, Emily @emilazy. Your position is nuanced and realistic. It's hard to hit all tradeoffs given what Nixpkgs is. The spectrum you outline from with lib (almost certainly not a bug, even it is it's pretty much fine) to overrideAttrs (brittle and better alternatives exists) to pkgsCross (few good alternatives, indicator of something substantially worse going on) is a good outline of the problem space in front of reviewers.

There's a real tone in your essay of despair at being able to find something that will cause both quick, effective reviews and merging and thorough, security-and-stability oriented review and merging. Is that what you meant to communicate emotionally or is there some nuance you'd lay on it?

@emilazy
Copy link
Member

emilazy commented Sep 12, 2025

Hmm, I think I was aiming more for “apologetic” than “despairing”, because I do feel bad about the pain our review dynamic causes for contributors, and have thoughts about how we can improve that, while also thinking that we don’t have super obvious quick fixes that will systematically produce good review outcomes. So if despair slipped in, it was subconscious!

I would say that I can think of ways we can improve in individual cases, but can’t with confidence say I have a solution to the coordination problem of scaling that up to the entire project. Partly that’s because not everyone will agree with me on what our review process should look like and we have only informal norms around this (this PR starts to address that, which is great) – clearly some people of us value very proactive optimistic merges, some of us value reviews primarily oriented around style/best practices, and the main lever I have in convincing anyone to value what I value is writing walls of text about it :) The larger work of consensus‐building and governance around review culture is downstream of actually having written up coherent pictures of what we could do better, so it felt like a good time to put my own position on the topic out there.

I think the low-hanging fruit here are the things I talked about that can be done fairly unilaterally. Encouraging contributors to push back against requests for changes that are clearly inappropriate is a cheap thing to do that doesn’t require much coordination, but I realize that contributors may not feel empowered to do so and that it may not get their PR merged. Better automation can also have a huge effect here, which is why I am incredibly grateful for @wolfgangwalther’s work on CI. PRs like this that write up subsets of things we can get easy consensus on are also very valuable as we work towards more consistent, thoughtful norms.

I do think that review culture is something that compounds: the better we get at it, the more we encourage the kinds of contributors who will become great reviewers in future, and then maybe one day we’ll be arguing over whether we should risk two CVEs per decade instead of one to get our average time‐to‐merge down from three to two minutes or something. So even taking the easy wins and avoiding the obvious pitfalls here has a lot of value for the project.

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

Labels

6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. ofborg-internal-error Ofborg encountered an error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants