@crvouga/atlas 0.16.0 → 1.0.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.
- package/CHANGELOG.md +12 -0
- package/README.md +52 -8
- package/dist/core/src/cli.d.ts +1 -1
- package/dist/core/src/cli.js +1 -1
- package/dist/reports/src/attachment-files.d.ts +3 -1
- package/dist/reports/src/attachment-files.js +14 -4
- package/dist/reports/src/evidence-types.d.ts +22 -0
- package/dist/reports/src/garbage.d.ts +39 -0
- package/dist/reports/src/garbage.js +82 -0
- package/dist/reports/src/layer-merge.js +5 -0
- package/dist/reports/src/layer-types.d.ts +1 -1
- package/dist/reports/src/publish-checks.js +11 -3
- package/dist/reports/src/recording-receipt.d.ts +48 -0
- package/dist/reports/src/recording-receipt.js +103 -0
- package/dist/reports/src/report-cli.d.ts +1 -1
- package/dist/reports/src/report-cli.js +20 -2
- package/dist/reports/src/report-index.d.ts +6 -0
- package/dist/reports/src/report-index.js +14 -0
- package/dist/reports/src/report-status.d.ts +2 -0
- package/dist/reports/src/report-status.js +17 -1
- package/dist/reports/src/reports-explorer-route.d.ts +8 -0
- package/dist/reports/src/reports-route.d.ts +8 -0
- package/dist/schema/src/api.d.ts +65 -0
- package/dist/schema/src/api.js +7 -2
- package/dist/schema/src/cli-results.d.ts +107 -2
- package/dist/schema/src/cli-results.js +11 -3
- package/dist/schema/src/index.d.ts +1 -0
- package/dist/schema/src/index.js +1 -0
- package/dist/schema/src/layer.d.ts +165 -0
- package/dist/schema/src/layer.js +72 -1
- package/dist/schema/src/server-config.d.ts +7 -49
- package/dist/schema/src/server-config.js +8 -21
- package/dist/schema/src/user-state.d.ts +115 -0
- package/dist/schema/src/user-state.js +54 -0
- package/dist/server/src/app.d.ts +16 -2
- package/dist/server/src/app.js +62 -0
- package/dist/server/src/config.d.ts +16 -21
- package/dist/server/src/config.js +48 -57
- package/dist/server/src/dev.d.ts +1 -1
- package/dist/server/src/dev.js +20 -7
- package/dist/server/src/index.d.ts +5 -1
- package/dist/server/src/index.js +5 -1
- package/dist/server/src/main.d.ts +23 -7
- package/dist/server/src/main.js +72 -26
- package/dist/server/src/openapi.js +24 -5
- package/dist/server/src/projects.js +89 -14
- package/dist/server/src/settings.d.ts +23 -7
- package/dist/server/src/settings.js +50 -60
- package/dist/server/src/storage.d.ts +68 -0
- package/dist/server/src/storage.js +125 -0
- package/dist/server/src/user-state.d.ts +31 -0
- package/dist/server/src/user-state.js +74 -0
- package/docs/agents.md +1 -1
- package/docs/deploying.md +38 -39
- package/docs/reference/cli.md +17 -7
- package/docs/reference/http-api.md +30 -2
- package/docs/reference/reports.md +165 -2
- package/docs/reference/schema.md +161 -16
- package/docs/reference/server.md +263 -41
- package/docs/report-backends.md +0 -144
- package/docs/report-contract.md +1 -1
- package/docs/rich-evidence.md +29 -0
- package/docs/runners.md +1 -1
- package/docs/server.md +141 -36
- package/docs/statecharts.md +1 -1
- package/docs/ui.md +1 -1
- package/docs/workspaces.md +5 -2
- package/llms-full.txt +265 -234
- package/llms.txt +1 -1
- package/package.json +2 -2
- package/packages/reports/STORAGE.md +1 -1
- package/packages/schema/schemas/check-detail.schema.json +20 -0
- package/packages/schema/schemas/effective-delta.schema.json +61 -0
- package/packages/schema/schemas/effective-evidence.schema.json +61 -0
- package/packages/schema/schemas/evidence-page.schema.json +45 -0
- package/packages/schema/schemas/gc-policy.schema.json +36 -0
- package/packages/schema/schemas/gc-run-result.schema.json +106 -0
- package/packages/schema/schemas/gc-snapshot.schema.json +122 -0
- package/packages/schema/schemas/layer-rows.schema.json +16 -0
- package/packages/schema/schemas/layer.schema.json +153 -0
- package/packages/schema/schemas/publish-checks.schema.json +24 -0
- package/packages/schema/schemas/publish-result.schema.json +161 -1
- package/packages/schema/schemas/report-status.schema.json +104 -0
- package/packages/schema/schemas/server-config.schema.json +0 -41
- package/packages/schema/schemas/server-editable-settings.schema.json +0 -41
- package/packages/schema/schemas/server-settings-snapshot.schema.json +0 -82
- package/packages/schema/schemas/user-state.schema.json +140 -0
- package/packages/server/README.md +11 -6
- package/packages/server/openapi.json +843 -128
- package/packages/visualizer/src/admin/SettingsPage.tsx +183 -88
- package/packages/visualizer/src/evidence/marks.tsx +16 -0
package/llms.txt
CHANGED
|
@@ -21,7 +21,7 @@ Given only the repository link, start at docs/agents.md: install `@crvouga/atlas
|
|
|
21
21
|
|
|
22
22
|
- [The report contract](https://raw.githubusercontent.com/crvouga/atlas/main/docs/report-contract.md): This is the normative description of what Atlas reads and writes when it reports on specs of any kind:
|
|
23
23
|
- [Evidence: attachments, timelines, snapshots and everything else](https://raw.githubusercontent.com/crvouga/atlas/main/docs/extending.md): Atlas is opinionated about specs and open about evidence.
|
|
24
|
-
- [
|
|
24
|
+
- [docs/report-backends.md](https://raw.githubusercontent.com/crvouga/atlas/main/docs/report-backends.md):
|
|
25
25
|
- [Executable statecharts](https://raw.githubusercontent.com/crvouga/atlas/main/docs/statecharts.md): Write down how a product behaves as statecharts in open formats, then let Atlas lint them, plan paths that cover every transition, run those paths against the real product through any driver (a browser, a phone, a pla…
|
|
26
26
|
|
|
27
27
|
## Working with this project
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/atlas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Atlas: specs of any kind, reported as layered evidence. Publish checks from any runner (JUnit, CTRF, a script), combine them across nodes, branches, environments and backends, gate CI on the result, and run statecharts against the real app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"schemas": "bun packages/schema/scripts/emit-json-schemas.ts",
|
|
165
165
|
"docs": "bun scripts/docs/generate.ts",
|
|
166
166
|
"docs:check": "bun test scripts/docs scripts/release/docs-links.test.ts packages/schema/tests/schemas.test.ts packages/server/tests/openapi.test.ts packages/server/tests/settings.test.ts",
|
|
167
|
-
"dev": "bun packages/core/bin/atlas.mjs dev
|
|
167
|
+
"dev": "bun packages/core/bin/atlas.mjs dev",
|
|
168
168
|
"client:dev": "bun packages/core/bin/atlas.mjs dev",
|
|
169
169
|
"client:build": "bun packages/core/bin/atlas.mjs client build --no-data",
|
|
170
170
|
"client:publish-data": "bun packages/visualizer/scripts/publish-data.ts",
|
|
@@ -69,7 +69,7 @@ adapter records each part independently.
|
|
|
69
69
|
|
|
70
70
|
The existing selected-attempt pointer, reusable content hashes and frame bundles
|
|
71
71
|
continue to own test-run publication. An empty closed run is `skipped`, never a
|
|
72
|
-
successful result inferred from absent evidence. Retention keeps historical evidence and its referenced content, including previous attempts and deleted branches. `pruneReports` reports retained commits and deletes nothing; storage usage grows with unique evidence.
|
|
72
|
+
successful result inferred from absent evidence. Retention keeps historical evidence and its referenced content, including previous attempts and deleted branches. `pruneReports` reports retained commits and deletes nothing; storage usage grows with unique evidence unless an operator saves a garbage collection policy for the server, which deletes only superseded layers (`garbage.ts`, [the server](../../docs/server.md#user-state-and-garbage-collection)).
|
|
73
73
|
|
|
74
74
|
Large bundles overlap at most four 4 MiB chunk uploads per source. Entry parts
|
|
75
75
|
retain input order even when uploads complete out of order. Backpressure bounds
|
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
"type": "number",
|
|
74
74
|
"minimum": 0
|
|
75
75
|
},
|
|
76
|
+
"recordingExpectation": {
|
|
77
|
+
"description": "`required`: expect a video of this check, and report whether it was published. `not-applicable`: intentionally unrecorded. Absent: no expectation. Never changes the check's status",
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
76
80
|
"tags": {
|
|
77
81
|
"description": "Free labels to filter and group by: smoke, slow, flaky…",
|
|
78
82
|
"type": "array",
|
|
@@ -169,6 +173,10 @@
|
|
|
169
173
|
"description": {
|
|
170
174
|
"type": "string"
|
|
171
175
|
},
|
|
176
|
+
"omitted": {
|
|
177
|
+
"description": "Why the producer did not include its bytes, in an open vocabulary: too-large, not-found, not-allowed, over-budget, policy… Present on a metadata-only attachment, so a reader can tell \"left out\" from \"never recorded\"",
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
172
180
|
"tags": {
|
|
173
181
|
"description": "Free labels of this one attachment, such as `demo`: shown as `#demo`, searchable, and normalized by `normalizeTag` (a leading `#` and letter case never matter). Unlike the tags of a check they say nothing about its result",
|
|
174
182
|
"type": "array",
|
|
@@ -404,6 +412,10 @@
|
|
|
404
412
|
"description": {
|
|
405
413
|
"type": "string"
|
|
406
414
|
},
|
|
415
|
+
"omitted": {
|
|
416
|
+
"description": "Why the producer did not include its bytes, in an open vocabulary: too-large, not-found, not-allowed, over-budget, policy… Present on a metadata-only attachment, so a reader can tell \"left out\" from \"never recorded\"",
|
|
417
|
+
"type": "string"
|
|
418
|
+
},
|
|
407
419
|
"tags": {
|
|
408
420
|
"description": "Free labels of this one attachment, such as `demo`: shown as `#demo`, searchable, and normalized by `normalizeTag` (a leading `#` and letter case never matter). Unlike the tags of a check they say nothing about its result",
|
|
409
421
|
"type": "array",
|
|
@@ -676,6 +688,10 @@
|
|
|
676
688
|
"description": {
|
|
677
689
|
"type": "string"
|
|
678
690
|
},
|
|
691
|
+
"omitted": {
|
|
692
|
+
"description": "Why the producer did not include its bytes, in an open vocabulary: too-large, not-found, not-allowed, over-budget, policy… Present on a metadata-only attachment, so a reader can tell \"left out\" from \"never recorded\"",
|
|
693
|
+
"type": "string"
|
|
694
|
+
},
|
|
679
695
|
"tags": {
|
|
680
696
|
"description": "Free labels of this one attachment, such as `demo`: shown as `#demo`, searchable, and normalized by `normalizeTag` (a leading `#` and letter case never matter). Unlike the tags of a check they say nothing about its result",
|
|
681
697
|
"type": "array",
|
|
@@ -883,6 +899,10 @@
|
|
|
883
899
|
"description": {
|
|
884
900
|
"type": "string"
|
|
885
901
|
},
|
|
902
|
+
"omitted": {
|
|
903
|
+
"description": "Why the producer did not include its bytes, in an open vocabulary: too-large, not-found, not-allowed, over-budget, policy… Present on a metadata-only attachment, so a reader can tell \"left out\" from \"never recorded\"",
|
|
904
|
+
"type": "string"
|
|
905
|
+
},
|
|
886
906
|
"tags": {
|
|
887
907
|
"description": "Free labels of this one attachment, such as `demo`: shown as `#demo`, searchable, and normalized by `normalizeTag` (a leading `#` and letter case never matter). Unlike the tags of a check they say nothing about its result",
|
|
888
908
|
"type": "array",
|
|
@@ -207,6 +207,22 @@
|
|
|
207
207
|
"roles"
|
|
208
208
|
],
|
|
209
209
|
"additionalProperties": {}
|
|
210
|
+
},
|
|
211
|
+
"recording": {
|
|
212
|
+
"description": "What became of the check's expected recording: uploaded, referenced, skipped, unresolved or not-applicable. Independent of `status`",
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"state": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"reason": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": [
|
|
223
|
+
"state"
|
|
224
|
+
],
|
|
225
|
+
"additionalProperties": {}
|
|
210
226
|
}
|
|
211
227
|
},
|
|
212
228
|
"required": [
|
|
@@ -481,6 +497,51 @@
|
|
|
481
497
|
"roles"
|
|
482
498
|
],
|
|
483
499
|
"additionalProperties": {}
|
|
500
|
+
},
|
|
501
|
+
"recordings": {
|
|
502
|
+
"description": "How many of the recordings the layer expected were published. Absent: the layer declared no expectations, so its completeness is unknown, not complete",
|
|
503
|
+
"type": "object",
|
|
504
|
+
"properties": {
|
|
505
|
+
"expected": {
|
|
506
|
+
"type": "integer",
|
|
507
|
+
"minimum": 0,
|
|
508
|
+
"maximum": 9007199254740991
|
|
509
|
+
},
|
|
510
|
+
"uploaded": {
|
|
511
|
+
"type": "integer",
|
|
512
|
+
"minimum": 0,
|
|
513
|
+
"maximum": 9007199254740991
|
|
514
|
+
},
|
|
515
|
+
"referenced": {
|
|
516
|
+
"type": "integer",
|
|
517
|
+
"minimum": 0,
|
|
518
|
+
"maximum": 9007199254740991
|
|
519
|
+
},
|
|
520
|
+
"skipped": {
|
|
521
|
+
"type": "integer",
|
|
522
|
+
"minimum": 0,
|
|
523
|
+
"maximum": 9007199254740991
|
|
524
|
+
},
|
|
525
|
+
"unresolved": {
|
|
526
|
+
"type": "integer",
|
|
527
|
+
"minimum": 0,
|
|
528
|
+
"maximum": 9007199254740991
|
|
529
|
+
},
|
|
530
|
+
"notApplicable": {
|
|
531
|
+
"type": "integer",
|
|
532
|
+
"minimum": 0,
|
|
533
|
+
"maximum": 9007199254740991
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"required": [
|
|
537
|
+
"expected",
|
|
538
|
+
"uploaded",
|
|
539
|
+
"referenced",
|
|
540
|
+
"skipped",
|
|
541
|
+
"unresolved",
|
|
542
|
+
"notApplicable"
|
|
543
|
+
],
|
|
544
|
+
"additionalProperties": {}
|
|
484
545
|
}
|
|
485
546
|
},
|
|
486
547
|
"required": [
|
|
@@ -207,6 +207,22 @@
|
|
|
207
207
|
"roles"
|
|
208
208
|
],
|
|
209
209
|
"additionalProperties": {}
|
|
210
|
+
},
|
|
211
|
+
"recording": {
|
|
212
|
+
"description": "What became of the check's expected recording: uploaded, referenced, skipped, unresolved or not-applicable. Independent of `status`",
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"state": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"reason": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": [
|
|
223
|
+
"state"
|
|
224
|
+
],
|
|
225
|
+
"additionalProperties": {}
|
|
210
226
|
}
|
|
211
227
|
},
|
|
212
228
|
"required": [
|
|
@@ -481,6 +497,51 @@
|
|
|
481
497
|
"roles"
|
|
482
498
|
],
|
|
483
499
|
"additionalProperties": {}
|
|
500
|
+
},
|
|
501
|
+
"recordings": {
|
|
502
|
+
"description": "How many of the recordings the layer expected were published. Absent: the layer declared no expectations, so its completeness is unknown, not complete",
|
|
503
|
+
"type": "object",
|
|
504
|
+
"properties": {
|
|
505
|
+
"expected": {
|
|
506
|
+
"type": "integer",
|
|
507
|
+
"minimum": 0,
|
|
508
|
+
"maximum": 9007199254740991
|
|
509
|
+
},
|
|
510
|
+
"uploaded": {
|
|
511
|
+
"type": "integer",
|
|
512
|
+
"minimum": 0,
|
|
513
|
+
"maximum": 9007199254740991
|
|
514
|
+
},
|
|
515
|
+
"referenced": {
|
|
516
|
+
"type": "integer",
|
|
517
|
+
"minimum": 0,
|
|
518
|
+
"maximum": 9007199254740991
|
|
519
|
+
},
|
|
520
|
+
"skipped": {
|
|
521
|
+
"type": "integer",
|
|
522
|
+
"minimum": 0,
|
|
523
|
+
"maximum": 9007199254740991
|
|
524
|
+
},
|
|
525
|
+
"unresolved": {
|
|
526
|
+
"type": "integer",
|
|
527
|
+
"minimum": 0,
|
|
528
|
+
"maximum": 9007199254740991
|
|
529
|
+
},
|
|
530
|
+
"notApplicable": {
|
|
531
|
+
"type": "integer",
|
|
532
|
+
"minimum": 0,
|
|
533
|
+
"maximum": 9007199254740991
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"required": [
|
|
537
|
+
"expected",
|
|
538
|
+
"uploaded",
|
|
539
|
+
"referenced",
|
|
540
|
+
"skipped",
|
|
541
|
+
"unresolved",
|
|
542
|
+
"notApplicable"
|
|
543
|
+
],
|
|
544
|
+
"additionalProperties": {}
|
|
484
545
|
}
|
|
485
546
|
},
|
|
486
547
|
"required": [
|
|
@@ -252,6 +252,51 @@
|
|
|
252
252
|
"roles"
|
|
253
253
|
],
|
|
254
254
|
"additionalProperties": {}
|
|
255
|
+
},
|
|
256
|
+
"recordings": {
|
|
257
|
+
"description": "How many of the recordings the layer expected were published. Absent: the layer declared no expectations, so its completeness is unknown, not complete",
|
|
258
|
+
"type": "object",
|
|
259
|
+
"properties": {
|
|
260
|
+
"expected": {
|
|
261
|
+
"type": "integer",
|
|
262
|
+
"minimum": 0,
|
|
263
|
+
"maximum": 9007199254740991
|
|
264
|
+
},
|
|
265
|
+
"uploaded": {
|
|
266
|
+
"type": "integer",
|
|
267
|
+
"minimum": 0,
|
|
268
|
+
"maximum": 9007199254740991
|
|
269
|
+
},
|
|
270
|
+
"referenced": {
|
|
271
|
+
"type": "integer",
|
|
272
|
+
"minimum": 0,
|
|
273
|
+
"maximum": 9007199254740991
|
|
274
|
+
},
|
|
275
|
+
"skipped": {
|
|
276
|
+
"type": "integer",
|
|
277
|
+
"minimum": 0,
|
|
278
|
+
"maximum": 9007199254740991
|
|
279
|
+
},
|
|
280
|
+
"unresolved": {
|
|
281
|
+
"type": "integer",
|
|
282
|
+
"minimum": 0,
|
|
283
|
+
"maximum": 9007199254740991
|
|
284
|
+
},
|
|
285
|
+
"notApplicable": {
|
|
286
|
+
"type": "integer",
|
|
287
|
+
"minimum": 0,
|
|
288
|
+
"maximum": 9007199254740991
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": [
|
|
292
|
+
"expected",
|
|
293
|
+
"uploaded",
|
|
294
|
+
"referenced",
|
|
295
|
+
"skipped",
|
|
296
|
+
"unresolved",
|
|
297
|
+
"notApplicable"
|
|
298
|
+
],
|
|
299
|
+
"additionalProperties": {}
|
|
255
300
|
}
|
|
256
301
|
},
|
|
257
302
|
"required": [
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://github.com/crvouga/atlas/schemas/gc-policy.schema.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"enabled": {
|
|
7
|
+
"type": "boolean",
|
|
8
|
+
"description": "Delete eligible layers on a schedule. `false` keeps the policy but deletes nothing"
|
|
9
|
+
},
|
|
10
|
+
"maxAgeDays": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 1,
|
|
13
|
+
"maximum": 3650,
|
|
14
|
+
"description": "A superseded layer is eligible once it was recorded more than this many days ago"
|
|
15
|
+
},
|
|
16
|
+
"keepLatest": {
|
|
17
|
+
"default": 20,
|
|
18
|
+
"description": "Always keep this many of the newest layers, however old, so recent history stays",
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 0,
|
|
21
|
+
"maximum": 1000000
|
|
22
|
+
},
|
|
23
|
+
"intervalHours": {
|
|
24
|
+
"default": 24,
|
|
25
|
+
"description": "How often the server applies the policy",
|
|
26
|
+
"type": "number",
|
|
27
|
+
"minimum": 1,
|
|
28
|
+
"maximum": 720
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": [
|
|
32
|
+
"enabled",
|
|
33
|
+
"maxAgeDays"
|
|
34
|
+
],
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://github.com/crvouga/atlas/schemas/gc-run-result.schema.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"runs": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"items": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"dryRun": {
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
},
|
|
17
|
+
"at": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "When the pass finished, ISO 8601"
|
|
20
|
+
},
|
|
21
|
+
"candidates": {
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"minimum": 0,
|
|
24
|
+
"maximum": 9007199254740991,
|
|
25
|
+
"description": "Layers the policy would delete"
|
|
26
|
+
},
|
|
27
|
+
"deletedLayers": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 0,
|
|
30
|
+
"maximum": 9007199254740991
|
|
31
|
+
},
|
|
32
|
+
"deletedBlobs": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 0,
|
|
35
|
+
"maximum": 9007199254740991
|
|
36
|
+
},
|
|
37
|
+
"keptLayers": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 0,
|
|
40
|
+
"maximum": 9007199254740991
|
|
41
|
+
},
|
|
42
|
+
"error": {
|
|
43
|
+
"description": "Why the pass stopped early, when it did",
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"project",
|
|
49
|
+
"dryRun",
|
|
50
|
+
"at",
|
|
51
|
+
"candidates",
|
|
52
|
+
"deletedLayers",
|
|
53
|
+
"deletedBlobs",
|
|
54
|
+
"keptLayers"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": {}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"policy": {
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"enabled": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "Delete eligible layers on a schedule. `false` keeps the policy but deletes nothing"
|
|
67
|
+
},
|
|
68
|
+
"maxAgeDays": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 1,
|
|
71
|
+
"maximum": 3650,
|
|
72
|
+
"description": "A superseded layer is eligible once it was recorded more than this many days ago"
|
|
73
|
+
},
|
|
74
|
+
"keepLatest": {
|
|
75
|
+
"default": 20,
|
|
76
|
+
"description": "Always keep this many of the newest layers, however old, so recent history stays",
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"maximum": 1000000
|
|
80
|
+
},
|
|
81
|
+
"intervalHours": {
|
|
82
|
+
"default": 24,
|
|
83
|
+
"description": "How often the server applies the policy",
|
|
84
|
+
"type": "number",
|
|
85
|
+
"minimum": 1,
|
|
86
|
+
"maximum": 720
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"enabled",
|
|
91
|
+
"maxAgeDays"
|
|
92
|
+
],
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "null"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"runs",
|
|
103
|
+
"policy"
|
|
104
|
+
],
|
|
105
|
+
"additionalProperties": {}
|
|
106
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://github.com/crvouga/atlas/schemas/gc-snapshot.schema.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"revision": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
9
|
+
},
|
|
10
|
+
"policy": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"enabled": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Delete eligible layers on a schedule. `false` keeps the policy but deletes nothing"
|
|
18
|
+
},
|
|
19
|
+
"maxAgeDays": {
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"minimum": 1,
|
|
22
|
+
"maximum": 3650,
|
|
23
|
+
"description": "A superseded layer is eligible once it was recorded more than this many days ago"
|
|
24
|
+
},
|
|
25
|
+
"keepLatest": {
|
|
26
|
+
"default": 20,
|
|
27
|
+
"description": "Always keep this many of the newest layers, however old, so recent history stays",
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 0,
|
|
30
|
+
"maximum": 1000000
|
|
31
|
+
},
|
|
32
|
+
"intervalHours": {
|
|
33
|
+
"default": 24,
|
|
34
|
+
"description": "How often the server applies the policy",
|
|
35
|
+
"type": "number",
|
|
36
|
+
"minimum": 1,
|
|
37
|
+
"maximum": 720
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": [
|
|
41
|
+
"enabled",
|
|
42
|
+
"maxAgeDays"
|
|
43
|
+
],
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "null"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"saved": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "Whether a policy exists in S3. `false` means garbage collection is off: nothing is deleted"
|
|
54
|
+
},
|
|
55
|
+
"lastRuns": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"project": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"dryRun": {
|
|
64
|
+
"type": "boolean"
|
|
65
|
+
},
|
|
66
|
+
"at": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "When the pass finished, ISO 8601"
|
|
69
|
+
},
|
|
70
|
+
"candidates": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 0,
|
|
73
|
+
"maximum": 9007199254740991,
|
|
74
|
+
"description": "Layers the policy would delete"
|
|
75
|
+
},
|
|
76
|
+
"deletedLayers": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"maximum": 9007199254740991
|
|
80
|
+
},
|
|
81
|
+
"deletedBlobs": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 0,
|
|
84
|
+
"maximum": 9007199254740991
|
|
85
|
+
},
|
|
86
|
+
"keptLayers": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"maximum": 9007199254740991
|
|
90
|
+
},
|
|
91
|
+
"error": {
|
|
92
|
+
"description": "Why the pass stopped early, when it did",
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"project",
|
|
98
|
+
"dryRun",
|
|
99
|
+
"at",
|
|
100
|
+
"candidates",
|
|
101
|
+
"deletedLayers",
|
|
102
|
+
"deletedBlobs",
|
|
103
|
+
"keptLayers"
|
|
104
|
+
],
|
|
105
|
+
"additionalProperties": {}
|
|
106
|
+
},
|
|
107
|
+
"description": "The most recent pass over each project, newest first; empty before the first pass"
|
|
108
|
+
},
|
|
109
|
+
"stateKey": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "Where the user state lives in the bucket, relative to the configured prefix"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": [
|
|
115
|
+
"revision",
|
|
116
|
+
"policy",
|
|
117
|
+
"saved",
|
|
118
|
+
"lastRuns",
|
|
119
|
+
"stateKey"
|
|
120
|
+
],
|
|
121
|
+
"additionalProperties": {}
|
|
122
|
+
}
|
|
@@ -198,6 +198,22 @@
|
|
|
198
198
|
"roles"
|
|
199
199
|
],
|
|
200
200
|
"additionalProperties": {}
|
|
201
|
+
},
|
|
202
|
+
"recording": {
|
|
203
|
+
"description": "What became of the check's expected recording: uploaded, referenced, skipped, unresolved or not-applicable. Independent of `status`",
|
|
204
|
+
"type": "object",
|
|
205
|
+
"properties": {
|
|
206
|
+
"state": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"reason": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": [
|
|
214
|
+
"state"
|
|
215
|
+
],
|
|
216
|
+
"additionalProperties": {}
|
|
201
217
|
}
|
|
202
218
|
},
|
|
203
219
|
"required": [
|