@radicaltools/cli 0.3.0 → 0.3.2

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.
Files changed (57) hide show
  1. package/README.md +332 -44
  2. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  3. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  4. package/dist/hub-catalogue/concern/concern-api-evolution.radical +449 -210
  5. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  6. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  7. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  8. package/dist/hub-catalogue/concern/concern-architecture-style.radical +287 -131
  9. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  10. package/dist/hub-catalogue/concern/concern-authentication.radical +247 -37
  11. package/dist/hub-catalogue/concern/concern-authorization.radical +311 -89
  12. package/dist/hub-catalogue/concern/concern-availability.radical +287 -63
  13. package/dist/hub-catalogue/concern/concern-backend-stack.radical +300 -381
  14. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +385 -129
  15. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  16. package/dist/hub-catalogue/concern/concern-capacity.radical +194 -81
  17. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  18. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  19. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  20. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  21. package/dist/hub-catalogue/concern/concern-communication-style.radical +473 -167
  22. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  23. package/dist/hub-catalogue/concern/concern-data-consistency.radical +339 -308
  24. package/dist/hub-catalogue/concern/concern-data-store.radical +480 -158
  25. package/dist/hub-catalogue/concern/concern-decomposition.radical +260 -85
  26. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  27. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  28. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  29. package/dist/hub-catalogue/concern/concern-deployment.radical +343 -92
  30. package/dist/hub-catalogue/concern/concern-encryption.radical +339 -76
  31. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  32. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  33. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +467 -160
  34. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  35. package/dist/hub-catalogue/concern/concern-infrastructure.radical +1300 -268
  36. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +88 -51
  37. package/dist/hub-catalogue/concern/concern-messaging.radical +173 -140
  38. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +162 -159
  39. package/dist/hub-catalogue/concern/concern-observability.radical +224 -275
  40. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  41. package/dist/hub-catalogue/concern/concern-personal-data.radical +637 -122
  42. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  43. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +433 -141
  44. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  45. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  46. package/dist/hub-catalogue/concern/concern-secrets.radical +332 -74
  47. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  48. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  49. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  50. package/dist/hub-catalogue/concern/concern-supply-chain.radical +257 -183
  51. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  52. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  53. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +271 -137
  54. package/dist/hub-catalogue/concern/concern-test-strategy.radical +243 -224
  55. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  56. package/dist/index.js +10608 -6579
  57. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  "id": "concern-backend-stack",
4
4
  "category": "concern",
5
5
  "name": "Backend stack",
6
- "description": "The language, runtime and framework a server-side service is built on, why, the performance budget it is held to, and how it is kept on supported versions with its dependencies up to date.",
6
+ "description": "The language, runtime and framework a server-side service is built on, why, the version policy that keeps it on supported releases, and the footprint it is held to when performance decides.",
7
7
  "tags": [
8
8
  "technology",
9
9
  "backend",
@@ -11,14 +11,14 @@
11
11
  "language",
12
12
  "framework",
13
13
  "end of life",
14
- "dependency updates",
15
- "performance budget"
14
+ "version policy",
15
+ "footprint"
16
16
  ],
17
17
  "requiredMetamodel": "c4-ddd-governance-builtin",
18
18
  "concern": {
19
19
  "id": "backend-stack",
20
- "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"component\") AND external != true",
21
- "why": "these are server-side services, so what they are built on, how fast they must be, and how they are kept supported and up to date has to be decided.",
20
+ "trigger": "LIST NODES WHERE type = \"container\" AND external != true",
21
+ "why": "these are server-side services, so what they are built on and how they are kept on supported versions has to be decided.",
22
22
  "group": "technology"
23
23
  },
24
24
  "sources": [
@@ -34,14 +34,18 @@
34
34
  "title": "ISO/IEC 25010, Maintainability, Flexibility and Performance efficiency",
35
35
  "url": "https://iso25000.com/index.php/en/iso-25000-standards/iso-25010"
36
36
  },
37
- {
38
- "title": "Renovate documentation",
39
- "url": "https://docs.renovatebot.com/"
40
- },
41
37
  {
42
38
  "title": "OpenSSF Scorecard",
43
39
  "url": "https://github.com/ossf/scorecard"
44
40
  },
41
+ {
42
+ "title": "deps.dev API v3 (Open Source Insights)",
43
+ "url": "https://docs.deps.dev/api/v3/"
44
+ },
45
+ {
46
+ "title": "OWASP Top 10 2021, A06 Vulnerable and Outdated Components",
47
+ "url": "https://owasp.org/Top10/A06_2021-Vulnerable_and_Outdated_Components/"
48
+ },
45
49
  {
46
50
  "title": "Ford, Parsons, Kua, Sadalage: Building Evolutionary Architectures, 2nd ed.",
47
51
  "url": "https://www.oreilly.com/library/view/building-evolutionary-architectures/9781492097532/"
@@ -73,12 +77,12 @@
73
77
  {
74
78
  "value": "go",
75
79
  "label": "Go",
76
- "description": "Small static binaries, fast start-up, low memory, simple concurrency. Pick it for infrastructure-like services, high-throughput network services and CLIs, when a small standard library is enough."
80
+ "description": "Small static binaries, fast start-up, low memory, simple concurrency. Pick it for infrastructure-like services, high-throughput network services and CLIs, when a small standard library is enough. Go has no LTS releases: not with the LTS-only version policy."
77
81
  },
78
82
  {
79
83
  "value": "python",
80
84
  "label": "Python (FastAPI or Django)",
81
- "description": "The data and machine-learning ecosystem, quick to write. Pick it when the service serves models or data pipelines, or the team are data people; CPU-heavy request handling is not its strength."
85
+ "description": "The data and machine-learning ecosystem, quick to write. Pick it when the service serves models or data pipelines, or the team are data people; CPU-heavy request handling is not its strength. Python has no LTS releases: not with the LTS-only version policy."
82
86
  }
83
87
  ]
84
88
  },
@@ -102,7 +106,7 @@
102
106
  {
103
107
  "value": "performance",
104
108
  "label": "performance",
105
- "description": "Latency, memory or start-up time drive cost or user experience. Pick it only when load or cost figures show it matters, and hold the stack to the numbers."
109
+ "description": "Memory and start-up time drive cost or scaling. Pick it only when load or cost figures show it matters, and hold the stack to the footprint numbers asked below."
106
110
  }
107
111
  ]
108
112
  },
@@ -110,47 +114,23 @@
110
114
  "key": "UPGRADE",
111
115
  "title": "Version policy",
112
116
  "label": "Which versions of the runtime and framework may run?",
113
- "hint": "Unsupported versions get no security fixes; versions far behind make each upgrade a project.",
117
+ "hint": "Unsupported versions get no security fixes; versions far behind make each upgrade a project. Go and Python have no LTS releases: with them, pick the latest or the previous major.",
114
118
  "defaultValue": "lts",
115
119
  "options": [
116
120
  {
117
121
  "value": "lts",
118
122
  "label": "supported LTS releases only",
119
- "description": "Only long-term-support releases, each new LTS adopted within 6 months. Pick it for business systems that value stability and upgrade a few times a year."
123
+ "description": "Only long-term-support releases, each new LTS adopted within 6 months. Pick it for business systems that value stability and upgrade a few times a year. Not with Go or Python, which have no LTS releases."
120
124
  },
121
125
  {
122
126
  "value": "n1",
123
127
  "label": "the latest or the previous major",
124
- "description": "Never more than one major version behind the latest release, LTS or not. Pick it when the stack has no LTS for what you use (Go, most frameworks) or you want new features sooner."
128
+ "description": "Never more than one release cycle behind the latest, LTS or not. Pick it when the stack has no LTS for what you use (Go, Python, most frameworks) or you want new features sooner."
125
129
  },
126
130
  {
127
131
  "value": "latest",
128
132
  "label": "the latest release within 30 days",
129
- "description": "Each new release of the runtime and framework is adopted within 30 days. Pick it for small services with a strong test suite and automated updates."
130
- }
131
- ]
132
- },
133
- {
134
- "key": "UPDATES",
135
- "title": "Dependency updates",
136
- "label": "How are dependencies kept up to date?",
137
- "hint": "Small, frequent updates are cheap; a year of updates at once is a migration.",
138
- "defaultValue": "renovate",
139
- "options": [
140
- {
141
- "value": "renovate",
142
- "label": "Renovate pull requests",
143
- "description": "A bot opens update pull requests for libraries, the runtime version and base images, merging patches automatically on green tests. Pick it for any hosting (GitHub, GitLab, Bitbucket, Azure DevOps) and when you want grouping, schedules and runtime files covered."
144
- },
145
- {
146
- "value": "dependabot",
147
- "label": "Dependabot pull requests",
148
- "description": "GitHub's built-in updates for libraries, Docker images and Actions. Pick it when the code is on GitHub and its simpler configuration is enough."
149
- },
150
- {
151
- "value": "manual",
152
- "label": "a scheduled upgrade each quarter",
153
- "description": "A planned upgrade of everything once a quarter, checked by a drift report. Pick it only where bots are not allowed (air-gapped or regulated build environments)."
133
+ "description": "Each new release cycle of the runtime and framework is adopted within 30 days. Pick it for small services with a strong test suite and automated updates."
154
134
  }
155
135
  ]
156
136
  },
@@ -160,33 +140,15 @@
160
140
  "defaultValue": "180",
161
141
  "type": "number"
162
142
  },
163
- {
164
- "key": "PATCH_DAYS",
165
- "label": "Within how many days must a high or critical vulnerability be patched?",
166
- "defaultValue": "14",
167
- "type": "number"
168
- },
169
- {
170
- "key": "P95_MS",
171
- "label": "What 95th-percentile response time must the service meet (ms)?",
172
- "defaultValue": "200",
173
- "type": "number"
174
- },
175
- {
176
- "key": "PEAK_RPS",
177
- "label": "What is the expected peak load (requests per second)?",
178
- "defaultValue": "200",
179
- "type": "number"
180
- },
181
143
  {
182
144
  "key": "MEMORY_MB",
183
- "label": "How much memory may one instance use at peak (MB)?",
145
+ "label": "How much memory may one instance use at peak (MB)? Held to when performance is the deciding factor",
184
146
  "defaultValue": "512",
185
147
  "type": "number"
186
148
  },
187
149
  {
188
150
  "key": "STARTUP_SECONDS",
189
- "label": "Within how many seconds must a new instance be ready for traffic?",
151
+ "label": "Within how many seconds must a new instance be ready for traffic? Held to when performance is the deciding factor",
190
152
  "defaultValue": "10",
191
153
  "type": "number"
192
154
  }
@@ -201,7 +163,7 @@
201
163
  "y": 0,
202
164
  "kind": "brief",
203
165
  "source": "Hub concern pack: Backend stack",
204
- "description": "The service has to be built on a language, runtime and framework the team can work in well, that have the libraries it needs, that meet a stated performance budget, and that keep receiving security fixes for as long as the service runs. The choice must be written down with its reasons, and keeping it current must be routine work, not a project every few years."
166
+ "description": "The service has to be built on a language, runtime and framework the team can work in well, that have the libraries it needs, that fit the footprint the hosting pays for, and that keep receiving security fixes for as long as the service runs. The choice must be written down with its reasons, and keeping it current must be routine work, not a project every few years. The checks assume one service per repository, with its Dockerfile and build manifest at the root, a versions.txt listing the endoflife.date products and cycles in use, and team.txt with the owning team's e-mail addresses next to CODEOWNERS."
205
167
  },
206
168
  {
207
169
  "id": "req-one-stack",
@@ -221,25 +183,14 @@
221
183
  "y": 130,
222
184
  "ears_type": "ubiquitous",
223
185
  "action": "run only runtime, framework and base image versions under vendor support, replacing each at least {{EOL_DAYS}} days before its end of support",
224
- "rationale": "After end of support no security fixes come; the lead time leaves room to upgrade without a rush (endoflife.date; PCI DSS v4.0 6.3.3, OWASP Top 10 A06 Vulnerable and Outdated Components)."
225
- },
226
- {
227
- "id": "req-patch",
228
- "type": "requirement",
229
- "label": "Vulnerabilities patched in time",
230
- "x": 260,
231
- "y": 260,
232
- "ears_type": "event-driven",
233
- "trigger": "a vulnerability rated high or critical (CVSS 7.0 or more) is published for the runtime, the framework or a dependency in use",
234
- "action": "deploy a fixed version to production within {{PATCH_DAYS}} days, or record a dated exception with the mitigation",
235
- "rationale": "Known vulnerabilities are exploited within days of publication; a deadline turns patching into routine (PCI DSS v4.0 6.3.3; CISA Known Exploited Vulnerabilities catalogue)."
186
+ "rationale": "After end of support no security fixes come; the lead time leaves room to upgrade without a rush (endoflife.date; OWASP Top 10 A06 Vulnerable and Outdated Components)."
236
187
  },
237
188
  {
238
189
  "id": "req-lts",
239
190
  "type": "requirement",
240
191
  "label": "New LTS adopted",
241
192
  "x": 260,
242
- "y": 390,
193
+ "y": 260,
243
194
  "ears_type": "event-driven",
244
195
  "trigger": "a new long-term-support release of the runtime or main framework is published",
245
196
  "action": "move the service to it within 6 months, and run no non-LTS release in production",
@@ -253,12 +204,12 @@
253
204
  {
254
205
  "id": "req-n1",
255
206
  "type": "requirement",
256
- "label": "At most one major behind",
207
+ "label": "At most one release behind",
257
208
  "x": 260,
258
- "y": 520,
209
+ "y": 390,
259
210
  "ears_type": "ubiquitous",
260
- "action": "run the latest or the previous major version of the runtime and the main framework, never older",
261
- "rationale": "Most projects support only the last one or two major versions (Go: the two latest releases); staying within them keeps fixes coming and upgrades short (endoflife.date).",
211
+ "action": "run the latest or the previous release cycle of the runtime and the main framework, never older",
212
+ "rationale": "Most projects support only the last one or two release cycles (Go: the two latest releases); staying within them keeps fixes coming and upgrades short (endoflife.date).",
262
213
  "hubWhen": {
263
214
  "UPGRADE": [
264
215
  "n1"
@@ -270,9 +221,9 @@
270
221
  "type": "requirement",
271
222
  "label": "Latest release adopted",
272
223
  "x": 260,
273
- "y": 650,
224
+ "y": 520,
274
225
  "ears_type": "event-driven",
275
- "trigger": "a new release of the runtime or main framework is published",
226
+ "trigger": "a new release cycle of the runtime or main framework is published",
276
227
  "action": "move the service to it within 30 days",
277
228
  "rationale": "Small, frequent upgrades are cheaper than large rare ones, and new security hardening arrives sooner (Building Evolutionary Architectures, incremental change).",
278
229
  "hubWhen": {
@@ -281,47 +232,14 @@
281
232
  ]
282
233
  }
283
234
  },
284
- {
285
- "id": "req-update-prs",
286
- "type": "requirement",
287
- "label": "Updates arrive as pull requests",
288
- "x": 260,
289
- "y": 780,
290
- "ears_type": "event-driven",
291
- "trigger": "a new version of a dependency, the runtime or a base image is published",
292
- "action": "open a pull request updating it within 7 days, merge patch updates automatically when the tests pass, and leave no update pull request open longer than 30 days",
293
- "rationale": "Updates that arrive one at a time with tests are cheap to take; automation keeps them from waiting for someone to remember (Renovate, Dependabot documentation).",
294
- "hubWhen": {
295
- "UPDATES": [
296
- "renovate",
297
- "dependabot"
298
- ]
299
- }
300
- },
301
- {
302
- "id": "req-quarterly",
303
- "type": "requirement",
304
- "label": "Quarterly upgrade",
305
- "x": 260,
306
- "y": 910,
307
- "ears_type": "event-driven",
308
- "trigger": "a quarter ends",
309
- "action": "upgrade every dependency to its latest version, leaving 0 direct dependencies more than one major version behind",
310
- "rationale": "Without a bot, only a fixed rhythm keeps drift from growing into a migration (Building Evolutionary Architectures, dependency fitness functions).",
311
- "hubWhen": {
312
- "UPDATES": [
313
- "manual"
314
- ]
315
- }
316
- },
317
235
  {
318
236
  "id": "req-skills",
319
237
  "type": "requirement",
320
238
  "label": "Enough people know it",
321
239
  "x": 260,
322
- "y": 1040,
240
+ "y": 650,
323
241
  "ears_type": "ubiquitous",
324
- "action": "keep at least two engineers in the owning team who have shipped production code on {{RUNTIME}} in the last 12 months",
242
+ "action": "keep at least two engineers in the owning team who have merged production changes to the service on {{RUNTIME}} in the last 12 months",
325
243
  "rationale": "A stack chosen for the team's skills is only as safe as the number of people who have them (bus factor).",
326
244
  "hubWhen": {
327
245
  "CRITERION": [
@@ -334,36 +252,25 @@
334
252
  "type": "requirement",
335
253
  "label": "Dependencies are maintained",
336
254
  "x": 260,
337
- "y": 1170,
255
+ "y": 780,
338
256
  "ears_type": "event-driven",
339
257
  "trigger": "a change adds a direct dependency",
340
258
  "action": "accept it only when it had a release in the last 12 months and an OpenSSF Scorecard score of at least 5, or a reviewer records why it is still acceptable",
341
- "rationale": "An ecosystem is worth what its maintained libraries are worth; an abandoned dependency becomes your code to maintain (OpenSSF Scorecard: Maintained check).",
259
+ "rationale": "An ecosystem is worth what its maintained libraries are worth; an abandoned dependency becomes your code to maintain (OpenSSF Scorecard: Maintained check; deps.dev).",
342
260
  "hubWhen": {
343
261
  "CRITERION": [
344
262
  "ecosystem"
345
263
  ]
346
264
  }
347
265
  },
348
- {
349
- "id": "req-latency",
350
- "type": "requirement",
351
- "label": "Meets the latency budget",
352
- "x": 260,
353
- "y": 1300,
354
- "ears_type": "state-driven",
355
- "precondition": "the service runs at the expected peak of {{PEAK_RPS}} requests per second",
356
- "action": "answer 95% of requests within {{P95_MS}} ms with under 1% errors",
357
- "rationale": "A budget stated as a number is checked on every release candidate; one left implicit is noticed only by users (ISO 25010 performance efficiency: time behaviour)."
358
- },
359
266
  {
360
267
  "id": "req-footprint",
361
268
  "type": "requirement",
362
269
  "label": "Small and quick to start",
363
270
  "x": 260,
364
- "y": 1430,
271
+ "y": 910,
365
272
  "ears_type": "state-driven",
366
- "precondition": "the service runs at the expected peak load",
273
+ "precondition": "the service runs under the load test decided in the Capacity and scaling pack",
367
274
  "action": "use at most {{MEMORY_MB}} MB of memory per instance, and have a new instance ready for traffic within {{STARTUP_SECONDS}} seconds of its start",
368
275
  "rationale": "A stack chosen for performance has to be held to the numbers that justified it: memory sets the cost per instance, start-up time how fast it scales out (ISO 25010 performance efficiency: resource utilisation).",
369
276
  "hubWhen": {
@@ -379,8 +286,8 @@
379
286
  "x": 520,
380
287
  "y": 0,
381
288
  "given": "the service's build files and container images",
382
- "when": "a change brings a base image or build of another runtime",
383
- "then": "the policy check fails until a decision record allows it"
289
+ "when": "a change brings a base image or a build manifest of another runtime",
290
+ "then": "the stack check fails until the manifest is listed in .stack-exceptions with the decision record that allows it"
384
291
  },
385
292
  {
386
293
  "id": "sc-eol",
@@ -392,25 +299,15 @@
392
299
  "when": "the version check runs",
393
300
  "then": "it fails naming the version and its end-of-support date"
394
301
  },
395
- {
396
- "id": "sc-patch",
397
- "type": "scenario",
398
- "label": "Fix deployed in time",
399
- "x": 520,
400
- "y": 260,
401
- "given": "a dependency in use with a newly published critical vulnerability",
402
- "when": "{{PATCH_DAYS}} days have passed",
403
- "then": "production runs a fixed version, or a dated exception with its mitigation is recorded"
404
- },
405
302
  {
406
303
  "id": "sc-lts",
407
304
  "type": "scenario",
408
305
  "label": "LTS upgrade on time",
409
306
  "x": 520,
410
- "y": 390,
307
+ "y": 260,
411
308
  "given": "a new LTS release of the runtime",
412
309
  "when": "6 months have passed since its release",
413
- "then": "the service runs on it in production",
310
+ "then": "the service runs on it in production, and the version check fails otherwise",
414
311
  "hubWhen": {
415
312
  "UPGRADE": [
416
313
  "lts"
@@ -420,10 +317,10 @@
420
317
  {
421
318
  "id": "sc-n1",
422
319
  "type": "scenario",
423
- "label": "Two majors behind refused",
320
+ "label": "Two releases behind refused",
424
321
  "x": 520,
425
- "y": 520,
426
- "given": "a framework whose latest major is N",
322
+ "y": 390,
323
+ "given": "a framework whose latest release cycle is N",
427
324
  "when": "the service still runs on N-2",
428
325
  "then": "the version check fails",
429
326
  "hubWhen": {
@@ -437,56 +334,25 @@
437
334
  "type": "scenario",
438
335
  "label": "Release adopted in 30 days",
439
336
  "x": 520,
440
- "y": 650,
441
- "given": "a new release of the main framework",
337
+ "y": 520,
338
+ "given": "a new release cycle of the main framework",
442
339
  "when": "30 days have passed",
443
- "then": "the service runs on it in production",
340
+ "then": "the service runs on it in production, and the version check fails otherwise",
444
341
  "hubWhen": {
445
342
  "UPGRADE": [
446
343
  "latest"
447
344
  ]
448
345
  }
449
346
  },
450
- {
451
- "id": "sc-update-prs",
452
- "type": "scenario",
453
- "label": "Update proposed and merged",
454
- "x": 520,
455
- "y": 780,
456
- "given": "a new patch version of a dependency",
457
- "when": "it is published",
458
- "then": "within 7 days a pull request updates it and merges itself once the tests pass",
459
- "hubWhen": {
460
- "UPDATES": [
461
- "renovate",
462
- "dependabot"
463
- ]
464
- }
465
- },
466
- {
467
- "id": "sc-quarterly",
468
- "type": "scenario",
469
- "label": "Drift cleared each quarter",
470
- "x": 520,
471
- "y": 910,
472
- "given": "the service's dependencies at the end of a quarter",
473
- "when": "the drift report runs",
474
- "then": "no direct dependency is more than one major version behind",
475
- "hubWhen": {
476
- "UPDATES": [
477
- "manual"
478
- ]
479
- }
480
- },
481
347
  {
482
348
  "id": "sc-skills",
483
349
  "type": "scenario",
484
350
  "label": "Two people can ship",
485
351
  "x": 520,
486
- "y": 1040,
487
- "given": "the owning team",
488
- "when": "its members are reviewed each quarter",
489
- "then": "at least two have merged production changes to the service in the last 12 months",
352
+ "y": 650,
353
+ "given": "the owning team's members and the service's history",
354
+ "when": "the authors of the last 12 months are counted",
355
+ "then": "at least two members of the team merged production changes to the service",
490
356
  "hubWhen": {
491
357
  "CRITERION": [
492
358
  "skills"
@@ -498,35 +364,25 @@
498
364
  "type": "scenario",
499
365
  "label": "Abandoned library flagged",
500
366
  "x": 520,
501
- "y": 1170,
367
+ "y": 780,
502
368
  "given": "a pull request adding a library without a release for two years",
503
- "when": "the dependency review runs",
504
- "then": "it is flagged and cannot merge without a recorded reason",
369
+ "when": "the dependency check runs",
370
+ "then": "it fails and the pull request cannot merge without the dependency-exception label and the reviewer's reason",
505
371
  "hubWhen": {
506
372
  "CRITERION": [
507
373
  "ecosystem"
508
374
  ]
509
375
  }
510
376
  },
511
- {
512
- "id": "sc-latency",
513
- "type": "scenario",
514
- "label": "Peak load within budget",
515
- "x": 520,
516
- "y": 1300,
517
- "given": "the service deployed in a production-like environment",
518
- "when": "a load test runs at {{PEAK_RPS}} requests per second for 10 minutes",
519
- "then": "the 95th percentile stays within {{P95_MS}} ms and errors stay under 1%"
520
- },
521
377
  {
522
378
  "id": "sc-footprint",
523
379
  "type": "scenario",
524
380
  "label": "Instance stays within footprint",
525
381
  "x": 520,
526
- "y": 1430,
527
- "given": "the service under the peak-load test",
528
- "when": "a new instance is started and the test runs for 10 minutes",
529
- "then": "it is ready within {{STARTUP_SECONDS}} seconds and stays under {{MEMORY_MB}} MB",
382
+ "y": 910,
383
+ "given": "a release candidate's image",
384
+ "when": "one instance is started under a {{MEMORY_MB}} MB limit and the load test runs against it",
385
+ "then": "it is ready within {{STARTUP_SECONDS}} seconds, is not killed for memory, and its peak memory stays under {{MEMORY_MB}} MB",
530
386
  "hubWhen": {
531
387
  "CRITERION": [
532
388
  "performance"
@@ -542,9 +398,9 @@
542
398
  "concern": "backend-stack",
543
399
  "status": "accepted",
544
400
  "date": "",
545
- "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (latency, memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
546
- "decision": "The service runs on the JVM: Java (or Kotlin where the team prefers it) on the newest LTS JDK from a supported distribution (Eclipse Temurin, Amazon Corretto or Microsoft Build of OpenJDK), with Spring Boot as the framework, built with Gradle or Maven. Deciding factor: {{CRITERION}}. Versions: {{RUNTIME}} at {{UPGRADE}}; end of support tracked through endoflife.date (eclipse-temurin, spring-boot). Dependency updates: {{UPDATES}}. Choosing Java or Kotlin: Kotlin for null safety and concise domain code when the team knows it; Java when more people need to read it. Choosing Spring Boot or Quarkus: Spring Boot for the widest ecosystem; Quarkus (or Spring with GraalVM native image) when start-up time and memory matter, e.g. scale-to-zero.",
547
- "consequences": "• The widest choice of enterprise libraries, drivers and SDKs, and many people who know it.\n• Higher memory use and slower start than Go or .NET native AOT, unless native images are used.\n• Spring Boot's major versions follow the JDK baseline; framework and JDK upgrades are planned together.\n• Long-lived LTS releases make the version policy easy to keep.",
401
+ "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
402
+ "decision": "The service runs on the JVM: Java (or Kotlin where the team prefers it) on a JDK release the version policy allows, from a supported distribution (Eclipse Temurin, Amazon Corretto or Microsoft Build of OpenJDK), with Spring Boot as the framework, built with Gradle or Maven. Deciding factor: {{CRITERION}}. Version policy: {{UPGRADE}}; each version replaced at least {{EOL_DAYS}} days before its end of support, tracked through endoflife.date (eclipse-temurin, spring-boot). Footprint budget, held to when performance decides: at most {{MEMORY_MB}} MB per instance at peak, ready within {{STARTUP_SECONDS}} seconds. Dependency updates: as decided in the Dependency hygiene pack. Vulnerable dependencies: as decided in the Software supply chain pack. Latency and load: as decided in the Capacity and scaling pack. Choosing Java or Kotlin: Kotlin for null safety and concise domain code when the team knows it; Java when more people need to read it. Choosing Spring Boot or Quarkus: Spring Boot for the widest ecosystem; Quarkus (or Spring with GraalVM native image) when start-up time and memory matter, e.g. scale-to-zero.",
403
+ "consequences": "• The widest choice of enterprise libraries, drivers and SDKs, and many people who know it.\n• Higher memory use and slower start than Go or .NET native AOT, unless native images are used.\n• Spring Boot's major versions follow the JDK baseline; framework and JDK upgrades are planned together.\n• A new JDK every six months and an LTS every two years: the version policy sets whether that is one upgrade a year or one every two.",
548
404
  "alternatives": "1. .NET: similar maturity and performance, a single vendor stack.\n2. Go: smaller and faster to start, fewer enterprise libraries.\n3. Node.js (TypeScript): one language with the front end, weaker for CPU-heavy work.",
549
405
  "hubWhen": {
550
406
  "RUNTIME": [
@@ -561,9 +417,9 @@
561
417
  "concern": "backend-stack",
562
418
  "status": "accepted",
563
419
  "date": "",
564
- "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (latency, memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
565
- "decision": "The service runs on .NET with C#, on the newest LTS release, with ASP.NET Core (minimal APIs or controllers) and Entity Framework Core or Dapper for data access. Deciding factor: {{CRITERION}}. Versions: {{RUNTIME}} at {{UPGRADE}}; end of support tracked through endoflife.date (dotnet). Dependency updates: {{UPDATES}}. Choosing EF Core or Dapper: EF Core for domain models and migrations; Dapper where queries are hand-tuned. Native AOT only when start-up time matters and every library used supports trimming.",
566
- "consequences": "• One coherent stack (language, web framework, ORM, test tooling) maintained by one vendor, with good performance.\n• LTS releases are supported for three years and come every two years, so the version policy needs an upgrade at least every two to three years.\n• Fewer open-source libraries than the JVM or Node.js for some niches.\n• Strong fit with Azure and Microsoft identity; runs equally on Linux containers.",
420
+ "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
421
+ "decision": "The service runs on .NET with C#, on a release the version policy allows (an LTS every two years, supported three years; an STS in between, supported two), with ASP.NET Core (minimal APIs or controllers) and Entity Framework Core or Dapper for data access. Deciding factor: {{CRITERION}}. Version policy: {{UPGRADE}}; each version replaced at least {{EOL_DAYS}} days before its end of support, tracked through endoflife.date (dotnet). Footprint budget, held to when performance decides: at most {{MEMORY_MB}} MB per instance at peak, ready within {{STARTUP_SECONDS}} seconds. Dependency updates: as decided in the Dependency hygiene pack. Vulnerable dependencies: as decided in the Software supply chain pack. Latency and load: as decided in the Capacity and scaling pack. Choosing EF Core or Dapper: EF Core for domain models and migrations; Dapper where queries are hand-tuned. Native AOT only when start-up time matters and every library used supports trimming.",
422
+ "consequences": "• One coherent stack (language, web framework, ORM, test tooling) maintained by one vendor, with good performance.\n• A release every November: the version policy decides whether every one is adopted or only the LTS ones, every two years.\n• Fewer open-source libraries than the JVM or Node.js for some niches.\n• Strong fit with Azure and Microsoft identity; runs equally on Linux containers.",
567
423
  "alternatives": "1. The JVM with Spring Boot: the widest ecosystem.\n2. Go: smaller and simpler, fewer abstractions.\n3. Node.js (TypeScript): shares the language with the front end.",
568
424
  "hubWhen": {
569
425
  "RUNTIME": [
@@ -580,9 +436,9 @@
580
436
  "concern": "backend-stack",
581
437
  "status": "accepted",
582
438
  "date": "",
583
- "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (latency, memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
584
- "decision": "The service runs on Node.js, on an Active or Maintenance LTS release line (even-numbered majors), written in TypeScript in strict mode, with Fastify or NestJS as the framework (Express only for small services). Deciding factor: {{CRITERION}}. Versions: {{RUNTIME}} at {{UPGRADE}}; the version is pinned in .nvmrc and the base image, end of support tracked through endoflife.date (nodejs). Dependency updates: {{UPDATES}}; lockfile committed, installs with npm ci. Choosing Fastify or NestJS: Fastify for lean APIs and speed; NestJS when the team wants modules and dependency injection in a larger codebase.",
585
- "consequences": "• One language across the front end and back end; types can be shared through generated contracts.\n• Very large package ecosystem, of very uneven quality: dependencies need review and updates more often than elsewhere.\n• Single-threaded event loop: excellent for I/O-bound APIs, poor for CPU-heavy work, which goes to worker threads or another service.\n• Each LTS line is supported for about 30 months, so expect a runtime upgrade at least every year or two.",
439
+ "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
440
+ "decision": "The service runs on Node.js, on a release line the version policy allows (the even-numbered majors become LTS lines), written in TypeScript in strict mode, with Fastify or NestJS as the framework (Express only for small services). Deciding factor: {{CRITERION}}. Version policy: {{UPGRADE}}; the version is pinned in .nvmrc and the base image, replaced at least {{EOL_DAYS}} days before its end of support, tracked through endoflife.date (nodejs). Footprint budget, held to when performance decides: at most {{MEMORY_MB}} MB per instance at peak, ready within {{STARTUP_SECONDS}} seconds. Dependency updates: as decided in the Dependency hygiene pack. Vulnerable dependencies: as decided in the Software supply chain pack. Latency and load: as decided in the Capacity and scaling pack. Choosing Fastify or NestJS: Fastify for lean APIs and speed; NestJS when the team wants modules and dependency injection in a larger codebase.",
441
+ "consequences": "• One language across the front end and back end; types can be shared through generated contracts.\n• Very large package ecosystem, of very uneven quality: dependencies need review and updates more often than elsewhere.\n• Single-threaded event loop: excellent for I/O-bound APIs, poor for CPU-heavy work, which goes to worker threads or another service.\n• A new major every six months and an LTS line every year, each supported about 30 months: the version policy sets the upgrade rhythm.",
586
442
  "alternatives": "1. Go: better for CPU-bound and high-throughput services, a separate language from the front end.\n2. The JVM or .NET: more structure and performance for large business domains.\n3. Deno or Bun: modern runtimes with built-in tooling, younger ecosystems and support policies.",
587
443
  "hubWhen": {
588
444
  "RUNTIME": [
@@ -599,8 +455,8 @@
599
455
  "concern": "backend-stack",
600
456
  "status": "accepted",
601
457
  "date": "",
602
- "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (latency, memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
603
- "decision": "The service is written in Go, on one of the two latest Go releases (the ones the Go team supports), using the standard library's net/http with a thin router (chi or the standard ServeMux) rather than a large framework, sqlc or pgx for data access, and distroless or scratch base images. Deciding factor: {{CRITERION}}. Versions: {{RUNTIME}} at {{UPGRADE}}; the toolchain is pinned in go.mod, end of support tracked through endoflife.date (go). Dependency updates: {{UPDATES}}; govulncheck runs in every build.",
458
+ "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
459
+ "decision": "The service is written in Go, on a release the version policy allows (the Go team supports the two latest releases), using the standard library's net/http with a thin router (chi or the standard ServeMux) rather than a large framework, sqlc or pgx for data access, and distroless or scratch base images. Deciding factor: {{CRITERION}}. Version policy: {{UPGRADE}}; the toolchain is pinned in go.mod, replaced at least {{EOL_DAYS}} days before its end of support, tracked through endoflife.date (go). Footprint budget, held to when performance decides: at most {{MEMORY_MB}} MB per instance at peak, ready within {{STARTUP_SECONDS}} seconds. Dependency updates: as decided in the Dependency hygiene pack. Vulnerable dependencies: as decided in the Software supply chain pack. Latency and load: as decided in the Capacity and scaling pack.",
604
460
  "consequences": "• Small static binaries, start-up in milliseconds, low memory: cheap to run and to scale.\n• Each Go release is supported for about a year, so the toolchain is upgraded every six to twelve months; the Go 1 compatibility promise makes that routine.\n• Fewer high-level libraries (ORMs, enterprise SDKs); more code written by hand.\n• Simple language, fast to learn; less expressive for rich domain models.",
605
461
  "alternatives": "1. The JVM or .NET: richer frameworks for large business domains, heavier to run.\n2. Rust: more control and safety, slower to write and to learn.\n3. Node.js (TypeScript): one language with the front end, weaker under CPU load.",
606
462
  "hubWhen": {
@@ -618,9 +474,9 @@
618
474
  "concern": "backend-stack",
619
475
  "status": "accepted",
620
476
  "date": "",
621
- "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (latency, memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
622
- "decision": "The service is written in Python on a supported 3.x release (bugfix or security phase), with FastAPI (async APIs, Pydantic models) or Django (data-heavy apps with an admin), type-checked with mypy or pyright and linted with Ruff, dependencies locked with uv or Poetry. Deciding factor: {{CRITERION}}. Versions: {{RUNTIME}} at {{UPGRADE}}; the version is pinned in pyproject.toml and the base image, end of support tracked through endoflife.date (python, django). Dependency updates: {{UPDATES}}. Choosing FastAPI or Django: FastAPI for APIs and model serving; Django when the service owns a relational data model and needs an admin and its migrations.",
623
- "consequences": "• Direct access to the data and machine-learning ecosystem (NumPy, pandas, PyTorch, scikit-learn).\n• Slower and more memory-hungry per request than the JVM, .NET or Go; CPU-heavy work goes to native libraries or worker processes.\n• Dynamic typing needs type checking in the build to keep a large codebase safe to change.\n• Each Python release is supported for five years; a new one every October.",
477
+ "context": "This element is a server-side service, and the runtime, language and main framework it is written in will outlive most of the people who chose them. The forces: the team's skills decide how fast and how safely it can work, and hiring follows the choice; the ecosystem decides which libraries, drivers and SDKs exist and are maintained; runtimes and frameworks reach end of support on published dates, after which security fixes stop; performance (memory, start-up time) matters where load or cost is high and rarely elsewhere; every dependency added is code someone else maintains, at their pace; and upgrades put off for years turn into rewrites.",
478
+ "decision": "The service is written in Python on a 3.x release the version policy allows (each supported five years, a new one every October), with FastAPI (async APIs, Pydantic models) or Django (data-heavy apps with an admin), type-checked with mypy or pyright and linted with Ruff, dependencies locked with uv or Poetry. Deciding factor: {{CRITERION}}. Version policy: {{UPGRADE}}; the version is pinned in pyproject.toml and the base image, replaced at least {{EOL_DAYS}} days before its end of support, tracked through endoflife.date (python, django). Footprint budget, held to when performance decides: at most {{MEMORY_MB}} MB per instance at peak, ready within {{STARTUP_SECONDS}} seconds. Dependency updates: as decided in the Dependency hygiene pack. Vulnerable dependencies: as decided in the Software supply chain pack. Latency and load: as decided in the Capacity and scaling pack. Choosing FastAPI or Django: FastAPI for APIs and model serving; Django when the service owns a relational data model and needs an admin and its migrations.",
479
+ "consequences": "• Direct access to the data and machine-learning ecosystem (NumPy, pandas, PyTorch, scikit-learn).\n• Slower and more memory-hungry per request than the JVM, .NET or Go; CPU-heavy work goes to native libraries or worker processes.\n• Dynamic typing needs type checking in the build to keep a large codebase safe to change.\n• A new release every October, each supported five years: the version policy sets how many are skipped.",
624
480
  "alternatives": "1. Go or the JVM for the request-handling service, with Python only where models run.\n2. Node.js (TypeScript): faster for I/O-bound APIs, weaker data ecosystem.\n3. Notebooks deployed as services: quick, but neither testable nor maintainable.",
625
481
  "hubWhen": {
626
482
  "RUNTIME": [
@@ -629,89 +485,192 @@
629
485
  }
630
486
  },
631
487
  {
632
- "id": "ff-eol",
488
+ "id": "ff-only-jvm",
633
489
  "type": "fitness-fn",
634
- "label": "No version near end of support",
490
+ "label": "Only the JVM",
635
491
  "x": 1040,
636
492
  "y": 0,
637
- "category": "operational",
638
- "threshold": "0 runtime, framework or base image versions within {{EOL_DAYS}} days of their end of support",
639
- "description": "A scheduled job and every build look up each version in use on endoflife.date and fail when its end of support is less than {{EOL_DAYS}} days away. The list of products and cycles is read from the build files (.nvmrc, go.mod, pom.xml, global.json, pyproject.toml) or kept next to them.\n\nTool: endoflife.date API (curl and jq)\n\n```bash\n#!/usr/bin/env bash\n# versions.txt: \"<endoflife.date product> <cycle>\", e.g. \"nodejs 22\", \"spring-boot 3.5\", \"python 3.13\"\nset -euo pipefail\nLIMIT=$(( $(date +%s) + {{EOL_DAYS}} * 86400 ))\nfail=0\nwhile read -r product cycle; do\n eol=$(curl -fsS \"https://endoflife.date/api/${product}/${cycle}.json\" | jq -r '.eol')\n [ \"$eol\" = \"false\" ] && continue\n if [ \"$eol\" = \"true\" ] || [ \"$(date -d \"$eol\" +%s)\" -lt \"$LIMIT\" ]; then\n echo \"::error::$product $cycle reaches end of support on $eol\"; fail=1\n fi\ndone < versions.txt\nexit $fail\n```"
493
+ "characteristic": "maintainability",
494
+ "scope": "atomic",
495
+ "cadence": "triggered",
496
+ "trigger": "pull-request",
497
+ "invocation": "automated",
498
+ "description": "A job in every build reads the final stage of each Dockerfile (a stage alias is resolved to its image) and lists the build manifests in the repository; it fails on a final image that is not a JVM image or on a manifest of another runtime (*.csproj, *package.json, *go.mod, *pyproject.toml, *requirements.txt). A manifest a decision record allows is listed in .stack-exceptions with that record's id. Runs on Linux (git, awk, GNU grep).\n\nThreshold: 100% of Dockerfiles end in a stage FROM a JVM image; 0 build manifests of another runtime outside .stack-exceptions\n\nTool: git with awk and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# Only the JVM: the final-stage base images and the build manifests of the repository\nset -euo pipefail\nAPPROVED='^(eclipse-temurin|amazoncorretto|mcr\\.microsoft\\.com/openjdk/jdk|gcr\\.io/distroless/java[0-9]*(-debian[0-9]+)?)(:|@|$)'\nFOREIGN=('*.csproj' '*package.json' '*go.mod' '*pyproject.toml' '*requirements.txt')\nfail=0\nfor df in $(git ls-files -- '*Dockerfile*'); do\n final=$(awk 'toupper($1)==\"FROM\" { img=\"\"; for (i=2;i<=NF;i++) if ($i !~ /^--/) { img=$i; break }\n if (img in alias) img=alias[img]\n for (i=2;i<=NF;i++) if (toupper($i)==\"AS\") alias[$(i+1)]=img\n final=img } END { print final }' \"$df\")\n [[ \"$final\" =~ $APPROVED ]] || { echo \"::error file=$df::final stage FROM $final is not a JVM image (ADR Built on the JVM)\"; fail=1; }\ndone\nforeign=$(git ls-files -- \"${FOREIGN[@]}\" | grep -vxFf <(cat .stack-exceptions 2>/dev/null) || true)\n[ -z \"$foreign\" ] || { echo \"::error::build manifests of another runtime: $(tr '\\n' ' ' <<<\"$foreign\")\"; fail=1; }\nexit $fail\n```",
499
+ "hubWhen": {
500
+ "RUNTIME": [
501
+ "jvm"
502
+ ]
503
+ }
640
504
  },
641
505
  {
642
- "id": "ff-vulns",
506
+ "id": "ff-only-dotnet",
643
507
  "type": "fitness-fn",
644
- "label": "No unpatched high vulnerabilities",
508
+ "label": "Only .NET",
645
509
  "x": 1040,
646
510
  "y": 130,
647
- "category": "operational",
648
- "threshold": "0 high or critical vulnerabilities in the image or dependencies, except entries in .trivyignore whose expiry is at most {{PATCH_DAYS}} days after they were added",
649
- "description": "Trivy scans the built image (runtime, base image and application dependencies) in every build and nightly; a high or critical finding fails it. An exception is a .trivyignore line with an expiry date, so it fails again when the deadline passes.\n\nTool: Trivy\n\n```yaml\n# .github/workflows/scan.yml (job step)\n- uses: aquasecurity/trivy-action@0.28.0\n with:\n image-ref: ${{ env.IMAGE }}\n severity: HIGH,CRITICAL\n ignore-unfixed: true\n exit-code: '1'\n trivyignores: .trivyignore\n# .trivyignore — every exception expires:\n# CVE-2026-12345 exp:2026-11-05 # mitigated by WAF rule 42, fix pending upstream\n```"
511
+ "characteristic": "maintainability",
512
+ "scope": "atomic",
513
+ "cadence": "triggered",
514
+ "trigger": "pull-request",
515
+ "invocation": "automated",
516
+ "description": "A job in every build reads the final stage of each Dockerfile (a stage alias is resolved to its image) and lists the build manifests in the repository; it fails on a final image that is not a .NET image or on a manifest of another runtime (*pom.xml, *build.gradle*, *package.json, *go.mod, *pyproject.toml, *requirements.txt). A manifest a decision record allows is listed in .stack-exceptions with that record's id. Runs on Linux (git, awk, GNU grep).\n\nThreshold: 100% of Dockerfiles end in a stage FROM a .NET image; 0 build manifests of another runtime outside .stack-exceptions\n\nTool: git with awk and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# Only .NET: the final-stage base images and the build manifests of the repository\nset -euo pipefail\nAPPROVED='^(mcr\\.microsoft\\.com/dotnet/(aspnet|runtime|runtime-deps))(:|@|$)'\nFOREIGN=('*pom.xml' '*build.gradle*' '*package.json' '*go.mod' '*pyproject.toml' '*requirements.txt')\nfail=0\nfor df in $(git ls-files -- '*Dockerfile*'); do\n final=$(awk 'toupper($1)==\"FROM\" { img=\"\"; for (i=2;i<=NF;i++) if ($i !~ /^--/) { img=$i; break }\n if (img in alias) img=alias[img]\n for (i=2;i<=NF;i++) if (toupper($i)==\"AS\") alias[$(i+1)]=img\n final=img } END { print final }' \"$df\")\n [[ \"$final\" =~ $APPROVED ]] || { echo \"::error file=$df::final stage FROM $final is not a .NET image (ADR Built on .NET)\"; fail=1; }\ndone\nforeign=$(git ls-files -- \"${FOREIGN[@]}\" | grep -vxFf <(cat .stack-exceptions 2>/dev/null) || true)\n[ -z \"$foreign\" ] || { echo \"::error::build manifests of another runtime: $(tr '\\n' ' ' <<<\"$foreign\")\"; fail=1; }\nexit $fail\n```",
517
+ "hubWhen": {
518
+ "RUNTIME": [
519
+ "dotnet"
520
+ ]
521
+ }
650
522
  },
651
523
  {
652
- "id": "ff-base-image",
524
+ "id": "ff-only-node",
653
525
  "type": "fitness-fn",
654
- "label": "Only the chosen runtime",
526
+ "label": "Only Node.js",
655
527
  "x": 1040,
656
528
  "y": 260,
657
- "category": "structural",
658
- "threshold": "100% of Dockerfile stages start FROM an approved image of the chosen runtime",
659
- "description": "A policy over every Dockerfile fails the build when a stage starts from an image that is not on the approved list; keep only the images of the chosen runtime on it.\n\nTool: Conftest (Open Policy Agent)\n\n```rego\n# policy/dockerfile.rego — conftest test Dockerfile\npackage main\nimport rego.v1\n\napproved := {\n \"eclipse-temurin\", \"mcr.microsoft.com/dotnet/aspnet\", \"node\",\n \"gcr.io/distroless/static-debian12\", \"python\",\n}\n\ndeny contains msg if {\n some instr in input\n instr.Cmd == \"from\"\n image := split(instr.Value[0], \":\")[0]\n not approved[image]\n msg := sprintf(\"%s is not an approved base image (ADR Backend stack)\", [image])\n}\n```"
529
+ "characteristic": "maintainability",
530
+ "scope": "atomic",
531
+ "cadence": "triggered",
532
+ "trigger": "pull-request",
533
+ "invocation": "automated",
534
+ "description": "A job in every build reads the final stage of each Dockerfile (a stage alias is resolved to its image) and lists the build manifests in the repository; it fails on a final image that is not a Node.js image or on a manifest of another runtime (*pom.xml, *build.gradle*, *.csproj, *go.mod, *pyproject.toml, *requirements.txt). A manifest a decision record allows is listed in .stack-exceptions with that record's id. Runs on Linux (git, awk, GNU grep).\n\nThreshold: 100% of Dockerfiles end in a stage FROM a Node.js image; 0 build manifests of another runtime outside .stack-exceptions\n\nTool: git with awk and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# Only Node.js: the final-stage base images and the build manifests of the repository\nset -euo pipefail\nAPPROVED='^(node|cgr\\.dev/chainguard/node|gcr\\.io/distroless/nodejs[0-9]*(-debian[0-9]+)?)(:|@|$)'\nFOREIGN=('*pom.xml' '*build.gradle*' '*.csproj' '*go.mod' '*pyproject.toml' '*requirements.txt')\nfail=0\nfor df in $(git ls-files -- '*Dockerfile*'); do\n final=$(awk 'toupper($1)==\"FROM\" { img=\"\"; for (i=2;i<=NF;i++) if ($i !~ /^--/) { img=$i; break }\n if (img in alias) img=alias[img]\n for (i=2;i<=NF;i++) if (toupper($i)==\"AS\") alias[$(i+1)]=img\n final=img } END { print final }' \"$df\")\n [[ \"$final\" =~ $APPROVED ]] || { echo \"::error file=$df::final stage FROM $final is not a Node.js image (ADR Built on Node.js)\"; fail=1; }\ndone\nforeign=$(git ls-files -- \"${FOREIGN[@]}\" | grep -vxFf <(cat .stack-exceptions 2>/dev/null) || true)\n[ -z \"$foreign\" ] || { echo \"::error::build manifests of another runtime: $(tr '\\n' ' ' <<<\"$foreign\")\"; fail=1; }\nexit $fail\n```",
535
+ "hubWhen": {
536
+ "RUNTIME": [
537
+ "node"
538
+ ]
539
+ }
660
540
  },
661
541
  {
662
- "id": "ff-renovate",
542
+ "id": "ff-only-go",
663
543
  "type": "fitness-fn",
664
- "label": "Renovate keeps versions current",
544
+ "label": "Only Go",
665
545
  "x": 1040,
666
546
  "y": 390,
667
- "category": "process",
668
- "threshold": "Update pull requests opened within 7 days of a release; patches merged automatically on green tests; 0 update pull requests open over 30 days",
669
- "description": "Renovate updates libraries, the runtime version files and base images; patch and minor updates merge automatically when the tests pass, majors wait for review, and the dependency dashboard lists what is pending.\n\nTool: Renovate\n\n```json\n{\n \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n \"extends\": [\"config:recommended\", \":dependencyDashboard\", \"docker:pinDigests\"],\n \"schedule\": [\"before 6am on monday\"],\n \"minimumReleaseAge\": \"3 days\",\n \"vulnerabilityAlerts\": { \"schedule\": [\"at any time\"], \"labels\": [\"security\"] },\n \"packageRules\": [\n { \"matchUpdateTypes\": [\"patch\", \"minor\"], \"matchCurrentVersion\": \"!/^0/\", \"automerge\": true },\n { \"matchUpdateTypes\": [\"major\"], \"labels\": [\"major-update\"] }\n ]\n}\n```",
547
+ "characteristic": "maintainability",
548
+ "scope": "atomic",
549
+ "cadence": "triggered",
550
+ "trigger": "pull-request",
551
+ "invocation": "automated",
552
+ "description": "A job in every build reads the final stage of each Dockerfile (a stage alias is resolved to its image) and lists the build manifests in the repository; it fails on a final image that is not a Go image or on a manifest of another runtime (*pom.xml, *build.gradle*, *.csproj, *package.json, *pyproject.toml, *requirements.txt). A manifest a decision record allows is listed in .stack-exceptions with that record's id. Runs on Linux (git, awk, GNU grep).\n\nThreshold: 100% of Dockerfiles end in a stage FROM a Go image; 0 build manifests of another runtime outside .stack-exceptions\n\nTool: git with awk and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# Only Go: the final-stage base images and the build manifests of the repository\nset -euo pipefail\nAPPROVED='^(scratch|gcr\\.io/distroless/(static|base)(-debian[0-9]+)?|cgr\\.dev/chainguard/static|alpine)(:|@|$)'\nFOREIGN=('*pom.xml' '*build.gradle*' '*.csproj' '*package.json' '*pyproject.toml' '*requirements.txt')\nfail=0\nfor df in $(git ls-files -- '*Dockerfile*'); do\n final=$(awk 'toupper($1)==\"FROM\" { img=\"\"; for (i=2;i<=NF;i++) if ($i !~ /^--/) { img=$i; break }\n if (img in alias) img=alias[img]\n for (i=2;i<=NF;i++) if (toupper($i)==\"AS\") alias[$(i+1)]=img\n final=img } END { print final }' \"$df\")\n [[ \"$final\" =~ $APPROVED ]] || { echo \"::error file=$df::final stage FROM $final is not a Go image (ADR Built on Go)\"; fail=1; }\ndone\nforeign=$(git ls-files -- \"${FOREIGN[@]}\" | grep -vxFf <(cat .stack-exceptions 2>/dev/null) || true)\n[ -z \"$foreign\" ] || { echo \"::error::build manifests of another runtime: $(tr '\\n' ' ' <<<\"$foreign\")\"; fail=1; }\nexit $fail\n```",
670
553
  "hubWhen": {
671
- "UPDATES": [
672
- "renovate"
554
+ "RUNTIME": [
555
+ "go"
673
556
  ]
674
557
  }
675
558
  },
676
559
  {
677
- "id": "ff-dependabot",
560
+ "id": "ff-only-python",
678
561
  "type": "fitness-fn",
679
- "label": "Dependabot keeps versions current",
562
+ "label": "Only Python",
680
563
  "x": 1040,
681
564
  "y": 520,
682
- "category": "process",
683
- "threshold": "Update pull requests opened weekly; patches merged automatically on green tests; 0 update pull requests open over 30 days",
684
- "description": "Dependabot opens weekly update pull requests for the application dependencies, the base image and the workflow actions; a workflow enables auto-merge for patch updates, which merge once the required checks pass.\n\nTool: Dependabot\n\n```yaml\n# .github/dependabot.yml\nversion: 2\nupdates:\n - package-ecosystem: npm # maven, gradle, nuget, gomod, pip, uv...\n directory: /\n schedule: { interval: weekly }\n groups:\n minor-and-patch: { update-types: [minor, patch] }\n - package-ecosystem: docker\n directory: /\n schedule: { interval: weekly }\n - package-ecosystem: github-actions\n directory: /\n schedule: { interval: weekly }\n# auto-merge: a workflow with dependabot/fetch-metadata@v2 runs\n# gh pr merge --auto --squash \"$PR_URL\" when update-type is semver-patch\n```",
565
+ "characteristic": "maintainability",
566
+ "scope": "atomic",
567
+ "cadence": "triggered",
568
+ "trigger": "pull-request",
569
+ "invocation": "automated",
570
+ "description": "A job in every build reads the final stage of each Dockerfile (a stage alias is resolved to its image) and lists the build manifests in the repository; it fails on a final image that is not a Python image or on a manifest of another runtime (*pom.xml, *build.gradle*, *.csproj, *package.json, *go.mod). A manifest a decision record allows is listed in .stack-exceptions with that record's id. Runs on Linux (git, awk, GNU grep).\n\nThreshold: 100% of Dockerfiles end in a stage FROM a Python image; 0 build manifests of another runtime outside .stack-exceptions\n\nTool: git with awk and grep (CI job)\n\n```bash\n#!/usr/bin/env bash\n# Only Python: the final-stage base images and the build manifests of the repository\nset -euo pipefail\nAPPROVED='^(python|cgr\\.dev/chainguard/python|gcr\\.io/distroless/python3(-debian[0-9]+)?)(:|@|$)'\nFOREIGN=('*pom.xml' '*build.gradle*' '*.csproj' '*package.json' '*go.mod')\nfail=0\nfor df in $(git ls-files -- '*Dockerfile*'); do\n final=$(awk 'toupper($1)==\"FROM\" { img=\"\"; for (i=2;i<=NF;i++) if ($i !~ /^--/) { img=$i; break }\n if (img in alias) img=alias[img]\n for (i=2;i<=NF;i++) if (toupper($i)==\"AS\") alias[$(i+1)]=img\n final=img } END { print final }' \"$df\")\n [[ \"$final\" =~ $APPROVED ]] || { echo \"::error file=$df::final stage FROM $final is not a Python image (ADR Built on Python)\"; fail=1; }\ndone\nforeign=$(git ls-files -- \"${FOREIGN[@]}\" | grep -vxFf <(cat .stack-exceptions 2>/dev/null) || true)\n[ -z \"$foreign\" ] || { echo \"::error::build manifests of another runtime: $(tr '\\n' ' ' <<<\"$foreign\")\"; fail=1; }\nexit $fail\n```",
685
571
  "hubWhen": {
686
- "UPDATES": [
687
- "dependabot"
572
+ "RUNTIME": [
573
+ "python"
688
574
  ]
689
575
  }
690
576
  },
691
577
  {
692
- "id": "ff-drift",
578
+ "id": "ff-eol",
693
579
  "type": "fitness-fn",
694
- "label": "Dependency drift report",
580
+ "label": "No version near end of support",
695
581
  "x": 1040,
696
582
  "y": 650,
697
- "category": "process",
698
- "threshold": "0 direct dependencies more than one major version behind at the end of each quarter",
699
- "description": "A scheduled job lists outdated direct dependencies and fails when any is more than one major version behind its latest release. On the JVM, the versions-maven-plugin (display-dependency-updates) or the Gradle versions plugin gives the same list.\n\nTool: npm outdated with jq\n\n```bash\n#!/usr/bin/env bash\n# fails when a direct dependency is two or more majors behind\nbehind=$(npm outdated --json | jq -r '\n to_entries[]\n | select(.value.current != null)\n | select((.value.latest | split(\".\")[0] | tonumber) - (.value.current | split(\".\")[0] | tonumber) >= 2)\n | \"\\(.key) \\(.value.current) -> \\(.value.latest)\"')\n[ -z \"$behind\" ] || { echo \"More than one major behind:\"; echo \"$behind\"; exit 1; }\n```",
583
+ "characteristic": "maintainability",
584
+ "scope": "atomic",
585
+ "cadence": "triggered",
586
+ "trigger": "nightly",
587
+ "invocation": "automated",
588
+ "description": "A scheduled job and every build look up each product and cycle listed in versions.txt on endoflife.date and fail when its end of support is less than {{EOL_DAYS}} days away. versions.txt is kept next to the build files and changed in the same pull request as .nvmrc, go.mod, pom.xml, global.json or pyproject.toml. Runs on Linux (GNU date).\n\nThreshold: 0 runtime, framework or base image versions within {{EOL_DAYS}} days of their end of support\n\nTool: endoflife.date API (curl and jq)\n\n```bash\n#!/usr/bin/env bash\n# versions.txt: \"<endoflife.date product> <cycle>\" per line, e.g. \"nodejs 24\", \"spring-boot 3.5\", \"python 3.13\"\n# runs on Linux (GNU date); curl and jq\nset -euo pipefail\nfail=0\nwhile read -r product cycle; do\n eol=$(curl -fsS \"https://endoflife.date/api/${product}/${cycle}.json\" | jq -r '.eol')\n [ \"$eol\" = \"false\" ] && continue\n if [ \"$eol\" = \"true\" ] || [ \"$(date -d \"$eol\" +%s)\" -lt $(( $(date +%s) + {{EOL_DAYS}} * 86400 )) ]; then\n echo \"::error::$product $cycle reaches end of support on $eol\"; fail=1\n fi\ndone < versions.txt\nexit $fail\n```"
589
+ },
590
+ {
591
+ "id": "ff-upgrade-lts",
592
+ "type": "fitness-fn",
593
+ "label": "On a current LTS",
594
+ "x": 1040,
595
+ "y": 780,
596
+ "characteristic": "maintainability",
597
+ "scope": "atomic",
598
+ "cadence": "triggered",
599
+ "trigger": "nightly",
600
+ "invocation": "automated",
601
+ "description": "A scheduled job reads every product's cycles from endoflife.date: the cycle in use must be marked LTS (already, not from a future date), and the newest LTS cycle must be the one in use or younger than six months. Go and Python have no LTS cycles, so the check fails for them: pick another version policy. Runs on Linux (GNU date).\n\nThreshold: Every cycle in versions.txt is an LTS cycle, and is the newest LTS cycle unless that one was released less than 180 days ago\n\nTool: endoflife.date API (curl and jq)\n\n```bash\n#!/usr/bin/env bash\n# versions.txt: \"<endoflife.date product> <cycle>\" per line, e.g. \"nodejs 24\", \"spring-boot 3.5\", \"python 3.13\"\n# runs on Linux (GNU date); curl and jq\nset -euo pipefail\nfail=0\nwhile read -r product cycle; do\n all=$(curl -fsS \"https://endoflife.date/api/${product}.json\")\n today=$(date +%F)\n jq -e --arg c \"$cycle\" --arg today \"$today\" \\\n '.[] | select((.cycle|tostring) == $c) | .lts == true or ((.lts|type) == \"string\" and .lts <= $today)' <<<\"$all\" >/dev/null \\\n || { echo \"::error::$product $cycle is not an LTS cycle\"; fail=1; continue; }\n read -r newest released < <(jq -r --arg today \"$today\" \\\n '[.[] | select(.lts == true or ((.lts|type) == \"string\" and .lts <= $today))][0] | \"\\(.cycle) \\(.releaseDate)\"' <<<\"$all\")\n if [ \"$newest\" != \"$cycle\" ] && [ \"$(date -d \"$released\" +%s)\" -lt \"$(date -d '180 days ago' +%s)\" ]; then\n echo \"::error::$product $cycle: LTS $newest has been out since $released (6 months allowed)\"; fail=1\n fi\ndone < versions.txt\nexit $fail\n```",
602
+ "hubWhen": {
603
+ "UPGRADE": [
604
+ "lts"
605
+ ]
606
+ }
607
+ },
608
+ {
609
+ "id": "ff-upgrade-n1",
610
+ "type": "fitness-fn",
611
+ "label": "At most one cycle behind",
612
+ "x": 1040,
613
+ "y": 910,
614
+ "characteristic": "maintainability",
615
+ "scope": "atomic",
616
+ "cadence": "triggered",
617
+ "trigger": "nightly",
618
+ "invocation": "automated",
619
+ "description": "A scheduled job reads every product's cycles from endoflife.date (newest first) and fails when the cycle in use is not among the first two.\n\nThreshold: Every cycle in versions.txt is the newest or the second-newest cycle endoflife.date lists for its product\n\nTool: endoflife.date API (curl and jq)\n\n```bash\n#!/usr/bin/env bash\n# versions.txt: \"<endoflife.date product> <cycle>\" per line, e.g. \"nodejs 24\", \"spring-boot 3.5\", \"python 3.13\"\n# runs on Linux (GNU date); curl and jq\nset -euo pipefail\nfail=0\nwhile read -r product cycle; do\n idx=$(curl -fsS \"https://endoflife.date/api/${product}.json\" | jq --arg c \"$cycle\" 'map(.cycle|tostring) | index($c)')\n if [ \"$idx\" = null ] || [ \"$idx\" -gt 1 ]; then\n echo \"::error::$product $cycle is more than one release cycle behind the latest\"; fail=1\n fi\ndone < versions.txt\nexit $fail\n```",
620
+ "hubWhen": {
621
+ "UPGRADE": [
622
+ "n1"
623
+ ]
624
+ }
625
+ },
626
+ {
627
+ "id": "ff-upgrade-latest",
628
+ "type": "fitness-fn",
629
+ "label": "On the latest cycle",
630
+ "x": 1040,
631
+ "y": 1040,
632
+ "characteristic": "maintainability",
633
+ "scope": "atomic",
634
+ "cadence": "triggered",
635
+ "trigger": "nightly",
636
+ "invocation": "automated",
637
+ "description": "A scheduled job reads every product's newest cycle and its release date from endoflife.date and fails when the cycle in use is older and the newest has been out for 30 days or more. Runs on Linux (GNU date).\n\nThreshold: Every cycle in versions.txt is the newest cycle endoflife.date lists for its product, unless that one was released less than 30 days ago\n\nTool: endoflife.date API (curl and jq)\n\n```bash\n#!/usr/bin/env bash\n# versions.txt: \"<endoflife.date product> <cycle>\" per line, e.g. \"nodejs 24\", \"spring-boot 3.5\", \"python 3.13\"\n# runs on Linux (GNU date); curl and jq\nset -euo pipefail\nfail=0\nwhile read -r product cycle; do\n read -r newest released < <(curl -fsS \"https://endoflife.date/api/${product}.json\" | jq -r '.[0] | \"\\(.cycle) \\(.releaseDate)\"')\n if [ \"$newest\" != \"$cycle\" ] && [ \"$(date -d \"$released\" +%s)\" -lt \"$(date -d '30 days ago' +%s)\" ]; then\n echo \"::error::$product $cycle: $newest released on $released (30 days allowed)\"; fail=1\n fi\ndone < versions.txt\nexit $fail\n```",
700
638
  "hubWhen": {
701
- "UPDATES": [
702
- "manual"
639
+ "UPGRADE": [
640
+ "latest"
641
+ ]
642
+ }
643
+ },
644
+ {
645
+ "id": "ff-skills",
646
+ "type": "fitness-fn",
647
+ "label": "Two of the team ship",
648
+ "x": 1040,
649
+ "y": 1170,
650
+ "characteristic": "maintainability",
651
+ "scope": "atomic",
652
+ "cadence": "triggered",
653
+ "trigger": "weekly",
654
+ "invocation": "automated",
655
+ "description": "A scheduled job counts the distinct authors of the last 12 months of commits on the service's path and keeps those whose e-mail address is in team.txt, the owning team's list kept next to CODEOWNERS; fewer than two fails. Needs the full history (fetch-depth 0).\n\nThreshold: At least 2 members of the owning team (team.txt) authored non-merge commits to the service in the last 12 months\n\nTool: git log (scheduled job)\n\n```bash\n#!/usr/bin/env bash\n# team.txt: one e-mail address of the owning team per line, kept next to CODEOWNERS\nset -euo pipefail\nn=$(git log --since='12 months ago' --no-merges --format=%ae -- . | sort -u | grep -cxFf team.txt || true)\n[ \"$n\" -ge 2 ] || { echo \"::error::only $n of the owning team merged a change to the service in 12 months (2 needed)\"; exit 1; }\n```",
656
+ "hubWhen": {
657
+ "CRITERION": [
658
+ "skills"
703
659
  ]
704
660
  }
705
661
  },
706
662
  {
707
663
  "id": "ff-dep-review",
708
664
  "type": "fitness-fn",
709
- "label": "New dependencies reviewed",
665
+ "label": "New dependencies maintained",
710
666
  "x": 1040,
711
- "y": 780,
712
- "category": "process",
713
- "threshold": "Every new direct dependency shows its OpenSSF Scorecard in the pull request; scores below 5 and high-severity advisories fail the check",
714
- "description": "GitHub's dependency review action runs on every pull request that changes a manifest: it fails on known vulnerable versions and shows each new dependency's OpenSSF Scorecard, warning below the level set.\n\nTool: GitHub dependency-review-action with OpenSSF Scorecard\n\n```yaml\n# .github/workflows/dependency-review.yml\nname: dependency review\non: [pull_request]\njobs:\n review:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/dependency-review-action@v4\n with:\n fail-on-severity: high\n show-openssf-scorecard: true\n warn-on-openssf-scorecard-level: 5\n```",
667
+ "y": 1300,
668
+ "characteristic": "maintainability",
669
+ "scope": "atomic",
670
+ "cadence": "triggered",
671
+ "trigger": "pull-request",
672
+ "invocation": "automated",
673
+ "description": "The pipeline runs the script for each direct dependency the pull request adds to the manifest (name from the manifest diff): deps.dev gives the package's newest publication date and its source repository's Scorecard, for npm, PyPI, Maven, Go and NuGet alike. A failing dependency passes only with the label dependency-exception, which the reviewer adds with the reason in the review. Runs on Linux (GNU date).\n\nThreshold: Every direct dependency a pull request adds had a release within 365 days and has an OpenSSF Scorecard of at least 5, or the pull request carries the label dependency-exception\n\nTool: deps.dev API (curl and jq) with the GitHub CLI\n\n```bash\n#!/usr/bin/env bash\n# check-dependency.sh <system> <package>: system is npm, pypi, maven (group:artifact), go or nuget\nset -euo pipefail\nsystem=$1; name=$(jq -rn --arg n \"$2\" '$n | @uri')\npkg=$(curl -fsS \"https://api.deps.dev/v3/systems/${system}/packages/${name}\")\nnewest=$(jq -r '[.versions[].publishedAt] | max' <<<\"$pkg\")\nversion=$(jq -r '.versions[] | select(.isDefault) | .versionKey.version' <<<\"$pkg\")\nproject=$(curl -fsS \"https://api.deps.dev/v3/systems/${system}/packages/${name}/versions/${version}\" \\\n | jq -r '[.relatedProjects[] | select(.relationType == \"SOURCE_REPO\")][0].projectKey.id // empty')\nscore=0\n[ -z \"$project\" ] || score=$(curl -fsS \"https://api.deps.dev/v3/projects/$(jq -rn --arg p \"$project\" '$p | @uri')\" | jq -r '.scorecard.overallScore // 0')\nfail=0\n[ \"$(date -d \"$newest\" +%s)\" -ge \"$(date -d '365 days ago' +%s)\" ] || { echo \"::error::$2: newest release $newest, more than 12 months ago\"; fail=1; }\n[ \"$(jq -n \"$score >= 5\")\" = true ] || { echo \"::error::$2: OpenSSF Scorecard $score (5 needed; project: ${project:-unknown})\"; fail=1; }\nif [ \"$fail\" = 1 ] && gh pr view \"$PR_NUMBER\" --json labels -q '.labels[].name' | grep -qx dependency-exception; then\n echo \"accepted: the pull request carries dependency-exception with the reviewer's reason\"; fail=0\nfi\nexit $fail\n```",
715
674
  "hubWhen": {
716
675
  "CRITERION": [
717
676
  "ecosystem"
@@ -719,14 +678,22 @@
719
678
  }
720
679
  },
721
680
  {
722
- "id": "ff-load",
681
+ "id": "ff-footprint",
723
682
  "type": "fitness-fn",
724
- "label": "Latency budget holds",
683
+ "label": "Footprint within budget",
725
684
  "x": 1040,
726
- "y": 910,
727
- "category": "operational",
728
- "threshold": "95th percentile below {{P95_MS}} ms and under 1% errors at {{PEAK_RPS}} requests per second, on every release candidate",
729
- "description": "A k6 load test runs against a production-like environment for each release candidate; its thresholds fail the run when the 95th percentile or the error rate exceeds the target.\n\nTool: Grafana k6\n\n```js\nimport http from 'k6/http'\nimport { check } from 'k6'\n\nexport const options = {\n scenarios: {\n peak: { executor: 'constant-arrival-rate', rate: {{PEAK_RPS}}, timeUnit: '1s', duration: '10m', preAllocatedVUs: 100 },\n },\n thresholds: {\n http_req_duration: ['p(95)<{{P95_MS}}'],\n http_req_failed: ['rate<0.01'],\n },\n}\n\nexport default function () {\n const res = http.get(`${__ENV.BASE_URL}/orders?page=1`)\n check(res, { 'status is 200': (r) => r.status === 200 })\n}\n```"
685
+ "y": 1430,
686
+ "characteristic": "performance-efficiency",
687
+ "scope": "atomic",
688
+ "cadence": "triggered",
689
+ "trigger": "release",
690
+ "invocation": "automated",
691
+ "description": "For each release candidate the job starts one instance of the image under a hard memory limit of {{MEMORY_MB}} MB, polls its readiness endpoint until it answers (failing past {{STARTUP_SECONDS}} seconds), runs the load test the Capacity and scaling pack decided against it, then reads the container's peak memory from cgroup v2 (memory.peak) and whether it was killed for memory. Runs on a Linux host with cgroup v2 (kernel 5.19 or newer).\n\nThreshold: A new instance answers its readiness probe within {{STARTUP_SECONDS}} seconds; under the load test its peak memory stays at or under {{MEMORY_MB}} MB and it is not killed for memory\n\nTool: Docker with curl and jq (release pipeline)\n\n```bash\n#!/usr/bin/env bash\n# IMAGE: the release candidate; LOAD_TEST: the k6 command of the Capacity and scaling pack, run against localhost:8080\nset -euo pipefail\nc=$(docker run -d --memory={{MEMORY_MB}}m -p 8080:8080 \"$IMAGE\")\ntrap 'docker rm -f \"$c\" >/dev/null' EXIT\nstart=$(date +%s)\nuntil curl -fsS localhost:8080/health/ready >/dev/null 2>&1; do\n sleep 1\n [ $(( $(date +%s) - start )) -lt {{STARTUP_SECONDS}} ] || { echo \"not ready within {{STARTUP_SECONDS}} s\"; exit 1; }\ndone\necho \"ready after $(( $(date +%s) - start )) s\"\nbash -c \"$LOAD_TEST\"\npeak=$(docker exec \"$c\" cat /sys/fs/cgroup/memory.peak)\noom=$(docker inspect \"$c\" | jq -r '.[0].State.OOMKilled')\n[ \"$oom\" = false ] && [ \"$peak\" -le $(( {{MEMORY_MB}} * 1024 * 1024 )) ] \\\n || { echo \"peak $(( peak / 1024 / 1024 )) MB of {{MEMORY_MB}} MB, killed for memory: $oom\"; exit 1; }\n```",
692
+ "hubWhen": {
693
+ "CRITERION": [
694
+ "performance"
695
+ ]
696
+ }
730
697
  }
731
698
  ],
732
699
  "relations": [
@@ -742,12 +709,6 @@
742
709
  "targetId": "need",
743
710
  "relationType": "derives"
744
711
  },
745
- {
746
- "id": "req-patch--derives--need",
747
- "sourceId": "req-patch",
748
- "targetId": "need",
749
- "relationType": "derives"
750
- },
751
712
  {
752
713
  "id": "req-lts--derives--need",
753
714
  "sourceId": "req-lts",
@@ -766,18 +727,6 @@
766
727
  "targetId": "need",
767
728
  "relationType": "derives"
768
729
  },
769
- {
770
- "id": "req-update-prs--derives--need",
771
- "sourceId": "req-update-prs",
772
- "targetId": "need",
773
- "relationType": "derives"
774
- },
775
- {
776
- "id": "req-quarterly--derives--need",
777
- "sourceId": "req-quarterly",
778
- "targetId": "need",
779
- "relationType": "derives"
780
- },
781
730
  {
782
731
  "id": "req-skills--derives--need",
783
732
  "sourceId": "req-skills",
@@ -790,12 +739,6 @@
790
739
  "targetId": "need",
791
740
  "relationType": "derives"
792
741
  },
793
- {
794
- "id": "req-latency--derives--need",
795
- "sourceId": "req-latency",
796
- "targetId": "need",
797
- "relationType": "derives"
798
- },
799
742
  {
800
743
  "id": "req-footprint--derives--need",
801
744
  "sourceId": "req-footprint",
@@ -814,12 +757,6 @@
814
757
  "targetId": "req-eol",
815
758
  "relationType": "verifies"
816
759
  },
817
- {
818
- "id": "sc-patch--verifies--req-patch",
819
- "sourceId": "sc-patch",
820
- "targetId": "req-patch",
821
- "relationType": "verifies"
822
- },
823
760
  {
824
761
  "id": "sc-lts--verifies--req-lts",
825
762
  "sourceId": "sc-lts",
@@ -838,18 +775,6 @@
838
775
  "targetId": "req-latest",
839
776
  "relationType": "verifies"
840
777
  },
841
- {
842
- "id": "sc-update-prs--verifies--req-update-prs",
843
- "sourceId": "sc-update-prs",
844
- "targetId": "req-update-prs",
845
- "relationType": "verifies"
846
- },
847
- {
848
- "id": "sc-quarterly--verifies--req-quarterly",
849
- "sourceId": "sc-quarterly",
850
- "targetId": "req-quarterly",
851
- "relationType": "verifies"
852
- },
853
778
  {
854
779
  "id": "sc-skills--verifies--req-skills",
855
780
  "sourceId": "sc-skills",
@@ -862,12 +787,6 @@
862
787
  "targetId": "req-maintained",
863
788
  "relationType": "verifies"
864
789
  },
865
- {
866
- "id": "sc-latency--verifies--req-latency",
867
- "sourceId": "sc-latency",
868
- "targetId": "req-latency",
869
- "relationType": "verifies"
870
- },
871
790
  {
872
791
  "id": "sc-footprint--verifies--req-footprint",
873
792
  "sourceId": "sc-footprint",
@@ -875,182 +794,182 @@
875
794
  "relationType": "verifies"
876
795
  },
877
796
  {
878
- "id": "ff-eol--implements--adr-jvm",
879
- "sourceId": "ff-eol",
797
+ "id": "ff-only-jvm--implements--adr-jvm",
798
+ "sourceId": "ff-only-jvm",
880
799
  "targetId": "adr-jvm",
881
800
  "relationType": "implements"
882
801
  },
883
802
  {
884
- "id": "ff-eol--implements--adr-dotnet",
885
- "sourceId": "ff-eol",
803
+ "id": "ff-only-dotnet--implements--adr-dotnet",
804
+ "sourceId": "ff-only-dotnet",
886
805
  "targetId": "adr-dotnet",
887
806
  "relationType": "implements"
888
807
  },
889
808
  {
890
- "id": "ff-eol--implements--adr-node",
891
- "sourceId": "ff-eol",
809
+ "id": "ff-only-node--implements--adr-node",
810
+ "sourceId": "ff-only-node",
892
811
  "targetId": "adr-node",
893
812
  "relationType": "implements"
894
813
  },
895
814
  {
896
- "id": "ff-eol--implements--adr-go",
897
- "sourceId": "ff-eol",
815
+ "id": "ff-only-go--implements--adr-go",
816
+ "sourceId": "ff-only-go",
898
817
  "targetId": "adr-go",
899
818
  "relationType": "implements"
900
819
  },
901
820
  {
902
- "id": "ff-eol--implements--adr-python",
903
- "sourceId": "ff-eol",
821
+ "id": "ff-only-python--implements--adr-python",
822
+ "sourceId": "ff-only-python",
904
823
  "targetId": "adr-python",
905
824
  "relationType": "implements"
906
825
  },
907
826
  {
908
- "id": "ff-vulns--implements--adr-jvm",
909
- "sourceId": "ff-vulns",
827
+ "id": "ff-eol--implements--adr-jvm",
828
+ "sourceId": "ff-eol",
910
829
  "targetId": "adr-jvm",
911
830
  "relationType": "implements"
912
831
  },
913
832
  {
914
- "id": "ff-vulns--implements--adr-dotnet",
915
- "sourceId": "ff-vulns",
833
+ "id": "ff-eol--implements--adr-dotnet",
834
+ "sourceId": "ff-eol",
916
835
  "targetId": "adr-dotnet",
917
836
  "relationType": "implements"
918
837
  },
919
838
  {
920
- "id": "ff-vulns--implements--adr-node",
921
- "sourceId": "ff-vulns",
839
+ "id": "ff-eol--implements--adr-node",
840
+ "sourceId": "ff-eol",
922
841
  "targetId": "adr-node",
923
842
  "relationType": "implements"
924
843
  },
925
844
  {
926
- "id": "ff-vulns--implements--adr-go",
927
- "sourceId": "ff-vulns",
845
+ "id": "ff-eol--implements--adr-go",
846
+ "sourceId": "ff-eol",
928
847
  "targetId": "adr-go",
929
848
  "relationType": "implements"
930
849
  },
931
850
  {
932
- "id": "ff-vulns--implements--adr-python",
933
- "sourceId": "ff-vulns",
851
+ "id": "ff-eol--implements--adr-python",
852
+ "sourceId": "ff-eol",
934
853
  "targetId": "adr-python",
935
854
  "relationType": "implements"
936
855
  },
937
856
  {
938
- "id": "ff-base-image--implements--adr-jvm",
939
- "sourceId": "ff-base-image",
857
+ "id": "ff-upgrade-lts--implements--adr-jvm",
858
+ "sourceId": "ff-upgrade-lts",
940
859
  "targetId": "adr-jvm",
941
860
  "relationType": "implements"
942
861
  },
943
862
  {
944
- "id": "ff-base-image--implements--adr-dotnet",
945
- "sourceId": "ff-base-image",
863
+ "id": "ff-upgrade-lts--implements--adr-dotnet",
864
+ "sourceId": "ff-upgrade-lts",
946
865
  "targetId": "adr-dotnet",
947
866
  "relationType": "implements"
948
867
  },
949
868
  {
950
- "id": "ff-base-image--implements--adr-node",
951
- "sourceId": "ff-base-image",
869
+ "id": "ff-upgrade-lts--implements--adr-node",
870
+ "sourceId": "ff-upgrade-lts",
952
871
  "targetId": "adr-node",
953
872
  "relationType": "implements"
954
873
  },
955
874
  {
956
- "id": "ff-base-image--implements--adr-go",
957
- "sourceId": "ff-base-image",
875
+ "id": "ff-upgrade-lts--implements--adr-go",
876
+ "sourceId": "ff-upgrade-lts",
958
877
  "targetId": "adr-go",
959
878
  "relationType": "implements"
960
879
  },
961
880
  {
962
- "id": "ff-base-image--implements--adr-python",
963
- "sourceId": "ff-base-image",
881
+ "id": "ff-upgrade-lts--implements--adr-python",
882
+ "sourceId": "ff-upgrade-lts",
964
883
  "targetId": "adr-python",
965
884
  "relationType": "implements"
966
885
  },
967
886
  {
968
- "id": "ff-renovate--implements--adr-jvm",
969
- "sourceId": "ff-renovate",
887
+ "id": "ff-upgrade-n1--implements--adr-jvm",
888
+ "sourceId": "ff-upgrade-n1",
970
889
  "targetId": "adr-jvm",
971
890
  "relationType": "implements"
972
891
  },
973
892
  {
974
- "id": "ff-renovate--implements--adr-dotnet",
975
- "sourceId": "ff-renovate",
893
+ "id": "ff-upgrade-n1--implements--adr-dotnet",
894
+ "sourceId": "ff-upgrade-n1",
976
895
  "targetId": "adr-dotnet",
977
896
  "relationType": "implements"
978
897
  },
979
898
  {
980
- "id": "ff-renovate--implements--adr-node",
981
- "sourceId": "ff-renovate",
899
+ "id": "ff-upgrade-n1--implements--adr-node",
900
+ "sourceId": "ff-upgrade-n1",
982
901
  "targetId": "adr-node",
983
902
  "relationType": "implements"
984
903
  },
985
904
  {
986
- "id": "ff-renovate--implements--adr-go",
987
- "sourceId": "ff-renovate",
905
+ "id": "ff-upgrade-n1--implements--adr-go",
906
+ "sourceId": "ff-upgrade-n1",
988
907
  "targetId": "adr-go",
989
908
  "relationType": "implements"
990
909
  },
991
910
  {
992
- "id": "ff-renovate--implements--adr-python",
993
- "sourceId": "ff-renovate",
911
+ "id": "ff-upgrade-n1--implements--adr-python",
912
+ "sourceId": "ff-upgrade-n1",
994
913
  "targetId": "adr-python",
995
914
  "relationType": "implements"
996
915
  },
997
916
  {
998
- "id": "ff-dependabot--implements--adr-jvm",
999
- "sourceId": "ff-dependabot",
917
+ "id": "ff-upgrade-latest--implements--adr-jvm",
918
+ "sourceId": "ff-upgrade-latest",
1000
919
  "targetId": "adr-jvm",
1001
920
  "relationType": "implements"
1002
921
  },
1003
922
  {
1004
- "id": "ff-dependabot--implements--adr-dotnet",
1005
- "sourceId": "ff-dependabot",
923
+ "id": "ff-upgrade-latest--implements--adr-dotnet",
924
+ "sourceId": "ff-upgrade-latest",
1006
925
  "targetId": "adr-dotnet",
1007
926
  "relationType": "implements"
1008
927
  },
1009
928
  {
1010
- "id": "ff-dependabot--implements--adr-node",
1011
- "sourceId": "ff-dependabot",
929
+ "id": "ff-upgrade-latest--implements--adr-node",
930
+ "sourceId": "ff-upgrade-latest",
1012
931
  "targetId": "adr-node",
1013
932
  "relationType": "implements"
1014
933
  },
1015
934
  {
1016
- "id": "ff-dependabot--implements--adr-go",
1017
- "sourceId": "ff-dependabot",
935
+ "id": "ff-upgrade-latest--implements--adr-go",
936
+ "sourceId": "ff-upgrade-latest",
1018
937
  "targetId": "adr-go",
1019
938
  "relationType": "implements"
1020
939
  },
1021
940
  {
1022
- "id": "ff-dependabot--implements--adr-python",
1023
- "sourceId": "ff-dependabot",
941
+ "id": "ff-upgrade-latest--implements--adr-python",
942
+ "sourceId": "ff-upgrade-latest",
1024
943
  "targetId": "adr-python",
1025
944
  "relationType": "implements"
1026
945
  },
1027
946
  {
1028
- "id": "ff-drift--implements--adr-jvm",
1029
- "sourceId": "ff-drift",
947
+ "id": "ff-skills--implements--adr-jvm",
948
+ "sourceId": "ff-skills",
1030
949
  "targetId": "adr-jvm",
1031
950
  "relationType": "implements"
1032
951
  },
1033
952
  {
1034
- "id": "ff-drift--implements--adr-dotnet",
1035
- "sourceId": "ff-drift",
953
+ "id": "ff-skills--implements--adr-dotnet",
954
+ "sourceId": "ff-skills",
1036
955
  "targetId": "adr-dotnet",
1037
956
  "relationType": "implements"
1038
957
  },
1039
958
  {
1040
- "id": "ff-drift--implements--adr-node",
1041
- "sourceId": "ff-drift",
959
+ "id": "ff-skills--implements--adr-node",
960
+ "sourceId": "ff-skills",
1042
961
  "targetId": "adr-node",
1043
962
  "relationType": "implements"
1044
963
  },
1045
964
  {
1046
- "id": "ff-drift--implements--adr-go",
1047
- "sourceId": "ff-drift",
965
+ "id": "ff-skills--implements--adr-go",
966
+ "sourceId": "ff-skills",
1048
967
  "targetId": "adr-go",
1049
968
  "relationType": "implements"
1050
969
  },
1051
970
  {
1052
- "id": "ff-drift--implements--adr-python",
1053
- "sourceId": "ff-drift",
971
+ "id": "ff-skills--implements--adr-python",
972
+ "sourceId": "ff-skills",
1054
973
  "targetId": "adr-python",
1055
974
  "relationType": "implements"
1056
975
  },
@@ -1085,32 +1004,32 @@
1085
1004
  "relationType": "implements"
1086
1005
  },
1087
1006
  {
1088
- "id": "ff-load--implements--adr-jvm",
1089
- "sourceId": "ff-load",
1007
+ "id": "ff-footprint--implements--adr-jvm",
1008
+ "sourceId": "ff-footprint",
1090
1009
  "targetId": "adr-jvm",
1091
1010
  "relationType": "implements"
1092
1011
  },
1093
1012
  {
1094
- "id": "ff-load--implements--adr-dotnet",
1095
- "sourceId": "ff-load",
1013
+ "id": "ff-footprint--implements--adr-dotnet",
1014
+ "sourceId": "ff-footprint",
1096
1015
  "targetId": "adr-dotnet",
1097
1016
  "relationType": "implements"
1098
1017
  },
1099
1018
  {
1100
- "id": "ff-load--implements--adr-node",
1101
- "sourceId": "ff-load",
1019
+ "id": "ff-footprint--implements--adr-node",
1020
+ "sourceId": "ff-footprint",
1102
1021
  "targetId": "adr-node",
1103
1022
  "relationType": "implements"
1104
1023
  },
1105
1024
  {
1106
- "id": "ff-load--implements--adr-go",
1107
- "sourceId": "ff-load",
1025
+ "id": "ff-footprint--implements--adr-go",
1026
+ "sourceId": "ff-footprint",
1108
1027
  "targetId": "adr-go",
1109
1028
  "relationType": "implements"
1110
1029
  },
1111
1030
  {
1112
- "id": "ff-load--implements--adr-python",
1113
- "sourceId": "ff-load",
1031
+ "id": "ff-footprint--implements--adr-python",
1032
+ "sourceId": "ff-footprint",
1114
1033
  "targetId": "adr-python",
1115
1034
  "relationType": "implements"
1116
1035
  }