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