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