Repository navigation
Branch protection is available again. What do we switch on? #293
Replies: 5 comments
Correction: the premise of this thread has already movedI opened this a few hours ago saying branch protection was free because the repository was public. It is private again, and the same API call now refuses: So none of the five proposals can be actioned today. I am not editing the post above, because what happened to it is more useful than the post was. This is the third visibility flip this month (public on 27 August, private on 31 August, public and then private again today). What still holds, and it is most of the thread:
What I am changing about how we decide this. Rather than deciding what to switch on, let us decide the rule and write it down, so it can be applied the next time the repo is public without re-arguing:
Agree or argue with that instead. A decision phrased that way survives the setting being unavailable, which the one above did not. |
|
Agree with the rule as re-posted, all of it. Require a PR, require one approving review, require both pytest checks -- yes to all three, and the measurement already does the arguing for the first two: if zero of the last 45 PRs would have been blocked, it costs nothing today and buys something the day someone is in a hurry. The pytest gate is the one that actually changes behaviour rather than just formalising what we already do -- CI has been a signal we could ignore, and we have had two red mains this month to show for it. No to dismiss_stale_reviews, and not as a judgement call -- M-2 rule 2 already says the reviewer decides whether a merge-only push voids their approval, and M-2 is signed 4 of 4. Turning that setting on would put a switch and a signed agreement in direct conflict, and the agreement should win. No to including administrators before the 10th, agreed. Not the week to risk protection misfiring during submission crunch. |
|
Reposting here -- my original vote landed on #245 rather than on this discussion, since I answered before seeing that the decision had moved. Same position, in the place it actually counts. Agreed with your position exactly, on all three. YES to requiring status checks -- a red cross being merely advisory is the gap, not CI itself; this just makes the existing signal actually block. YES to requiring one approval -- this is M-1 rule 1 written into the platform rather than left to discipline. Correctly still lets an author merge once someone else has approved, matching the amended rule. NO to dismissing stale reviews -- you're right this is the one that would actively contradict M-2. A merge-only push from main doesn't need re-reading the diff under our own rule, and this setting can't tell that apart from a real content change. The thing that looks like it enforces M-2 is the one that would break it. |
|
A live data point worth adding to the measurement. Just pushed a genuine content commit to #284 after Arsh's and Ankeet's approvals -- under M-2 rule 1 that voids both, and I said so on the thread. But GitHub still shows Not arguing to reverse my vote -- the reasoning against |
|
Following up on my earlier data point -- it's a pattern now, not a one-off. Three instances in the last few days: #284 (my own commit voided two approvals), and now #304 has both Shubham's and Ankeet's approvals predating the two most recent commits. Same underlying gap each time -- Timestamps for the record, checked rather than remembered: The two shapes are not equally concerning, and I think that matters for the voteWorth naming them separately, because lumping them together overstates the case. Ankeet's #304 review is the benign shape. It was accurate when given and describes a tree that has since changed. He verified the fixtures end to end against real Batfish and reported the four CVE outcomes -- all true at the time, and still true, because the bug Arsh later found was genuinely latent rather than missed. It only surfaced when Arsh moved a line to see what it was doing. Nothing about that review was wrong; the tree moved under it. That is close to the merge-only-push case the argument against Shubham's is the sharper one. He requested changes, approved conditional on adding something himself, did not add it, and the gap he had flagged sat open under a green approval for two days until I wrote it. That is not the tree moving under a review -- it is an approval issued against a condition that was never met, and nothing anywhere recorded that.
Where that leaves my voteUnchanged. Still yes to requiring status checks, yes to requiring one approval, no to But the "0 of 45" figure was about what had already happened, and three cases in four days is a meaningfully different picture from zero. Not different enough to flip the third setting; different enough that "the rule is followed by hand and that has been sufficient" is now a claim with counterexamples attached rather than an unqualified one. Two things I would rather see than auto-dismissal, and neither needs a setting:
One correction to my own earlier comment hereI said on 6 September that this was "the first time in practice the gap it can't see was actually live." Two of the three cases are mine -- #284 was my commit, and #304's is my PR -- so I should be clear that I am reporting a pattern I am half of, not one I only observed. Also worth noting, since it changes what is actionable: the repository is private again as of today, and |
Uh oh!
There was an error while loading. Please reload this page.
Answering this one here rather than on #245, as the first real use of the rule
in the announcement.
The fact that changed
The repository is public again (
private: false, checked against the APItoday). Branch protection needs GitHub Pro or a public repo, so it is
available to us at no cost right now.
That is available and switched off, not unavailable. It has been both this
month: on 31 August the same call returned 403 "Upgrade to GitHub Pro". So
whatever we decide, the decision only holds while the repo stays public, and
that has now changed three times.
What is worth reading before answering
We measured this on #245 rather than guessing. Across 45 pull requests merged
since 20 August, requiring a review would have blocked none of them — we
already review everything. So "require a review" costs nothing and buys nothing
today; it buys something the first time somebody is in a hurry.
dismiss_stale_reviewsis the interesting one, and it contradicts M-2 rule2. M-2 says a merge-only push does not void an approval, and the reviewer
decides. Auto-dismissal would void it automatically. M-2 is now ratified 4 of 4
as of this morning, so switching that on would put a setting and a signed
agreement in direct conflict.
My proposal, to accept or argue with
pytest 3.12,pytest 3.13) — yes. Thisis the one with real value: CI is currently a signal, not a gate, and we
have had two red
mains this month.dismiss_stale_reviews— no, because M-2 says the reviewer decidesand M-2 has four signatures.
misfires during submission week we need to be able to move.
Please reply with agree / disagree per number. I will mark whichever answer we
converge on, and then it is decided — not "decided in a chat somebody
remembers".
All reactions