1.. _project_roles:
2
3TSC Project Roles
4*****************
5
6Project Roles
7#############
8
9TSC projects generally will involve *Maintainers*, *Collaborators*, and
10*Contributors*:
11
12**Maintainer**: lead Collaborators on an area identified by the TSC (e.g.
13Architecture, code subsystems, etc.). Maintainers shall also serve as the
14area’s representative on the TSC as needed. Maintainers may become voting
15members of the TSC under the guidelines stated in the project Charter.
16
17**Collaborator**: A highly involved Contributor in one or more areas.
18May become a Maintainer with approval of existing TSC voting members.
19
20**Contributor**: anyone in the community that contributes code or
21documentation to the project. Contributors may become Collaborators
22by approval of the existing Collaborators and Maintainers of the
23particular code base areas or subsystems.
24
25
26.. _contributor:
27
28Contributor
29+++++++++++
30
31A *Contributor* is a developer who wishes to contribute to the project,
32at any level.
33
34Contributors are granted the following rights and responsibilities:
35
36* Right to contribute code, documentation, translations, artwork, etc.
37* Right to report defects (bugs) and suggestions for enhancement.
38* Right to participate in the process of reviewing contributions by others.
39* Right to initiate and participate in discussions in any communication
40  methods.
41* Right to approach any member of the community with matters they believe
42  to be important.
43* Right to participate in the feature development process.
44* Responsibility to abide by decisions, once made. They are welcome to
45  provide new, relevant information to reopen decisions.
46* Responsibility for issues and bugs introduced by one’s own contributions.
47* Responsibility to respect the rules of the community.
48* Responsibility to provide constructive advice whenever participating in
49  discussions and in the review of contributions.
50* Responsibility to follow the project’s code of conduct
51  (https://github.com/zephyrproject-rtos/zephyr/blob/main/CODE_OF_CONDUCT.md)
52
53Contributors are initially only given `Read
54<https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization>`_
55access to the Zephyr GitHub repository. Specifically, at the Read access level,
56Contributors are not allowed to assign reviewers to their own pull requests. An
57automated process will assign reviewers. You may also share the pull request on
58the `Zephyr devel mailing list <https://lists.zephyrproject.org/g/devel>`_ or on
59the `Zephyr Discord Server <https://chat.zephyrproject.org>`_.
60
61Contributors who show dedication and skill are granted the Triage permission
62level to the Zephyr GitHub repository.
63
64You may nominate yourself, or another GitHub user, for promotion to the Triage
65permission level by creating a GitHub issue, using the :github:`nomination
66template <new?assignees=&labels=Role+Nomination&template=006_nomination.md&title=>`.
67
68Contributors granted the Triage permission level are permitted to add reviewers
69to a pull request and can be added as a reviewer by other GitHub users.
70Contributor change requests or approval on pull requests are not counted with
71respect to accepting and merging a pull request. However, Contributors comments
72and requested changes should still be considered by the pull request author.
73
74.. _collaborator:
75
76Collaborator
77++++++++++++
78
79A *Collaborator* is a Contributor who is also responsible for the maintenance
80of Zephyr source code. Their opinions weigh more when decisions are made, in a
81fully meritocratic fashion.
82
83Collaborators have the following rights and responsibilities,
84in addition to those listed for Contributors:
85
86* Right to set goals for the short and medium terms for the project being
87  maintained, alongside the Maintainer.
88* Responsibility to participate in the feature development process.
89* Responsibility to review relevant code changes within reasonable time.
90* Responsibility to ensure the quality of the code to expected levels.
91* Responsibility to participate in community discussions.
92* Responsibility to mentor new contributors when appropriate
93* Responsibility to participate in the quality verification and release
94  process, when those happen.
95
96Contributors are promoted to the Collaborator role by adding the GitHub user
97name to one or more ``collaborators`` sections of the :ref:`maintainers_file` in
98the Zephyr repository.
99
100Collaborator change requests on pull requests should
101be addressed by the original submitter. In cases where the changes requested do
102not follow the :ref:`expectations <reviewer-expectations>` and the guidelines
103of the project or in cases of disagreement, it is the responsibility of the
104assignee to advance the review process and resolve any disagreements.
105
106Collaborator approval of pull requests are counted toward the minimum required
107approvals needed to merge a PR. Other criteria for merging may apply.
108
109
110.. _maintainer:
111
112Maintainer
113++++++++++
114
115A *Maintainer* is a Collaborator who is also responsible for knowing,
116directing and anticipating the needs of a given zephyr source code area.
117
118Maintainers have the following rights and responsibilities,
119in addition to those listed for Contributors and Collaborators:
120
121* Right to set the overall architecture of the relevant subsystems or areas
122  of involvement.
123* Right to make decisions in the relevant subsystems or areas of involvement,
124  in conjunction with the collaborators and submitters.
125  See :ref:`pr_technical_escalation`.
126* Responsibility to convey the direction of the relevant subsystem or areas to
127  the TSC
128* Responsibility to ensure all contributions of the project have been reviewed
129  within reasonable time.
130* Responsibility to enforce the code of conduct.
131* Responsibility to triage static analysis issues in their code area.
132  See :ref:`static_analysis`.
133
134Contributors or Collaborators are promoted to the Maintainer role by adding the
135GitHub user name to one or more ``maintainers`` sections of the
136:ref:`maintainers_file` in the Zephyr repository. Candidates who are neither
137Contributors nor Collaborators must be approved by the TSC before they can
138assume the role of Maintainer.
139
140Maintainer approval of pull requests are counted toward the minimum
141required approvals needed to merge a PR. Other criteria for merging may apply.
142
143Role Retirement
144###############
145
146* Individuals elected to the following Project roles, including, Maintainer,
147  Release Engineering Team member, Release Manager, but are no longer engaged
148  in the project as described by the rights and responsibilities of that role,
149  may be requested by the TSC to retire from the role they are elected.
150* Such a request needs to be raised as a motion in the TSC and be
151  approved by the TSC voting members.
152  By approval of the TSC the individual is considered to be retired
153  from the role they have been elected.
154* The above applies to elected TSC Project roles that may be defined
155  in addition.
156
157
158Teams and Supporting Activities
159###############################
160
161Assignee
162++++++++
163
164An *Assignee* is one of the maintainers of a subsystem or code being changed.
165Assignees are set either automatically based on the code being changed or set
166by the other Maintainers, the Release Engineering team can set an assignee when
167the latter is not possible.
168
169* Responsibility to drive the pull request to a mergeable state
170* Right to dismiss stale and unrelated reviews or reviews not following
171  :ref:`expectations <reviewer-expectations>` from reviewers and seek reviews
172  from additional maintainers, developers and contributors
173* Right to block pull requests from being merged until issues or changes
174  requested are addressed
175* Responsibility to re-assign a pull request if they are the original submitter
176  of the code
177* Solicit approvals from maintainers of the subsystems affected
178* Responsibility to drive the :ref:`pr_technical_escalation` process
179
180Static Analysis Audit Team
181++++++++++++++++++++++++++
182
183The Static Analysis Audit team works closely with the release engineering
184team to ensure that static analysis defects opened during a release
185cycle are properly addressed. The team has the following rights and
186responsibilities:
187
188* Right to revert any triage in a static analysis tool (e.g: Coverity)
189  that does not follow the project expectations.
190* Responsibility to inform code owners about improper classifications.
191* Responsibility to alert TSC if any issues are not adequately addressed by the
192  responsible code owners.
193
194Joining the Static Analysis Audit team
195
196* Contributors highly involved in the project with some expertise
197  in static analysis.
198
199
200.. _release-engineering-team:
201
202Release Engineering Team
203++++++++++++++++++++++++
204
205A team of active Maintainers involved in multiple areas.
206
207* The members of the Release Engineering team are expected to fill
208  the Release Manager role based on a defined cadence and selection process.
209* The cadence and selection process are defined by the Release Engineering
210  team and are approved by the TSC.
211* The team reports directly into the TSC.
212
213Release Engineering team has the following rights and responsibilities:
214
215* Right to merge code changes to the zephyr tree following the project rules.
216* Right to revert any changes that have broken the code base
217* Right to close any stale changes after <N> months of no activity
218* Responsibility to take directions from the TSC and follow them.
219* Responsibility to coordinate code merges with maintainers.
220* Responsibility to merge all contributions regardless of their
221  origin and area if they have been approved by the respective
222  maintainers and follow the merge criteria of a change.
223* Responsibility to keep the Zephyr code base in a working and passing state
224  (as per CI)
225
226Joining the Release Engineering team
227
228* Maintainers highly involved in the project may be nominated
229  by a TSC voting member to join the Release Engineering team.
230  Nominees may become members of the team by approval of the
231  existing TSC voting members.
232* To ensure a functional Release Engineering team the TSC shall
233  periodically review the team’s followed processes,
234  the appropriate size, and the membership
235  composition (ensure, for example, that team members are
236  geographically distributed across multiple locations and
237  time-zones).
238
239
240Release Manager
241+++++++++++++++
242
243A *Maintainer* responsible for driving a specific release to
244completion following the milestones and the roadmap of the
245project for this specific release.
246
247* TSC has to approve a release manager.
248
249A Release Manager is a member of the Release Engineering team and has
250the rights and responsibilities of that team in addition to
251the following:
252
253* Right to manage and coordinate all code merges after the
254  code freeze milestone (M3, see `program management overview <https://wiki.zephyrproject.org/Program-Management>`_.)
255* Responsibility to drive and coordinate the triaging process
256  for the release
257* Responsibility to create the release notes of the release
258* Responsibility to notify all stakeholders of the project,
259  including the community at large about the status of the
260  release in a timely manner.
261* Responsibility to coordinate with QA and validation and
262  verify changes either directly or through QA before major
263  changes and major milestones.
264
265Roles / Permissions
266+++++++++++++++++++
267
268.. table:: Project Roles vs GitHub Permissions
269    :widths: 20 20 10 10 10 10 10
270    :align: center
271
272    ================ =================== =========== ================ =========== =========== ============
273          ..             ..               **Admin**  **Merge Rights**   Member      Owner     Collaborator
274    ---------------- ------------------- ----------- ---------------- ----------- ----------- ------------
275    Main Roles       Contributor                                                                 x
276    ---------------- ------------------- ----------- ---------------- ----------- ----------- ------------
277        ..           Collaborator                                       x
278    ---------------- ------------------- ----------- ---------------- ----------- ----------- ------------
279        ..           Maintainer                                         x
280    Supportive Roles QA/Validation                                      x                        x
281        ..           DevOps                   **x**
282        ..           System Admin             **x**                                      x
283        ..           Release Engineering      **x**      **x**          x
284
285    ================ =================== =========== ================ =========== =========== ============
286
287
288.. _maintainers_file:
289
290MAINTAINERS File
291################
292
293Generic guidelines for deciding and filling in the Maintainers' list
294
295* We should keep the granularity of code maintainership at a manageable level
296* We should be looking for maintainers for areas of code that
297  are orphaned (i.e. without an explicit maintainer)
298
299  * Un-maintained areas should be indicated clearly in the MAINTAINERS file
300
301* All submitted pull requests should have an assignee
302* We Introduce an area/subsystem hierarchy to address the above point
303
304  * Parent-area maintainer should be acting as default substitute/fallback
305    assignee for un-maintained sub-areas
306  * Area maintainer gets precedence over parent-area maintainer
307
308* Pull requests may be re-assigned if this is needed or more appropriate
309
310  * Re-assigned by original assignee
311
312* In general, updates to the MAINTAINERS file should be
313  in a standalone commit alongside other changes introducing new files and
314  directories to the tree.
315* Major changes to the file, including the addition of new areas with new maintainers
316  should come in as standalone pull requests and require TSC review.
317* If additional review by the TSC is required, the maintainers of the file
318  should send the requested changes to the TSC and give members of the TSC two
319  (2) days to object to any of the changes to maintainership of areas or the
320  addition of new maintainers or areas.
321* Path, collaborator and name changes do not require a review by the TSC.
322* Addition of new areas without a maintainer do not require review by the TSC.
323* The MAINTAINERS file itself shall have a maintainer
324* Architectures, core components, sub-systems, samples, tests
325
326  * Each area shall have an explicit maintainer
327
328* Boards (incl relevant samples, tests), SoCs (incl DTS)
329  * May have a maintainer, shall have a higher-level platform maintainer
330* Drivers
331
332  * Shall have a driver-area (and API) maintainer
333  * Could have individual driver implementation
334    maintainers but preferably collaborator/contributors
335  * In the above case, platform-specific PRs may be
336    re-assigned to respective collaborator/contributor of driver
337    implementation
338
339
340Release Activity
341################
342
343    .. figure:: img/img_release_activity.png
344         :width: 663px
345         :align: center
346         :alt: Release Activity
347
348.. _merge_criteria:
349
350Merge Criteria
351++++++++++++++
352
353* Minimal of 2 approvals, including an approval by the designated assignee.
354* Pull requests should be reviewed by at least a maintainer or collaborator of
355  each affected area; Unless the changes to a given area are considered trivial
356  enough, in which case approvals by other affected subsystems
357  maintainers/collaborators would suffice.
358* Four eye principle on the organisation level. We already require at least 2
359  approvals (basic four eye principle), however, such reviews and approvals
360  might be unintentionally biased in the case where the submitter is from the
361  same organisation as the approvers. To allow for project wide review and
362  approvals, the merge criteria is extended with the guidelines below:
363
364  * Changes or additions to common and shared code shall have approvals from
365    different organisations (at least one approval from an
366    organisation different than the submitters').
367    Common and shared code is defined as anything that does not fall under
368    :file:`soc`, :file:`boards` and :file:`drivers/*/*`.
369  * Changes or additions to hardware support (driver, SoC, boards) shall at
370    least have the merger be from a different organisation. This applies only
371    to implementation of an API supporting vendor specific hardware and not the
372    APIs.
373  * Release engineers may make exceptions for areas with contributions primarily
374    coming from one organisation and where reviews from other organisations are
375    not possible, however, merges shall be completed by a person from a different
376    organisation. In such cases, the minimum review period of at least 2 days
377    shall be strictly followed to allow for additional reviews.
378  * Release engineers shall not merge code changes originating and reviewed
379    only by their own organisation. To be able to merge such changes, at least
380    one review shall be from a different organisation.
381
382* A minimum review period of 2 business days, 4 hours for trivial changes (see
383  :ref:`review_time`).
384* Hotfixes can be merged at any time after CI has passed and are excluded from
385  most of the conditions listed above.
386* All required checks are passing:
387
388  * Device Tree
389  * Documentation
390  * Code linters (Gitlint, Pylint, Ruff, Sphinx, etc.)
391  * Identity/Emails
392  * Kconfig
393  * License checks
394  * Checkpatch (Coding Style)
395  * Integration Tests (Via twister) on emulation/simulation platforms
396  * Simulated Bluetooth Tests
397
398* Planned
399
400  * Footprint
401  * Code coverage
402  * Coding Guidelines
403  * Static Analysis (Coverity)
404  * Documentation coverage (APIs)
405