@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.
Files changed (58) hide show
  1. package/dist/{chunk-Z7THA3L5.js → chunk-2SZDTOYJ.js} +65 -33
  2. package/dist/{elkLayout-TAUBPPVN.js → elkLayout-VYJDCCIT.js} +1 -1
  3. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  4. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  5. package/dist/hub-catalogue/concern/concern-api-evolution.radical +449 -210
  6. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  7. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  8. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  9. package/dist/hub-catalogue/concern/concern-architecture-style.radical +287 -131
  10. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  11. package/dist/hub-catalogue/concern/concern-authentication.radical +247 -37
  12. package/dist/hub-catalogue/concern/concern-authorization.radical +311 -89
  13. package/dist/hub-catalogue/concern/concern-availability.radical +287 -63
  14. package/dist/hub-catalogue/concern/concern-backend-stack.radical +300 -381
  15. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +385 -129
  16. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  17. package/dist/hub-catalogue/concern/concern-capacity.radical +194 -81
  18. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  19. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  20. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  21. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  22. package/dist/hub-catalogue/concern/concern-communication-style.radical +473 -167
  23. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  24. package/dist/hub-catalogue/concern/concern-data-consistency.radical +339 -308
  25. package/dist/hub-catalogue/concern/concern-data-store.radical +480 -158
  26. package/dist/hub-catalogue/concern/concern-decomposition.radical +260 -85
  27. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  28. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  29. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  30. package/dist/hub-catalogue/concern/concern-deployment.radical +343 -92
  31. package/dist/hub-catalogue/concern/concern-encryption.radical +339 -76
  32. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  33. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  34. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +467 -160
  35. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  36. package/dist/hub-catalogue/concern/concern-infrastructure.radical +1300 -268
  37. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +88 -51
  38. package/dist/hub-catalogue/concern/concern-messaging.radical +173 -140
  39. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +162 -159
  40. package/dist/hub-catalogue/concern/concern-observability.radical +224 -275
  41. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  42. package/dist/hub-catalogue/concern/concern-personal-data.radical +637 -122
  43. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  44. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +433 -141
  45. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  46. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  47. package/dist/hub-catalogue/concern/concern-secrets.radical +332 -74
  48. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  49. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  50. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  51. package/dist/hub-catalogue/concern/concern-supply-chain.radical +257 -183
  52. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  53. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  54. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +271 -137
  55. package/dist/hub-catalogue/concern/concern-test-strategy.radical +243 -224
  56. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  57. package/dist/index.js +1001 -230
  58. package/package.json +1 -1
@@ -0,0 +1,1136 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-api-collections",
4
+ "category": "concern",
5
+ "name": "Collections",
6
+ "description": "How an HTTP API returns lists, the same way for every list operation: pages and page sizes, page tokens, filtering, sorting, partial responses and totals. Paths, field casing and methods are decided in the Resource design pack, the error body in the Errors pack. The snippets are for a Node API described in OpenAPI 3.1, checked with Spectral, Vitest with supertest, and k6.",
7
+ "tags": [
8
+ "api",
9
+ "collections",
10
+ "pagination",
11
+ "filtering",
12
+ "sorting",
13
+ "page tokens"
14
+ ],
15
+ "requiredMetamodel": "c4-ddd-governance-builtin",
16
+ "concern": {
17
+ "id": "api-collections",
18
+ "trigger": "LIST RELATIONS WHERE source.type != \"person\" AND target.external != true AND (target.type = \"container\" OR target.type = \"component\")",
19
+ "applyTo": "target",
20
+ "why": "other parts and systems call these elements, so how their APIs return lists has to be decided.",
21
+ "group": "api"
22
+ },
23
+ "sources": [
24
+ {
25
+ "title": "Google AIP-158, Pagination",
26
+ "url": "https://google.aip.dev/158"
27
+ },
28
+ {
29
+ "title": "Google AIP-160, Filtering",
30
+ "url": "https://google.aip.dev/160"
31
+ },
32
+ {
33
+ "title": "Google AIP-132, Standard methods: List (ordering)",
34
+ "url": "https://google.aip.dev/132"
35
+ },
36
+ {
37
+ "title": "Google AIP-157, Partial responses",
38
+ "url": "https://google.aip.dev/157"
39
+ },
40
+ {
41
+ "title": "Microsoft Azure REST API Guidelines, Collections",
42
+ "url": "https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#collections"
43
+ },
44
+ {
45
+ "title": "Zalando RESTful API Guidelines (rules 137, 157, 159, 160, 248, 254)",
46
+ "url": "https://opensource.zalando.com/restful-api-guidelines/"
47
+ },
48
+ {
49
+ "title": "Markus Winand, Use The Index, Luke: Paging Through Results (the seek method)",
50
+ "url": "https://use-the-index-luke.com/sql/partial-results/fetch-next-page"
51
+ },
52
+ {
53
+ "title": "RFC 8288, Web Linking",
54
+ "url": "https://www.rfc-editor.org/rfc/rfc8288"
55
+ },
56
+ {
57
+ "title": "Spectral: custom rulesets and core functions",
58
+ "url": "https://docs.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets"
59
+ }
60
+ ],
61
+ "templateParams": [
62
+ {
63
+ "key": "PAGING",
64
+ "title": "Pagination",
65
+ "label": "How does a caller read a long list page by page?",
66
+ "hint": "This decides most of what follows: what a deep page costs, whether items are skipped or read twice while the collection changes, and whether a caller can jump to a page. How many requests a caller may send is decided in the Rate limiting pack.",
67
+ "defaultValue": "cursor",
68
+ "options": [
69
+ {
70
+ "value": "cursor",
71
+ "label": "an opaque page token over a stable sort",
72
+ "description": "Each response carries next_page_token, an encrypted token saying where the page ended, and the next request sends it back as page_token (Google AIP-158; cursors in Zalando rule 160). A page costs the same at any depth, and items added or removed while a caller reads shift nothing. Pick it for collections that grow without limit (orders, events, logs) and for any public or partner API."
73
+ },
74
+ {
75
+ "value": "offset",
76
+ "label": "offset and limit, with a maximum offset",
77
+ "description": "The caller sends offset and limit, so it can jump to any page and show page numbers; offsets past a cap are refused, because the database reads and throws away every skipped row. Pick it for back-office tables that need page numbers over collections of at most tens of thousands of items, whose callers can live with items shifting between pages while the collection changes."
78
+ },
79
+ {
80
+ "value": "bounded",
81
+ "label": "no pagination, bounded lists only",
82
+ "description": "Every list comes back whole, because the domain caps it (a customer's addresses, an order's lines) and the API refuses to grow it past the cap. Pick it only when no list the API serves can grow without limit; the first collection that can needs this decision superseded."
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "key": "FILTER",
88
+ "title": "Filtering",
89
+ "label": "How does a caller filter a list?",
90
+ "hint": "Every filterable field is an index to keep and a promise to callers. Whatever is chosen here, a parameter or field the operation does not know is refused with 400, never ignored.",
91
+ "defaultValue": "params",
92
+ "options": [
93
+ {
94
+ "value": "params",
95
+ "label": "a query parameter per filterable field",
96
+ "description": "Each filterable field is a documented query parameter of its own: equality (?status=paid), a comma-separated list for any of (?status=paid,shipped), and _after and _before suffixes for time ranges (?created_after=2026-01-01T00:00:00Z). Pick it by default: the OpenAPI document lists every filter, request validation checks it, and generated clients get typed arguments."
97
+ },
98
+ {
99
+ "value": "expression",
100
+ "label": "a filter expression (Google AIP-160)",
101
+ "description": "One filter parameter holds an expression in the AIP-160 grammar (filter=status = \"paid\" AND total > 100), parsed on the server over an allow-list of fields and turned into parameterised SQL. Pick it when callers need OR, NOT and comparisons across several fields, typically reporting or partner APIs. The OData-style filter of the Microsoft guidelines (status eq 'paid') is the same choice for .NET stacks."
102
+ },
103
+ {
104
+ "value": "none",
105
+ "label": "no filtering",
106
+ "description": "Lists take no filter; the path itself is the only selection (/customers/{id}/orders). Pick it for small or bounded lists, or when callers always read a list whole."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "key": "SORT",
112
+ "title": "Sorting",
113
+ "label": "Can a caller choose the order of a list?",
114
+ "hint": "Each order offered needs an index on its fields ending in the id; with page tokens, the token carries the order it was issued for.",
115
+ "defaultValue": "allowlist",
116
+ "options": [
117
+ {
118
+ "value": "allowlist",
119
+ "label": "an order_by parameter over an allow-list of fields",
120
+ "description": "order_by takes a comma-separated list of fields from the operation's allow-list, each optionally followed by desc (Google AIP-132: order_by=total desc), and the id is always added as the last key. Pick it when callers show the list in tables they sort."
121
+ },
122
+ {
123
+ "value": "fixed",
124
+ "label": "one fixed order per list",
125
+ "description": "Each list has one documented order (by default newest first, then by id) and takes no order parameter. Pick it for feeds, logs and lists read by programs that walk them in one order; it needs one index per list."
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "key": "FIELDS",
131
+ "title": "Fields",
132
+ "label": "Can a caller ask for only some fields of each item?",
133
+ "hint": "Partial responses save bandwidth for wide items and mobile clients, at the cost of a response shape that varies with the request.",
134
+ "defaultValue": "full",
135
+ "options": [
136
+ {
137
+ "value": "partial",
138
+ "label": "partial responses through a fields parameter",
139
+ "description": "fields names the field paths to return, comma-separated, with dots for nested fields (fields=status,total,customer.name), as Google AIP-157 field masks and Zalando rule 157 do; the id always comes back. Pick it when items are wide (dozens of fields, embedded objects) and callers such as mobile apps read a few of them."
140
+ },
141
+ {
142
+ "value": "full",
143
+ "label": "the full representation always",
144
+ "description": "Every item comes back whole in every list. Pick it by default: one shape per resource, easy to cache and to type; if items are too wide, make the resource narrower instead."
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "key": "DEFAULT_PAGE_SIZE",
150
+ "label": "How many items does a page hold when the caller names no size?",
151
+ "defaultValue": "50",
152
+ "type": "number"
153
+ },
154
+ {
155
+ "key": "MAX_PAGE_SIZE",
156
+ "label": "What is the largest page a caller may ask for?",
157
+ "defaultValue": "100",
158
+ "type": "number"
159
+ },
160
+ {
161
+ "key": "TOKEN_HOURS",
162
+ "label": "For how many hours does a page token stay valid (page tokens only)?",
163
+ "defaultValue": "72",
164
+ "type": "number"
165
+ },
166
+ {
167
+ "key": "MAX_OFFSET",
168
+ "label": "What is the largest offset accepted (offset and limit only)?",
169
+ "defaultValue": "10000",
170
+ "type": "number"
171
+ },
172
+ {
173
+ "key": "MAX_ITEMS",
174
+ "label": "At most how many items may a bounded list hold (bounded lists only)?",
175
+ "defaultValue": "200",
176
+ "type": "number"
177
+ },
178
+ {
179
+ "key": "DEFAULT_ORDER",
180
+ "label": "In which order are lists returned when the caller names none (the last key unique)?",
181
+ "defaultValue": "created_at desc, id desc"
182
+ },
183
+ {
184
+ "key": "LIST_P95_MS",
185
+ "label": "Within how many milliseconds must 95% of page requests be answered, deep pages included?",
186
+ "defaultValue": "300",
187
+ "type": "number"
188
+ }
189
+ ]
190
+ },
191
+ "nodes": [
192
+ {
193
+ "id": "need",
194
+ "type": "need",
195
+ "label": "Lists stay fast, complete and exact",
196
+ "x": 0,
197
+ "y": 0,
198
+ "kind": "brief",
199
+ "source": "Hub concern pack: Collections",
200
+ "description": "Callers read collections from this element over HTTP, and the collections grow. Every list has to come back in bounded time and size however large its collection gets, show each item once to a caller who reads it page by page, apply exactly the filters and order the caller asked for or refuse the request, and hand out nothing callers could come to depend on by accident, such as ids or offsets inside a page token. The snippets assume the OpenAPI document at api/openapi.yaml, the application exported from src/app with requests validated against that document, page tokens sealed by src/collections/pageToken, and the tests under tests/ with their fixtures in tests/collections (a seeded /orders collection and a walk helper that reads every page of a list). Names are written in snake_case as Google AIP-158 writes them (page_size, page_token, next_page_token, order_by); where the Resource design pack chose camelCase, read pageSize, pageToken, nextPageToken and orderBy."
201
+ },
202
+ {
203
+ "id": "req-paged",
204
+ "type": "requirement",
205
+ "label": "Pages are bounded",
206
+ "x": 260,
207
+ "y": 0,
208
+ "ears_type": "ubiquitous",
209
+ "action": "return at most {{MAX_PAGE_SIZE}} items in one response of every list operation, {{DEFAULT_PAGE_SIZE}} when the caller names no page size, and refuse a page size below 1, above {{MAX_PAGE_SIZE}} or not a whole number with 400",
210
+ "rationale": "A list without a cap works in testing and times out in production; Zalando rule 159 makes pagination a must for that reason. Refusing an oversized page instead of shrinking it keeps the contract exact, as for any parameter the operation cannot serve (Microsoft Azure REST API Guidelines, Collections); Google AIP-158 shrinks it instead, which the decision weighs among its alternatives.",
211
+ "hubWhen": {
212
+ "PAGING": [
213
+ "cursor",
214
+ "offset"
215
+ ]
216
+ }
217
+ },
218
+ {
219
+ "id": "req-token-opaque",
220
+ "type": "requirement",
221
+ "label": "Page tokens reveal nothing",
222
+ "x": 260,
223
+ "y": 130,
224
+ "ears_type": "ubiquitous",
225
+ "action": "issue every page token encrypted and authenticated with AES-256-GCM, so that no item id, sort value or position can be read from it or changed in it",
226
+ "rationale": "Google AIP-158: page tokens must be opaque and must not be user-parseable; Zalando rule 160: a cursor is never inspected or constructed by clients. A readable token becomes an interface callers build on, and an editable one lets a caller page through data it never queried.",
227
+ "hubWhen": {
228
+ "PAGING": [
229
+ "cursor"
230
+ ]
231
+ }
232
+ },
233
+ {
234
+ "id": "req-token-refused",
235
+ "type": "requirement",
236
+ "label": "Bad page tokens refused",
237
+ "x": 260,
238
+ "y": 260,
239
+ "ears_type": "unwanted-behaviour",
240
+ "unwanted_condition": "a request carries a page token that has been altered, was issued by another list operation, or is older than {{TOKEN_HOURS}} hours",
241
+ "action": "refuse it with 400 and tell the caller to start again from the first page",
242
+ "rationale": "Google AIP-158: every other parameter must match the call that issued the token, and tokens may expire some time after they are sent (three days is its rule of thumb). A token taken to another list or kept for days reads a position that no longer means anything.",
243
+ "hubWhen": {
244
+ "PAGING": [
245
+ "cursor"
246
+ ]
247
+ }
248
+ },
249
+ {
250
+ "id": "req-cursor-consistent",
251
+ "type": "requirement",
252
+ "label": "Changes during a read skip nothing",
253
+ "x": 260,
254
+ "y": 390,
255
+ "ears_type": "event-driven",
256
+ "trigger": "items are added to or removed from a collection while a caller reads it page by page with page tokens",
257
+ "action": "return every item that existed throughout the read exactly once",
258
+ "rationale": "A token that holds the last item's sort keys continues after that item wherever it now is, where an offset shifts by every item added or removed before it (Winand, the seek method). The Microsoft guidelines ask to document whether items can be skipped or read twice; with page tokens they cannot.",
259
+ "hubWhen": {
260
+ "PAGING": [
261
+ "cursor"
262
+ ]
263
+ }
264
+ },
265
+ {
266
+ "id": "req-offset-cap",
267
+ "type": "requirement",
268
+ "label": "Deep offsets refused",
269
+ "x": 260,
270
+ "y": 520,
271
+ "ears_type": "unwanted-behaviour",
272
+ "unwanted_condition": "a request asks for an offset greater than {{MAX_OFFSET}}",
273
+ "action": "refuse it with 400 naming the largest offset accepted, before any query runs",
274
+ "rationale": "With OFFSET the database counts every row from the beginning up to the page, so a page costs more the deeper it is (Winand); the cap bounds that cost. Zalando rule 160 prefers cursors for the same reason.",
275
+ "hubWhen": {
276
+ "PAGING": [
277
+ "offset"
278
+ ]
279
+ }
280
+ },
281
+ {
282
+ "id": "req-bounded",
283
+ "type": "requirement",
284
+ "label": "Bounded lists stay bounded",
285
+ "x": 260,
286
+ "y": 650,
287
+ "ears_type": "ubiquitous",
288
+ "action": "return every list whole in one response of at most {{MAX_ITEMS}} items, and refuse with 409 a request that would add an item to a list already holding {{MAX_ITEMS}}",
289
+ "rationale": "Zalando rule 159 asks for pagination to protect the service against overload; a list served without pages is safe only while the domain bounds it, and the bound holds only if it is enforced where items are added.",
290
+ "hubWhen": {
291
+ "PAGING": [
292
+ "bounded"
293
+ ]
294
+ }
295
+ },
296
+ {
297
+ "id": "req-order",
298
+ "type": "requirement",
299
+ "label": "Lists have a total order",
300
+ "x": 260,
301
+ "y": 780,
302
+ "ears_type": "ubiquitous",
303
+ "action": "return the items of every list in a total order, the one the caller asked for or else {{DEFAULT_ORDER}}, always ending in the unique id, so that reading every page of an unchanged collection yields each item exactly once",
304
+ "rationale": "Paging requires a deterministic sort order (Winand): two items with the same creation time can swap places between requests, and then one is read twice and the other never. Google AIP-132 lets an order name several fields, which is how the id is added."
305
+ },
306
+ {
307
+ "id": "req-unknown",
308
+ "type": "requirement",
309
+ "label": "Unknown parameters refused",
310
+ "x": 260,
311
+ "y": 910,
312
+ "ears_type": "unwanted-behaviour",
313
+ "unwanted_condition": "a list request carries a query parameter the operation does not document, or names a filter, sort or field that is not on the operation's allow-list",
314
+ "action": "refuse it with 400 naming that parameter or field, and never answer as if it were absent",
315
+ "rationale": "An ignored parameter hands unfiltered or misordered data to a caller who believes it was applied. The Microsoft guidelines return an error for an unsupported parameter, filter operator and sort field; Google AIP-160 returns INVALID_ARGUMENT for a filter that names a field that does not exist. The body of the error is decided in the Errors pack."
316
+ },
317
+ {
318
+ "id": "req-filter",
319
+ "type": "requirement",
320
+ "label": "Filters apply before paging",
321
+ "x": 260,
322
+ "y": 1040,
323
+ "ears_type": "ubiquitous",
324
+ "action": "apply every filter on the server before paging, so that the pages together hold exactly the items that match, and refuse a filter value that does not fit its field's type with 400",
325
+ "rationale": "A filter applied after paging returns short or empty pages and hides matches behind them. Google AIP-160 refuses values that do not fit the field's type and asks the API to document which fields a filter may name, which the OpenAPI document does.",
326
+ "hubWhen": {
327
+ "FILTER": [
328
+ "params",
329
+ "expression"
330
+ ]
331
+ }
332
+ },
333
+ {
334
+ "id": "req-sort",
335
+ "type": "requirement",
336
+ "label": "Callers choose the order",
337
+ "x": 260,
338
+ "y": 1170,
339
+ "ears_type": "event-driven",
340
+ "trigger": "a caller names in order_by fields from the operation's allow-list, each optionally followed by desc",
341
+ "action": "return the list in that order across every page, with the id as the last key in the direction of the last field named",
342
+ "rationale": "Google AIP-132 defines order_by as a comma-separated list of fields with a desc suffix. The id as the last key makes the order total, and keeping it in the direction of the last field lets a page continue with one row comparison (Winand, the seek method).",
343
+ "hubWhen": {
344
+ "SORT": [
345
+ "allowlist"
346
+ ]
347
+ }
348
+ },
349
+ {
350
+ "id": "req-fields",
351
+ "type": "requirement",
352
+ "label": "Only the fields asked for",
353
+ "x": 260,
354
+ "y": 1300,
355
+ "ears_type": "event-driven",
356
+ "trigger": "a list request names field paths in fields",
357
+ "action": "return only those fields and the id of each item, on every page",
358
+ "rationale": "Wide items cost bandwidth and parsing that a mobile client does not need (Google AIP-157, partial responses; Zalando rule 157).",
359
+ "hubWhen": {
360
+ "FIELDS": [
361
+ "partial"
362
+ ]
363
+ }
364
+ },
365
+ {
366
+ "id": "req-latency",
367
+ "type": "requirement",
368
+ "label": "Deep pages stay fast",
369
+ "x": 260,
370
+ "y": 1430,
371
+ "ears_type": "ubiquitous",
372
+ "action": "answer 95% of requests for a page of {{MAX_PAGE_SIZE}} items within {{LIST_P95_MS}} ms, the deepest pages a caller can reach included",
373
+ "rationale": "OFFSET paging gets slower the further back a caller reads (Winand), and a test of the first page hides it; with page tokens the hundredth page should cost what the first does, which this proves.",
374
+ "hubWhen": {
375
+ "PAGING": [
376
+ "cursor",
377
+ "offset"
378
+ ]
379
+ }
380
+ },
381
+ {
382
+ "id": "sc-paged",
383
+ "type": "scenario",
384
+ "label": "Page size held to its range",
385
+ "x": 520,
386
+ "y": 0,
387
+ "given": "a list operation over a collection of more than {{MAX_PAGE_SIZE}} items",
388
+ "when": "it is called with no page size, with {{MAX_PAGE_SIZE}}, with one more, with 0, with -1 and with a word",
389
+ "then": "the first call returns {{DEFAULT_PAGE_SIZE}} items, the second {{MAX_PAGE_SIZE}}, and the other four are refused with 400",
390
+ "hubWhen": {
391
+ "PAGING": [
392
+ "cursor",
393
+ "offset"
394
+ ]
395
+ }
396
+ },
397
+ {
398
+ "id": "sc-token-opaque",
399
+ "type": "scenario",
400
+ "label": "Token holds nothing readable",
401
+ "x": 520,
402
+ "y": 130,
403
+ "given": "the first page of a list and the token for the next one",
404
+ "when": "the token is decoded from base64url",
405
+ "then": "the id of the page's last item does not appear in it",
406
+ "hubWhen": {
407
+ "PAGING": [
408
+ "cursor"
409
+ ]
410
+ }
411
+ },
412
+ {
413
+ "id": "sc-token-refused",
414
+ "type": "scenario",
415
+ "label": "Altered, foreign and expired tokens refused",
416
+ "x": 520,
417
+ "y": 260,
418
+ "given": "a page token issued by the orders list",
419
+ "when": "it is sent back with one character changed, to the customers list, and backdated past {{TOKEN_HOURS}} hours",
420
+ "then": "each request is refused with 400",
421
+ "hubWhen": {
422
+ "PAGING": [
423
+ "cursor"
424
+ ]
425
+ }
426
+ },
427
+ {
428
+ "id": "sc-cursor-consistent",
429
+ "type": "scenario",
430
+ "label": "Read survives concurrent changes",
431
+ "x": 520,
432
+ "y": 390,
433
+ "given": "a collection of five pages",
434
+ "when": "a caller reads it page by page, and after the second page five items are added and five not yet read are removed",
435
+ "then": "every other item is read exactly once and no item twice",
436
+ "hubWhen": {
437
+ "PAGING": [
438
+ "cursor"
439
+ ]
440
+ }
441
+ },
442
+ {
443
+ "id": "sc-offset-cap",
444
+ "type": "scenario",
445
+ "label": "Offset past the cap refused",
446
+ "x": 520,
447
+ "y": 520,
448
+ "given": "a list operation with offset and limit",
449
+ "when": "it is called with offset {{MAX_OFFSET}} and with offset {{MAX_OFFSET}} plus one",
450
+ "then": "the first is answered and the second refused with 400, its message naming {{MAX_OFFSET}}",
451
+ "hubWhen": {
452
+ "PAGING": [
453
+ "offset"
454
+ ]
455
+ }
456
+ },
457
+ {
458
+ "id": "sc-bounded",
459
+ "type": "scenario",
460
+ "label": "Full list refuses another item",
461
+ "x": 520,
462
+ "y": 650,
463
+ "given": "a list holding {{MAX_ITEMS}} items",
464
+ "when": "one more item is added and the list is read",
465
+ "then": "the addition is refused with 409, and the list returns all {{MAX_ITEMS}} items in one response with no page token",
466
+ "hubWhen": {
467
+ "PAGING": [
468
+ "bounded"
469
+ ]
470
+ }
471
+ },
472
+ {
473
+ "id": "sc-order",
474
+ "type": "scenario",
475
+ "label": "Ties broken by the id",
476
+ "x": 520,
477
+ "y": 780,
478
+ "given": "a collection in which twenty items share one creation time",
479
+ "when": "a caller reads every page in the default order",
480
+ "then": "each item appears exactly once, in the order {{DEFAULT_ORDER}}, and no two neighbours tie"
481
+ },
482
+ {
483
+ "id": "sc-unknown",
484
+ "type": "scenario",
485
+ "label": "Unknown names refused",
486
+ "x": 520,
487
+ "y": 910,
488
+ "given": "a list operation",
489
+ "when": "it is called with an undocumented parameter, an order_by field off its allow-list, a filter on an unknown field and an unknown field in fields",
490
+ "then": "each call is refused with 400 and the error names what it did not know"
491
+ },
492
+ {
493
+ "id": "sc-filter",
494
+ "type": "scenario",
495
+ "label": "Filtered pages hold exactly the matches",
496
+ "x": 520,
497
+ "y": 1040,
498
+ "given": "a seeded collection and a filter on each filterable field",
499
+ "when": "a caller reads every page with the filter, and once with a value of the wrong type",
500
+ "then": "the pages hold exactly the items the filter matches, in order, and the wrong value is refused with 400",
501
+ "hubWhen": {
502
+ "FILTER": [
503
+ "params",
504
+ "expression"
505
+ ]
506
+ }
507
+ },
508
+ {
509
+ "id": "sc-sort",
510
+ "type": "scenario",
511
+ "label": "Sorted both ways across pages",
512
+ "x": 520,
513
+ "y": 1170,
514
+ "given": "each field on the allow-list",
515
+ "when": "the list is read page by page ordered by it ascending and descending",
516
+ "then": "every read is ordered by the field, ties by id in the same direction",
517
+ "hubWhen": {
518
+ "SORT": [
519
+ "allowlist"
520
+ ]
521
+ }
522
+ },
523
+ {
524
+ "id": "sc-fields",
525
+ "type": "scenario",
526
+ "label": "Partial items",
527
+ "x": 520,
528
+ "y": 1300,
529
+ "given": "orders with a dozen fields and an embedded customer",
530
+ "when": "the list is read with fields=status,total,customer.name",
531
+ "then": "each item holds exactly id, status, total and a customer with only its name",
532
+ "hubWhen": {
533
+ "FIELDS": [
534
+ "partial"
535
+ ]
536
+ }
537
+ },
538
+ {
539
+ "id": "sc-latency",
540
+ "type": "scenario",
541
+ "label": "Deep page under load",
542
+ "x": 520,
543
+ "y": 1430,
544
+ "given": "a production-sized collection in a test environment",
545
+ "when": "ten callers request a page a hundred pages deep, or at the largest offset accepted, for two minutes",
546
+ "then": "the 95th percentile of the response times stays below {{LIST_P95_MS}} ms",
547
+ "hubWhen": {
548
+ "PAGING": [
549
+ "cursor",
550
+ "offset"
551
+ ]
552
+ }
553
+ },
554
+ {
555
+ "id": "adr-cursor",
556
+ "type": "adr",
557
+ "label": "Lists paged with opaque page tokens",
558
+ "x": 780,
559
+ "y": 0,
560
+ "concern": "api-collections",
561
+ "status": "accepted",
562
+ "date": "",
563
+ "context": "Callers read lists from this element over HTTP (orders, customers, events), and the collections behind them grow. The forces: a list that returns everything works in testing and times out in production; a deep OFFSET page makes the database read and throw away every row before it, while a cursor cannot jump to page 40; items added or removed while a caller reads shift offset pages, so items are skipped or read twice; an order that is not total (two orders created in the same millisecond) does the same even when nothing changes; every filter and sort field offered is an index to keep and a promise to callers; a parameter the API ignores returns the wrong data to a caller who believes it was applied; and a page token with readable ids or offsets becomes an interface callers build on. Paths, field casing and methods are decided in the Resource design pack, the error body in the Errors pack, and how many requests a caller may send in the Rate limiting pack.",
564
+ "decision": "Every list operation takes page_size (1 to {{MAX_PAGE_SIZE}}, default {{DEFAULT_PAGE_SIZE}}) and page_token, and answers an object { items, next_page_token }, never a bare array, with next_page_token left out on the last page (Google AIP-158; Microsoft guidelines, Collections). The token holds the last item's sort values and id, the operation, a hash of the filter, order and field parameters and its time of issue, sealed with AES-256-GCM (Node crypto, javax.crypto on the JVM) under a key from the secrets store; it is valid for {{TOKEN_HOURS}} hours and refused with 400 when altered, foreign or expired. The next page is read with the seek method, WHERE (created_at, id) < (last created_at, last id) ORDER BY created_at DESC, id DESC LIMIT page_size + 1, over an index on the sort keys and the id; the extra row says whether there is a next page. Default order: {{DEFAULT_ORDER}}. Filtering: {{FILTER}}. Sorting: {{SORT}}. Fields: {{FIELDS}}. No total count is returned (Zalando rule 254; the Microsoft guidelines advise against a count); a caller that needs the number uses a report. Requests are validated against the OpenAPI document (express-openapi-validator in Node, swagger-request-validator on the JVM), so an undocumented parameter or a page size out of range is refused with 400.",
565
+ "consequences": "• Every page costs one index range scan at any depth, and items added or removed during a read shift nothing.\n• No page numbers and no jumping to page 40: a caller reads forward from the first page; a table that needs page numbers needs offset paging or a search engine.\n• Each order offered needs an index on its fields and the id; an order mixing directions (total desc, created_at asc) cannot use one row comparison and needs an expanded WHERE.\n• The sealing key is a secret to rotate; tokens sealed with a retired key are refused and callers start again from the first page.\n• After {{TOKEN_HOURS}} hours a token is refused, so a long export has to finish sooner or start over.\n• Lowering the maximum page size later narrows the contract and is a breaking change, decided in the API evolution pack.",
566
+ "alternatives": "1. Offset and limit: page numbers and jumps, but deep pages cost every skipped row and items shift while the collection changes (Winand).\n2. Readable cursors (base64 of the last id): simpler, but callers decode and build them, and an edited one reads data the caller never queried (Zalando rule 160).\n3. Next-page links in a Link header (RFC 8288) instead of a token in the body: fits hypermedia clients, but generated clients read the body more easily.\n4. Shrinking a too-large page size to the maximum, as Google AIP-158 does: kinder to callers that ask for too much and lets the maximum fall later without a break, but the contract then accepts what it does not serve.",
567
+ "hubWhen": {
568
+ "PAGING": [
569
+ "cursor"
570
+ ]
571
+ }
572
+ },
573
+ {
574
+ "id": "adr-offset",
575
+ "type": "adr",
576
+ "label": "Lists paged with offset and limit",
577
+ "x": 780,
578
+ "y": 130,
579
+ "concern": "api-collections",
580
+ "status": "accepted",
581
+ "date": "",
582
+ "context": "Callers read lists from this element over HTTP (orders, customers, events), and the collections behind them grow. The forces: a list that returns everything works in testing and times out in production; a deep OFFSET page makes the database read and throw away every row before it, while a cursor cannot jump to page 40; items added or removed while a caller reads shift offset pages, so items are skipped or read twice; an order that is not total (two orders created in the same millisecond) does the same even when nothing changes; every filter and sort field offered is an index to keep and a promise to callers; a parameter the API ignores returns the wrong data to a caller who believes it was applied; and a page token with readable ids or offsets becomes an interface callers build on. Paths, field casing and methods are decided in the Resource design pack, the error body in the Errors pack, and how many requests a caller may send in the Rate limiting pack.",
583
+ "decision": "Every list operation takes limit (1 to {{MAX_PAGE_SIZE}}, default {{DEFAULT_PAGE_SIZE}}) and offset (0 to {{MAX_OFFSET}}), the names Zalando rule 137 reserves, and answers an object { items, next_offset }, never a bare array, with next_offset left out on the last page. The query runs ORDER BY the requested order LIMIT limit + 1 OFFSET offset over an index on the sort keys and the id; the extra row says whether there is a next page. An offset above {{MAX_OFFSET}} is refused with 400 naming the cap: a caller that needs to reach further narrows the list with filters. Each list operation's description says that items added or removed during a read can shift between pages (Microsoft guidelines, Collections). Default order: {{DEFAULT_ORDER}}. Filtering: {{FILTER}}. Sorting: {{SORT}}. Fields: {{FIELDS}}. No total count is returned (Zalando rule 254; the Microsoft guidelines advise against a count). Requests are validated against the OpenAPI document (express-openapi-validator in Node, swagger-request-validator on the JVM), so an undocumented parameter, a limit out of range or an offset past the cap is refused with 400.",
584
+ "consequences": "• A caller can jump to any page and show page numbers.\n• The database reads and discards every row before the offset, so a page costs more the deeper it is; the cap bounds that cost and leaves the rest of a long list reachable only through filters.\n• Items added or removed during a read shift the pages, so an item can be read twice or missed: exports and synchronisation must not read these lists.\n• Simple to build with any ORM and any database.\n• Lowering the maximum page size or the cap later narrows the contract and is a breaking change, decided in the API evolution pack.",
585
+ "alternatives": "1. Opaque page tokens: the same cost at every depth and no shifting, but no page numbers.\n2. No cap on the offset: every page reachable, and one request can make the database read a whole table.\n3. A page number and page size instead of offset and limit: the same query and costs, and a page size change moves every page boundary.\n4. Shrinking a too-large limit to the maximum, as Google AIP-158 does: kinder to callers that ask for too much, but the contract then accepts what it does not serve.",
586
+ "hubWhen": {
587
+ "PAGING": [
588
+ "offset"
589
+ ]
590
+ }
591
+ },
592
+ {
593
+ "id": "adr-bounded",
594
+ "type": "adr",
595
+ "label": "Lists served whole, bounded by the domain",
596
+ "x": 780,
597
+ "y": 260,
598
+ "concern": "api-collections",
599
+ "status": "accepted",
600
+ "date": "",
601
+ "context": "Callers read lists from this element over HTTP (orders, customers, events), and the collections behind them grow. The forces: a list that returns everything works in testing and times out in production; a deep OFFSET page makes the database read and throw away every row before it, while a cursor cannot jump to page 40; items added or removed while a caller reads shift offset pages, so items are skipped or read twice; an order that is not total (two orders created in the same millisecond) does the same even when nothing changes; every filter and sort field offered is an index to keep and a promise to callers; a parameter the API ignores returns the wrong data to a caller who believes it was applied; and a page token with readable ids or offsets becomes an interface callers build on. Paths, field casing and methods are decided in the Resource design pack, the error body in the Errors pack, and how many requests a caller may send in the Rate limiting pack. Here every collection the API lists is capped by the domain, so none needs pages yet.",
602
+ "decision": "Every list operation returns the whole list as an object { items }, never a bare array (Microsoft guidelines, Collections). Each listed collection is capped by the domain at {{MAX_ITEMS}} items (a customer's addresses, an order's lines), the cap is declared as maxItems on items in the OpenAPI document, and a request that would add an item past it is refused with 409. A collection that can grow without limit (orders, events, audit records) is not served as a list until this decision is superseded. Default order: {{DEFAULT_ORDER}}. Filtering: {{FILTER}}. Sorting: {{SORT}}. Fields: {{FIELDS}}. Requests are validated against the OpenAPI document (express-openapi-validator in Node, swagger-request-validator on the JVM), so an undocumented parameter is refused with 400.",
603
+ "consequences": "• No paging code in the API or in its callers: every list is one request.\n• The cap is a product rule: it is agreed with the business and shown to users before they meet it.\n• Adding pages later is still a breaking change for callers that never followed a token (the Microsoft guidelines say so of adding paging); the object shape only keeps the response parsable, and the change goes through the API evolution pack.\n• The first collection that can grow without limit needs this decision superseded.",
604
+ "alternatives": "1. Opaque page tokens on every list from the start: nothing to supersede later, at the cost of paging code for lists that never need it.\n2. Lists without a cap: one request returns a whole table the first time it grows.",
605
+ "hubWhen": {
606
+ "PAGING": [
607
+ "bounded"
608
+ ]
609
+ }
610
+ },
611
+ {
612
+ "id": "adr-filter-expression",
613
+ "type": "adr",
614
+ "label": "Lists filtered with AIP-160 expressions",
615
+ "x": 780,
616
+ "y": 390,
617
+ "concern": "api-collections",
618
+ "status": "accepted",
619
+ "date": "",
620
+ "context": "Callers read lists from this element over HTTP (orders, customers, events), and the collections behind them grow. The forces: a list that returns everything works in testing and times out in production; a deep OFFSET page makes the database read and throw away every row before it, while a cursor cannot jump to page 40; items added or removed while a caller reads shift offset pages, so items are skipped or read twice; an order that is not total (two orders created in the same millisecond) does the same even when nothing changes; every filter and sort field offered is an index to keep and a promise to callers; a parameter the API ignores returns the wrong data to a caller who believes it was applied; and a page token with readable ids or offsets becomes an interface callers build on. Paths, field casing and methods are decided in the Resource design pack, the error body in the Errors pack, and how many requests a caller may send in the Rate limiting pack.",
621
+ "decision": "Lists are filtered through one filter parameter holding an expression in the Google AIP-160 grammar: comparisons (=, !=, <, >, <=, >=), AND, OR, NOT and the has operator (:) over the fields on each operation's allow-list, which the parameter's description in the OpenAPI document lists with their types. The server parses the expression with go.einride.tech/aip/filtering in Go, or with a parser generated from the published AIP-160 EBNF grammar (ANTLR on the JVM, Peggy in Node), checks every field against the allow-list and every value against the field's type, and turns it into parameterised SQL; the expression is never concatenated into a query. A field off the list, a value of the wrong type or an unsupported operator is refused with 400. A page token or offset is valid only with the expression it was issued for.",
622
+ "consequences": "• Callers combine conditions (OR, NOT, ranges on several fields) without a new parameter for each.\n• A parser, a type check and a translation to SQL to build and keep; a flaw there reaches the database, so it is tested like any other input handling.\n• Request validation cannot check an expression: the OpenAPI document sees one string, and generated clients get no typed filter arguments.\n• An expression can combine fields no index serves; a field enters the allow-list together with its index.",
623
+ "alternatives": "1. A query parameter per filterable field: typed, documented and validated through the OpenAPI document, but no OR and no NOT.\n2. The OData-style filter of the Microsoft guidelines (status eq 'paid'): the same power, natural on .NET stacks with an OData library, unfamiliar elsewhere.\n3. A search engine (OpenSearch) for free-form queries: full text and facets, at the cost of a second store kept in sync.",
624
+ "hubWhen": {
625
+ "FILTER": [
626
+ "expression"
627
+ ]
628
+ }
629
+ },
630
+ {
631
+ "id": "ff-spectral-cursor",
632
+ "type": "fitness-fn",
633
+ "label": "Every list documents page tokens and a page-size cap",
634
+ "x": 1040,
635
+ "y": 0,
636
+ "characteristic": "compatibility",
637
+ "scope": "atomic",
638
+ "cadence": "triggered",
639
+ "trigger": "pull-request",
640
+ "invocation": "automated",
641
+ "description": "Spectral lints the OpenAPI document in every pull request with two custom rules in .spectral.yaml, with references resolved. A list operation is a GET on a path that does not end in a path parameter; other paths that are not lists (/health here) are added to the pattern. Request validation against the same document then enforces the range at run time.\n\nThreshold: 0 Spectral errors: every list operation in api/openapi.yaml takes page_token and page_size with minimum 1, maximum at most {{MAX_PAGE_SIZE}} and default {{DEFAULT_PAGE_SIZE}}, and answers an object with items and next_page_token\n\nTool: Spectral CLI (@stoplight/spectral-cli 6) in CI: npx @stoplight/spectral-cli lint api/openapi.yaml --fail-severity error\n\n```yaml\nextends: spectral:oas\nrules:\n list-page-parameters:\n description: Every list operation takes page_token, and page_size from 1 to {{MAX_PAGE_SIZE}} with default {{DEFAULT_PAGE_SIZE}}.\n severity: error\n given: $.paths[?(!@property.match(/(\\}|^\\/health)$/))].get\n then:\n field: parameters\n function: schema\n functionOptions:\n schema:\n type: array\n allOf:\n - contains: { required: [name], properties: { name: { const: page_token } } }\n - contains:\n required: [name, schema]\n properties:\n name: { const: page_size }\n schema: { required: [minimum, maximum, default], properties: { minimum: { const: 1 }, maximum: { maximum: {{MAX_PAGE_SIZE}} }, default: { const: {{DEFAULT_PAGE_SIZE}} } } }\n list-page-object:\n description: Every list operation answers an object with items and next_page_token, never a bare array.\n severity: error\n given: $.paths[?(!@property.match(/(\\}|^\\/health)$/))].get\n then: { field: responses.200.content.application/json.schema, function: schema, functionOptions: { schema: { required: [properties], properties: { properties: { required: [items, next_page_token] } } } } }\n```",
642
+ "hubWhen": {
643
+ "PAGING": [
644
+ "cursor"
645
+ ]
646
+ }
647
+ },
648
+ {
649
+ "id": "ff-spectral-offset",
650
+ "type": "fitness-fn",
651
+ "label": "Every list documents limit and a capped offset",
652
+ "x": 1040,
653
+ "y": 130,
654
+ "characteristic": "compatibility",
655
+ "scope": "atomic",
656
+ "cadence": "triggered",
657
+ "trigger": "pull-request",
658
+ "invocation": "automated",
659
+ "description": "Spectral lints the OpenAPI document in every pull request with two custom rules in .spectral.yaml, with references resolved. A list operation is a GET on a path that does not end in a path parameter; other paths that are not lists (/health here) are added to the pattern. Request validation against the same document then refuses a limit or offset out of range with 400.\n\nThreshold: 0 Spectral errors: every list operation in api/openapi.yaml takes limit with minimum 1, maximum at most {{MAX_PAGE_SIZE}} and default {{DEFAULT_PAGE_SIZE}}, and offset with minimum 0 and maximum at most {{MAX_OFFSET}}, and answers an object with items and next_offset\n\nTool: Spectral CLI (@stoplight/spectral-cli 6) in CI: npx @stoplight/spectral-cli lint api/openapi.yaml --fail-severity error\n\n```yaml\nextends: spectral:oas\nrules:\n list-limit-offset:\n description: Every list operation takes limit (1 to {{MAX_PAGE_SIZE}}, default {{DEFAULT_PAGE_SIZE}}) and offset (0 to {{MAX_OFFSET}}).\n severity: error\n given: $.paths[?(!@property.match(/(\\}|^\\/health)$/))].get\n then:\n field: parameters\n function: schema\n functionOptions:\n schema:\n type: array\n allOf:\n - contains:\n required: [name, schema]\n properties:\n name: { const: limit }\n schema: { required: [minimum, maximum, default], properties: { minimum: { const: 1 }, maximum: { maximum: {{MAX_PAGE_SIZE}} }, default: { const: {{DEFAULT_PAGE_SIZE}} } } }\n - contains: { required: [name, schema], properties: { name: { const: offset }, schema: { required: [minimum, maximum], properties: { minimum: { const: 0 }, maximum: { maximum: {{MAX_OFFSET}} } } } } }\n list-page-object:\n description: Every list operation answers an object with items and next_offset, never a bare array.\n severity: error\n given: $.paths[?(!@property.match(/(\\}|^\\/health)$/))].get\n then: { field: responses.200.content.application/json.schema, function: schema, functionOptions: { schema: { required: [properties], properties: { properties: { required: [items, next_offset] } } } } }\n```",
660
+ "hubWhen": {
661
+ "PAGING": [
662
+ "offset"
663
+ ]
664
+ }
665
+ },
666
+ {
667
+ "id": "ff-page-size",
668
+ "type": "fitness-fn",
669
+ "label": "Page size held to its range",
670
+ "x": 1040,
671
+ "y": 260,
672
+ "characteristic": "performance-efficiency",
673
+ "scope": "atomic",
674
+ "cadence": "triggered",
675
+ "trigger": "pull-request",
676
+ "invocation": "automated",
677
+ "description": "An HTTP test against the application calls the orders list with each page size at and around the limits, and with offset and limit also with the offsets at and past the cap. The fixture names the page-size parameter of the decision (page_size with page tokens, limit with offsets).\n\nThreshold: No page size returns {{DEFAULT_PAGE_SIZE}} items, {{MAX_PAGE_SIZE}} returns {{MAX_PAGE_SIZE}}; {{MAX_PAGE_SIZE}} + 1, 0, -1 and a word are refused with 400; with offsets, offset {{MAX_OFFSET}} is answered and {{MAX_OFFSET}} + 1 refused with 400 naming {{MAX_OFFSET}}\n\nTool: Vitest with supertest (or the test runner and HTTP client of your stack: JUnit with MockMvc, xUnit with WebApplicationFactory)\n\n```ts\nimport request from 'supertest'\nimport { beforeAll, expect, it } from 'vitest'\nimport { app } from '../src/app'\nimport { PAGED_BY, SIZE_PARAM, seedOrders } from './collections/fixtures' // SIZE_PARAM: page_size or limit\n\nconst DEFAULT_SIZE = {{DEFAULT_PAGE_SIZE}}\nconst MAX_SIZE = {{MAX_PAGE_SIZE}}\nconst MAX_OFFSET = {{MAX_OFFSET}}\nconst list = (query: Record<string, string | number> = {}) => request(app).get('/orders').query(query)\n\nbeforeAll(() => seedOrders(MAX_SIZE + 10))\n\nit('serves the default size and the maximum, and refuses anything outside 1 to the maximum', async () => {\n expect((await list()).body.items).toHaveLength(DEFAULT_SIZE)\n expect((await list({ [SIZE_PARAM]: MAX_SIZE })).body.items).toHaveLength(MAX_SIZE)\n for (const size of [MAX_SIZE + 1, 0, -1, 'ten']) expect((await list({ [SIZE_PARAM]: size })).status).toBe(400)\n})\n\nit.runIf(PAGED_BY === 'offset')('refuses an offset past the cap, naming it', async () => {\n expect((await list({ offset: MAX_OFFSET })).status).toBe(200)\n const past = await list({ offset: MAX_OFFSET + 1 })\n expect(past.status).toBe(400)\n expect(JSON.stringify(past.body)).toContain(String(MAX_OFFSET))\n})\n```",
678
+ "hubWhen": {
679
+ "PAGING": [
680
+ "cursor",
681
+ "offset"
682
+ ]
683
+ }
684
+ },
685
+ {
686
+ "id": "ff-cursor-tokens",
687
+ "type": "fitness-fn",
688
+ "label": "Page tokens sealed and checked",
689
+ "x": 1040,
690
+ "y": 390,
691
+ "characteristic": "security",
692
+ "scope": "atomic",
693
+ "cadence": "triggered",
694
+ "trigger": "pull-request",
695
+ "invocation": "automated",
696
+ "description": "An HTTP test reads the first page, decodes its token to show it holds no readable id, then sends the token back with one character changed, to the customers list, and resealed with an issue time {{TOKEN_HOURS}} hours and one more in the past, using the same sealing module the list operations use.\n\nThreshold: The last item's id appears 0 times in the decoded token; an altered token, a token sent to another list and a token older than {{TOKEN_HOURS}} hours are each refused with 400\n\nTool: Vitest with supertest, the token module of the application (Node crypto, AES-256-GCM)\n\n```ts\nimport request from 'supertest'\nimport { beforeAll, expect, it } from 'vitest'\nimport { app } from '../src/app'\nimport { openPageToken, sealPageToken } from '../src/collections/pageToken' // AES-256-GCM, as the lists use it\nimport { seedOrders } from './collections/fixtures'\n\nconst TOKEN_HOURS = {{TOKEN_HOURS}}\n\nbeforeAll(() => seedOrders(30))\n\nit('issues tokens that reveal nothing, and refuses altered, foreign and expired ones', async () => {\n const first = await request(app).get('/orders').query({ page_size: 10 })\n const token: string = first.body.next_page_token\n expect(Buffer.from(token, 'base64url').toString('latin1')).not.toContain(first.body.items.at(-1).id)\n const altered = token.slice(0, 20) + (token[20] === 'A' ? 'B' : 'A') + token.slice(21)\n const expired = sealPageToken({ ...openPageToken(token), issuedAt: Date.now() - (TOKEN_HOURS + 1) * 3_600_000 })\n for (const [path, pageToken] of [['/orders', altered], ['/customers', token], ['/orders', expired]]) {\n const res = await request(app).get(path).query({ page_size: 10, page_token: pageToken })\n expect(res.status, `${path} with a bad token`).toBe(400)\n }\n})\n```",
697
+ "hubWhen": {
698
+ "PAGING": [
699
+ "cursor"
700
+ ]
701
+ }
702
+ },
703
+ {
704
+ "id": "ff-cursor-walk",
705
+ "type": "fitness-fn",
706
+ "label": "A read survives concurrent changes",
707
+ "x": 1040,
708
+ "y": 520,
709
+ "characteristic": "functional-suitability",
710
+ "scope": "atomic",
711
+ "cadence": "triggered",
712
+ "trigger": "pull-request",
713
+ "invocation": "automated",
714
+ "description": "An HTTP test reads the orders list page by page with page tokens; after the second page it adds five orders and removes the last five of the list, which have not been read yet, then checks what the read returned against the ids the database held before.\n\nThreshold: While 5 items are added and 5 not yet read are removed during a read of 5 pages, every other item is read exactly once and 0 items twice\n\nTool: Vitest with supertest, with fixtures that write to the test database\n\n```ts\nimport request from 'supertest'\nimport { beforeAll, expect, it } from 'vitest'\nimport { app } from '../src/app'\nimport { createOrders, deleteOrders, orderIds, seedOrders } from './collections/fixtures' // orderIds: in the default order\n\nbeforeAll(() => seedOrders(50))\n\nit('reads every surviving item once while items are added and removed', async () => {\n const before = await orderIds()\n const removed = before.slice(-5) // not read yet when they go\n const read: string[] = []\n let token: string | undefined\n for (let page = 1; page === 1 || token; page++) {\n const { body } = await request(app).get('/orders').query({ page_size: 10, ...(token ? { page_token: token } : {}) })\n read.push(...body.items.map((o: { id: string }) => o.id))\n token = body.next_page_token\n if (page === 2) { await createOrders(5); await deleteOrders(removed) }\n }\n expect(new Set(read).size).toBe(read.length)\n for (const id of before.filter((id) => !removed.includes(id))) expect(read).toContain(id)\n})\n```",
715
+ "hubWhen": {
716
+ "PAGING": [
717
+ "cursor"
718
+ ]
719
+ }
720
+ },
721
+ {
722
+ "id": "ff-order",
723
+ "type": "fitness-fn",
724
+ "label": "Lists read in a total order",
725
+ "x": 1040,
726
+ "y": 650,
727
+ "characteristic": "functional-suitability",
728
+ "scope": "atomic",
729
+ "cadence": "triggered",
730
+ "trigger": "pull-request",
731
+ "invocation": "automated",
732
+ "description": "An HTTP test seeds orders of which twenty share one creation time, reads every page with the walk helper (which follows the pagination of the decision: page tokens, offsets, or the one response of a bounded list), and checks that no item is missing or repeated and that each item comes strictly after the one before it in the default order, so ties are broken.\n\nThreshold: Reading every page of the orders list in the default order returns each seeded item exactly once, and every item comes strictly after its neighbour in the order {{DEFAULT_ORDER}}\n\nTool: Vitest with supertest, through the walk helper in tests/collections\n\n```ts\nimport { beforeAll, expect, it } from 'vitest'\nimport { SEEDED, seedOrders, walk } from './collections/fixtures' // walk: every page, as the decision pages\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Item = Record<string, any>\nconst ORDER = '{{DEFAULT_ORDER}}'.split(',').map((key) => key.trim().split(/\\s+/))\nconst strictlyBefore = (a: Item, b: Item): boolean => {\n for (const [field, direction] of ORDER) {\n if (a[field] === b[field]) continue\n return direction === 'desc' ? a[field] > b[field] : a[field] < b[field]\n }\n return false\n}\n\nbeforeAll(() => seedOrders(SEEDED, { sameCreatedAt: 20 })) // twenty items share one creation time\n\nit('reads each item once, in the default order, with every tie broken', async () => {\n const items: Item[] = await walk('/orders', {})\n expect(items).toHaveLength(SEEDED)\n expect(new Set(items.map((item) => item.id)).size).toBe(SEEDED)\n for (let i = 1; i < items.length; i++) expect(strictlyBefore(items[i - 1], items[i])).toBe(true)\n})\n```"
733
+ },
734
+ {
735
+ "id": "ff-bounded",
736
+ "type": "fitness-fn",
737
+ "label": "Bounded lists refuse to grow",
738
+ "x": 1040,
739
+ "y": 780,
740
+ "characteristic": "performance-efficiency",
741
+ "scope": "atomic",
742
+ "cadence": "triggered",
743
+ "trigger": "pull-request",
744
+ "invocation": "automated",
745
+ "description": "An HTTP test per bounded list fills it to the cap through the API, adds one more and reads the list back. The example is a customer's addresses.\n\nThreshold: A list holding {{MAX_ITEMS}} items refuses one more with 409 and returns all {{MAX_ITEMS}} in one response without a page token; one test per bounded list\n\nTool: Vitest with supertest (or the test runner and HTTP client of your stack)\n\n```ts\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../src/app'\nimport { createCustomer } from './collections/fixtures'\n\nconst MAX_ITEMS = {{MAX_ITEMS}}\n\nit('serves a customer\\'s addresses whole and refuses to grow them past the cap', async () => {\n const customer = await createCustomer()\n const addresses = `/customers/${customer.id}/addresses`\n const add = () => request(app).post(addresses).send({ line1: 'Main Street 1', city: 'Gdansk', country: 'PL' })\n for (let i = 0; i < MAX_ITEMS; i++) expect((await add()).status).toBe(201)\n expect((await add()).status).toBe(409)\n const { body } = await request(app).get(addresses)\n expect(body.items).toHaveLength(MAX_ITEMS)\n expect(body).not.toHaveProperty('next_page_token')\n})\n```",
746
+ "hubWhen": {
747
+ "PAGING": [
748
+ "bounded"
749
+ ]
750
+ }
751
+ },
752
+ {
753
+ "id": "ff-unknown",
754
+ "type": "fitness-fn",
755
+ "label": "Unknown parameters refused",
756
+ "x": 1040,
757
+ "y": 910,
758
+ "characteristic": "compatibility",
759
+ "scope": "atomic",
760
+ "cadence": "triggered",
761
+ "trigger": "pull-request",
762
+ "invocation": "automated",
763
+ "description": "An HTTP test calls the orders list four times with something it does not know. The same four calls hold for every answer: where the pack decided no order_by, filter or fields parameter, the parameter itself is the unknown one.\n\nThreshold: An undocumented parameter, an order_by field off the allow-list, a filter on an unknown field and an unknown field in fields are each refused with 400, the error naming the parameter or field\n\nTool: Vitest with supertest (or the test runner and HTTP client of your stack)\n\n```ts\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../src/app'\n\nit.each([\n { label: 'an undocumented parameter', query: { colour: 'red' }, names: /colour/ },\n { label: 'an order_by field off the allow-list', query: { order_by: 'internal_cost' }, names: /order_by|internal_cost/ },\n { label: 'a filter on an unknown field', query: { filter: 'internal_cost > 1' }, names: /filter|internal_cost/ },\n { label: 'an unknown field in fields', query: { fields: 'internal_cost' }, names: /fields|internal_cost/ },\n])('refuses $label with 400, naming it', async ({ query, names }) => {\n const res = await request(app).get('/orders').query(query)\n expect(res.status).toBe(400)\n expect(JSON.stringify(res.body)).toMatch(names)\n})\n```"
764
+ },
765
+ {
766
+ "id": "ff-filter",
767
+ "type": "fitness-fn",
768
+ "label": "Filters apply before paging",
769
+ "x": 1040,
770
+ "y": 1040,
771
+ "characteristic": "functional-suitability",
772
+ "scope": "atomic",
773
+ "cadence": "triggered",
774
+ "trigger": "pull-request",
775
+ "invocation": "automated",
776
+ "description": "An HTTP test per filterable field reads the whole list, then the list with the filter, and compares the ids; a second call sends a value that does not fit the field. The cases live in the fixtures, one per filterable field of the OpenAPI document, written as the decision filters (a parameter per field, or an AIP-160 expression).\n\nThreshold: For each filterable field, the filtered read across every page returns exactly the matching items of the unfiltered read, in the same order; a value of the wrong type is refused with 400\n\nTool: Vitest with supertest, through the walk helper in tests/collections\n\n```ts\nimport request from 'supertest'\nimport { beforeAll, describe, expect, it } from 'vitest'\nimport { app } from '../src/app'\nimport { FILTER_CASES, SEEDED, seedOrders, walk } from './collections/fixtures'\n// one case per filterable field, for example\n// { field: 'status', query: { status: 'paid' }, invalid: { created_after: 'yesterday' }, matches: (o) => o.status === 'paid' }\n// { field: 'status', query: { filter: 'status = \"paid\"' }, invalid: { filter: 'total > \"many\"' }, matches: (o) => o.status === 'paid' }\n\nbeforeAll(() => seedOrders(SEEDED))\n\ndescribe.each(FILTER_CASES)('filter on $field', ({ query, invalid, matches }) => {\n it('returns exactly the matching items across every page, in order', async () => {\n const all = await walk('/orders', {})\n expect((await walk('/orders', query)).map((o) => o.id)).toEqual(all.filter(matches).map((o) => o.id))\n })\n it('refuses a value that does not fit the field', async () => {\n expect((await request(app).get('/orders').query(invalid)).status).toBe(400)\n })\n})\n```",
777
+ "hubWhen": {
778
+ "FILTER": [
779
+ "params",
780
+ "expression"
781
+ ]
782
+ }
783
+ },
784
+ {
785
+ "id": "ff-sort",
786
+ "type": "fitness-fn",
787
+ "label": "Every allowed order holds across pages",
788
+ "x": 1040,
789
+ "y": 1170,
790
+ "characteristic": "functional-suitability",
791
+ "scope": "atomic",
792
+ "cadence": "triggered",
793
+ "trigger": "pull-request",
794
+ "invocation": "automated",
795
+ "description": "An HTTP test reads the orders list page by page once per allowed field and direction, with twenty orders sharing one creation time so ties occur, and checks each neighbouring pair. The allow-list comes from the fixtures, which read it from the OpenAPI document.\n\nThreshold: For each field on the order_by allow-list, ascending and descending, every item read across all pages comes after its neighbour by the field, ties by id in the same direction\n\nTool: Vitest with supertest, through the walk helper in tests/collections\n\n```ts\nimport { beforeAll, describe, expect, it } from 'vitest'\nimport { SEEDED, SORTABLE, seedOrders, walk } from './collections/fixtures' // SORTABLE: the order_by allow-list\n\nbeforeAll(() => seedOrders(SEEDED, { sameCreatedAt: 20 }))\n\nconst cases = SORTABLE.flatMap((field: string) => [{ field, direction: 'asc' }, { field, direction: 'desc' }])\n\ndescribe.each(cases)('order_by $field $direction', ({ field, direction }) => {\n it('orders every page by the field, ties by id in the same direction', async () => {\n const items = await walk('/orders', { order_by: direction === 'desc' ? `${field} desc` : field })\n for (let i = 1; i < items.length; i++) {\n const [a, b] = direction === 'desc' ? [items[i], items[i - 1]] : [items[i - 1], items[i]]\n expect(a[field] < b[field] || (a[field] === b[field] && a.id < b.id)).toBe(true)\n }\n })\n})\n```",
796
+ "hubWhen": {
797
+ "SORT": [
798
+ "allowlist"
799
+ ]
800
+ }
801
+ },
802
+ {
803
+ "id": "ff-fields",
804
+ "type": "fitness-fn",
805
+ "label": "Partial items hold only what was asked",
806
+ "x": 1040,
807
+ "y": 1300,
808
+ "characteristic": "functional-suitability",
809
+ "scope": "atomic",
810
+ "cadence": "triggered",
811
+ "trigger": "pull-request",
812
+ "invocation": "automated",
813
+ "description": "An HTTP test reads every page of the orders list with a fields parameter that names two top-level fields and one nested field, and checks the keys of each item.\n\nThreshold: With fields=status,total,customer.name, every item on every page holds exactly id, status, total and a customer with only its name\n\nTool: Vitest with supertest, through the walk helper in tests/collections\n\n```ts\nimport { beforeAll, expect, it } from 'vitest'\nimport { SEEDED, seedOrders, walk } from './collections/fixtures'\n\nbeforeAll(() => seedOrders(SEEDED))\n\nit('returns only the named fields and the id, on every page', async () => {\n const items = await walk('/orders', { fields: 'status,total,customer.name' })\n expect(items).toHaveLength(SEEDED)\n for (const item of items) {\n expect(Object.keys(item).sort()).toEqual(['customer', 'id', 'status', 'total'])\n expect(Object.keys(item.customer)).toEqual(['name'])\n }\n})\n```",
814
+ "hubWhen": {
815
+ "FIELDS": [
816
+ "partial"
817
+ ]
818
+ }
819
+ },
820
+ {
821
+ "id": "ff-latency",
822
+ "type": "fitness-fn",
823
+ "label": "Deep pages answered in time",
824
+ "x": 1040,
825
+ "y": 1430,
826
+ "characteristic": "performance-efficiency",
827
+ "scope": "holistic",
828
+ "cadence": "triggered",
829
+ "trigger": "nightly",
830
+ "invocation": "automated",
831
+ "description": "A k6 script run nightly against a test environment with a production-sized collection: its setup finds a page a hundred pages deep by following page tokens (with offsets it takes the largest offset accepted), then ten virtual users request that page for two minutes; the threshold fails the run when the 95th percentile is too slow. Only the deep-page requests are tagged, so the setup does not count.\n\nThreshold: p95 of http_req_duration for the deep page below {{LIST_P95_MS}} ms over 2 minutes with 10 virtual users\n\nTool: k6 (k6 run tests/load/deep-pages.js with BASE_URL and PAGED_BY=token or offset)\n\n```js\nimport http from 'k6/http'\nimport { check } from 'k6'\n\nconst BASE = __ENV.BASE_URL\nconst SIZE = {{MAX_PAGE_SIZE}}\nexport const options = {\n vus: 10,\n duration: '2m',\n thresholds: { 'http_req_duration{page:deep}': ['p(95)<{{LIST_P95_MS}}'] },\n}\n\nexport function setup() {\n if (__ENV.PAGED_BY === 'offset') return { url: `${BASE}/orders?limit=${SIZE}&offset={{MAX_OFFSET}}` }\n let query = `page_size=${SIZE}`\n for (let page = 1; page < 100; page++) query = `page_size=${SIZE}&page_token=${http.get(`${BASE}/orders?${query}`).json('next_page_token')}`\n return { url: `${BASE}/orders?${query}` }\n}\n\nexport default function (data) {\n check(http.get(data.url, { tags: { page: 'deep' } }), { 'deep page served': (r) => r.status === 200 })\n}\n```",
832
+ "hubWhen": {
833
+ "PAGING": [
834
+ "cursor",
835
+ "offset"
836
+ ]
837
+ }
838
+ }
839
+ ],
840
+ "relations": [
841
+ {
842
+ "id": "req-paged--derives--need",
843
+ "sourceId": "req-paged",
844
+ "targetId": "need",
845
+ "relationType": "derives"
846
+ },
847
+ {
848
+ "id": "req-token-opaque--derives--need",
849
+ "sourceId": "req-token-opaque",
850
+ "targetId": "need",
851
+ "relationType": "derives"
852
+ },
853
+ {
854
+ "id": "req-token-refused--derives--need",
855
+ "sourceId": "req-token-refused",
856
+ "targetId": "need",
857
+ "relationType": "derives"
858
+ },
859
+ {
860
+ "id": "req-cursor-consistent--derives--need",
861
+ "sourceId": "req-cursor-consistent",
862
+ "targetId": "need",
863
+ "relationType": "derives"
864
+ },
865
+ {
866
+ "id": "req-offset-cap--derives--need",
867
+ "sourceId": "req-offset-cap",
868
+ "targetId": "need",
869
+ "relationType": "derives"
870
+ },
871
+ {
872
+ "id": "req-bounded--derives--need",
873
+ "sourceId": "req-bounded",
874
+ "targetId": "need",
875
+ "relationType": "derives"
876
+ },
877
+ {
878
+ "id": "req-order--derives--need",
879
+ "sourceId": "req-order",
880
+ "targetId": "need",
881
+ "relationType": "derives"
882
+ },
883
+ {
884
+ "id": "req-unknown--derives--need",
885
+ "sourceId": "req-unknown",
886
+ "targetId": "need",
887
+ "relationType": "derives"
888
+ },
889
+ {
890
+ "id": "req-filter--derives--need",
891
+ "sourceId": "req-filter",
892
+ "targetId": "need",
893
+ "relationType": "derives"
894
+ },
895
+ {
896
+ "id": "req-sort--derives--need",
897
+ "sourceId": "req-sort",
898
+ "targetId": "need",
899
+ "relationType": "derives"
900
+ },
901
+ {
902
+ "id": "req-fields--derives--need",
903
+ "sourceId": "req-fields",
904
+ "targetId": "need",
905
+ "relationType": "derives"
906
+ },
907
+ {
908
+ "id": "req-latency--derives--need",
909
+ "sourceId": "req-latency",
910
+ "targetId": "need",
911
+ "relationType": "derives"
912
+ },
913
+ {
914
+ "id": "sc-paged--verifies--req-paged",
915
+ "sourceId": "sc-paged",
916
+ "targetId": "req-paged",
917
+ "relationType": "verifies"
918
+ },
919
+ {
920
+ "id": "sc-token-opaque--verifies--req-token-opaque",
921
+ "sourceId": "sc-token-opaque",
922
+ "targetId": "req-token-opaque",
923
+ "relationType": "verifies"
924
+ },
925
+ {
926
+ "id": "sc-token-refused--verifies--req-token-refused",
927
+ "sourceId": "sc-token-refused",
928
+ "targetId": "req-token-refused",
929
+ "relationType": "verifies"
930
+ },
931
+ {
932
+ "id": "sc-cursor-consistent--verifies--req-cursor-consistent",
933
+ "sourceId": "sc-cursor-consistent",
934
+ "targetId": "req-cursor-consistent",
935
+ "relationType": "verifies"
936
+ },
937
+ {
938
+ "id": "sc-offset-cap--verifies--req-offset-cap",
939
+ "sourceId": "sc-offset-cap",
940
+ "targetId": "req-offset-cap",
941
+ "relationType": "verifies"
942
+ },
943
+ {
944
+ "id": "sc-bounded--verifies--req-bounded",
945
+ "sourceId": "sc-bounded",
946
+ "targetId": "req-bounded",
947
+ "relationType": "verifies"
948
+ },
949
+ {
950
+ "id": "sc-order--verifies--req-order",
951
+ "sourceId": "sc-order",
952
+ "targetId": "req-order",
953
+ "relationType": "verifies"
954
+ },
955
+ {
956
+ "id": "sc-unknown--verifies--req-unknown",
957
+ "sourceId": "sc-unknown",
958
+ "targetId": "req-unknown",
959
+ "relationType": "verifies"
960
+ },
961
+ {
962
+ "id": "sc-filter--verifies--req-filter",
963
+ "sourceId": "sc-filter",
964
+ "targetId": "req-filter",
965
+ "relationType": "verifies"
966
+ },
967
+ {
968
+ "id": "sc-sort--verifies--req-sort",
969
+ "sourceId": "sc-sort",
970
+ "targetId": "req-sort",
971
+ "relationType": "verifies"
972
+ },
973
+ {
974
+ "id": "sc-fields--verifies--req-fields",
975
+ "sourceId": "sc-fields",
976
+ "targetId": "req-fields",
977
+ "relationType": "verifies"
978
+ },
979
+ {
980
+ "id": "sc-latency--verifies--req-latency",
981
+ "sourceId": "sc-latency",
982
+ "targetId": "req-latency",
983
+ "relationType": "verifies"
984
+ },
985
+ {
986
+ "id": "ff-spectral-cursor--implements--adr-cursor",
987
+ "sourceId": "ff-spectral-cursor",
988
+ "targetId": "adr-cursor",
989
+ "relationType": "implements"
990
+ },
991
+ {
992
+ "id": "ff-spectral-offset--implements--adr-offset",
993
+ "sourceId": "ff-spectral-offset",
994
+ "targetId": "adr-offset",
995
+ "relationType": "implements"
996
+ },
997
+ {
998
+ "id": "ff-page-size--implements--adr-cursor",
999
+ "sourceId": "ff-page-size",
1000
+ "targetId": "adr-cursor",
1001
+ "relationType": "implements"
1002
+ },
1003
+ {
1004
+ "id": "ff-page-size--implements--adr-offset",
1005
+ "sourceId": "ff-page-size",
1006
+ "targetId": "adr-offset",
1007
+ "relationType": "implements"
1008
+ },
1009
+ {
1010
+ "id": "ff-cursor-tokens--implements--adr-cursor",
1011
+ "sourceId": "ff-cursor-tokens",
1012
+ "targetId": "adr-cursor",
1013
+ "relationType": "implements"
1014
+ },
1015
+ {
1016
+ "id": "ff-cursor-walk--implements--adr-cursor",
1017
+ "sourceId": "ff-cursor-walk",
1018
+ "targetId": "adr-cursor",
1019
+ "relationType": "implements"
1020
+ },
1021
+ {
1022
+ "id": "ff-order--implements--adr-cursor",
1023
+ "sourceId": "ff-order",
1024
+ "targetId": "adr-cursor",
1025
+ "relationType": "implements"
1026
+ },
1027
+ {
1028
+ "id": "ff-order--implements--adr-offset",
1029
+ "sourceId": "ff-order",
1030
+ "targetId": "adr-offset",
1031
+ "relationType": "implements"
1032
+ },
1033
+ {
1034
+ "id": "ff-order--implements--adr-bounded",
1035
+ "sourceId": "ff-order",
1036
+ "targetId": "adr-bounded",
1037
+ "relationType": "implements"
1038
+ },
1039
+ {
1040
+ "id": "ff-bounded--implements--adr-bounded",
1041
+ "sourceId": "ff-bounded",
1042
+ "targetId": "adr-bounded",
1043
+ "relationType": "implements"
1044
+ },
1045
+ {
1046
+ "id": "ff-unknown--implements--adr-cursor",
1047
+ "sourceId": "ff-unknown",
1048
+ "targetId": "adr-cursor",
1049
+ "relationType": "implements"
1050
+ },
1051
+ {
1052
+ "id": "ff-unknown--implements--adr-offset",
1053
+ "sourceId": "ff-unknown",
1054
+ "targetId": "adr-offset",
1055
+ "relationType": "implements"
1056
+ },
1057
+ {
1058
+ "id": "ff-unknown--implements--adr-bounded",
1059
+ "sourceId": "ff-unknown",
1060
+ "targetId": "adr-bounded",
1061
+ "relationType": "implements"
1062
+ },
1063
+ {
1064
+ "id": "ff-filter--implements--adr-cursor",
1065
+ "sourceId": "ff-filter",
1066
+ "targetId": "adr-cursor",
1067
+ "relationType": "implements"
1068
+ },
1069
+ {
1070
+ "id": "ff-filter--implements--adr-offset",
1071
+ "sourceId": "ff-filter",
1072
+ "targetId": "adr-offset",
1073
+ "relationType": "implements"
1074
+ },
1075
+ {
1076
+ "id": "ff-filter--implements--adr-bounded",
1077
+ "sourceId": "ff-filter",
1078
+ "targetId": "adr-bounded",
1079
+ "relationType": "implements"
1080
+ },
1081
+ {
1082
+ "id": "ff-filter--implements--adr-filter-expression",
1083
+ "sourceId": "ff-filter",
1084
+ "targetId": "adr-filter-expression",
1085
+ "relationType": "implements"
1086
+ },
1087
+ {
1088
+ "id": "ff-sort--implements--adr-cursor",
1089
+ "sourceId": "ff-sort",
1090
+ "targetId": "adr-cursor",
1091
+ "relationType": "implements"
1092
+ },
1093
+ {
1094
+ "id": "ff-sort--implements--adr-offset",
1095
+ "sourceId": "ff-sort",
1096
+ "targetId": "adr-offset",
1097
+ "relationType": "implements"
1098
+ },
1099
+ {
1100
+ "id": "ff-sort--implements--adr-bounded",
1101
+ "sourceId": "ff-sort",
1102
+ "targetId": "adr-bounded",
1103
+ "relationType": "implements"
1104
+ },
1105
+ {
1106
+ "id": "ff-fields--implements--adr-cursor",
1107
+ "sourceId": "ff-fields",
1108
+ "targetId": "adr-cursor",
1109
+ "relationType": "implements"
1110
+ },
1111
+ {
1112
+ "id": "ff-fields--implements--adr-offset",
1113
+ "sourceId": "ff-fields",
1114
+ "targetId": "adr-offset",
1115
+ "relationType": "implements"
1116
+ },
1117
+ {
1118
+ "id": "ff-fields--implements--adr-bounded",
1119
+ "sourceId": "ff-fields",
1120
+ "targetId": "adr-bounded",
1121
+ "relationType": "implements"
1122
+ },
1123
+ {
1124
+ "id": "ff-latency--implements--adr-cursor",
1125
+ "sourceId": "ff-latency",
1126
+ "targetId": "adr-cursor",
1127
+ "relationType": "implements"
1128
+ },
1129
+ {
1130
+ "id": "ff-latency--implements--adr-offset",
1131
+ "sourceId": "ff-latency",
1132
+ "targetId": "adr-offset",
1133
+ "relationType": "implements"
1134
+ }
1135
+ ]
1136
+ }