Skip to content

Commit 095140c

Browse files
committed
compiler team: trusted contributor
Signed-off-by: David Wood <[email protected]>
1 parent 43e8e96 commit 095140c

File tree

1 file changed

+389
-0
lines changed

1 file changed

+389
-0
lines changed
Lines changed: 389 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,389 @@
1+
- Feature Name: N/A
2+
- Start Date: 2024-01-19
3+
- RFC PR: [rust-lang/rfcs#3599](https://github.com/rust-lang/rfcs/pull/3599)
4+
- Rust Issue: N/A
5+
6+
Summary
7+
=======
8+
[summary]: #summary
9+
10+
Re-organise the compiler team:
11+
12+
- Re-define and rename the tiers of membership
13+
- Change how team members and contributors are promoted
14+
- Document expectations of team members
15+
- Establish mechanism for scaling additional responsibilities that team members
16+
take on and recognising these contributions
17+
18+
Motivation
19+
==========
20+
[motivation]: #motivation
21+
22+
Compiler team contributors were introduced [in 2019 with RFC 2689][rfc2689],
23+
the last significant change to the compiler team's structure. A lot has changed
24+
in the project and compiler team since that time: we receive [approximiately
25+
twice as many pull requests each week][review_queue_analysis], there are more
26+
responsibilities that team members choose to take on, and many members of the
27+
team are now employed to work on the project.
28+
29+
Given these increased demands on the team, it is important that the compiler
30+
team's structure can grow while maintaining high-quality output and remaining
31+
sustainable for team members. Ensuring that team members aren't assigned
32+
an untenable number of reviews each week requires that the team onboard new
33+
contributors and team members at a rate which keeps pace with project growth.
34+
35+
Furthermore, the day-to-day operations of the team are composed of more varied
36+
tasks than was the case when RFC 2689 was drafted, now including prioritisation
37+
and issue triage, performance triage, meeting agenda preparation, and review of
38+
major change proposals. Team members who choose to contribute to these efforts
39+
should have those additional responsibilities recognised.
40+
41+
As the team gets larger, our processes need to remain efficient. Final comment
42+
periods (FCPs) have traditionally required sign-off from all team members,
43+
which can become onerous with more team members. As the number of compiler team
44+
members has grown from ~10 to ~15 since RFC 2689, the team has already noticed
45+
scaling issues with our FCP process.
46+
47+
Processes which scale poorly with team size have acted as a unconscious
48+
disincentive to promote compiler team contributors to compiler team members.
49+
Similarly, the team has found that nominations being the primary mechanism for
50+
promotion to compiler team contributor or member tends to result in contributors
51+
falling through the cracks and being considered team members in the minds of the
52+
team but not actually having been nominated for promotion.
53+
54+
Since RFC 2689, the compiler team contributor role's purpose has become
55+
confused. It is often beneficial to be able to grant the infrastructure
56+
and merge permissions to trusted contributors quickly so they can work more
57+
efficiently. However, it is also desirable for the compiler team contributor
58+
role to act as recognition for those contributors who have shown staying power
59+
and that the team would like to recognise. These goals are in tension, adding
60+
new contributors early and regularly improves the efficiency of the compiler
61+
team while watering down the recognition and sense of achievement that the role
62+
would ideally confer.
63+
64+
In addition, as compiler team contributors and members increasingly leverage
65+
their contributions to gain employment/contracts to contribute to the project
66+
full-time (or otherwise), the naming of the compiler team contributor role can
67+
be confusing. An employer unfamiliar with the project may not realise that a
68+
compiler team contributor is a role within the project which recognises regular
69+
contribution and trust rather than just having made a handful of contributions
70+
and thus being a contributor.
71+
72+
[rfc2689]: https://rust-lang.github.io/rfcs/2689-compiler-team-contributors.html
73+
[review_queue_analysis]: https://borrowed.dev/p/on-the-compiler-teams-review-queue
74+
75+
Definitions
76+
-----------
77+
[definitions]: #definitions
78+
79+
There are various permissions/privileges/responsibilities which will be
80+
referenced in later sections of this RFC, defined here:
81+
82+
- **r+**
83+
- Contributors with *r+* privilege are able to approve pull requests to be
84+
merged by *bors*. Contributors should not merge their own pull requests (with
85+
the exception of re-approving their own work on behalf of another contributor
86+
after a rebase or similarly trivial change). *r+* permissions apply to the
87+
whole repository, but [it is expected][expectations] that contributors limit
88+
themselves to only those parts of the *rust-lang/rust* repository that are under
89+
the purview of the compiler team (unless granted *r+* from other teams too), and
90+
for subsystems/pull requests that they are confident reviewing.
91+
- **try**
92+
- Contributors with *try* permissions are able to trigger complete toolchain
93+
builds for a pull request or commit, which are then used by *rustc-perf* and
94+
*crater*. *try* permissions aren't available to everyone because try builds
95+
can pose a security risk: try builds have access to secrets and the resulting
96+
builds are hosted on `static.rust-lang.org` where we would never want
97+
malicious code.
98+
- **review rotation**
99+
- Contributors on the review rotation will be randomly assigned to new pull
100+
requests submitted to the compiler. Being on the review rotation is one of the
101+
best ways for contributors to help the compiler team and learn new parts of
102+
the compiler. Review capacity is one of the most important resources that the
103+
team has, as it enables our progress in the compiler's continued development
104+
and maintenance.
105+
- **organization membership**
106+
- Contributors that are added to the *rust-lang/compiler* team in the GitHub
107+
organisation can be assigned to issues/pull requests, modify labels, receive
108+
group mentions and receive a "Member" badge next to their name.
109+
- **rustc-perf**
110+
- Contributors with permissions to use *rustc-perf* can request benchmarking
111+
of their pull requests (and pull requests they are reviewing). *rustc-perf*
112+
permissions are useful for regular contributors as it is common to need to
113+
request benchmarks from contributors with permissions. *rustc-perf* permissions
114+
only make sense alongside *try* permissions.
115+
- **crater**
116+
- Contributors with permissions to *crater* can request crater runs to check
117+
whether their code breaks any public ecosystem code. *crater* permissions only
118+
make sense alongside *try* permissions.
119+
- **dev desktops**
120+
- Contributors with access to developer desktops are able to connect to shared
121+
development servers that they can do their contributions from.
122+
- **triagebot**
123+
- [triagebot][triagebot] is a GitHub bot that can perform helpful tasks on issues
124+
and pull requests. Many of its functions are available to everyone, such as issue
125+
claiming, but some functions may be restricted to project/team members.
126+
127+
[expectations]: https://forge.rust-lang.org/compiler/reviews.html#expectations-for-r
128+
[triagebot]: https://forge.rust-lang.org/triagebot/index.html
129+
130+
Guide-level explanation
131+
=======================
132+
[guide-level-explanation]: #guide-level-explanation
133+
134+
Contributors start without any particular privileges, permissions or
135+
responsibilities and can contribute whatever they'd like. Contributors can
136+
progress to [Trusted Contributors][trusted-contributors] and then
137+
[Team Members][team-members].
138+
139+
Trusted Contributors
140+
--------------------
141+
[trusted-contributors]: #trusted-contributors
142+
143+
Being able to grant permissions to trusted contributors quickly is beneficial to
144+
enable them to contribute to the project more efficiently and review and approve
145+
work of their collaborators.
146+
147+
Any contributor can request to become a trusted contributor by contacting the
148+
compiler team's leads, or current team members and trusted contributors can
149+
nominate a contributor. Team leads will check for a reasonable contribution
150+
history, and will check if the current team have any serious concerns related to
151+
contributor conduct (waiting approximately one week).
152+
153+
When evaluating a candidate's contribution history, length of time and
154+
consistency of contributions and interactions with other contributors and team
155+
members will be taken into account. It is important to note that many kinds
156+
of contributions will be considered such as code contributions, helping with
157+
issue triage and bisection, running meetings and creating minutes, documentation
158+
contributions for rustc internals or the [Compiler Development Guide], etc.
159+
160+
Trusted contributor is a mix of RFC 2689's "working group participant" and
161+
"compiler team contributor" roles. It is explicitly intended to be granted more
162+
liberally to contributors who have demonstrated competence and trustworthiness,
163+
for whom they would be able to work more effectively with these permissions and
164+
can be trusted to use them responsibly. Trusted contributors do not need to
165+
have experience with most of the compiler, and can be specialised to specific
166+
subsystems of the compiler.
167+
168+
Trusted contributors are granted *r+*, *try*, *triagebot*, *rustc-perf*, and
169+
*crater* permissions; *organisation membership*; and *dev desktop* access.
170+
Trusted contributors are considered members of the Rust project as a whole, and
171+
are automatically eligible for any benefits that incurs (e.g. invitations to
172+
meetups of project members). As representatives of the Rust project, trusted
173+
contributors are expected to obey not just the letter of the
174+
[Code of Conduct][coc] but its spirit.
175+
176+
Trusted contributors can choose to take on additional responsibilities, such as
177+
those listed in the [responsibilities][responsibilities] section. Participating
178+
in the team's review rotation is encouraged.
179+
180+
If a trusted contributor becomes inactive (the contributor's prior contributions
181+
and other interactions with the project cease) for longer than a year, the
182+
trusted contributor will be moved into alumni status. At any point in the
183+
future, they can ask to be re-instated at the trusted contributor level if they
184+
desire.
185+
186+
[Compiler Development Guide]: https://rustc-dev-guide.rust-lang.org/
187+
188+
Team Members
189+
------------
190+
[team-members]: #team-members
191+
192+
Trusted contributors are eligible to become team members after they have
193+
continued to contribute actively for a year. Trusted contributors can contact
194+
team leads or will be contacted by team leads to enquire about promotion to team
195+
membership. Trusted contributors who are eligible for team membership do not
196+
have to become team members.
197+
198+
Unlike trusted contributors, team members are expected to consider themselves
199+
as *maintainers* of the compiler - put otherwise, to be invested in the quality
200+
of the compiler codebase and overall health of the compiler team, independent
201+
of their own projects. Team membership is primarily intended to recognise and
202+
encourage participation in activities which are vital to the success of the
203+
compiler team and broader project.
204+
205+
Team members are expected to participate in the ongoing maintenance tasks
206+
that the compiler team is responsible for (with all of the expected caveats
207+
for vacation time, mental health breaks, etc) - listed as
208+
[responsibilities][responsibilities] below. However, not all contributors need
209+
to participate in these responsibilities to an equal degree. Contributors should
210+
participate in these tasks to the degree that they are able - volunteers are not
211+
expected to participate as much as those employed to work on the compiler, for
212+
example. It is the responsibility of the compiler team leads to ensure that the
213+
ongoing maintenance tasks of the team can be completed sustainably.
214+
215+
Team members have all of the same permissions and access as trusted
216+
contributors. Like trusted contributors, team members are considered members of
217+
the Rust project as a whole and are expected to follow the spirit of the [Code
218+
of Conduct][coc].
219+
220+
Like trusted contributors, after inactivity for longer than a year, a
221+
contributor will be moved to alumni status. Members who are no longer able to
222+
help maintain the compiler but otherwise wish to continue contributing to the
223+
compiler can also be moved to alumni status and retain their trusted contributor
224+
status. Alumni can ask to be reinstated in the future.
225+
226+
[coc]: https://www.rust-lang.org/policies/code-of-conduct
227+
228+
Responsibilities
229+
----------------
230+
[responsibilities]: #responsibilities
231+
232+
There are various responsibilities that a team member could take on to help the
233+
team. All team members must participate in at least one activity.
234+
235+
Team members can get involved in any of these by contacting the team leads, by
236+
asking team members currently involved in these responsibilities, or by asking
237+
in any venue where these responsibilities are conducted (e.g. a Zulip stream).
238+
239+
- Final comment period (FCP) reviewer
240+
- Final comment periods are the process by which the team signs-off on a
241+
change before it is made, like stabilizing a feature.
242+
243+
FCPs have always required whole team to sign-off, but this doesn't scale
244+
as the team grows. As described above, this acts as a disincentive for the
245+
team to grow. Furthermore, not all FCPs are relevant to all team members and a
246+
diffusion of responsibility means that most team members just sanity-check and
247+
then sign-off. This isn't ideal, as it doesn't guarantee that someone on the
248+
team has thoroughly considered a FCP.
249+
250+
Instead, have FCPs require sign-off from team members who opt-in to being
251+
an "FCP reviewer", with the expectation that they will spend time reviewing
252+
an FCP thoroughly. FCP reviewers should also consider reaching out to relevant
253+
domain experts and soliciting their opinions whenever possible. Any team or
254+
project member can raise concerns with an FCP, which will be considered by the
255+
FCP reviewers.
256+
257+
To function effectively, it is recommended that there be 4 - 8 FCP
258+
reviewers at any time. If less than 4 FCP reviewers are available, the compiler
259+
team co-leads will act as FCP reviewers until the reviewers can be found.
260+
261+
- Performance triage
262+
- There is a rotation of team members and other project members who check
263+
all of the interesting performance benchmarks from the last week to produce a
264+
report summarizing the improvements and regressions. This is valuable to keep
265+
track of the compiler's performance over time and make sure that regressions are
266+
being addressed.
267+
268+
- Issue prioritisation
269+
- The compiler team has a prioritisation procedure and policy to identify
270+
and label issues according to their importance. These labels feed into the
271+
backport procedure (what's worth being backported) and work priorities of team
272+
members.
273+
274+
- Backport reviews
275+
- On a regular basis, some team members participate a review of pull
276+
requests which have been nominated for backporting to the beta or stable
277+
release. This involves a judgement call on the risk of backporting a
278+
particular fix versus the severity of the issue being addressed.
279+
280+
Once those team members interested in backport reviews are identified,
281+
this function could be performed in a separate meeting or asynchronously,
282+
allowing the triage meeting to be streamlined and focused on nominated issues or
283+
other tasks requiring broader discussion.
284+
285+
To establish a reasonable quorum of triage members, it is recommended that
286+
at least 4 members participate in triage meetings. In the event there are not
287+
enough triage members, the compiler team co-leads will act as triage members
288+
until additional members are found.
289+
290+
- Review rotation
291+
- Every week, lots of pull requests are submitted to the compiler which need
292+
to be reviewed. Being on the review rotation is one of the primary ways that
293+
team members can help keep the wheels turning in the compiler team.
294+
295+
It is **strongly** encouraged that all team members be a part of the
296+
review rotation.
297+
298+
299+
- Operations
300+
- There are various *operations* tasks like agenda preparation and taking
301+
meeting notes which are very useful for the team.
302+
303+
This list isn't exhaustive, and this RFC shouldn't be considered the canonical
304+
list of these responsibilities. Similarly, this RFC isn't intended to define how
305+
these responsibilities are conducted (in meetings or asynchronously, etc), that
306+
should be decided and documented by those involved in each.
307+
308+
While this RFC doesn't aim to be authoritative with respect to how team members
309+
who take on additional responsibilities are recognised, one way would be for
310+
team members who take on additional responsibilities to record this in the
311+
*rust-lang/team* metadata (using the `roles` key), e.g.
312+
313+
```toml
314+
[people]
315+
members = [
316+
{ github = "davidtwco", roles = ["compiler-backport"] }
317+
]
318+
319+
[[roles]]
320+
id = "compiler-backport"
321+
description = "Backport Reviewer"
322+
```
323+
324+
By tracking responsibility participation in the team repository, it is easier
325+
for the team leads to have visibility into the participation in each to ensure
326+
that it is sustainable. Participants will be recognised for the additional
327+
responsibilities they participate in on the compiler team's page on the Rust
328+
website.
329+
330+
Drawbacks
331+
=========
332+
[drawbacks]: #drawbacks
333+
334+
- Granting permissions earlier may be a risk
335+
- We haven't had any issues with contributors having staying power to the
336+
extent that we would trust them with permissions and then having those be used
337+
inappropriately. We can always revert changes if necessary.
338+
- Expectations of team members
339+
- This RFC formally establishes expectations which come with team
340+
membership. Some team members already assume that these expectations are there,
341+
but this wasn't made explicit when current team members were made team members.
342+
343+
Rationale and alternatives
344+
==========================
345+
[rationale-and-alternatives]: #rationale-and-alternatives
346+
347+
- Get better at doing nominations
348+
- A lot of this proposal's simplification of the way that promotions are
349+
granted is based on the premise that our current system doesn't work well for us
350+
- but we could just try and do the current system better.
351+
- Only change review responsibilities
352+
- We could instead try to increase the number of reviewers on the review
353+
queue by just amending the current compiler team membership policy to include
354+
review rotation duty. This does not improve our ability to correctly promote
355+
contributors or recognize the ways individuals contribute to the maintenance
356+
of the compiler but could be reasonable if implementing all of the changes
357+
described here will take too long.
358+
359+
Prior art
360+
=========
361+
[prior-art]: #prior-art
362+
363+
- [Responsibilities][responsibilities] are similar to [an unsubmitted proposal
364+
by Niko Matsakis in December 2020 to have "elected officers"][officers] within
365+
the compiler team responsible for different team functions. This RFC shares
366+
many of the goals of Niko's earlier proposal, but is slightly less formal -
367+
responsibilities are loosely-defined groups of contributors rather than elected
368+
positions, and there is no rotations or term limits.
369+
370+
In this RFC's proposal, it is expected that responsibilities are shared
371+
amongst a group of team members, and that team members do less of other
372+
responsibilities so that their workload is sustainable, but this isn't enforced.
373+
Team leads are instead responsible for ensuring that the team is large enough to
374+
perform each responsibility sustainably.
375+
376+
[officers]: https://hackmd.io/S9xqmwJbSI-a9mFdK9yQBA
377+
378+
Unresolved questions
379+
====================
380+
[unresolved-questions]: #unresolved-questions
381+
382+
None!
383+
384+
Future possibilities
385+
====================
386+
[future-possibilities]: #future-possibilities
387+
388+
Responsibilities could be formalized further - see references in
389+
[Prior art][prior-art].

0 commit comments

Comments
 (0)