@radicaltools/mcp 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-Z7THA3L5.js → chunk-2SZDTOYJ.js} +65 -33
- package/dist/{elkLayout-TAUBPPVN.js → elkLayout-VYJDCCIT.js} +1 -1
- package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
- package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +449 -210
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +287 -131
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
- package/dist/hub-catalogue/concern/concern-authentication.radical +247 -37
- package/dist/hub-catalogue/concern/concern-authorization.radical +311 -89
- package/dist/hub-catalogue/concern/concern-availability.radical +287 -63
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +300 -381
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +385 -129
- package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
- package/dist/hub-catalogue/concern/concern-capacity.radical +194 -81
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
- package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
- package/dist/hub-catalogue/concern/concern-communication-style.radical +473 -167
- package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +339 -308
- package/dist/hub-catalogue/concern/concern-data-store.radical +480 -158
- package/dist/hub-catalogue/concern/concern-decomposition.radical +260 -85
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
- package/dist/hub-catalogue/concern/concern-deployment.radical +343 -92
- package/dist/hub-catalogue/concern/concern-encryption.radical +339 -76
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +467 -160
- package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +1300 -268
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +88 -51
- package/dist/hub-catalogue/concern/concern-messaging.radical +173 -140
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +162 -159
- package/dist/hub-catalogue/concern/concern-observability.radical +224 -275
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
- package/dist/hub-catalogue/concern/concern-personal-data.radical +637 -122
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +433 -141
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
- package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
- package/dist/hub-catalogue/concern/concern-secrets.radical +332 -74
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
- package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
- package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +257 -183
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +271 -137
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +243 -224
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
- package/dist/index.js +1001 -230
- package/package.json +1 -1
|
@@ -0,0 +1,1358 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "concern-release-versioning",
|
|
4
|
+
"category": "concern",
|
|
5
|
+
"name": "Release and versioning",
|
|
6
|
+
"description": "How a release of the element is named, described, approved and supported: the version scheme, where the release notes come from, which release lines get security fixes, and who decides that a release goes out. The snippets assume a GitHub repository, GitHub releases and the GitHub CLI.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"sdlc",
|
|
9
|
+
"releases",
|
|
10
|
+
"versioning",
|
|
11
|
+
"semver",
|
|
12
|
+
"calver",
|
|
13
|
+
"changelog",
|
|
14
|
+
"release notes"
|
|
15
|
+
],
|
|
16
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
17
|
+
"concern": {
|
|
18
|
+
"id": "release-versioning",
|
|
19
|
+
"trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
|
|
20
|
+
"why": "these elements are built and released, so how a release is numbered, described, approved and supported has to be decided.",
|
|
21
|
+
"group": "sdlc"
|
|
22
|
+
},
|
|
23
|
+
"sources": [
|
|
24
|
+
{
|
|
25
|
+
"title": "Semantic Versioning 2.0.0",
|
|
26
|
+
"url": "https://semver.org/spec/v2.0.0.html"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Calendar Versioning (CalVer)",
|
|
30
|
+
"url": "https://calver.org/"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Keep a Changelog 1.1.0",
|
|
34
|
+
"url": "https://keepachangelog.com/en/1.1.0/"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Conventional Commits 1.0.0",
|
|
38
|
+
"url": "https://www.conventionalcommits.org/en/v1.0.0/"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Google SRE book, chapter 8: Release Engineering",
|
|
42
|
+
"url": "https://sre.google/sre-book/release-engineering/"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "release-please",
|
|
46
|
+
"url": "https://github.com/googleapis/release-please"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"title": "semantic-release",
|
|
50
|
+
"url": "https://semantic-release.gitbook.io/semantic-release"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"title": "git-cliff documentation",
|
|
54
|
+
"url": "https://git-cliff.org/docs/"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"title": "GitHub Docs: Automatically generated release notes",
|
|
58
|
+
"url": "https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"title": "GitHub Docs: Immutable releases",
|
|
62
|
+
"url": "https://docs.github.com/en/code-security/concepts/supply-chain-security/immutable-releases"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"title": "GitHub Docs: Adding a security policy to your repository",
|
|
66
|
+
"url": "https://docs.github.com/en/code-security/how-tos/report-and-fix-vulnerabilities/configure-vulnerability-reporting/add-security-policy"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"title": "GitHub Docs: Deployments and environments (required reviewers)",
|
|
70
|
+
"url": "https://docs.github.com/en/actions/reference/workflows-and-actions/deployments-and-environments"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"templateParams": [
|
|
74
|
+
{
|
|
75
|
+
"key": "SCHEME",
|
|
76
|
+
"title": "Version scheme",
|
|
77
|
+
"label": "How is a release of the element numbered?",
|
|
78
|
+
"hint": "The number is what users, support and tools compare: it decides what a release promises about compatibility, and whether there are numbered releases at all. This is the version of what is shipped, not of an API: how an API names its versions is decided in the API evolution pack.",
|
|
79
|
+
"defaultValue": "semver",
|
|
80
|
+
"options": [
|
|
81
|
+
{
|
|
82
|
+
"value": "semver",
|
|
83
|
+
"label": "semantic versions (MAJOR.MINOR.PATCH)",
|
|
84
|
+
"description": "Releases are numbered MAJOR.MINOR.PATCH by Semantic Versioning 2.0.0: a breaking change raises MAJOR, new functionality or a deprecation MINOR, a fix PATCH, computed from what the release contains. Pick it when others install, pin or build against the element (an image customers run, a self-hosted product, an SDK or a command-line tool), so the number has to say whether an upgrade breaks them."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"value": "calver",
|
|
88
|
+
"label": "calendar versions (YYYY.M.MICRO)",
|
|
89
|
+
"description": "Releases are numbered by the year and month their line started, with a counter for the fixes after it (2026.10.0, 2026.10.1), by CalVer; the month has no leading zero, so the number stays valid for semantic-versioning tools. Pick it when releases follow the calendar (a monthly or quarterly product release, an app store build) and how old a release is matters more to its users than whether it breaks them."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": "none",
|
|
93
|
+
"label": "no version numbers, a commit SHA per build",
|
|
94
|
+
"description": "No releases are cut: every build is named by the full SHA of the commit it was built from, and every production deploy is recorded with that SHA. Pick it for a service the team deploys continuously that nobody else installs or pins, where a number would only restate the commit."
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"key": "CHANGELOG",
|
|
100
|
+
"title": "Release notes",
|
|
101
|
+
"label": "Where do the release notes come from?",
|
|
102
|
+
"hint": "Every release says what changed in it; the source decides whether the notes are complete, readable, or both. Only when releases are numbered (semantic or calendar versions): with a commit SHA per build, the compare view of two deploys is the record.",
|
|
103
|
+
"defaultValue": "commits",
|
|
104
|
+
"options": [
|
|
105
|
+
{
|
|
106
|
+
"value": "commits",
|
|
107
|
+
"label": "notes generated from Conventional Commits",
|
|
108
|
+
"description": "release-please, semantic-release or git-cliff group the commits since the last release by type (breaking changes, features, fixes) and, for semantic versions, compute the next number from them. Pick it when the Code review and branching pack has chosen Conventional Commits; with free-form commit messages there is nothing to generate from."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"value": "keepachangelog",
|
|
112
|
+
"label": "a hand-written changelog in the Keep a Changelog format",
|
|
113
|
+
"description": "Every pull request that changes shipped code adds a line under Unreleased in CHANGELOG.md, in one of six categories (Added, Changed, Deprecated, Removed, Fixed, Security); a release moves those lines under its version. Pick it when the readers are customers or operators who need sentences, not commit subjects, and the team will write one with each change."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": "labels",
|
|
117
|
+
"label": "notes generated from pull request labels",
|
|
118
|
+
"description": "Every pull request carries one release label (breaking-change, feature, deprecation, fix or internal) and GitHub generates the notes from the merged pull requests, grouped by label through .github/release.yml. Pick it when commit messages are free-form but every change goes through a pull request with a title worth reading."
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"key": "SUPPORT",
|
|
124
|
+
"title": "Support",
|
|
125
|
+
"label": "Which releases get fixes?",
|
|
126
|
+
"hint": "Every line kept in support needs its own branch, its own builds and a copy of every security fix. A line is a MAJOR version under semantic versions and a YYYY.M line under calendar versions. Only when releases are numbered: with a commit SHA per build, only the latest build runs.",
|
|
127
|
+
"defaultValue": "latest",
|
|
128
|
+
"options": [
|
|
129
|
+
{
|
|
130
|
+
"value": "latest",
|
|
131
|
+
"label": "support for the latest release line only",
|
|
132
|
+
"description": "Fixes ship only as the next release on the newest line; users of an older line upgrade to get them. Pick it for a hosted service, or whenever users can move to a new line within weeks without a migration project."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"value": "lts",
|
|
136
|
+
"label": "security fixes for the newest release lines (LTS)",
|
|
137
|
+
"description": "The newest lines (two by default) get security fixes, cherry-picked from main onto a maintenance branch per line and released within days. Pick it when customers run the element themselves and cannot take a new line as fast as you ship one: on-premises installs, regulated environments, SDK users."
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"key": "APPROVAL",
|
|
143
|
+
"title": "Release approval",
|
|
144
|
+
"label": "Who decides that a release goes out?",
|
|
145
|
+
"hint": "Cutting a release here means numbering it, writing its notes and publishing it; when it reaches production is the Deployment pack's cadence. Only when releases are numbered: with a commit SHA per build, every merge is simply a build.",
|
|
146
|
+
"defaultValue": "auto",
|
|
147
|
+
"options": [
|
|
148
|
+
{
|
|
149
|
+
"value": "auto",
|
|
150
|
+
"label": "an automatic release on every merge to main",
|
|
151
|
+
"description": "The release workflow publishes a release for every merge that changes shipped code, with nobody to approve it. Pick it with the Deployment pack's continuous deployment, where every merge reaches production anyway and should carry its own version."
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"value": "owner",
|
|
155
|
+
"label": "the release owner's approval of each release",
|
|
156
|
+
"description": "The job that publishes a release waits in a protected GitHub environment until a member of the release-owner team approves it; with release-please, merging its release pull request starts that job. Pick it with the Deployment pack's weekly release train, or when a person must read the notes before customers do."
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"key": "RELEASE_HOURS",
|
|
162
|
+
"label": "Within how many hours must a merged change be in a release? (automatic releases only)",
|
|
163
|
+
"defaultValue": "1",
|
|
164
|
+
"type": "number"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"key": "RELEASE_OWNER",
|
|
168
|
+
"label": "Which GitHub team approves each release (its slug)? (the release owner's approval only)",
|
|
169
|
+
"defaultValue": "release-owners"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"key": "LTS_LINES",
|
|
173
|
+
"label": "How many release lines get security fixes? (LTS only)",
|
|
174
|
+
"defaultValue": "2",
|
|
175
|
+
"type": "number"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"key": "BACKPORT_DAYS",
|
|
179
|
+
"label": "Within how many days must a security fix be released on every supported line? (LTS only)",
|
|
180
|
+
"defaultValue": "7",
|
|
181
|
+
"type": "number"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"nodes": [
|
|
186
|
+
{
|
|
187
|
+
"id": "need",
|
|
188
|
+
"type": "need",
|
|
189
|
+
"label": "Every release says what it is",
|
|
190
|
+
"x": 0,
|
|
191
|
+
"y": 0,
|
|
192
|
+
"kind": "brief",
|
|
193
|
+
"source": "Hub concern pack: Release and versioning",
|
|
194
|
+
"description": "People and tools outside the team take this element's releases: they need to know which version they run, what changed in it, whether upgrading breaks them, and how long it will get fixes. Every release has to answer those questions the same way, from a process that runs without heroics and leaves a release as it was published. The snippets assume a GitHub repository (our-org/shop) whose releases are GitHub releases tagged v<version> with their notes in the body; shipped code under src/; CHANGELOG.md and SECURITY.md (with a Supported versions table of rows such as | 2.x | ✅ |, newest first) at the root; maintenance branches release/<line>.x; the deployment manifests under deploy/; and a GET /version endpoint (a /version.json file for a web app) answering with the version and commit."
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "req-version-visible",
|
|
198
|
+
"type": "requirement",
|
|
199
|
+
"label": "Running build names itself",
|
|
200
|
+
"x": 260,
|
|
201
|
+
"y": 0,
|
|
202
|
+
"ears_type": "ubiquitous",
|
|
203
|
+
"action": "answer GET /version (a /version.json file for a web app) with the version it was released as (its commit SHA where builds carry no version number) and the full SHA of the commit it was built from, so that the deploy job can confirm both within 90 seconds of every deploy",
|
|
204
|
+
"rationale": "An incident starts with \"which build is running?\"; a build that reports its own identity answers it in one request and ties what runs to the source it came from (Google SRE book, Release Engineering: every package labelled with its build ID)."
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "req-semver",
|
|
208
|
+
"type": "requirement",
|
|
209
|
+
"label": "Tags are semantic versions",
|
|
210
|
+
"x": 260,
|
|
211
|
+
"y": 130,
|
|
212
|
+
"ears_type": "ubiquitous",
|
|
213
|
+
"action": "tag every release v followed by a valid Semantic Versioning 2.0.0 version (MAJOR.MINOR.PATCH with an optional pre-release suffix), and never publish two releases with the same version",
|
|
214
|
+
"rationale": "Tools compare versions only when they follow the grammar, and a version published twice means two different things (Semantic Versioning 2.0.0, items 2 and 3).",
|
|
215
|
+
"hubWhen": {
|
|
216
|
+
"SCHEME": [
|
|
217
|
+
"semver"
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"id": "req-semver-bump",
|
|
223
|
+
"type": "requirement",
|
|
224
|
+
"label": "Number matches the changes",
|
|
225
|
+
"x": 260,
|
|
226
|
+
"y": 260,
|
|
227
|
+
"ears_type": "ubiquitous",
|
|
228
|
+
"action": "raise MAJOR for a release with a breaking change (MINOR while MAJOR is 0), MINOR for one with new functionality or a deprecation and nothing breaking, and PATCH for one with fixes only, each by exactly one step from the previous version",
|
|
229
|
+
"rationale": "The number is a promise to everyone who upgrades: a breaking change in a minor or patch release breaks them without warning, and a deprecation is announced by a minor release (Semantic Versioning 2.0.0, items 4, 6, 7 and 8).",
|
|
230
|
+
"hubWhen": {
|
|
231
|
+
"SCHEME": [
|
|
232
|
+
"semver"
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"id": "req-calver",
|
|
238
|
+
"type": "requirement",
|
|
239
|
+
"label": "Tags are calendar versions",
|
|
240
|
+
"x": 260,
|
|
241
|
+
"y": 390,
|
|
242
|
+
"ears_type": "ubiquitous",
|
|
243
|
+
"action": "tag every release vYYYY.M.MICRO, where YYYY.M is the UTC year and month in which the line's first release (MICRO 0) is published, the month without a leading zero, and MICRO counts the line's later releases without gaps; a release with new functionality, a deprecation or a breaking change starts a new line",
|
|
244
|
+
"rationale": "The date tells users how old a line is; a month without a leading zero keeps the number valid for semantic-versioning tools, and keeping fixes on their line keeps the date honest (Calendar Versioning).",
|
|
245
|
+
"hubWhen": {
|
|
246
|
+
"SCHEME": [
|
|
247
|
+
"calver"
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "req-immutable",
|
|
253
|
+
"type": "requirement",
|
|
254
|
+
"label": "Published releases never change",
|
|
255
|
+
"x": 260,
|
|
256
|
+
"y": 520,
|
|
257
|
+
"ears_type": "ubiquitous",
|
|
258
|
+
"action": "publish every release as an immutable GitHub release, so that its tag cannot be moved or deleted and its assets cannot be replaced, and ship any correction as a new version",
|
|
259
|
+
"rationale": "A release that can change after publication is no longer the one its users tested and installed (Semantic Versioning 2.0.0, item 3; GitHub Docs, Immutable releases).",
|
|
260
|
+
"hubWhen": {
|
|
261
|
+
"SCHEME": [
|
|
262
|
+
"semver",
|
|
263
|
+
"calver"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"id": "req-build-id",
|
|
269
|
+
"type": "requirement",
|
|
270
|
+
"label": "Builds named by their commit",
|
|
271
|
+
"x": 260,
|
|
272
|
+
"y": 650,
|
|
273
|
+
"ears_type": "ubiquitous",
|
|
274
|
+
"action": "tag every image with the full SHA of the commit it was built from, reference it in the deployment by that tag or by digest and never by a mutable tag such as latest, record every production deploy as a GitHub deployment of a commit on main, and create no version tags",
|
|
275
|
+
"rationale": "Without version numbers the commit is the version; a mutable tag makes it impossible to say afterwards what ran (Google SRE book, Release Engineering: builds tied to identifiers).",
|
|
276
|
+
"hubWhen": {
|
|
277
|
+
"SCHEME": [
|
|
278
|
+
"none"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "req-notes-commits",
|
|
284
|
+
"type": "requirement",
|
|
285
|
+
"label": "Notes list every change",
|
|
286
|
+
"x": 260,
|
|
287
|
+
"y": 780,
|
|
288
|
+
"ears_type": "event-driven",
|
|
289
|
+
"trigger": "a release is published",
|
|
290
|
+
"action": "list in its notes every feat, fix and perf commit merged since the previous release, each with its pull request number or its short commit SHA",
|
|
291
|
+
"rationale": "Generated notes are worth having only when they are complete: the release carries a report of every change it contains (Conventional Commits 1.0.0; Google SRE book, Release Engineering: a report of all changes contained in a release).",
|
|
292
|
+
"hubWhen": {
|
|
293
|
+
"SCHEME": [
|
|
294
|
+
"semver",
|
|
295
|
+
"calver"
|
|
296
|
+
],
|
|
297
|
+
"CHANGELOG": [
|
|
298
|
+
"commits"
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"id": "req-changelog-entry",
|
|
304
|
+
"type": "requirement",
|
|
305
|
+
"label": "Changelog line with every change",
|
|
306
|
+
"x": 260,
|
|
307
|
+
"y": 910,
|
|
308
|
+
"ears_type": "unwanted-behaviour",
|
|
309
|
+
"unwanted_condition": "a pull request changes code under src/ without adding an entry under Unreleased in CHANGELOG.md and without the skip-changelog label",
|
|
310
|
+
"action": "refuse the merge, and accept under Unreleased only the headings Added, Changed, Deprecated, Removed, Fixed and Security, and as release headings only ## [version] - YYYY-MM-DD",
|
|
311
|
+
"rationale": "A hand-written changelog is complete only when the line is written with the change, by the person who knows what it means for users (Keep a Changelog 1.1.0).",
|
|
312
|
+
"hubWhen": {
|
|
313
|
+
"SCHEME": [
|
|
314
|
+
"semver",
|
|
315
|
+
"calver"
|
|
316
|
+
],
|
|
317
|
+
"CHANGELOG": [
|
|
318
|
+
"keepachangelog"
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "req-pr-labels",
|
|
324
|
+
"type": "requirement",
|
|
325
|
+
"label": "One release label per pull request",
|
|
326
|
+
"x": 260,
|
|
327
|
+
"y": 1040,
|
|
328
|
+
"ears_type": "unwanted-behaviour",
|
|
329
|
+
"unwanted_condition": "a pull request carries none, or more than one, of the labels breaking-change, feature, deprecation, fix and internal",
|
|
330
|
+
"action": "refuse the merge until it carries exactly one, so that the generated notes put every merged pull request in one category",
|
|
331
|
+
"rationale": "Generated notes group pull requests by label; an unlabelled one lands in no category or in the wrong one (GitHub Docs, Automatically generated release notes).",
|
|
332
|
+
"hubWhen": {
|
|
333
|
+
"SCHEME": [
|
|
334
|
+
"semver",
|
|
335
|
+
"calver"
|
|
336
|
+
],
|
|
337
|
+
"CHANGELOG": [
|
|
338
|
+
"labels"
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"id": "req-latest-only",
|
|
344
|
+
"type": "requirement",
|
|
345
|
+
"label": "Only the newest line is supported",
|
|
346
|
+
"x": 260,
|
|
347
|
+
"y": 1170,
|
|
348
|
+
"ears_type": "ubiquitous",
|
|
349
|
+
"action": "release fixes only on the newest release line, publish nothing on an older line after a newer line's first release, and list only the newest line as supported in SECURITY.md",
|
|
350
|
+
"rationale": "Users must know which releases still get fixes; one supported line is a promise the team can keep, and a fix is always a new version on it (GitHub Docs, Adding a security policy; Semantic Versioning 2.0.0, item 3).",
|
|
351
|
+
"hubWhen": {
|
|
352
|
+
"SCHEME": [
|
|
353
|
+
"semver",
|
|
354
|
+
"calver"
|
|
355
|
+
],
|
|
356
|
+
"SUPPORT": [
|
|
357
|
+
"latest"
|
|
358
|
+
]
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"id": "req-lts-policy",
|
|
363
|
+
"type": "requirement",
|
|
364
|
+
"label": "Newest lines supported, each with its branch",
|
|
365
|
+
"x": 260,
|
|
366
|
+
"y": 1300,
|
|
367
|
+
"ears_type": "ubiquitous",
|
|
368
|
+
"action": "list exactly the newest {{LTS_LINES}} release lines as supported in SECURITY.md, keep a maintenance branch release/<line>.x for each of them but the newest, and publish nothing on a line after it has left support",
|
|
369
|
+
"rationale": "Customers who cannot upgrade at once must know which lines get fixes; a line is kept on a branch cut from its release, which takes fixes and nothing else (Google SRE book, Release Engineering: release branches; GitHub Docs, Adding a security policy).",
|
|
370
|
+
"hubWhen": {
|
|
371
|
+
"SCHEME": [
|
|
372
|
+
"semver",
|
|
373
|
+
"calver"
|
|
374
|
+
],
|
|
375
|
+
"SUPPORT": [
|
|
376
|
+
"lts"
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"id": "req-backport",
|
|
382
|
+
"type": "requirement",
|
|
383
|
+
"label": "Security fixes reach every supported line",
|
|
384
|
+
"x": 260,
|
|
385
|
+
"y": 1430,
|
|
386
|
+
"ears_type": "event-driven",
|
|
387
|
+
"trigger": "a pull request labelled security is merged to main",
|
|
388
|
+
"action": "cherry-pick its fix with git cherry-pick -x onto the maintenance branch of every supported line that lacks it, and release it there within {{BACKPORT_DAYS}} days of the merge",
|
|
389
|
+
"rationale": "Fixes land on the mainline first and are cherry-picked into the release branches, never made there, so that no line misses one (Google SRE book, Release Engineering: cherry picks into release branches).",
|
|
390
|
+
"hubWhen": {
|
|
391
|
+
"SCHEME": [
|
|
392
|
+
"semver",
|
|
393
|
+
"calver"
|
|
394
|
+
],
|
|
395
|
+
"SUPPORT": [
|
|
396
|
+
"lts"
|
|
397
|
+
]
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"id": "req-owner-approves",
|
|
402
|
+
"type": "requirement",
|
|
403
|
+
"label": "Release owner approves each release",
|
|
404
|
+
"x": 260,
|
|
405
|
+
"y": 1560,
|
|
406
|
+
"ears_type": "ubiquitous",
|
|
407
|
+
"action": "publish a release only from the release workflow's job in the GitHub environment release, after a member of the team {{RELEASE_OWNER}} who did not start the run approves it, and never by hand",
|
|
408
|
+
"rationale": "Who may release is a policy the release system enforces, not one people remember (Google SRE book, Release Engineering: enforcement of policies and procedures; GitHub Docs, Deployments and environments: required reviewers).",
|
|
409
|
+
"hubWhen": {
|
|
410
|
+
"SCHEME": [
|
|
411
|
+
"semver",
|
|
412
|
+
"calver"
|
|
413
|
+
],
|
|
414
|
+
"APPROVAL": [
|
|
415
|
+
"owner"
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"id": "req-auto-release",
|
|
421
|
+
"type": "requirement",
|
|
422
|
+
"label": "Every merge released",
|
|
423
|
+
"x": 260,
|
|
424
|
+
"y": 1690,
|
|
425
|
+
"ears_type": "event-driven",
|
|
426
|
+
"trigger": "a change to code under src/ is merged to main",
|
|
427
|
+
"action": "publish it in a release within {{RELEASE_HOURS}} hours, with nobody approving",
|
|
428
|
+
"rationale": "Frequent releases keep the changes between versions few, so each release is easier to test and a fault easier to trace to its change (Google SRE book, Release Engineering: high velocity).",
|
|
429
|
+
"hubWhen": {
|
|
430
|
+
"SCHEME": [
|
|
431
|
+
"semver",
|
|
432
|
+
"calver"
|
|
433
|
+
],
|
|
434
|
+
"APPROVAL": [
|
|
435
|
+
"auto"
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"id": "sc-version-visible",
|
|
441
|
+
"type": "scenario",
|
|
442
|
+
"label": "Deploy confirms what runs",
|
|
443
|
+
"x": 520,
|
|
444
|
+
"y": 0,
|
|
445
|
+
"given": "a release deployed to an environment",
|
|
446
|
+
"when": "the deploy job calls GET /version",
|
|
447
|
+
"then": "within 90 seconds the answer names the version and commit the job deployed, and the job fails if it does not"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"id": "sc-semver",
|
|
451
|
+
"type": "scenario",
|
|
452
|
+
"label": "Malformed tag refused",
|
|
453
|
+
"x": 520,
|
|
454
|
+
"y": 130,
|
|
455
|
+
"given": "the releases of the repository",
|
|
456
|
+
"when": "the release check lists their tags",
|
|
457
|
+
"then": "every tag is v and a valid semantic version and no version appears twice; a tag such as v1.02.0 or release-5 fails the check",
|
|
458
|
+
"hubWhen": {
|
|
459
|
+
"SCHEME": [
|
|
460
|
+
"semver"
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"id": "sc-semver-bump",
|
|
466
|
+
"type": "scenario",
|
|
467
|
+
"label": "Breaking change raises major",
|
|
468
|
+
"x": 520,
|
|
469
|
+
"y": 260,
|
|
470
|
+
"given": "version 2.3.1 and a new release whose notes list a breaking change",
|
|
471
|
+
"when": "the release check compares the new number with its notes",
|
|
472
|
+
"then": "v3.0.0 passes, while v2.4.0, v2.3.2 or v4.0.0 fails the check",
|
|
473
|
+
"hubWhen": {
|
|
474
|
+
"SCHEME": [
|
|
475
|
+
"semver"
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"id": "sc-calver",
|
|
481
|
+
"type": "scenario",
|
|
482
|
+
"label": "Line dated by its first release",
|
|
483
|
+
"x": 520,
|
|
484
|
+
"y": 390,
|
|
485
|
+
"given": "a line started on 2026-10-29 and a fix to it published on 2026-11-03",
|
|
486
|
+
"when": "the release check runs",
|
|
487
|
+
"then": "v2026.10.0 and v2026.10.1 pass, while v2026.010.0, a v2026.10.2 with no v2026.10.1, and a v2026.10.1 whose notes list a feature fail",
|
|
488
|
+
"hubWhen": {
|
|
489
|
+
"SCHEME": [
|
|
490
|
+
"calver"
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"id": "sc-immutable",
|
|
496
|
+
"type": "scenario",
|
|
497
|
+
"label": "Releases are immutable",
|
|
498
|
+
"x": 520,
|
|
499
|
+
"y": 520,
|
|
500
|
+
"given": "immutable releases turned on for the repository",
|
|
501
|
+
"when": "the release check lists the releases published since",
|
|
502
|
+
"then": "every one is marked immutable, and GitHub refuses to move the tag of any of them",
|
|
503
|
+
"hubWhen": {
|
|
504
|
+
"SCHEME": [
|
|
505
|
+
"semver",
|
|
506
|
+
"calver"
|
|
507
|
+
]
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"id": "sc-build-id",
|
|
512
|
+
"type": "scenario",
|
|
513
|
+
"label": "Every deploy names its commit",
|
|
514
|
+
"x": 520,
|
|
515
|
+
"y": 650,
|
|
516
|
+
"given": "the deployment manifests and the production deployments",
|
|
517
|
+
"when": "the build-id check runs",
|
|
518
|
+
"then": "every image reference ends in a 40-character SHA or a sha256 digest, every production deployment points at a commit on main, and the repository has no version tags",
|
|
519
|
+
"hubWhen": {
|
|
520
|
+
"SCHEME": [
|
|
521
|
+
"none"
|
|
522
|
+
]
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"id": "sc-notes-commits",
|
|
527
|
+
"type": "scenario",
|
|
528
|
+
"label": "Missing change found",
|
|
529
|
+
"x": 520,
|
|
530
|
+
"y": 780,
|
|
531
|
+
"given": "three feat and fix commits merged since the previous release",
|
|
532
|
+
"when": "the release is published and the notes check runs",
|
|
533
|
+
"then": "the notes name all three by pull request number or SHA, and the check fails when one is missing",
|
|
534
|
+
"hubWhen": {
|
|
535
|
+
"SCHEME": [
|
|
536
|
+
"semver",
|
|
537
|
+
"calver"
|
|
538
|
+
],
|
|
539
|
+
"CHANGELOG": [
|
|
540
|
+
"commits"
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"id": "sc-changelog-entry",
|
|
546
|
+
"type": "scenario",
|
|
547
|
+
"label": "Change without a line refused",
|
|
548
|
+
"x": 520,
|
|
549
|
+
"y": 910,
|
|
550
|
+
"given": "a pull request that changes src/ and leaves CHANGELOG.md alone",
|
|
551
|
+
"when": "the changelog check runs",
|
|
552
|
+
"then": "it fails until an entry is added under ## [Unreleased] in one of the six categories, or the pull request is labelled skip-changelog",
|
|
553
|
+
"hubWhen": {
|
|
554
|
+
"SCHEME": [
|
|
555
|
+
"semver",
|
|
556
|
+
"calver"
|
|
557
|
+
],
|
|
558
|
+
"CHANGELOG": [
|
|
559
|
+
"keepachangelog"
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"id": "sc-pr-labels",
|
|
565
|
+
"type": "scenario",
|
|
566
|
+
"label": "Unlabelled pull request refused",
|
|
567
|
+
"x": 520,
|
|
568
|
+
"y": 1040,
|
|
569
|
+
"given": "a pull request with no release label, and then with both fix and feature",
|
|
570
|
+
"when": "the label check runs",
|
|
571
|
+
"then": "it fails both times, and passes once only fix remains",
|
|
572
|
+
"hubWhen": {
|
|
573
|
+
"SCHEME": [
|
|
574
|
+
"semver",
|
|
575
|
+
"calver"
|
|
576
|
+
],
|
|
577
|
+
"CHANGELOG": [
|
|
578
|
+
"labels"
|
|
579
|
+
]
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"id": "sc-latest-only",
|
|
584
|
+
"type": "scenario",
|
|
585
|
+
"label": "Old line gets no release",
|
|
586
|
+
"x": 520,
|
|
587
|
+
"y": 1170,
|
|
588
|
+
"given": "line 3 started after line 2",
|
|
589
|
+
"when": "the support check reads SECURITY.md and the releases",
|
|
590
|
+
"then": "only 3.x is listed as supported, and a 2.4.1 published after 3.0.0 fails the check",
|
|
591
|
+
"hubWhen": {
|
|
592
|
+
"SCHEME": [
|
|
593
|
+
"semver",
|
|
594
|
+
"calver"
|
|
595
|
+
],
|
|
596
|
+
"SUPPORT": [
|
|
597
|
+
"latest"
|
|
598
|
+
]
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"id": "sc-lts-policy",
|
|
603
|
+
"type": "scenario",
|
|
604
|
+
"label": "Support table matches the lines",
|
|
605
|
+
"x": 520,
|
|
606
|
+
"y": 1300,
|
|
607
|
+
"given": "{{LTS_LINES}} + 1 release lines",
|
|
608
|
+
"when": "the support check runs",
|
|
609
|
+
"then": "SECURITY.md lists the newest {{LTS_LINES}} as supported, each older supported line has its release/<line>.x branch, and a release on the oldest line after it left support fails the check",
|
|
610
|
+
"hubWhen": {
|
|
611
|
+
"SCHEME": [
|
|
612
|
+
"semver",
|
|
613
|
+
"calver"
|
|
614
|
+
],
|
|
615
|
+
"SUPPORT": [
|
|
616
|
+
"lts"
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"id": "sc-backport",
|
|
622
|
+
"type": "scenario",
|
|
623
|
+
"label": "Fix released on the older line",
|
|
624
|
+
"x": 520,
|
|
625
|
+
"y": 1430,
|
|
626
|
+
"given": "a security fix merged to main and two supported lines",
|
|
627
|
+
"when": "{{BACKPORT_DAYS}} days have passed and the backport check runs",
|
|
628
|
+
"then": "the older line has a commit cherry-picked from the fix in a released tag, and the check fails for a line that has none",
|
|
629
|
+
"hubWhen": {
|
|
630
|
+
"SCHEME": [
|
|
631
|
+
"semver",
|
|
632
|
+
"calver"
|
|
633
|
+
],
|
|
634
|
+
"SUPPORT": [
|
|
635
|
+
"lts"
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"id": "sc-owner-approves",
|
|
641
|
+
"type": "scenario",
|
|
642
|
+
"label": "Release waits for its owner",
|
|
643
|
+
"x": 520,
|
|
644
|
+
"y": 1560,
|
|
645
|
+
"given": "a release pull request merged by a developer",
|
|
646
|
+
"when": "the release job reaches the environment release",
|
|
647
|
+
"then": "it waits until a member of {{RELEASE_OWNER}} other than the developer approves, and a release created by hand fails the approval check",
|
|
648
|
+
"hubWhen": {
|
|
649
|
+
"SCHEME": [
|
|
650
|
+
"semver",
|
|
651
|
+
"calver"
|
|
652
|
+
],
|
|
653
|
+
"APPROVAL": [
|
|
654
|
+
"owner"
|
|
655
|
+
]
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"id": "sc-auto-release",
|
|
660
|
+
"type": "scenario",
|
|
661
|
+
"label": "Merge reaches a release",
|
|
662
|
+
"x": 520,
|
|
663
|
+
"y": 1690,
|
|
664
|
+
"given": "a fix merged to main",
|
|
665
|
+
"when": "{{RELEASE_HOURS}} hours have passed",
|
|
666
|
+
"then": "a release containing it is published, and the release check fails while the merge still waits",
|
|
667
|
+
"hubWhen": {
|
|
668
|
+
"SCHEME": [
|
|
669
|
+
"semver",
|
|
670
|
+
"calver"
|
|
671
|
+
],
|
|
672
|
+
"APPROVAL": [
|
|
673
|
+
"auto"
|
|
674
|
+
]
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"id": "adr-semver",
|
|
679
|
+
"type": "adr",
|
|
680
|
+
"label": "Semantic versions",
|
|
681
|
+
"x": 780,
|
|
682
|
+
"y": 0,
|
|
683
|
+
"concern": "release-versioning",
|
|
684
|
+
"status": "accepted",
|
|
685
|
+
"date": "",
|
|
686
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
687
|
+
"decision": "Every release of the element is numbered by Semantic Versioning 2.0.0 and tagged vMAJOR.MINOR.PATCH on the commit it was built from. A breaking change to what users rely on (its API, configuration, data formats, command line or image contract) raises MAJOR, new functionality or a deprecation raises MINOR, a fix raises PATCH; while MAJOR is 0 a breaking change raises MINOR, and 1.0.0 is declared when the element is stable. The number is computed from the same categories the release notes are grouped by (commit types, changelog categories or pull request labels), never typed by hand, and a check compares the number with the notes on every release. Every release is a GitHub release, with immutable releases turned on for the repository, so a published tag never moves and a correction is always a new version. The running element answers GET /version with its version and commit. Release notes: {{CHANGELOG}}. Support: {{SUPPORT}}. Release approval: {{APPROVAL}}. With the release owner's approval, the job that publishes a release runs in the GitHub environment release, which waits for a review by a member of the team {{RELEASE_OWNER}} other than the person who started the run; with automatic releases, the release workflow runs on every push to main and publishes within {{RELEASE_HOURS}} hours of the merge, waiting for nobody. Either way only the release workflow publishes releases, never a person by hand. A breaking change to an API the element serves is also a MAJOR release here; how that API names its own versions is decided in the API evolution pack.",
|
|
688
|
+
"consequences": "• Users and their tools (Renovate, Dependabot, version ranges) can tell from the number alone whether an upgrade may break them.\n• Someone decides what counts as breaking: the categories put that decision on each change, with its author, and a wrong category makes a wrong number.\n• Breaking changes become visible and expensive, which pushes towards additive changes and deprecations first.\n• Immutable releases forbid fixing a release in place: a bad release is followed by a new one, never replaced, and assets have to be attached to a draft before it is published.\n• A service that nobody pins gains little from the number beyond the order of its releases.",
|
|
689
|
+
"alternatives": "1. Calendar versions: they say how old a release is, not whether it breaks anything.\n2. A commit SHA per build: nothing to number, but nothing for an installer or a dependency bot to compare.\n3. Numbers chosen by hand at release time: where most teams start, and how a breaking change ends up in a patch release.",
|
|
690
|
+
"hubWhen": {
|
|
691
|
+
"SCHEME": [
|
|
692
|
+
"semver"
|
|
693
|
+
]
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"id": "adr-calver",
|
|
698
|
+
"type": "adr",
|
|
699
|
+
"label": "Calendar versions",
|
|
700
|
+
"x": 780,
|
|
701
|
+
"y": 130,
|
|
702
|
+
"concern": "release-versioning",
|
|
703
|
+
"status": "accepted",
|
|
704
|
+
"date": "",
|
|
705
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
706
|
+
"decision": "Every release of the element is numbered by calendar versioning as vYYYY.M.MICRO (CalVer) and tagged on the commit it was built from. YYYY.M is the UTC year and month in which the release line's first release is published, with no leading zero on the month, so the number stays valid for semantic-versioning tools; MICRO is 0 for that first release and counts the line's later releases. A release with new functionality, a deprecation or a breaking change starts a new line; a release with fixes only is the next MICRO of the newest line. The release workflow computes the tag from the date and the existing tags, since release-please and semantic-release compute semantic versions only. The notes carry a breaking-changes section whenever a release breaks something, because the number does not say so. Every release is a GitHub release, with immutable releases turned on for the repository, so a published tag never moves and a correction is always a new version. The running element answers GET /version with its version and commit. Release notes: {{CHANGELOG}}. Support: {{SUPPORT}}. Release approval: {{APPROVAL}}. With the release owner's approval, the job that publishes a release runs in the GitHub environment release, which waits for a review by a member of the team {{RELEASE_OWNER}} other than the person who started the run; with automatic releases, the release workflow runs on every push to main and publishes within {{RELEASE_HOURS}} hours of the merge, waiting for nobody. Either way only the release workflow publishes releases, never a person by hand.",
|
|
707
|
+
"consequences": "• Users and support see at a glance how old a release is and how far behind a customer runs.\n• The number says nothing about compatibility: breaking changes are read in the notes, and dependency bots treat every new line as an upgrade of unknown risk.\n• A fix to a line keeps the line's date (2026.10.3 may ship in December), which surprises people who read the number as a release date.\n• No standard release tool computes the number: the release workflow does, and a check holds it to the rule.\n• Immutable releases forbid fixing a release in place; a bad release is followed by a new one.",
|
|
708
|
+
"alternatives": "1. Semantic versions: they say whether an upgrade breaks, not how old a release is.\n2. A zero-padded month (YYYY.0M): sorts as text, but is not a valid semantic version, which strict tools such as Cargo and Go refuse (CalVer).\n3. The full date as the version (2026.10.29): no room for two releases a day or for a fix to a line.",
|
|
709
|
+
"hubWhen": {
|
|
710
|
+
"SCHEME": [
|
|
711
|
+
"calver"
|
|
712
|
+
]
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"id": "adr-build-id",
|
|
717
|
+
"type": "adr",
|
|
718
|
+
"label": "A commit SHA per build, no version numbers",
|
|
719
|
+
"x": 780,
|
|
720
|
+
"y": 260,
|
|
721
|
+
"concern": "release-versioning",
|
|
722
|
+
"status": "accepted",
|
|
723
|
+
"date": "",
|
|
724
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack. Here the team deploys the element itself, continuously, and nobody outside installs or pins it.",
|
|
725
|
+
"decision": "The element has no version numbers and no releases: every build is named by the full SHA of the commit it was built from. The image is tagged with that SHA, the deployment references it by that tag or by digest and never by a mutable tag such as latest, and every production deploy is recorded as a GitHub deployment of its SHA, so what changed between two deploys is GitHub's compare view of their SHAs. The running element answers GET /version with that SHA as its version and its commit. No release tool, changelog file or version tag is kept, and nothing older than the latest build is supported. When anyone outside the team starts to install or pin the element, or to be told about its releases, this decision is superseded by semantic or calendar versions.",
|
|
726
|
+
"consequences": "• Nothing to number, write or approve: the build id costs nothing and is never wrong.\n• What changed in a deploy is a list of pull requests in a compare view, readable by the team and nobody else.\n• Users and support cannot name a release in words; they quote a SHA or a date.\n• Only the latest build runs, so there is no older release to support or to fix.",
|
|
727
|
+
"alternatives": "1. Semantic versions with automatic releases: a number for every merge at the cost of a release tool, worth it once someone outside depends on the element.\n2. Calendar versions: a readable date per release, for products released on a calendar.\n3. The pipeline's run number as the version: readable, but tied to one CI system and to nothing in the source.",
|
|
728
|
+
"hubWhen": {
|
|
729
|
+
"SCHEME": [
|
|
730
|
+
"none"
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"id": "adr-notes-commits",
|
|
736
|
+
"type": "adr",
|
|
737
|
+
"label": "Release notes generated from Conventional Commits",
|
|
738
|
+
"x": 780,
|
|
739
|
+
"y": 390,
|
|
740
|
+
"concern": "release-versioning",
|
|
741
|
+
"status": "accepted",
|
|
742
|
+
"date": "",
|
|
743
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
744
|
+
"decision": "Release notes are generated from the Conventional Commits on main since the previous release, grouped as breaking changes, features and fixes, each entry linking its commit and pull request; the commit format itself is enforced in the Code review and branching pack. Nobody edits the generated entries; a summary for customers, when one is needed, is written above them. With semantic versions the tool also computes the number: release-please (release-please-config.json with bump-minor-pre-major) for releases with the release owner's approval, since it keeps a release pull request open and merging it starts the release; semantic-release (preset conventionalcommits, with releaseRules giving refactor, build and style commits a patch so that every change to shipped code is released) for automatic releases. With calendar versions, git-cliff renders the notes for the tag the release workflow computed (git cliff --unreleased --tag <tag> --strip all). The notes are the body of the GitHub release, and CHANGELOG.md is kept by the same tool. A check confirms after each release that every feat, fix and perf commit is in its notes.",
|
|
745
|
+
"consequences": "• Complete notes for free: every typed commit is in them, linked to its change.\n• The notes read like commit subjects; customers who need sentences need a summary on top.\n• The number is only as right as the commit types: a breaking change committed as fix: becomes a patch release, so review checks the type as well as the code.\n• Depends on the Code review and branching pack keeping Conventional Commits; free-form subjects there leave nothing to generate from.",
|
|
746
|
+
"alternatives": "1. A hand-written changelog in the Keep a Changelog format: better sentences, but lines get forgotten without a check.\n2. Notes from pull request labels: no commit convention needed, one label per pull request instead.\n3. Changesets: a change file per pull request with its bump, from which the version and changelog are computed; made for monorepos that publish several packages.",
|
|
747
|
+
"hubWhen": {
|
|
748
|
+
"SCHEME": [
|
|
749
|
+
"semver",
|
|
750
|
+
"calver"
|
|
751
|
+
],
|
|
752
|
+
"CHANGELOG": [
|
|
753
|
+
"commits"
|
|
754
|
+
]
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"id": "adr-notes-keepachangelog",
|
|
759
|
+
"type": "adr",
|
|
760
|
+
"label": "A hand-written changelog in the Keep a Changelog format",
|
|
761
|
+
"x": 780,
|
|
762
|
+
"y": 520,
|
|
763
|
+
"concern": "release-versioning",
|
|
764
|
+
"status": "accepted",
|
|
765
|
+
"date": "",
|
|
766
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
767
|
+
"decision": "CHANGELOG.md at the root follows Keep a Changelog 1.1.0: an Unreleased section on top, then one section per release headed ## [version] - YYYY-MM-DD, entries grouped under Added, Changed, Deprecated, Removed, Fixed and Security, and a breaking entry starting with **BREAKING:**. Every pull request that changes code under src/ adds its entry under Unreleased, or carries the skip-changelog label when users cannot notice the change; a required check enforces both. At release time the Unreleased entries move under the new version's heading, and that section becomes the body of the GitHub release. With semantic versions the number follows the categories: a Removed or **BREAKING:** entry makes a breaking release, Added or Deprecated a minor one, anything else a patch. With calendar versions an Added, Changed, Deprecated or Removed entry starts a new line, and Fixed or Security entries alone make the next MICRO. With the release owner's approval, the release owner moves the entries in a release pull request; with automatic releases, the release workflow moves them on every merge that leaves Unreleased non-empty, committing to main as a GitHub App on the branch ruleset's bypass list. A release that is pulled keeps its section, marked [YANKED].",
|
|
768
|
+
"consequences": "• Notes written for the reader: what changed for them, in words a customer understands.\n• Every pull request costs a sentence; the check makes forgetting it impossible, not making it good, so review reads it.\n• Two pull requests adding lines to the same section conflict in CHANGELOG.md; the rebase takes seconds but happens daily on a busy repository.\n• The number depends on the categories authors choose, which review has to check.\n• With automatic releases a bot commits to main, which the branch ruleset has to allow.",
|
|
769
|
+
"alternatives": "1. Notes generated from Conventional Commits: complete without effort, but they read like commits.\n2. Changesets: a file per pull request instead of one shared CHANGELOG.md, so no conflicts, with the bump declared with each change; its changelog does not follow Keep a Changelog.\n3. Notes written at release time from memory: what gets forgotten is what users needed to know.",
|
|
770
|
+
"hubWhen": {
|
|
771
|
+
"SCHEME": [
|
|
772
|
+
"semver",
|
|
773
|
+
"calver"
|
|
774
|
+
],
|
|
775
|
+
"CHANGELOG": [
|
|
776
|
+
"keepachangelog"
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"id": "adr-notes-labels",
|
|
782
|
+
"type": "adr",
|
|
783
|
+
"label": "Release notes generated from pull request labels",
|
|
784
|
+
"x": 780,
|
|
785
|
+
"y": 650,
|
|
786
|
+
"concern": "release-versioning",
|
|
787
|
+
"status": "accepted",
|
|
788
|
+
"date": "",
|
|
789
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
790
|
+
"decision": "Release notes are generated by GitHub from the pull requests merged since the previous release (gh release create <tag> --generate-notes --verify-tag), grouped by .github/release.yml into ⚠ Breaking changes (label breaking-change), Features (feature), Deprecations (deprecation), Fixes (fix) and Other changes (internal). Every pull request carries exactly one of these labels before it can merge; a required check enforces it. With semantic versions the release workflow computes the number from the labels of those pull requests: breaking-change makes a breaking release, feature or deprecation a minor one, the rest a patch. With calendar versions a breaking-change, feature or deprecation label starts a new line, and fix or internal alone make the next MICRO. The notes are the body of the GitHub release; no CHANGELOG.md is kept.",
|
|
791
|
+
"consequences": "• No commit convention needed: a pull request's title and label are its entry.\n• The notes are only as good as the pull request titles, which become what users read.\n• Labels can still change after the merge and later notes follow them; the label check runs on the pull request, not on history.\n• Tied to GitHub: moving the repository elsewhere means another way to generate the notes.",
|
|
792
|
+
"alternatives": "1. Notes generated from Conventional Commits: the same automation from commit types, and portable across hosts.\n2. A hand-written changelog: better sentences at the cost of a line per change.\n3. Release Drafter: keeps a draft release up to date from the labels as pull requests merge, with its own version resolver; one more app to configure and trust.",
|
|
793
|
+
"hubWhen": {
|
|
794
|
+
"SCHEME": [
|
|
795
|
+
"semver",
|
|
796
|
+
"calver"
|
|
797
|
+
],
|
|
798
|
+
"CHANGELOG": [
|
|
799
|
+
"labels"
|
|
800
|
+
]
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"id": "adr-support-latest",
|
|
805
|
+
"type": "adr",
|
|
806
|
+
"label": "Support for the latest line only",
|
|
807
|
+
"x": 780,
|
|
808
|
+
"y": 780,
|
|
809
|
+
"concern": "release-versioning",
|
|
810
|
+
"status": "accepted",
|
|
811
|
+
"date": "",
|
|
812
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
813
|
+
"decision": "Only the newest release line gets fixes: a security or bug fix ships as the next release on that line (the next PATCH under semantic versions, the next MICRO under calendar versions), and nothing is released on an older line once a newer line has its first release. SECURITY.md at the root says so in its Supported versions table, which lists the newest line as supported and every older line as not; users of an older line upgrade to get a fix. No maintenance branches are kept for older lines.",
|
|
814
|
+
"consequences": "• One line to fix, test and release: a security fix is out as soon as it is merged and released.\n• Users have to keep up: crossing a breaking change is the price of every fix after it, so breaking releases need an upgrade path in their notes.\n• Customers who cannot upgrade quickly run unpatched versions; for them this decision is superseded by long-term support.",
|
|
815
|
+
"alternatives": "1. Security fixes for the newest lines (LTS): users can stay on a line while the team back-ports every security fix.\n2. Support by contract for each customer's version: unbounded, and every customer's version becomes a fork.",
|
|
816
|
+
"hubWhen": {
|
|
817
|
+
"SCHEME": [
|
|
818
|
+
"semver",
|
|
819
|
+
"calver"
|
|
820
|
+
],
|
|
821
|
+
"SUPPORT": [
|
|
822
|
+
"latest"
|
|
823
|
+
]
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"id": "adr-support-lts",
|
|
828
|
+
"type": "adr",
|
|
829
|
+
"label": "Security fixes for the newest lines (LTS)",
|
|
830
|
+
"x": 780,
|
|
831
|
+
"y": 910,
|
|
832
|
+
"concern": "release-versioning",
|
|
833
|
+
"status": "accepted",
|
|
834
|
+
"date": "",
|
|
835
|
+
"context": "This element is released again and again, and each release is read by people who were not in the room: operators deciding whether to deploy it, customers deciding whether to upgrade, support asking which version a user runs. The forces: a version number is a promise, and one that says \"patch\" over a breaking change costs more trust than no number at all; numbers typed by hand drift, while numbers computed from the history are only as right as the history; notes generated from commits are complete but read like commits, notes written by hand read well but get forgotten; every older line kept in support multiplies the work of each security fix, while supporting only the latest line makes every user keep up; a person approving each release catches what no check describes but makes every release wait for that person; and a release whose tag can move after publication is not one anybody can rely on. Neighbouring packs own the rest: the commit message format and the branching model are decided in the Code review and branching pack, release cadence, rollout and rollback in the Deployment pack, how an API names and retires its versions in the API evolution pack, signing, provenance and SBOMs of what is released in the Software supply chain pack, and how dependencies are pinned in the Dependency hygiene pack.",
|
|
836
|
+
"decision": "The newest {{LTS_LINES}} release lines get security fixes; a line is a MAJOR version under semantic versions and a YYYY.M line under calendar versions. Each supported line other than the newest has a maintenance branch release/<line>.x (release/2.x, release/2026.10.x) cut from its first release tag and protected like main. A security fix is merged to main first, labelled security, then cherry-picked with git cherry-pick -x onto every supported maintenance branch and released there within {{BACKPORT_DAYS}} days of the merge; bug fixes that are not security fixes go to the newest line only. SECURITY.md at the root lists the supported lines in its Supported versions table, newest first, and nothing is released on a line once it has left support. The branches follow the branching model of the Code review and branching pack; under GitFlow they play the part of its support branches.",
|
|
837
|
+
"consequences": "• Customers can stay on a line until {{LTS_LINES}} newer lines have shipped, and still get security fixes.\n• Every security fix is made once per supported line: cherry-picks that conflict, a build and a release per line; the cost grows with how far the lines have drifted apart.\n• Old lines keep old dependencies and old build tooling alive, and their pipelines must keep working.\n• How long a line is supported depends on how often new lines start: frequent breaking releases shorten every line's support.",
|
|
838
|
+
"alternatives": "1. Support for the latest line only: one line to fix, and users upgrade to get fixes.\n2. Designated long-term lines (one in every few, supported for years on a calendar of their own): longer support for fewer lines.\n3. Back-ports on request: no promise to customers, and no plan when the request comes.",
|
|
839
|
+
"hubWhen": {
|
|
840
|
+
"SCHEME": [
|
|
841
|
+
"semver",
|
|
842
|
+
"calver"
|
|
843
|
+
],
|
|
844
|
+
"SUPPORT": [
|
|
845
|
+
"lts"
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"id": "ff-version-endpoint",
|
|
851
|
+
"type": "fitness-fn",
|
|
852
|
+
"label": "Deploy confirms the running version",
|
|
853
|
+
"x": 1040,
|
|
854
|
+
"y": 0,
|
|
855
|
+
"characteristic": "reliability",
|
|
856
|
+
"scope": "atomic",
|
|
857
|
+
"cadence": "triggered",
|
|
858
|
+
"trigger": "deploy",
|
|
859
|
+
"invocation": "automated",
|
|
860
|
+
"description": "The last step of every deploy job polls the element's version endpoint and fails the deploy unless it answers with the version the job deployed (the tag, or the commit SHA where builds carry no version number) and the commit SHA of the workflow run. The element fills both from build arguments baked into the image (or into /version.json for a web app), never from its environment at run time.\n\nThreshold: Within 90 seconds of every deploy, GET /version answers with the deployed version and commit; otherwise the deploy job fails\n\nTool: curl and jq in the deploy job (GitHub Actions)\n\n```bash\n# the last step of every deploy job; APP_URL is the environment's address, EXPECTED_VERSION the tag deployed\n# (or the commit SHA, where builds carry no version number)\nset -euo pipefail\nfor attempt in 1 2 3 4 5 6; do # 6 tries, 90 seconds at most\n body=$(curl -fsS --max-time 5 \"$APP_URL/version\" || true) # /version.json for a web app\n if echo \"$body\" | jq -e --arg version \"$EXPECTED_VERSION\" --arg commit \"$GITHUB_SHA\" \\\n '.version == $version and .commit == $commit' >/dev/null 2>&1; then\n echo \"running $EXPECTED_VERSION at $GITHUB_SHA\"; exit 0\n fi\n sleep 10\ndone\necho \"expected $EXPECTED_VERSION at $GITHUB_SHA, the element answers: ${body:-nothing}\"; exit 1\n```"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"id": "ff-semver-release",
|
|
864
|
+
"type": "fitness-fn",
|
|
865
|
+
"label": "Semantic versions follow their notes",
|
|
866
|
+
"x": 1040,
|
|
867
|
+
"y": 130,
|
|
868
|
+
"characteristic": "compatibility",
|
|
869
|
+
"scope": "atomic",
|
|
870
|
+
"cadence": "triggered",
|
|
871
|
+
"trigger": "release",
|
|
872
|
+
"invocation": "automated",
|
|
873
|
+
"description": "A script runs in the release workflow after each release and nightly. It lists the releases with the GitHub CLI, checks every tag against the regular expression semver.org publishes, refuses a version released twice, and requires every release since SINCE (the day these rules and immutable releases were adopted) to be immutable. Then it sorts the final releases by version and, for each, reads its notes: a breaking or Removed heading or a **BREAKING:** entry calls for MAJOR (MINOR while MAJOR is 0), a Features, Added or Deprecated heading for MINOR, anything else for PATCH, one step from the version before; the move from 0.y.z to 1.0.0 is declared, not computed. The headings are the ones release-please, semantic-release, the .github/release.yml of the label decision and Keep a Changelog write.\n\nThreshold: 0 release tags that are not v and a valid semantic version and 0 versions released twice; for releases published since the rules were adopted, 0 mutable releases and 0 numbers other than the one their notes call for\n\nTool: Node.js with the GitHub CLI (gh release list, gh release view)\n\n```js\n// scripts/check-semver.mjs — tags are semantic versions, each released once and immutable, each bump what its notes call for\nimport { execFileSync } from 'node:child_process'\nconst gh = (...args) => JSON.parse(execFileSync('gh', args, { encoding: 'utf8' }))\nconst SINCE = process.env.SINCE ?? '1970-01-01' // the day these rules and immutable releases were adopted; older releases are not judged\nconst SEMVER = /^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\nconst BREAKING = /^#{2,4} .*(breaking|removed)|^[-*] \\*\\*BREAKING/im // headings of release-please, semantic-release, .github/release.yml, Keep a Changelog\nconst MINOR = /^#{2,4} .*(features|added|deprecat)/im\nconst releases = gh('release', 'list', '--exclude-drafts', '--limit', '1000', '--json', 'tagName,publishedAt,isImmutable')\nconst core = (tag) => tag.replace(/\\+.*$/, '')\nconst problems = releases.filter((r) => !SEMVER.test(r.tagName)).map((r) => `${r.tagName}: not v + a semantic version`)\nproblems.push(...releases.filter((r) => !r.isImmutable && r.publishedAt > SINCE).map((r) => `${r.tagName}: not an immutable release`))\nproblems.push(...releases.map((r) => core(r.tagName)).filter((v, i, all) => all.indexOf(v) !== i).map((v) => `${v}: released twice`))\nconst final = releases.map((r) => [r, r.tagName.match(SEMVER)]).filter(([, m]) => m && !m[4]).map(([r, m]) => [r, ...m.slice(1, 4).map(Number)])\n .sort((a, b) => a[1] - b[1] || a[2] - b[2] || a[3] - b[3])\nfor (let i = 1; i < final.length; i++) {\n const [[prev, ma, mi, pa], [cur]] = [final[i - 1], final[i]]\n if (cur.publishedAt <= SINCE || (ma === 0 && core(cur.tagName) === 'v1.0.0')) continue // 0.y.z to 1.0.0 is declared, not computed\n const body = gh('release', 'view', cur.tagName, '--json', 'body').body\n const level = BREAKING.test(body) ? (ma === 0 ? 'minor' : 'major') : MINOR.test(body) ? 'minor' : 'patch'\n const expected = level === 'major' ? `v${ma + 1}.0.0` : level === 'minor' ? `v${ma}.${mi + 1}.0` : `v${ma}.${mi}.${pa + 1}`\n if (core(cur.tagName) !== expected) problems.push(`${cur.tagName}: its notes call for a ${level} release after ${prev.tagName}, so ${expected}`)\n}\nif (problems.length) { console.error(problems.join('\\n')); process.exit(1) }\n```",
|
|
874
|
+
"hubWhen": {
|
|
875
|
+
"SCHEME": [
|
|
876
|
+
"semver"
|
|
877
|
+
]
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"id": "ff-calver-release",
|
|
882
|
+
"type": "fitness-fn",
|
|
883
|
+
"label": "Calendar versions follow the rule",
|
|
884
|
+
"x": 1040,
|
|
885
|
+
"y": 260,
|
|
886
|
+
"characteristic": "maintainability",
|
|
887
|
+
"scope": "atomic",
|
|
888
|
+
"cadence": "triggered",
|
|
889
|
+
"trigger": "release",
|
|
890
|
+
"invocation": "automated",
|
|
891
|
+
"description": "A script runs in the release workflow after each release and nightly. It lists the releases with the GitHub CLI, checks every tag against vYYYY.M.MICRO with no leading zero on the month, compares each line's first release with the UTC month it was published in, requires each line's MICRO numbers to count 0, 1, 2 without gaps, requires every release since SINCE (the day these rules and immutable releases were adopted) to be immutable, and reads the notes of every fix release for headings only a new line may carry.\n\nThreshold: 0 release tags outside vYYYY.M.MICRO, 0 lines whose first release was published outside their month, 0 gaps in a line's MICRO numbers; for releases published since the rules were adopted, 0 mutable releases and 0 fix releases whose notes bring new functionality, a deprecation or a breaking change\n\nTool: Node.js with the GitHub CLI (gh release list, gh release view)\n\n```js\n// scripts/check-calver.mjs — tags are vYYYY.M.MICRO, lines dated by their first release, MICRO counting fixes, releases immutable\nimport { execFileSync } from 'node:child_process'\nconst gh = (...args) => JSON.parse(execFileSync('gh', args, { encoding: 'utf8' }))\nconst SINCE = process.env.SINCE ?? '1970-01-01' // the day these rules and immutable releases were adopted; older releases are not judged\nconst CALVER = /^v(\\d{4})\\.([1-9]|1[0-2])\\.(0|[1-9]\\d*)$/\nconst NEW_LINE = /^#{2,4} .*(breaking|removed|features|added|deprecat)|^[-*] \\*\\*BREAKING/im // what only a new line may bring\nconst problems = []\nconst lines = new Map()\nfor (const { tagName, publishedAt, isImmutable } of gh('release', 'list', '--exclude-drafts', '--limit', '1000', '--json', 'tagName,publishedAt,isImmutable')) {\n const m = tagName.match(CALVER)\n if (!m) { problems.push(`${tagName}: not vYYYY.M.MICRO`); continue }\n if (!isImmutable && publishedAt > SINCE) problems.push(`${tagName}: not immutable`)\n const [, year, month, micro] = m.map(Number)\n const at = new Date(publishedAt)\n if (micro === 0 && (year !== at.getUTCFullYear() || month !== at.getUTCMonth() + 1)) problems.push(`${tagName}: first release of its line published ${publishedAt.slice(0, 10)}`)\n if (micro > 0 && publishedAt > SINCE && NEW_LINE.test(gh('release', 'view', tagName, '--json', 'body').body)) problems.push(`${tagName}: new functionality in a fix release; start a new line`)\n lines.set(`${year}.${month}`, [...(lines.get(`${year}.${month}`) ?? []), micro])\n}\nfor (const [line, micros] of lines) {\n micros.sort((a, b) => a - b)\n if (micros.some((n, i) => n !== i)) problems.push(`v${line}: MICRO ${micros.join(', ')} does not count 0, 1, 2, …`)\n}\nif (problems.length) { console.error(problems.join('\\n')); process.exit(1) }\n```",
|
|
892
|
+
"hubWhen": {
|
|
893
|
+
"SCHEME": [
|
|
894
|
+
"calver"
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"id": "ff-build-id",
|
|
900
|
+
"type": "fitness-fn",
|
|
901
|
+
"label": "Builds deployed by their commit",
|
|
902
|
+
"x": 1040,
|
|
903
|
+
"y": 390,
|
|
904
|
+
"characteristic": "maintainability",
|
|
905
|
+
"scope": "atomic",
|
|
906
|
+
"cadence": "triggered",
|
|
907
|
+
"trigger": "pull-request",
|
|
908
|
+
"invocation": "automated",
|
|
909
|
+
"description": "A step on every pull request and after every deploy reads the manifests the pipeline applies, refuses any image referenced by a mutable tag, checks with the GitHub API that the recent production deployments are of commits on main, and fails when a version tag appears, which would mean releases started without their decision.\n\nThreshold: 0 image references in deploy/ without a full commit SHA or a sha256 digest, 0 of the last 30 production deployments of a commit not on main, 0 version tags\n\nTool: grep and the GitHub CLI (gh api repos/{owner}/{repo}/deployments) in a GitHub Actions step\n\n```bash\n# on every pull request and after every deploy; deploy/ holds the manifests the pipeline applies (render Helm or Kustomize into it first)\nset -euo pipefail\nREPO=${GITHUB_REPOSITORY:-our-org/shop}\nimages=$(grep -rhoE '^[[:space:]-]*image:[[:space:]]*[\"'\\'']?[^\"'\\''[:space:]]+' deploy/ | sed -E 's/.*image:[[:space:]]*[\"'\\'']?//')\nmutable=$(echo \"$images\" | grep -Ev '(@sha256:[0-9a-f]{64}|:[0-9a-f]{40})$' || true)\n[ -z \"$mutable\" ] || { echo \"images not referenced by a full commit SHA or a digest:\"; echo \"$mutable\"; exit 1; }\n# every production deploy is recorded with a commit of main\ngit fetch --quiet origin main\nfor sha in $(gh api \"repos/$REPO/deployments?environment=production&per_page=30\" --jq '.[].sha'); do\n git merge-base --is-ancestor \"$sha\" origin/main || { echo \"production deployment of $sha, which is not on main\"; exit 1; }\ndone\n# no version numbers: the decision is a commit SHA per build\n[ -z \"$(git tag --list 'v[0-9]*')\" ] || { echo \"version tags exist; supersede the decision before numbering releases\"; exit 1; }\n```",
|
|
910
|
+
"hubWhen": {
|
|
911
|
+
"SCHEME": [
|
|
912
|
+
"none"
|
|
913
|
+
]
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"id": "ff-notes-complete",
|
|
918
|
+
"type": "fitness-fn",
|
|
919
|
+
"label": "Notes list every typed commit",
|
|
920
|
+
"x": 1040,
|
|
921
|
+
"y": 520,
|
|
922
|
+
"characteristic": "maintainability",
|
|
923
|
+
"scope": "atomic",
|
|
924
|
+
"cadence": "triggered",
|
|
925
|
+
"trigger": "release",
|
|
926
|
+
"invocation": "automated",
|
|
927
|
+
"description": "After each release the release workflow lists the commits between the two latest releases and looks for each feat, fix and perf commit in the new release's notes, by the pull request number its squash subject ends with, or else by its short SHA (release-please, semantic-release and the git-cliff template all link both).\n\nThreshold: 0 feat, fix or perf commits between the previous and the latest release missing from the latest release's notes\n\nTool: Node.js with git and the GitHub CLI (gh release list, gh release view)\n\n```js\n// scripts/check-release-notes.mjs — every feat, fix and perf commit of the latest release is in its notes\nimport { execFileSync } from 'node:child_process'\nconst run = (cmd, ...args) => execFileSync(cmd, args, { encoding: 'utf8' }).trim()\nconst [latest, previous] = JSON.parse(run('gh', 'release', 'list', '--exclude-drafts', '--exclude-pre-releases', '--limit', '2', '--json', 'tagName'))\n .map((r) => r.tagName)\nconst body = JSON.parse(run('gh', 'release', 'view', latest, '--json', 'body')).body\nconst range = previous ? `${previous}..${latest}` : latest\nconst missing = run('git', 'log', '--format=%H%x09%s', range).split('\\n').filter(Boolean)\n .map((line) => line.split('\\t'))\n .filter(([, subject]) => /^(feat|fix|perf)(\\([^)]*\\))?!?: /.test(subject))\n .filter(([sha, subject]) => {\n const pr = subject.match(/\\(#(\\d+)\\)$/)\n return !(pr ? new RegExp(`#${pr[1]}\\\\b`).test(body) : body.includes(sha.slice(0, 7)))\n })\nif (missing.length) {\n console.error(`${latest}: commits missing from the release notes:\\n${missing.map(([sha, s]) => `${sha.slice(0, 7)} ${s}`).join('\\n')}`)\n process.exit(1)\n}\n```",
|
|
928
|
+
"hubWhen": {
|
|
929
|
+
"SCHEME": [
|
|
930
|
+
"semver",
|
|
931
|
+
"calver"
|
|
932
|
+
],
|
|
933
|
+
"CHANGELOG": [
|
|
934
|
+
"commits"
|
|
935
|
+
]
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"id": "ff-changelog-entry",
|
|
940
|
+
"type": "fitness-fn",
|
|
941
|
+
"label": "Changelog line with each change",
|
|
942
|
+
"x": 1040,
|
|
943
|
+
"y": 650,
|
|
944
|
+
"characteristic": "maintainability",
|
|
945
|
+
"scope": "atomic",
|
|
946
|
+
"cadence": "triggered",
|
|
947
|
+
"trigger": "pull-request",
|
|
948
|
+
"invocation": "automated",
|
|
949
|
+
"description": "A required check on every pull request compares it with its base: when code under src/ changed and the pull request is not labelled skip-changelog, the lines it adds to CHANGELOG.md must be entries inside the Unreleased section, that section may hold only the six Keep a Changelog categories, and every release heading must read ## [version] - YYYY-MM-DD, optionally followed by [YANKED].\n\nThreshold: Every pull request that changes src/ adds an entry under ## [Unreleased] or carries skip-changelog; 0 headings under Unreleased outside the six categories; 0 release headings other than ## [version] - YYYY-MM-DD\n\nTool: git, awk and jq in a GitHub Actions step on pull_request\n\n```bash\n# CI on every pull request (fetch-depth: 0); LABELS is toJSON(github.event.pull_request.labels.*.name)\nset -euo pipefail\nbase=\"origin/${GITHUB_BASE_REF:-main}\"\nif git diff --quiet \"$base\"...HEAD -- src/; then exit 0; fi # no shipped code changed\nif echo \"$LABELS\" | jq -e 'index(\"skip-changelog\")' >/dev/null; then exit 0; fi # nothing a user can notice\nunreleased=$(awk '/^## \\[Unreleased\\]/ { on = 1; next } /^## \\[/ { on = 0 } on' CHANGELOG.md)\nadded=$(git diff -U0 \"$base\"...HEAD -- ./CHANGELOG.md | sed -n 's/^+\\(- .*\\)$/\\1/p')\n[ -n \"$added\" ] || { echo \"src/ changed: add an entry under ## [Unreleased] in CHANGELOG.md, or label the pull request skip-changelog\"; exit 1; }\nwhile IFS= read -r entry; do\n grep -Fxq -- \"$entry\" <<<\"$unreleased\" || { echo \"entry outside ## [Unreleased]: $entry\"; exit 1; }\ndone <<<\"$added\"\nbad=$(grep -E '^### ' <<<\"$unreleased\" | grep -Evx '### (Added|Changed|Deprecated|Removed|Fixed|Security)' || true)\n[ -z \"$bad\" ] || { echo \"not a Keep a Changelog category: $bad\"; exit 1; }\nheads=$(grep -E '^## ' CHANGELOG.md | grep -Evx '## \\[(Unreleased|[0-9][0-9A-Za-z.+-]*)\\]( - [0-9]{4}-[0-9]{2}-[0-9]{2}( \\[YANKED\\])?)?' || true)\n[ -z \"$heads\" ] || { echo \"release headings must read ## [version] - YYYY-MM-DD: $heads\"; exit 1; }\n```",
|
|
950
|
+
"hubWhen": {
|
|
951
|
+
"SCHEME": [
|
|
952
|
+
"semver",
|
|
953
|
+
"calver"
|
|
954
|
+
],
|
|
955
|
+
"CHANGELOG": [
|
|
956
|
+
"keepachangelog"
|
|
957
|
+
]
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"id": "ff-pr-labels",
|
|
962
|
+
"type": "fitness-fn",
|
|
963
|
+
"label": "Exactly one release label",
|
|
964
|
+
"x": 1040,
|
|
965
|
+
"y": 780,
|
|
966
|
+
"characteristic": "maintainability",
|
|
967
|
+
"scope": "atomic",
|
|
968
|
+
"cadence": "triggered",
|
|
969
|
+
"trigger": "pull-request",
|
|
970
|
+
"invocation": "automated",
|
|
971
|
+
"description": "A workflow that the main branch's ruleset lists as a required check runs whenever a pull request is opened, edited, synchronised or relabelled, and fails unless exactly one of the labels that .github/release.yml groups the notes by is set.\n\nThreshold: Every pull request carries exactly 1 of the 5 release labels before it can merge\n\nTool: GitHub Actions with jq; GitHub's generated release notes (.github/release.yml)\n\n```yaml\n# .github/workflows/release-label.yml, a required check. The notes' categories, in .github/release.yml:\n# changelog:\n# categories:\n# - title: ⚠ Breaking changes\n# labels: [breaking-change]\n# - title: Features\n# labels: [feature]\n# - title: Deprecations\n# labels: [deprecation]\n# - title: Fixes\n# labels: [fix]\n# - title: Other changes\n# labels: [internal]\nname: release-label\non:\n pull_request:\n types: [opened, reopened, edited, labeled, unlabeled, synchronize]\njobs:\n label:\n runs-on: ubuntu-latest\n steps:\n - name: Exactly one release-notes label\n env:\n LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}\n run: |\n n=$(echo \"$LABELS\" | jq '[.[] | select(IN(\"breaking-change\", \"feature\", \"deprecation\", \"fix\", \"internal\"))] | length')\n [ \"$n\" -eq 1 ] || { echo \"label the pull request with exactly one of breaking-change, feature, deprecation, fix, internal (it has $n)\"; exit 1; }\n```",
|
|
972
|
+
"hubWhen": {
|
|
973
|
+
"SCHEME": [
|
|
974
|
+
"semver",
|
|
975
|
+
"calver"
|
|
976
|
+
],
|
|
977
|
+
"CHANGELOG": [
|
|
978
|
+
"labels"
|
|
979
|
+
]
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"id": "ff-support-latest",
|
|
984
|
+
"type": "fitness-fn",
|
|
985
|
+
"label": "Only the newest line supported",
|
|
986
|
+
"x": 1040,
|
|
987
|
+
"y": 910,
|
|
988
|
+
"characteristic": "maintainability",
|
|
989
|
+
"scope": "atomic",
|
|
990
|
+
"cadence": "triggered",
|
|
991
|
+
"trigger": "nightly",
|
|
992
|
+
"invocation": "automated",
|
|
993
|
+
"description": "A nightly script groups the final releases into lines (MAJOR under semantic versions, YYYY.M under calendar versions, told apart by a four-digit first number), compares the supported rows of SECURITY.md with the newest line, and fails on any release published on a line after the next newer line started.\n\nThreshold: SECURITY.md lists exactly the newest line as supported; 0 releases on an older line published after a newer line's first release\n\nTool: Node.js with the GitHub CLI (gh release list)\n\n```js\n// scripts/check-support.mjs — SECURITY.md supports the newest line only, and no older line gets a release once a newer one has started\nimport { execFileSync } from 'node:child_process'\nimport { readFileSync } from 'node:fs'\nconst releases = JSON.parse(execFileSync('gh', ['release', 'list', '--exclude-drafts', '--exclude-pre-releases', '--limit', '1000', '--json', 'tagName,publishedAt'], { encoding: 'utf8' }))\n .filter((r) => /^v\\d+\\.\\d+\\.\\d+$/.test(r.tagName)).map((r) => ({ tag: r.tagName, v: r.tagName.slice(1).split('.').map(Number), at: r.publishedAt }))\nconst lineOf = (v) => (v[0] >= 1000 ? v.slice(0, 2) : v.slice(0, 1)).join('.') // YYYY.M under calendar versions, MAJOR under semantic ones\nconst starts = new Map() // line -> when its first release was published\nfor (const { v, at } of releases) if (!starts.has(lineOf(v)) || at < starts.get(lineOf(v))) starts.set(lineOf(v), at)\nconst num = (line) => line.split('.').map(Number)\nconst lines = [...starts.keys()].sort((a, b) => num(b)[0] - num(a)[0] || (num(b)[1] ?? 0) - (num(a)[1] ?? 0)) // newest first\nconst supported = readFileSync('SECURITY.md', 'utf8').split('\\n')\n .map((row) => row.match(/^\\|\\s*v?(\\d+(?:\\.\\d+)?)\\.x\\s*\\|\\s*(?:✅|:white_check_mark:)/)).filter(Boolean).map((m) => m[1])\nconst problems = []\nif (supported.join() !== lines.slice(0, 1).join()) problems.push(`SECURITY.md supports ${supported.join(', ') || 'nothing'}; only the newest line, ${lines[0]}, is`)\nlines.slice(1).forEach((line, i) => {\n const leftAt = starts.get(lines[i]) // the next newer line's first release ends this one's support\n for (const r of releases) if (lineOf(r.v) === line && r.at > leftAt) problems.push(`${r.tag}: released on ${line} after ${lines[i]} started`)\n})\nif (problems.length) { console.error(problems.join('\\n')); process.exit(1) }\n```",
|
|
994
|
+
"hubWhen": {
|
|
995
|
+
"SCHEME": [
|
|
996
|
+
"semver",
|
|
997
|
+
"calver"
|
|
998
|
+
],
|
|
999
|
+
"SUPPORT": [
|
|
1000
|
+
"latest"
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"id": "ff-support-lts",
|
|
1006
|
+
"type": "fitness-fn",
|
|
1007
|
+
"label": "Supported lines match the policy",
|
|
1008
|
+
"x": 1040,
|
|
1009
|
+
"y": 1040,
|
|
1010
|
+
"characteristic": "maintainability",
|
|
1011
|
+
"scope": "atomic",
|
|
1012
|
+
"cadence": "triggered",
|
|
1013
|
+
"trigger": "nightly",
|
|
1014
|
+
"invocation": "automated",
|
|
1015
|
+
"description": "A nightly script groups the final releases into lines (MAJOR under semantic versions, YYYY.M under calendar versions, told apart by a four-digit first number), compares the supported rows of SECURITY.md with the newest {{LTS_LINES}} lines, checks that each older supported line has its maintenance branch on origin, and fails on any release published on a line after the line {{LTS_LINES}} places newer started.\n\nThreshold: SECURITY.md lists exactly the newest {{LTS_LINES}} lines as supported; 1 maintenance branch release/<line>.x per older supported line; 0 releases on a line published after it left support\n\nTool: Node.js with git and the GitHub CLI (gh release list)\n\n```js\n// scripts/check-support.mjs — SECURITY.md supports the newest {{LTS_LINES}} lines, each older one has its branch, none is released on after it left support\nimport { execFileSync } from 'node:child_process'\nimport { readFileSync } from 'node:fs'\nconst SUPPORTED_LINES = {{LTS_LINES}}\nconst run = (cmd, ...args) => execFileSync(cmd, args, { encoding: 'utf8' })\nconst releases = JSON.parse(run('gh', 'release', 'list', '--exclude-drafts', '--exclude-pre-releases', '--limit', '1000', '--json', 'tagName,publishedAt'))\n .filter((r) => /^v\\d+\\.\\d+\\.\\d+$/.test(r.tagName)).map((r) => ({ tag: r.tagName, v: r.tagName.slice(1).split('.').map(Number), at: r.publishedAt }))\nconst lineOf = (v) => (v[0] >= 1000 ? v.slice(0, 2) : v.slice(0, 1)).join('.') // YYYY.M under calendar versions, MAJOR under semantic ones\nconst starts = new Map() // line -> when its first release was published\nfor (const { v, at } of releases) if (!starts.has(lineOf(v)) || at < starts.get(lineOf(v))) starts.set(lineOf(v), at)\nconst num = (line) => line.split('.').map(Number)\nconst lines = [...starts.keys()].sort((a, b) => num(b)[0] - num(a)[0] || (num(b)[1] ?? 0) - (num(a)[1] ?? 0)) // newest first\nconst supported = readFileSync('SECURITY.md', 'utf8').split('\\n')\n .map((row) => row.match(/^\\|\\s*v?(\\d+(?:\\.\\d+)?)\\.x\\s*\\|\\s*(?:✅|:white_check_mark:)/)).filter(Boolean).map((m) => m[1])\nconst expected = lines.slice(0, SUPPORTED_LINES)\nconst problems = []\nif ([...supported].sort().join() !== [...expected].sort().join()) problems.push(`SECURITY.md supports ${supported.join(', ') || 'nothing'}, the decision ${expected.join(', ')}`)\nfor (const line of expected.slice(1)) if (!run('git', 'ls-remote', '--heads', 'origin', `release/${line}.x`).trim()) problems.push(`release/${line}.x: no maintenance branch`)\nlines.forEach((line, i) => {\n if (i < SUPPORTED_LINES) return\n const leftAt = starts.get(lines[i - SUPPORTED_LINES]) // a line leaves support when the line SUPPORTED_LINES places newer starts\n for (const r of releases) if (lineOf(r.v) === line && r.at > leftAt) problems.push(`${r.tag}: released after line ${line} left support`)\n})\nif (problems.length) { console.error(problems.join('\\n')); process.exit(1) }\n```",
|
|
1016
|
+
"hubWhen": {
|
|
1017
|
+
"SCHEME": [
|
|
1018
|
+
"semver",
|
|
1019
|
+
"calver"
|
|
1020
|
+
],
|
|
1021
|
+
"SUPPORT": [
|
|
1022
|
+
"lts"
|
|
1023
|
+
]
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"id": "ff-backports",
|
|
1028
|
+
"type": "fitness-fn",
|
|
1029
|
+
"label": "Security fixes back-ported in time",
|
|
1030
|
+
"x": 1040,
|
|
1031
|
+
"y": 1170,
|
|
1032
|
+
"characteristic": "security",
|
|
1033
|
+
"scope": "atomic",
|
|
1034
|
+
"cadence": "triggered",
|
|
1035
|
+
"trigger": "nightly",
|
|
1036
|
+
"invocation": "automated",
|
|
1037
|
+
"description": "A nightly job lists the pull requests labelled security that were merged to main more than {{BACKPORT_DAYS}} days ago, and for each older line SECURITY.md supports, looks on release/<line>.x for the commit git cherry-pick -x made from the fix (its \"cherry picked from commit\" line) and for a release tag containing it. A line cut after the fix already contains it and is skipped.\n\nThreshold: 0 security fixes merged to main more than {{BACKPORT_DAYS}} days ago without a cherry-picked commit in a released tag on every older supported line\n\nTool: git and the GitHub CLI (gh pr list) in a scheduled GitHub Actions job\n\n```bash\n# nightly, in a full clone; SECURITY.md lists the supported lines newest first (| 2.x | ✅ |), the newest released from main\nset -euo pipefail\ngit fetch --quiet --tags origin '+refs/heads/release/*:refs/remotes/origin/release/*'\nolder=$(grep -E '^\\|' SECURITY.md | grep -E '✅|:white_check_mark:' | awk -F'|' '{ gsub(/[ v]/, \"\", $2); print $2 }' | tail -n +2)\nfixes=$(gh pr list --base main --state merged --label security --limit 200 --json mergeCommit,mergedAt \\\n --jq '.[] | select(now - (.mergedAt | fromdateiso8601) > {{BACKPORT_DAYS}} * 86400) | .mergeCommit.oid')\nlate=0\nfor fix in $fixes; do\n for line in $older; do\n branch=\"origin/release/$line\" # release/2.x\n git merge-base --is-ancestor \"$fix\" \"$branch\" && continue # the line was cut after the fix\n pick=$(git log \"$branch\" --format=%H -n 1 --grep \"cherry picked from commit $fix\")\n if [ -z \"$pick\" ] || [ -z \"$(git tag --list 'v*' --contains \"$pick\")\" ]; then\n echo \"security fix $fix is not released on $line within {{BACKPORT_DAYS}} days\"; late=1\n fi\n done\ndone\nexit \"$late\"\n```",
|
|
1038
|
+
"hubWhen": {
|
|
1039
|
+
"SCHEME": [
|
|
1040
|
+
"semver",
|
|
1041
|
+
"calver"
|
|
1042
|
+
],
|
|
1043
|
+
"SUPPORT": [
|
|
1044
|
+
"lts"
|
|
1045
|
+
]
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"id": "ff-release-approval",
|
|
1050
|
+
"type": "fitness-fn",
|
|
1051
|
+
"label": "Releases wait for the release owner",
|
|
1052
|
+
"x": 1040,
|
|
1053
|
+
"y": 1300,
|
|
1054
|
+
"characteristic": "maintainability",
|
|
1055
|
+
"scope": "atomic",
|
|
1056
|
+
"cadence": "triggered",
|
|
1057
|
+
"trigger": "weekly",
|
|
1058
|
+
"invocation": "automated",
|
|
1059
|
+
"description": "A weekly job, and one on every change under .github/, reads the protection rules of the environment release through the GitHub API, checks that every workflow file that publishes releases (gh release, release-please or semantic-release) declares environment: release, and lists the published releases whose author is not github-actions[bot], which means someone published one by hand.\n\nThreshold: The environment release requires a review by the team {{RELEASE_OWNER}} alone, with self-review prevented; every workflow that publishes releases runs in it; 0 of the last 100 releases published by anyone but the release workflow\n\nTool: the GitHub CLI (gh api repos/{owner}/{repo}/environments/release and /releases) with jq\n\n```bash\n# weekly and on changes to .github/; GH_TOKEN may read the repository's environments and releases\nset -euo pipefail\nREPO=${GITHUB_REPOSITORY:-our-org/shop}\ngh api \"repos/$REPO/environments/release\" --jq '.protection_rules' | jq -e --arg team '{{RELEASE_OWNER}}' '\n map(select(.type == \"required_reviewers\")) | length == 1 and .[0].prevent_self_review == true\n and (.[0].reviewers | length == 1 and .[0].type == \"Team\" and .[0].reviewer.slug == $team)' >/dev/null \\\n || { echo \"environment release must wait for a review by the team {{RELEASE_OWNER}} alone, with self-review prevented\"; exit 1; }\n# every job that publishes a release runs in that environment\nfor wf in $(grep -lE 'gh release (create|edit)|release-please-action|semantic-release' .github/workflows/*.yml); do\n grep -qE '^\\s+environment:\\s*release\\s*$' \"$wf\" || { echo \"$wf publishes releases outside the environment release\"; exit 1; }\ndone\n# and nobody publishes one by hand\nby_hand=$(gh api \"repos/$REPO/releases?per_page=100\" --jq '.[] | select(.draft | not) | select(.author.login != \"github-actions[bot]\") | .tag_name')\n[ -z \"$by_hand\" ] || { echo \"releases not published by the release workflow: $by_hand\"; exit 1; }\n```",
|
|
1060
|
+
"hubWhen": {
|
|
1061
|
+
"SCHEME": [
|
|
1062
|
+
"semver",
|
|
1063
|
+
"calver"
|
|
1064
|
+
],
|
|
1065
|
+
"APPROVAL": [
|
|
1066
|
+
"owner"
|
|
1067
|
+
]
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"id": "ff-auto-release",
|
|
1072
|
+
"type": "fitness-fn",
|
|
1073
|
+
"label": "No merge waits for its release",
|
|
1074
|
+
"x": 1040,
|
|
1075
|
+
"y": 1430,
|
|
1076
|
+
"characteristic": "maintainability",
|
|
1077
|
+
"scope": "atomic",
|
|
1078
|
+
"cadence": "continual",
|
|
1079
|
+
"invocation": "automated",
|
|
1080
|
+
"description": "An hourly job finds the latest release tag on main and lists the first-parent commits after it that change code under src/, test files excluded; any older than {{RELEASE_HOURS}} hours fails the job. It also checks that the release workflow starts on pushes to main and declares no environment, where it would wait for a reviewer. A commit typed docs or test that touches src/ is reported too: type it so that it releases, or keep it out of src/.\n\nThreshold: 0 commits changing src/ (tests excluded) merged to main more than {{RELEASE_HOURS}} hours ago and not in a release; release.yml runs on pushes to main and waits in no environment\n\nTool: git in a scheduled GitHub Actions job\n\n```bash\n# hourly, in a full clone: no change to shipped code waits on main longer than {{RELEASE_HOURS}} hours for its release\nset -euo pipefail\ngit fetch --quiet --tags origin main\nlatest=$(git describe --tags --abbrev=0 --match 'v*' origin/main)\ncutoff=$(( $(date +%s) - {{RELEASE_HOURS}} * 3600 ))\nwaiting=$(git log \"$latest..origin/main\" --first-parent --format='%h %ct %s' -- src/ ':(glob,exclude)src/**/*.test.*' | awk -v c=\"$cutoff\" '$2 < c')\n[ -z \"$waiting\" ] || { echo \"merged more than {{RELEASE_HOURS}} hours ago and in no release after $latest:\"; echo \"$waiting\"; exit 1; }\n# and no release waits for a person: the release workflow starts on every push to main, in no environment with reviewers\ngrep -qE '^\\s+branches:\\s*\\[\\s*main\\s*\\]' .github/workflows/release.yml || { echo \"release.yml does not run on pushes to main\"; exit 1; }\n! grep -qE '^\\s+environment:' .github/workflows/release.yml || { echo \"release.yml waits in an environment; automatic releases do not\"; exit 1; }\n```",
|
|
1081
|
+
"hubWhen": {
|
|
1082
|
+
"SCHEME": [
|
|
1083
|
+
"semver",
|
|
1084
|
+
"calver"
|
|
1085
|
+
],
|
|
1086
|
+
"APPROVAL": [
|
|
1087
|
+
"auto"
|
|
1088
|
+
]
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
],
|
|
1092
|
+
"relations": [
|
|
1093
|
+
{
|
|
1094
|
+
"id": "req-version-visible--derives--need",
|
|
1095
|
+
"sourceId": "req-version-visible",
|
|
1096
|
+
"targetId": "need",
|
|
1097
|
+
"relationType": "derives"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"id": "req-semver--derives--need",
|
|
1101
|
+
"sourceId": "req-semver",
|
|
1102
|
+
"targetId": "need",
|
|
1103
|
+
"relationType": "derives"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"id": "req-semver-bump--derives--need",
|
|
1107
|
+
"sourceId": "req-semver-bump",
|
|
1108
|
+
"targetId": "need",
|
|
1109
|
+
"relationType": "derives"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"id": "req-calver--derives--need",
|
|
1113
|
+
"sourceId": "req-calver",
|
|
1114
|
+
"targetId": "need",
|
|
1115
|
+
"relationType": "derives"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"id": "req-immutable--derives--need",
|
|
1119
|
+
"sourceId": "req-immutable",
|
|
1120
|
+
"targetId": "need",
|
|
1121
|
+
"relationType": "derives"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"id": "req-build-id--derives--need",
|
|
1125
|
+
"sourceId": "req-build-id",
|
|
1126
|
+
"targetId": "need",
|
|
1127
|
+
"relationType": "derives"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"id": "req-notes-commits--derives--need",
|
|
1131
|
+
"sourceId": "req-notes-commits",
|
|
1132
|
+
"targetId": "need",
|
|
1133
|
+
"relationType": "derives"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"id": "req-changelog-entry--derives--need",
|
|
1137
|
+
"sourceId": "req-changelog-entry",
|
|
1138
|
+
"targetId": "need",
|
|
1139
|
+
"relationType": "derives"
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
"id": "req-pr-labels--derives--need",
|
|
1143
|
+
"sourceId": "req-pr-labels",
|
|
1144
|
+
"targetId": "need",
|
|
1145
|
+
"relationType": "derives"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"id": "req-latest-only--derives--need",
|
|
1149
|
+
"sourceId": "req-latest-only",
|
|
1150
|
+
"targetId": "need",
|
|
1151
|
+
"relationType": "derives"
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
"id": "req-lts-policy--derives--need",
|
|
1155
|
+
"sourceId": "req-lts-policy",
|
|
1156
|
+
"targetId": "need",
|
|
1157
|
+
"relationType": "derives"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"id": "req-backport--derives--need",
|
|
1161
|
+
"sourceId": "req-backport",
|
|
1162
|
+
"targetId": "need",
|
|
1163
|
+
"relationType": "derives"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"id": "req-owner-approves--derives--need",
|
|
1167
|
+
"sourceId": "req-owner-approves",
|
|
1168
|
+
"targetId": "need",
|
|
1169
|
+
"relationType": "derives"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"id": "req-auto-release--derives--need",
|
|
1173
|
+
"sourceId": "req-auto-release",
|
|
1174
|
+
"targetId": "need",
|
|
1175
|
+
"relationType": "derives"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"id": "sc-version-visible--verifies--req-version-visible",
|
|
1179
|
+
"sourceId": "sc-version-visible",
|
|
1180
|
+
"targetId": "req-version-visible",
|
|
1181
|
+
"relationType": "verifies"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"id": "sc-semver--verifies--req-semver",
|
|
1185
|
+
"sourceId": "sc-semver",
|
|
1186
|
+
"targetId": "req-semver",
|
|
1187
|
+
"relationType": "verifies"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"id": "sc-semver-bump--verifies--req-semver-bump",
|
|
1191
|
+
"sourceId": "sc-semver-bump",
|
|
1192
|
+
"targetId": "req-semver-bump",
|
|
1193
|
+
"relationType": "verifies"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"id": "sc-calver--verifies--req-calver",
|
|
1197
|
+
"sourceId": "sc-calver",
|
|
1198
|
+
"targetId": "req-calver",
|
|
1199
|
+
"relationType": "verifies"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"id": "sc-immutable--verifies--req-immutable",
|
|
1203
|
+
"sourceId": "sc-immutable",
|
|
1204
|
+
"targetId": "req-immutable",
|
|
1205
|
+
"relationType": "verifies"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"id": "sc-build-id--verifies--req-build-id",
|
|
1209
|
+
"sourceId": "sc-build-id",
|
|
1210
|
+
"targetId": "req-build-id",
|
|
1211
|
+
"relationType": "verifies"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"id": "sc-notes-commits--verifies--req-notes-commits",
|
|
1215
|
+
"sourceId": "sc-notes-commits",
|
|
1216
|
+
"targetId": "req-notes-commits",
|
|
1217
|
+
"relationType": "verifies"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"id": "sc-changelog-entry--verifies--req-changelog-entry",
|
|
1221
|
+
"sourceId": "sc-changelog-entry",
|
|
1222
|
+
"targetId": "req-changelog-entry",
|
|
1223
|
+
"relationType": "verifies"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"id": "sc-pr-labels--verifies--req-pr-labels",
|
|
1227
|
+
"sourceId": "sc-pr-labels",
|
|
1228
|
+
"targetId": "req-pr-labels",
|
|
1229
|
+
"relationType": "verifies"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"id": "sc-latest-only--verifies--req-latest-only",
|
|
1233
|
+
"sourceId": "sc-latest-only",
|
|
1234
|
+
"targetId": "req-latest-only",
|
|
1235
|
+
"relationType": "verifies"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"id": "sc-lts-policy--verifies--req-lts-policy",
|
|
1239
|
+
"sourceId": "sc-lts-policy",
|
|
1240
|
+
"targetId": "req-lts-policy",
|
|
1241
|
+
"relationType": "verifies"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"id": "sc-backport--verifies--req-backport",
|
|
1245
|
+
"sourceId": "sc-backport",
|
|
1246
|
+
"targetId": "req-backport",
|
|
1247
|
+
"relationType": "verifies"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"id": "sc-owner-approves--verifies--req-owner-approves",
|
|
1251
|
+
"sourceId": "sc-owner-approves",
|
|
1252
|
+
"targetId": "req-owner-approves",
|
|
1253
|
+
"relationType": "verifies"
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"id": "sc-auto-release--verifies--req-auto-release",
|
|
1257
|
+
"sourceId": "sc-auto-release",
|
|
1258
|
+
"targetId": "req-auto-release",
|
|
1259
|
+
"relationType": "verifies"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"id": "ff-version-endpoint--implements--adr-semver",
|
|
1263
|
+
"sourceId": "ff-version-endpoint",
|
|
1264
|
+
"targetId": "adr-semver",
|
|
1265
|
+
"relationType": "implements"
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"id": "ff-version-endpoint--implements--adr-calver",
|
|
1269
|
+
"sourceId": "ff-version-endpoint",
|
|
1270
|
+
"targetId": "adr-calver",
|
|
1271
|
+
"relationType": "implements"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"id": "ff-version-endpoint--implements--adr-build-id",
|
|
1275
|
+
"sourceId": "ff-version-endpoint",
|
|
1276
|
+
"targetId": "adr-build-id",
|
|
1277
|
+
"relationType": "implements"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"id": "ff-semver-release--implements--adr-semver",
|
|
1281
|
+
"sourceId": "ff-semver-release",
|
|
1282
|
+
"targetId": "adr-semver",
|
|
1283
|
+
"relationType": "implements"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"id": "ff-calver-release--implements--adr-calver",
|
|
1287
|
+
"sourceId": "ff-calver-release",
|
|
1288
|
+
"targetId": "adr-calver",
|
|
1289
|
+
"relationType": "implements"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"id": "ff-build-id--implements--adr-build-id",
|
|
1293
|
+
"sourceId": "ff-build-id",
|
|
1294
|
+
"targetId": "adr-build-id",
|
|
1295
|
+
"relationType": "implements"
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
"id": "ff-notes-complete--implements--adr-notes-commits",
|
|
1299
|
+
"sourceId": "ff-notes-complete",
|
|
1300
|
+
"targetId": "adr-notes-commits",
|
|
1301
|
+
"relationType": "implements"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"id": "ff-changelog-entry--implements--adr-notes-keepachangelog",
|
|
1305
|
+
"sourceId": "ff-changelog-entry",
|
|
1306
|
+
"targetId": "adr-notes-keepachangelog",
|
|
1307
|
+
"relationType": "implements"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"id": "ff-pr-labels--implements--adr-notes-labels",
|
|
1311
|
+
"sourceId": "ff-pr-labels",
|
|
1312
|
+
"targetId": "adr-notes-labels",
|
|
1313
|
+
"relationType": "implements"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
"id": "ff-support-latest--implements--adr-support-latest",
|
|
1317
|
+
"sourceId": "ff-support-latest",
|
|
1318
|
+
"targetId": "adr-support-latest",
|
|
1319
|
+
"relationType": "implements"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"id": "ff-support-lts--implements--adr-support-lts",
|
|
1323
|
+
"sourceId": "ff-support-lts",
|
|
1324
|
+
"targetId": "adr-support-lts",
|
|
1325
|
+
"relationType": "implements"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"id": "ff-backports--implements--adr-support-lts",
|
|
1329
|
+
"sourceId": "ff-backports",
|
|
1330
|
+
"targetId": "adr-support-lts",
|
|
1331
|
+
"relationType": "implements"
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"id": "ff-release-approval--implements--adr-semver",
|
|
1335
|
+
"sourceId": "ff-release-approval",
|
|
1336
|
+
"targetId": "adr-semver",
|
|
1337
|
+
"relationType": "implements"
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"id": "ff-release-approval--implements--adr-calver",
|
|
1341
|
+
"sourceId": "ff-release-approval",
|
|
1342
|
+
"targetId": "adr-calver",
|
|
1343
|
+
"relationType": "implements"
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
"id": "ff-auto-release--implements--adr-semver",
|
|
1347
|
+
"sourceId": "ff-auto-release",
|
|
1348
|
+
"targetId": "adr-semver",
|
|
1349
|
+
"relationType": "implements"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"id": "ff-auto-release--implements--adr-calver",
|
|
1353
|
+
"sourceId": "ff-auto-release",
|
|
1354
|
+
"targetId": "adr-calver",
|
|
1355
|
+
"relationType": "implements"
|
|
1356
|
+
}
|
|
1357
|
+
]
|
|
1358
|
+
}
|