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