standard_flags 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +188 -0
- data/README.md +531 -59
- data/conformance/README.md +152 -3
- data/conformance/legacy_env.json +7 -1
- data/conformance/schema/fixture.schema.json +390 -21
- data/conformance/schema/manifest.schema.json +347 -0
- data/conformance/upgrade/client_status_server.json +297 -0
- data/conformance/wire/client_state.json +2115 -2
- data/conformance/wire/client_status.json +359 -0
- data/conformance/wire/manifest_check.json +5713 -0
- data/lib/generators/standard_flags/install/templates/initializer.rb.tt +4 -1
- data/lib/generators/standard_flags/migrations/migrations_generator.rb +37 -9
- data/lib/generators/standard_flags/migrations/templates/create_standard_flags_compat_stats.rb.tt +17 -0
- data/lib/standard_flags/client_app.rb +229 -0
- data/lib/standard_flags/client_status/controller.rb +59 -0
- data/lib/standard_flags/client_status.rb +110 -0
- data/lib/standard_flags/config.rb +18 -1
- data/lib/standard_flags/controller.rb +110 -5
- data/lib/standard_flags/definition.rb +37 -35
- data/lib/standard_flags/diagnostics.rb +61 -3
- data/lib/standard_flags/env_pin.rb +5 -15
- data/lib/standard_flags/errors.rb +31 -0
- data/lib/standard_flags/evaluator.rb +1 -0
- data/lib/standard_flags/mcp/flags.rb +12 -1
- data/lib/standard_flags/open_feature/provider.rb +2 -1
- data/lib/standard_flags/parser.rb +0 -16
- data/lib/standard_flags/registry.rb +46 -4
- data/lib/standard_flags/runtime/active_record_store.rb +64 -0
- data/lib/standard_flags/runtime/compat_tracker.rb +228 -0
- data/lib/standard_flags/runtime/memory_store.rb +20 -0
- data/lib/standard_flags/runtime/models.rb +6 -0
- data/lib/standard_flags/runtime/store.rb +18 -0
- data/lib/standard_flags/runtime.rb +33 -3
- data/lib/standard_flags/stores/app_store.rb +172 -0
- data/lib/standard_flags/stores.rb +37 -0
- data/lib/standard_flags/tooling/kotlin.rb +319 -0
- data/lib/standard_flags/tooling/manifest.rb +401 -0
- data/lib/standard_flags/tooling/manifest_check.rb +355 -0
- data/lib/standard_flags/tooling.rb +150 -55
- data/lib/standard_flags/version.rb +1 -1
- data/lib/standard_flags.rb +3 -0
- data/lib/tasks/standard_flags.rake +47 -0
- metadata +15 -2
- data/conformance/legacy_exact.json +0 -90
data/conformance/README.md
CHANGED
|
@@ -21,7 +21,7 @@ versions passed outside SemVer).
|
|
|
21
21
|
|
|
22
22
|
| File | Suite | Scope | In → out |
|
|
23
23
|
|---|---|---|---|
|
|
24
|
-
| `resolution.json`, `guards_and_errors.json`, `legacy_env.json`, `
|
|
24
|
+
| `resolution.json`, `guards_and_errors.json`, `legacy_env.json`, `permanent_flags.json` | `evaluation` | server | registry, environment, env vars → value, variant, reason, error code, deciding variable |
|
|
25
25
|
| `runtime/*.json` | `runtime` | server | stored rule, cohorts, memberships, context → evaluation and `rule_id` |
|
|
26
26
|
| `operations/write_path.json` | `operations` | server | operations applied in order → evaluations |
|
|
27
27
|
| `bucket_vectors.json` | `bucket_vectors` | server | salt, unit key, decision → bucket |
|
|
@@ -29,6 +29,9 @@ versions passed outside SemVer).
|
|
|
29
29
|
| `versions/legacy_ranges.json` | `legacy_ranges` | server | RubyGems range stored by 0.2.x → neutral translation; version → matched (as Gem::Requirement) |
|
|
30
30
|
| `wire/delivery.json` | `delivery` | wire | registry, context, client → OFREP entries and ETag |
|
|
31
31
|
| `wire/client_state.json` | `client_state` | wire | OFREP payloads → what client code reads |
|
|
32
|
+
| `wire/client_status.json` | `client_status` | wire | recognised platforms, client registry, X-Client-* header values, today → `/client/status` payload |
|
|
33
|
+
| `upgrade/client_status_server.json` | `client_status` | server | the same, plus ENV pins and store lookups |
|
|
34
|
+
| `wire/manifest_check.json` | `manifest_check` | wire | committed manifest, current manifest, today → invalid, or ok / stale / breaking with removed wires, type changes, audiences made private |
|
|
32
35
|
|
|
33
36
|
## delivery.json: what the server sends
|
|
34
37
|
|
|
@@ -106,6 +109,16 @@ last good one and that payload's version, when any of these hold:
|
|
|
106
109
|
- it is larger than `max_bytes` (a payload of exactly `max_bytes` is
|
|
107
110
|
accepted), or is not JSON (a byte-order mark or trailing bytes make it not
|
|
108
111
|
JSON);
|
|
112
|
+
- it is not strict RFC 8259 JSON. Lenient parsers must be configured
|
|
113
|
+
strictly: no unquoted literals (`tru`, `True`, `NaN`, `Infinity`), single
|
|
114
|
+
quotes, unquoted keys, malformed numbers (`01`, `1.`, `-`), trailing
|
|
115
|
+
commas, raw control characters (U+0000 to U+001F) inside strings,
|
|
116
|
+
escapes other than `\" \\ \/ \b \f \n \r \t \uXXXX`, or a `\uXXXX`
|
|
117
|
+
surrogate that isn't a high one (D800–DBFF) followed directly by a
|
|
118
|
+
`\uXXXX` low one (DC00–DFFF). A lone or reversed surrogate is rejected,
|
|
119
|
+
even by parsers that would otherwise accept it;
|
|
120
|
+
- it nests more than `max_nesting` containers. Every object and array
|
|
121
|
+
counts, the top level being 1, so exactly `max_nesting` is accepted;
|
|
109
122
|
- the top level is not an object;
|
|
110
123
|
- `flags` is not an array, or has more than `max_flags` entries;
|
|
111
124
|
- an entry is not an object, or has no non-empty string `key`;
|
|
@@ -117,8 +130,15 @@ send an object with a repeated member name, so how a client reads one is not
|
|
|
117
130
|
pinned.
|
|
118
131
|
|
|
119
132
|
**Accepting a payload.** The client remembers `metadata.version` when it is
|
|
120
|
-
a
|
|
121
|
-
|
|
133
|
+
a string of 1 to 256 characters, every one printable ASCII other than a
|
|
134
|
+
space or a double quote (U+0021, U+0023 to U+007E: what an ETag may hold),
|
|
135
|
+
else null, and sends it quoted as If-None-Match next time. A version with
|
|
136
|
+
CR or LF, a space, `"` or a non-ASCII character is not kept, nor is an
|
|
137
|
+
empty one or one longer than 256 characters: a version is sent back in a
|
|
138
|
+
request header, and an oversized one could be refused by every proxy on
|
|
139
|
+
the way. Servers send far shorter versions (a digest). The same rule
|
|
140
|
+
applies to a version read back from a stored payload, and to an ETag
|
|
141
|
+
response header (neither is pinned by a case). A 304 changes nothing, even before any payload. Keys the client doesn't
|
|
122
142
|
declare are ignored.
|
|
123
143
|
|
|
124
144
|
**Reading a key.** An entry's value is *usable* when all of these hold:
|
|
@@ -146,6 +166,135 @@ The read is then:
|
|
|
146
166
|
When a fresh value applies, at launch or live, is the app's policy. It is not
|
|
147
167
|
part of this suite.
|
|
148
168
|
|
|
169
|
+
## client_status.json: upgrade status
|
|
170
|
+
|
|
171
|
+
A server takes the file's `client_platforms` as the platforms it
|
|
172
|
+
recognises, declares the file's `clients` (its client registry), takes the
|
|
173
|
+
case's `client` as the X-Client-Platform, X-Client-Version and
|
|
174
|
+
X-Client-Build header values, and answers `GET /client/status` for the
|
|
175
|
+
case's `group` (absent: the default group) on `today` (the case's, else the
|
|
176
|
+
file's), comparing the body with `expected`. A client library uses each
|
|
177
|
+
`expected` body as a golden payload for its upgrade-state parsing.
|
|
178
|
+
|
|
179
|
+
The rules:
|
|
180
|
+
|
|
181
|
+
- **The body.** Always the seven keys `status`, `platform`, `version`,
|
|
182
|
+
`min_version`, `recommended`, `enforce_at` and `store_url`, with null for
|
|
183
|
+
anything absent. Versions are canonical SemVer (`0.4` is sent as
|
|
184
|
+
`0.4.0`; build metadata is dropped). `enforce_at` is a UTC date.
|
|
185
|
+
- **`unknown`.** No platform, a platform outside `client_platforms`
|
|
186
|
+
(`platform` is then null), or no usable version (`version` null). An
|
|
187
|
+
unknown build is never told to upgrade; the body still carries the
|
|
188
|
+
platform's versions and store URL when the platform is known.
|
|
189
|
+
- **The minimum.** A client below `min_version` gets `upgrade_recommended`
|
|
190
|
+
until `enforce_at` (the client's `since` plus `grace_days`) and
|
|
191
|
+
`upgrade_required` from that day on. `enforce_at` is set whenever the
|
|
192
|
+
version is below the minimum. Versions compare by SemVer precedence, with
|
|
193
|
+
one exception: a prerelease of exactly the minimum (or recommended)
|
|
194
|
+
release meets it (`0.4.0-rc.1` meets `0.4.0`), while a prerelease of an
|
|
195
|
+
older release (`0.3.10-beta.1`) is below it.
|
|
196
|
+
- **Recommended.** At or above the minimum but below `recommended` is
|
|
197
|
+
`upgrade_recommended` with no `enforce_at`. Anything else is `ok`.
|
|
198
|
+
- **Store ceiling.** `min_version` and `recommended` are never above the
|
|
199
|
+
newest version known to be in the store (`available`): the body carries
|
|
200
|
+
the capped values, and the comparison uses them.
|
|
201
|
+
- **Nothing declared.** A recognised platform with no client in the group
|
|
202
|
+
is `ok`, with null versions.
|
|
203
|
+
- **A status a client doesn't know** (a future one) must be treated as
|
|
204
|
+
`unknown`: never block on it.
|
|
205
|
+
|
|
206
|
+
`upgrade/client_status_server.json` (`"scope": "server"`) has the same shape
|
|
207
|
+
and adds what only a server has: `env_vars` (the
|
|
208
|
+
`STANDARD_FLAGS_CLIENT_<NAME>_*` break-glass pins, which beat the code and
|
|
209
|
+
any store lookup; a raised `_MIN_VERSION` needs `_SINCE`, and a pin is a raise unless every version meeting the code's minimum also meets it) and
|
|
210
|
+
`store_lookup` (client name => the version that client's lookup last
|
|
211
|
+
answered; null means no answer, so `available` applies; a lookup caps only
|
|
212
|
+
its own client). Clients skip it.
|
|
213
|
+
## manifest_check.json: when a manifest change breaks clients
|
|
214
|
+
|
|
215
|
+
The server's `standard_flags:manifest:check` and a client library's contract
|
|
216
|
+
check (the Kotlin library's Gradle task) run these cases, so they agree on
|
|
217
|
+
what breaks a shipped build. Each case has a `committed` manifest (the
|
|
218
|
+
baseline a client was built against), a `current` one and a `today` date
|
|
219
|
+
(the case's, else the file's), all in UTC. A case expecting `"status":
|
|
220
|
+
"invalid"` names the manifest (`committed` or `current`) a reader must
|
|
221
|
+
refuse, and expects nothing else. The manifests are version 2 and
|
|
222
|
+
validate against [`schema/manifest.schema.json`](schema/manifest.schema.json),
|
|
223
|
+
apart from the manifest an `invalid` case names.
|
|
224
|
+
The one case committing a version 1 manifest is `"scope": "server"`.
|
|
225
|
+
|
|
226
|
+
A wire is an (audience, wire name) pair. A manifest tells an audience a wire
|
|
227
|
+
in one of two ways:
|
|
228
|
+
|
|
229
|
+
- a flag lists the wire under its `audiences` for that audience. Its type is
|
|
230
|
+
the flag's `type`;
|
|
231
|
+
- a tombstone lists it under `serve` for that audience. Its type is
|
|
232
|
+
`boolean` for true or false and `string` for a string. It is still served
|
|
233
|
+
while `today <= until`.
|
|
234
|
+
|
|
235
|
+
The rules:
|
|
236
|
+
|
|
237
|
+
- **Invalid manifests.** A reader refuses at least what the server's
|
|
238
|
+
reader refuses (the `invalid` cases pin a sample):
|
|
239
|
+
- text that isn't strict JSON (a trailing comma, say), and an object with
|
|
240
|
+
a repeated member name (the server refuses one when its JSON parser
|
|
241
|
+
reports it, as json 3.1 and later do);
|
|
242
|
+
- a `version` that isn't the integer 2 (`2.0` included);
|
|
243
|
+
- a missing `audiences`, `flags`, `tombstones` or `clients`
|
|
244
|
+
(`{"version":2}` is not an empty manifest);
|
|
245
|
+
- `audiences` that isn't an object, or an audience whose `public` isn't
|
|
246
|
+
true or false;
|
|
247
|
+
- `flags` or `tombstones` that isn't an array of objects, or an entry
|
|
248
|
+
without a non-empty string `key`;
|
|
249
|
+
- a flag whose `type` isn't `boolean` or `string`; whose `values` aren't
|
|
250
|
+
at least two unique values of that type; whose `default` (or any value
|
|
251
|
+
of a `default` object) or `final` isn't of that type; or whose
|
|
252
|
+
`audiences` isn't an object of non-empty arrays of strings;
|
|
253
|
+
- a date that isn't a calendar date (`2027-02-30`) in a tombstone's
|
|
254
|
+
required `removed`, its `until`, a flag's `remove_by` or a client's
|
|
255
|
+
`since`;
|
|
256
|
+
- a tombstone `until` or `until_clients` without `serve`; a `serve` that
|
|
257
|
+
isn't a non-empty object of objects, serves anything but true, false
|
|
258
|
+
or a string, or comes without both `until` and `until_clients`;
|
|
259
|
+
- `clients` that isn't an object of objects holding exactly the
|
|
260
|
+
registry's fields, typed as the server writes them (`platform` a
|
|
261
|
+
non-empty string; `group`, `min_version`, `recommended`, `available`
|
|
262
|
+
and `store_url` a string or null; `grace` a whole number of days at
|
|
263
|
+
least 0; `store_lookup` true or false);
|
|
264
|
+
- a wire listed twice for one audience (by two flags, twice in one list,
|
|
265
|
+
or by a flag and a tombstone).
|
|
266
|
+
|
|
267
|
+
The rest of the schema (key and wire-name patterns, `kind`,
|
|
268
|
+
`min_client`, members it doesn't list) describes what the server writes;
|
|
269
|
+
a reader may refuse those too but isn't required to.
|
|
270
|
+
- **`stale`** is true when the two manifests differ as JSON values,
|
|
271
|
+
compared structurally: object member order is ignored, array order (wires,
|
|
272
|
+
values, flags, tombstones) is significant. The server task compares the
|
|
273
|
+
committed file's text with what it would write instead, ignoring CRLF
|
|
274
|
+
line endings and trailing newlines, which the fixture can't express.
|
|
275
|
+
- **`removed_wires`** lists every wire the committed manifest tells an
|
|
276
|
+
audience (a static wire only while it is still served on `today`) that the
|
|
277
|
+
current manifest neither exposes to that audience from a flag nor serves
|
|
278
|
+
from a tombstone still serving on `today`. A deprecated wire whose `until`
|
|
279
|
+
has passed may be removed. Moving a wire to another flag of the same type
|
|
280
|
+
is not a removal. Moving it to another audience is.
|
|
281
|
+
- **`type_changes`** lists every wire both manifests tell the same audience
|
|
282
|
+
whose type differs, with `from` and `to`. This includes a committed static
|
|
283
|
+
wire whose `until` has passed: a wire name that comes back with another
|
|
284
|
+
type is still a change.
|
|
285
|
+
- **`audiences_made_private`** lists every audience the committed manifest
|
|
286
|
+
marks `public: true`, with at least one wire still served on `today`,
|
|
287
|
+
that the current manifest marks `public: false`. Clients before sign-in
|
|
288
|
+
lose all of its wires. An audience that disappears altogether shows up as
|
|
289
|
+
removed wires instead.
|
|
290
|
+
- Lists are sorted by audience, then wire name. **`status`** is `breaking`
|
|
291
|
+
when any list is non-empty, else `stale` when `stale` is true, else `ok`.
|
|
292
|
+
|
|
293
|
+
Flag keys, kinds, defaults, values, `min_client` and lifecycle dates only
|
|
294
|
+
make a manifest stale. Moving a deprecated wire's `until` earlier is a
|
|
295
|
+
warning in the server task, not a break; warnings aren't pinned here. Removed mode values and variants are not checked:
|
|
296
|
+
clients read unknown values as not usable (see `client_state.json`).
|
|
297
|
+
|
|
149
298
|
## versions/version_ranges.json
|
|
150
299
|
|
|
151
300
|
A version and a range in the neutral syntax, `matched` out; `build_cases`
|
data/conformance/legacy_env.json
CHANGED
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
"expected": { "value": true, "variant": "on", "reason": "ENV_PIN", "source_env_var": "ACME_REPORTS_ENABLED" } },
|
|
34
34
|
{ "name": "later legacy name is read when earlier ones are unset", "flag": "new_reports", "environment": "production",
|
|
35
35
|
"env_vars": { "ACME_REPORTS_V2": "on" },
|
|
36
|
-
"expected": { "value": true, "variant": "on", "reason": "ENV_PIN", "source_env_var": "ACME_REPORTS_V2" } }
|
|
36
|
+
"expected": { "value": true, "variant": "on", "reason": "ENV_PIN", "source_env_var": "ACME_REPORTS_V2" } },
|
|
37
|
+
{ "name": "legacy names are read by the strict parser: trimmed and case-insensitive", "flag": "new_reports", "environment": "production",
|
|
38
|
+
"env_vars": { "ACME_REPORTS_ENABLED": " Yes " },
|
|
39
|
+
"expected": { "value": true, "variant": "on", "reason": "ENV_PIN", "source_env_var": "ACME_REPORTS_ENABLED" } },
|
|
40
|
+
{ "name": "a blank legacy value is unset", "flag": "new_reports", "environment": "production",
|
|
41
|
+
"env_vars": { "ACME_REPORTS_ENABLED": " ", "ACME_REPORTS_V2": "off" },
|
|
42
|
+
"expected": { "value": false, "variant": "off", "reason": "ENV_PIN", "source_env_var": "ACME_REPORTS_V2" } }
|
|
37
43
|
]
|
|
38
44
|
}
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"version_ranges",
|
|
24
24
|
"legacy_ranges",
|
|
25
25
|
"delivery",
|
|
26
|
-
"client_state"
|
|
26
|
+
"client_state",
|
|
27
|
+
"client_status",
|
|
28
|
+
"manifest_check"
|
|
27
29
|
]
|
|
28
30
|
},
|
|
29
31
|
"scope": {
|
|
@@ -126,6 +128,30 @@
|
|
|
126
128
|
"then": {
|
|
127
129
|
"$ref": "#/$defs/client_state_suite"
|
|
128
130
|
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"if": {
|
|
134
|
+
"properties": {
|
|
135
|
+
"suite": {
|
|
136
|
+
"const": "client_status"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"then": {
|
|
141
|
+
"$ref": "#/$defs/client_status_suite"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"if": {
|
|
146
|
+
"properties": {
|
|
147
|
+
"suite": {
|
|
148
|
+
"const": "manifest_check"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"then": {
|
|
153
|
+
"$ref": "#/$defs/manifest_check_suite"
|
|
154
|
+
}
|
|
129
155
|
}
|
|
130
156
|
],
|
|
131
157
|
"$defs": {
|
|
@@ -250,25 +276,6 @@
|
|
|
250
276
|
"inverted": {
|
|
251
277
|
"type": "boolean"
|
|
252
278
|
},
|
|
253
|
-
"legacy_parser": {
|
|
254
|
-
"enum": [
|
|
255
|
-
"strict",
|
|
256
|
-
"exact"
|
|
257
|
-
]
|
|
258
|
-
},
|
|
259
|
-
"legacy_true": {
|
|
260
|
-
"oneOf": [
|
|
261
|
-
{
|
|
262
|
-
"type": "string"
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"type": "array",
|
|
266
|
-
"items": {
|
|
267
|
-
"type": "string"
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
},
|
|
272
279
|
"forbidden_in": {
|
|
273
280
|
"oneOf": [
|
|
274
281
|
{
|
|
@@ -1223,7 +1230,8 @@
|
|
|
1223
1230
|
"type": "object",
|
|
1224
1231
|
"required": [
|
|
1225
1232
|
"max_bytes",
|
|
1226
|
-
"max_flags"
|
|
1233
|
+
"max_flags",
|
|
1234
|
+
"max_nesting"
|
|
1227
1235
|
],
|
|
1228
1236
|
"properties": {
|
|
1229
1237
|
"max_bytes": {
|
|
@@ -1233,6 +1241,10 @@
|
|
|
1233
1241
|
"max_flags": {
|
|
1234
1242
|
"type": "integer",
|
|
1235
1243
|
"minimum": 1
|
|
1244
|
+
},
|
|
1245
|
+
"max_nesting": {
|
|
1246
|
+
"type": "integer",
|
|
1247
|
+
"minimum": 1
|
|
1236
1248
|
}
|
|
1237
1249
|
},
|
|
1238
1250
|
"additionalProperties": false
|
|
@@ -1335,6 +1347,363 @@
|
|
|
1335
1347
|
}
|
|
1336
1348
|
}
|
|
1337
1349
|
}
|
|
1350
|
+
},
|
|
1351
|
+
"client_status_payload": {
|
|
1352
|
+
"description": "The GET /client/status body. Every key is always present; absent values are null. Versions are canonical SemVer (MAJOR.MINOR.PATCH[-prerelease]); enforce_at is a UTC date.",
|
|
1353
|
+
"type": "object",
|
|
1354
|
+
"required": [
|
|
1355
|
+
"status",
|
|
1356
|
+
"platform",
|
|
1357
|
+
"version",
|
|
1358
|
+
"min_version",
|
|
1359
|
+
"recommended",
|
|
1360
|
+
"enforce_at",
|
|
1361
|
+
"store_url"
|
|
1362
|
+
],
|
|
1363
|
+
"properties": {
|
|
1364
|
+
"status": {
|
|
1365
|
+
"description": "A client that receives a status it doesn't know treats it as unknown: it never blocks on it.",
|
|
1366
|
+
"enum": [
|
|
1367
|
+
"ok",
|
|
1368
|
+
"upgrade_recommended",
|
|
1369
|
+
"upgrade_required",
|
|
1370
|
+
"unknown"
|
|
1371
|
+
]
|
|
1372
|
+
},
|
|
1373
|
+
"platform": {
|
|
1374
|
+
"type": [
|
|
1375
|
+
"string",
|
|
1376
|
+
"null"
|
|
1377
|
+
]
|
|
1378
|
+
},
|
|
1379
|
+
"version": {
|
|
1380
|
+
"type": [
|
|
1381
|
+
"string",
|
|
1382
|
+
"null"
|
|
1383
|
+
]
|
|
1384
|
+
},
|
|
1385
|
+
"min_version": {
|
|
1386
|
+
"type": [
|
|
1387
|
+
"string",
|
|
1388
|
+
"null"
|
|
1389
|
+
]
|
|
1390
|
+
},
|
|
1391
|
+
"recommended": {
|
|
1392
|
+
"type": [
|
|
1393
|
+
"string",
|
|
1394
|
+
"null"
|
|
1395
|
+
]
|
|
1396
|
+
},
|
|
1397
|
+
"enforce_at": {
|
|
1398
|
+
"oneOf": [
|
|
1399
|
+
{
|
|
1400
|
+
"$ref": "#/$defs/date"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"type": "null"
|
|
1404
|
+
}
|
|
1405
|
+
]
|
|
1406
|
+
},
|
|
1407
|
+
"store_url": {
|
|
1408
|
+
"type": [
|
|
1409
|
+
"string",
|
|
1410
|
+
"null"
|
|
1411
|
+
]
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
"additionalProperties": false
|
|
1415
|
+
},
|
|
1416
|
+
"client_app": {
|
|
1417
|
+
"description": "A declared client (a `client` in config/flags.rb).",
|
|
1418
|
+
"type": "object",
|
|
1419
|
+
"required": [
|
|
1420
|
+
"name",
|
|
1421
|
+
"platform"
|
|
1422
|
+
],
|
|
1423
|
+
"properties": {
|
|
1424
|
+
"name": {
|
|
1425
|
+
"$ref": "#/$defs/flag_key"
|
|
1426
|
+
},
|
|
1427
|
+
"platform": {
|
|
1428
|
+
"type": "string"
|
|
1429
|
+
},
|
|
1430
|
+
"group": {
|
|
1431
|
+
"$ref": "#/$defs/flag_key"
|
|
1432
|
+
},
|
|
1433
|
+
"min_version": {
|
|
1434
|
+
"type": "string"
|
|
1435
|
+
},
|
|
1436
|
+
"since": {
|
|
1437
|
+
"$ref": "#/$defs/date"
|
|
1438
|
+
},
|
|
1439
|
+
"grace_days": {
|
|
1440
|
+
"type": "integer",
|
|
1441
|
+
"minimum": 0
|
|
1442
|
+
},
|
|
1443
|
+
"recommended": {
|
|
1444
|
+
"type": "string"
|
|
1445
|
+
},
|
|
1446
|
+
"available": {
|
|
1447
|
+
"type": "string"
|
|
1448
|
+
},
|
|
1449
|
+
"store_url": {
|
|
1450
|
+
"type": "string"
|
|
1451
|
+
}
|
|
1452
|
+
},
|
|
1453
|
+
"additionalProperties": false
|
|
1454
|
+
},
|
|
1455
|
+
"client_status_suite": {
|
|
1456
|
+
"required": [
|
|
1457
|
+
"today",
|
|
1458
|
+
"client_platforms",
|
|
1459
|
+
"clients",
|
|
1460
|
+
"cases"
|
|
1461
|
+
],
|
|
1462
|
+
"properties": {
|
|
1463
|
+
"today": {
|
|
1464
|
+
"$ref": "#/$defs/date"
|
|
1465
|
+
},
|
|
1466
|
+
"client_platforms": {
|
|
1467
|
+
"description": "The platforms the server recognises (config.client_platforms); any other platform header is unknown.",
|
|
1468
|
+
"type": "array",
|
|
1469
|
+
"minItems": 1,
|
|
1470
|
+
"items": {
|
|
1471
|
+
"type": "string"
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
"clients": {
|
|
1475
|
+
"type": "array",
|
|
1476
|
+
"items": {
|
|
1477
|
+
"$ref": "#/$defs/client_app"
|
|
1478
|
+
}
|
|
1479
|
+
},
|
|
1480
|
+
"cases": {
|
|
1481
|
+
"type": "array",
|
|
1482
|
+
"minItems": 1,
|
|
1483
|
+
"items": {
|
|
1484
|
+
"type": "object",
|
|
1485
|
+
"required": [
|
|
1486
|
+
"name",
|
|
1487
|
+
"client",
|
|
1488
|
+
"expected"
|
|
1489
|
+
],
|
|
1490
|
+
"properties": {
|
|
1491
|
+
"name": {
|
|
1492
|
+
"type": "string"
|
|
1493
|
+
},
|
|
1494
|
+
"scope": {
|
|
1495
|
+
"$ref": "#/$defs/scope"
|
|
1496
|
+
},
|
|
1497
|
+
"client": {
|
|
1498
|
+
"description": "The X-Client-Platform, X-Client-Version and X-Client-Build header values sent.",
|
|
1499
|
+
"$ref": "#/$defs/client"
|
|
1500
|
+
},
|
|
1501
|
+
"group": {
|
|
1502
|
+
"$ref": "#/$defs/flag_key"
|
|
1503
|
+
},
|
|
1504
|
+
"today": {
|
|
1505
|
+
"$ref": "#/$defs/date"
|
|
1506
|
+
},
|
|
1507
|
+
"env_vars": {
|
|
1508
|
+
"$ref": "#/$defs/env_vars"
|
|
1509
|
+
},
|
|
1510
|
+
"store_lookup": {
|
|
1511
|
+
"description": "client name => the version a store lookup answers (null: no answer).",
|
|
1512
|
+
"type": "object",
|
|
1513
|
+
"additionalProperties": {
|
|
1514
|
+
"type": [
|
|
1515
|
+
"string",
|
|
1516
|
+
"null"
|
|
1517
|
+
]
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
"expected": {
|
|
1521
|
+
"$ref": "#/$defs/client_status_payload"
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
"additionalProperties": false
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
"manifest_check_suite": {
|
|
1530
|
+
"description": "Committed manifest + current manifest + today (UTC) in, check result out: `invalid` (naming the manifest a reader must refuse), or status, stale and the three finding lists. Manifests are version 2 (conformance/schema/manifest.schema.json); a `server` case may commit version 1.",
|
|
1531
|
+
"required": [
|
|
1532
|
+
"today",
|
|
1533
|
+
"cases"
|
|
1534
|
+
],
|
|
1535
|
+
"properties": {
|
|
1536
|
+
"today": {
|
|
1537
|
+
"$ref": "#/$defs/date"
|
|
1538
|
+
},
|
|
1539
|
+
"cases": {
|
|
1540
|
+
"type": "array",
|
|
1541
|
+
"minItems": 1,
|
|
1542
|
+
"items": {
|
|
1543
|
+
"type": "object",
|
|
1544
|
+
"required": [
|
|
1545
|
+
"name",
|
|
1546
|
+
"committed",
|
|
1547
|
+
"current",
|
|
1548
|
+
"expected"
|
|
1549
|
+
],
|
|
1550
|
+
"properties": {
|
|
1551
|
+
"name": {
|
|
1552
|
+
"type": "string"
|
|
1553
|
+
},
|
|
1554
|
+
"scope": {
|
|
1555
|
+
"$ref": "#/$defs/scope"
|
|
1556
|
+
},
|
|
1557
|
+
"today": {
|
|
1558
|
+
"$ref": "#/$defs/date"
|
|
1559
|
+
},
|
|
1560
|
+
"committed": {
|
|
1561
|
+
"type": "object",
|
|
1562
|
+
"required": [
|
|
1563
|
+
"version"
|
|
1564
|
+
]
|
|
1565
|
+
},
|
|
1566
|
+
"current": {
|
|
1567
|
+
"type": "object",
|
|
1568
|
+
"required": [
|
|
1569
|
+
"version"
|
|
1570
|
+
]
|
|
1571
|
+
},
|
|
1572
|
+
"expected": {
|
|
1573
|
+
"type": "object",
|
|
1574
|
+
"properties": {
|
|
1575
|
+
"status": {
|
|
1576
|
+
"enum": [
|
|
1577
|
+
"ok",
|
|
1578
|
+
"stale",
|
|
1579
|
+
"breaking",
|
|
1580
|
+
"invalid"
|
|
1581
|
+
]
|
|
1582
|
+
},
|
|
1583
|
+
"stale": {
|
|
1584
|
+
"type": "boolean"
|
|
1585
|
+
},
|
|
1586
|
+
"removed_wires": {
|
|
1587
|
+
"type": "array",
|
|
1588
|
+
"items": {
|
|
1589
|
+
"type": "object",
|
|
1590
|
+
"required": [
|
|
1591
|
+
"audience",
|
|
1592
|
+
"wire"
|
|
1593
|
+
],
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"audience": {
|
|
1596
|
+
"type": "string",
|
|
1597
|
+
"minLength": 1
|
|
1598
|
+
},
|
|
1599
|
+
"wire": {
|
|
1600
|
+
"$ref": "#/$defs/wire_name"
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
"additionalProperties": false
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
"type_changes": {
|
|
1607
|
+
"type": "array",
|
|
1608
|
+
"items": {
|
|
1609
|
+
"type": "object",
|
|
1610
|
+
"required": [
|
|
1611
|
+
"audience",
|
|
1612
|
+
"wire",
|
|
1613
|
+
"from",
|
|
1614
|
+
"to"
|
|
1615
|
+
],
|
|
1616
|
+
"properties": {
|
|
1617
|
+
"audience": {
|
|
1618
|
+
"type": "string",
|
|
1619
|
+
"minLength": 1
|
|
1620
|
+
},
|
|
1621
|
+
"wire": {
|
|
1622
|
+
"$ref": "#/$defs/wire_name"
|
|
1623
|
+
},
|
|
1624
|
+
"from": {
|
|
1625
|
+
"enum": [
|
|
1626
|
+
"boolean",
|
|
1627
|
+
"string"
|
|
1628
|
+
]
|
|
1629
|
+
},
|
|
1630
|
+
"to": {
|
|
1631
|
+
"enum": [
|
|
1632
|
+
"boolean",
|
|
1633
|
+
"string"
|
|
1634
|
+
]
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
"additionalProperties": false
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
"audiences_made_private": {
|
|
1641
|
+
"type": "array",
|
|
1642
|
+
"items": {
|
|
1643
|
+
"type": "object",
|
|
1644
|
+
"required": [
|
|
1645
|
+
"audience"
|
|
1646
|
+
],
|
|
1647
|
+
"properties": {
|
|
1648
|
+
"audience": {
|
|
1649
|
+
"type": "string",
|
|
1650
|
+
"minLength": 1
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
"additionalProperties": false
|
|
1654
|
+
}
|
|
1655
|
+
},
|
|
1656
|
+
"invalid": {
|
|
1657
|
+
"enum": [
|
|
1658
|
+
"committed",
|
|
1659
|
+
"current"
|
|
1660
|
+
]
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
"additionalProperties": false,
|
|
1664
|
+
"oneOf": [
|
|
1665
|
+
{
|
|
1666
|
+
"required": [
|
|
1667
|
+
"status",
|
|
1668
|
+
"invalid"
|
|
1669
|
+
],
|
|
1670
|
+
"properties": {
|
|
1671
|
+
"status": {
|
|
1672
|
+
"const": "invalid"
|
|
1673
|
+
}
|
|
1674
|
+
},
|
|
1675
|
+
"maxProperties": 2
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
"required": [
|
|
1679
|
+
"status",
|
|
1680
|
+
"stale",
|
|
1681
|
+
"removed_wires",
|
|
1682
|
+
"type_changes",
|
|
1683
|
+
"audiences_made_private"
|
|
1684
|
+
],
|
|
1685
|
+
"properties": {
|
|
1686
|
+
"status": {
|
|
1687
|
+
"enum": [
|
|
1688
|
+
"ok",
|
|
1689
|
+
"stale",
|
|
1690
|
+
"breaking"
|
|
1691
|
+
]
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
"not": {
|
|
1695
|
+
"required": [
|
|
1696
|
+
"invalid"
|
|
1697
|
+
]
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
]
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
"additionalProperties": false
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1338
1707
|
}
|
|
1339
1708
|
}
|
|
1340
1709
|
}
|