|
| 1 | +# esp-stub-lib maintenance & release policy |
| 2 | + |
| 3 | +This document defines the maintenance rules for `esp-stub-lib` when multiple teams develop and integrate in parallel. |
| 4 | + |
| 5 | +## 1) Public API definition |
| 6 | + |
| 7 | +**Public API** is everything exposed by headers under: |
| 8 | + |
| 9 | +- `include/esp-stub-lib/**` |
| 10 | + |
| 11 | +Consumers must not rely on internal headers or internal symbols outside of this directory. |
| 12 | + |
| 13 | +## 2) Versioning & releases (SemVer) |
| 14 | + |
| 15 | +This project follows **Semantic Versioning**: `MAJOR.MINOR.PATCH` (e.g. `1.4.2`). |
| 16 | + |
| 17 | +Releases are created and tagged regularly using **commitizen** (and its generated changelog/release notes). |
| 18 | + |
| 19 | +**Integration rule for downstream projects:** |
| 20 | +- Downstream projects should pin the submodule to **release tags** (e.g. `v1.3.0`), not to branches and not to arbitrary commits. |
| 21 | +- Pinning to the exact commit that an annotated tag points at is equally valid. This is useful when a team has already tested and approved commit X: they can create a tag pointing at X without needing to move to a different commit and re-run their testing pipelines. |
| 22 | + |
| 23 | +Rationale: tags are explicit integration points with a known set of changes and release notes. |
| 24 | + |
| 25 | +## 3) Branch policy |
| 26 | + |
| 27 | +- There is exactly **one maintained branch: `master`**. |
| 28 | +- Feature branches may exist for development, but no other long-lived maintained branches (no `release/*` branches). |
| 29 | + |
| 30 | +## 4) Breaking changes policy |
| 31 | + |
| 32 | +A change is considered **breaking** if it changes **public API or behavior** in a way that can break existing consumers. |
| 33 | + |
| 34 | +This includes (non-exhaustive): |
| 35 | +- Changes to function signatures, types, macros, constants in `include/esp-stub-lib/**` |
| 36 | +- Removal/renaming of any public API surface |
| 37 | +- Behavioral changes that break existing correct usage (even if the header signature is unchanged) |
| 38 | + |
| 39 | +### Required review for breaking changes |
| 40 | +Any PR that introduces a breaking change MUST be reviewed by **all teams** before merge. |
| 41 | + |
| 42 | +Operationally: |
| 43 | +- PR must be clearly marked as breaking (e.g. title prefix `BREAKING:` and/or label `breaking-change`) |
| 44 | +- The merge commit must follow the Conventional Commits breaking-change format so that commitizen detects it automatically: |
| 45 | + - Use `!` after the type/scope: `feat(flash)!: change read buffer type`, **or** |
| 46 | + - Include a `BREAKING CHANGE:` footer in the commit body |
| 47 | +- Approval from all teams is required to merge |
| 48 | + |
| 49 | +## 5) Who can release / tag |
| 50 | + |
| 51 | +Each team is allowed to create releases/tags. |
| 52 | + |
| 53 | +Typical flow: |
| 54 | +- Team A merges a change to `master` that they need in their tool. |
| 55 | +- Team A validates the commit with their tool, then performs a release directly on `master`: |
| 56 | + - Run `cz bump` on the up-to-date `master` branch — this commits a version bump and creates the tag locally. |
| 57 | + - Push both the commit and the tag: `git push && git push --tags`. |
| 58 | + - No separate release PR is needed. The push triggers CI and creates a draft GitHub release with auto-generated release notes. The same person who tagged may review and publish the draft. |
| 59 | +- Team B (and any other teams) can run automation that reacts to new tags (e.g., opens a PR to bump the submodule to the new tag) and executes integration tests. |
| 60 | +- Teams can either: |
| 61 | + - accept and merge the bump to keep up with the flow (reducing future catch-up cost), or |
| 62 | + - defer if they have a blocking issue, understanding that later upgrades will include more accumulated changes. |
| 63 | + |
| 64 | +## 6) Expectations for release quality |
| 65 | + |
| 66 | +Because tags are the supported integration points: |
| 67 | +- Do not tag a release unless it is buildable and passes the releasing team's integration test(s). |
| 68 | +- If a release is found to be bad, follow SemVer: |
| 69 | + - ship a new PATCH release with the fix, or |
| 70 | + - if necessary, ship a revert + PATCH release |
| 71 | + |
| 72 | +(Do not move/retag an existing version tag.) |
0 commit comments