@kumwe/studio-testkit 0.1.0-alpha.6 → 0.1.0-alpha.7
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/README.md +28 -2
- package/corpus-manifest.json +760 -0
- package/dist/host-testbed.d.ts.map +1 -1
- package/dist/host-testbed.js +131 -0
- package/dist/host-testbed.js.map +1 -1
- package/dist/http-host-adapter.d.ts.map +1 -1
- package/dist/http-host-adapter.js +15 -0
- package/dist/http-host-adapter.js.map +1 -1
- package/fixtures/field-adapter.example.json +27 -0
- package/fixtures/host-capabilities.example.json +9 -3
- package/fixtures/host-operations.example.json +270 -0
- package/fixtures/inspector.example.json +17 -0
- package/fixtures/media-upload-grant.example.json +14 -0
- package/fixtures/studio-config.example.json +1 -1
- package/invalid/inspector.empty-block-types.json +20 -0
- package/invalid/media-upload-grant.insecure-url.json +14 -0
- package/invalid/preview-message.activated-unknown-interaction.json +16 -0
- package/invalid/preview-message.viewport-role-and-size.json +16 -0
- package/package.json +6 -4
- package/vectors/canonical/array-order.json +13 -0
- package/vectors/canonical/control-characters.json +13 -0
- package/vectors/canonical/depth-exceeded.json +21 -0
- package/vectors/canonical/empty-containers.json +14 -0
- package/vectors/canonical/forbidden-member.json +14 -0
- package/vectors/canonical/member-order.json +16 -0
- package/vectors/canonical/negative-zero.json +13 -0
- package/vectors/canonical/nested-order.json +19 -0
- package/vectors/canonical/non-ascii.json +13 -0
- package/vectors/canonical/numbers.json +16 -0
- package/vectors/canonical/string-escapes.json +13 -0
- package/vectors/canonical/surrogate-pair.json +13 -0
- package/vectors/host/artifact.dependencies.result.json +35 -0
- package/vectors/host/artifact.load.stored.json +36 -0
- package/vectors/host/artifact.load.unknown.error.json +37 -0
- package/vectors/host/artifact.publish.accepted.json +37 -0
- package/vectors/host/artifact.publish.forbidden.error.json +37 -0
- package/vectors/host/artifact.publish.stale.error.json +38 -0
- package/vectors/host/artifact.save.accepted.json +38 -0
- package/vectors/host/artifact.save.forbidden.error.json +38 -0
- package/vectors/host/artifact.save.stale.error.json +39 -0
- package/vectors/host/artifact.unpublish.stale.error.json +38 -0
- package/vectors/host/envelope.malformed-context.error.json +36 -0
- package/vectors/host/envelope.protocol-version.error.json +36 -0
- package/vectors/host/envelope.stale-generation.error.json +36 -0
- package/vectors/host/localization.messages.unknown-locale.error.json +36 -0
- package/vectors/host/media.abort-upload.unknown.error.json +35 -0
- package/vectors/host/media.authorize-upload.granted.json +37 -0
- package/vectors/host/media.authorize-upload.path-filename.error.json +39 -0
- package/vectors/host/media.authorize-upload.too-large.error.json +38 -0
- package/vectors/host/media.complete-upload.unknown.error.json +36 -0
- package/vectors/host/media.get.unknown.json +34 -0
- package/vectors/host/media.import-external.private-host.error.json +36 -0
- package/vectors/host/media.list.cursor.error.json +36 -0
- package/vectors/host/media.list.limit.error.json +35 -0
- package/vectors/host/media.upload-status.unknown.error.json +35 -0
- package/vectors/host/permission.explain.withheld.json +34 -0
- package/vectors/host/permission.refresh.snapshot.json +31 -0
- package/vectors/host/recovery.load.absent.json +31 -0
- package/vectors/host/telemetry.emit.accepted.json +37 -0
- package/vectors/host/telemetry.emit.non-primitive.error.json +40 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.load.stored",
|
|
5
|
+
"description": "Loading a stored artifact returns it with the revision it is stored at.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "load",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"id": "vector.blueprint",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "result",
|
|
33
|
+
"revision": "vector.blueprint-r1",
|
|
34
|
+
"value": "artifact"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.load.unknown",
|
|
5
|
+
"description": "An unknown artifact identifier is refused as not-found without disclosing whether it exists.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "load",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"id": "vector.absent",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "error",
|
|
33
|
+
"category": "not-found",
|
|
34
|
+
"retryable": false,
|
|
35
|
+
"messageMustNotContain": ["vector.absent"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.publish.accepted",
|
|
5
|
+
"description": "Publishing under the current revision is accepted and advances the revision.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "publish",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r1"
|
|
27
|
+
},
|
|
28
|
+
"argument": {
|
|
29
|
+
"id": "vector.blueprint",
|
|
30
|
+
"version": "1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"expect": {
|
|
33
|
+
"outcome": "result",
|
|
34
|
+
"revisionAdvances": true,
|
|
35
|
+
"value": "null"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.publish.forbidden",
|
|
5
|
+
"description": "Publication authority is distinct from save authority: holding one never grants the other.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "publish",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.operation/artifact.publish",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r1"
|
|
27
|
+
},
|
|
28
|
+
"argument": {
|
|
29
|
+
"id": "vector.blueprint",
|
|
30
|
+
"version": "1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"expect": {
|
|
33
|
+
"outcome": "error",
|
|
34
|
+
"category": "forbidden",
|
|
35
|
+
"retryable": false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.publish.stale",
|
|
5
|
+
"description": "Publishing against a superseded revision conflicts and carries the safe current revision.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "publish",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r0"
|
|
27
|
+
},
|
|
28
|
+
"argument": {
|
|
29
|
+
"id": "vector.blueprint",
|
|
30
|
+
"version": "1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"expect": {
|
|
33
|
+
"outcome": "error",
|
|
34
|
+
"category": "conflict",
|
|
35
|
+
"retryable": false,
|
|
36
|
+
"revision": "vector.blueprint-r1"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.save.accepted",
|
|
5
|
+
"description": "A save whose expected revision matches the stored revision is accepted and advances the revision.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "save",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r1",
|
|
27
|
+
"idempotencyKey": "idempotency/save-1"
|
|
28
|
+
},
|
|
29
|
+
"argument": {
|
|
30
|
+
"id": "vector.blueprint",
|
|
31
|
+
"kind": "blueprint"
|
|
32
|
+
},
|
|
33
|
+
"expect": {
|
|
34
|
+
"outcome": "result",
|
|
35
|
+
"revisionAdvances": true,
|
|
36
|
+
"value": "null"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.save.forbidden",
|
|
5
|
+
"description": "A save the acting identity is not authorized for is refused before the artifact is touched, and the refusal does not disclose whether it exists.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "save",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.operation/artifact.save",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r1"
|
|
27
|
+
},
|
|
28
|
+
"argument": {
|
|
29
|
+
"id": "vector.blueprint",
|
|
30
|
+
"kind": "blueprint"
|
|
31
|
+
},
|
|
32
|
+
"expect": {
|
|
33
|
+
"outcome": "error",
|
|
34
|
+
"category": "forbidden",
|
|
35
|
+
"retryable": false,
|
|
36
|
+
"messageMustNotContain": ["vector.blueprint"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.save.stale",
|
|
5
|
+
"description": "A save against a superseded revision conflicts and returns the safe current revision so the client resolves without a second read.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "save",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r0",
|
|
27
|
+
"idempotencyKey": "idempotency/save-2"
|
|
28
|
+
},
|
|
29
|
+
"argument": {
|
|
30
|
+
"id": "vector.blueprint",
|
|
31
|
+
"kind": "blueprint"
|
|
32
|
+
},
|
|
33
|
+
"expect": {
|
|
34
|
+
"outcome": "error",
|
|
35
|
+
"category": "conflict",
|
|
36
|
+
"retryable": false,
|
|
37
|
+
"revision": "vector.blueprint-r1"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.unpublish.stale",
|
|
5
|
+
"description": "Unpublishing is revision-checked exactly like every other mutation.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "unpublish",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1",
|
|
26
|
+
"expectedRevision": "vector.blueprint-r0"
|
|
27
|
+
},
|
|
28
|
+
"argument": {
|
|
29
|
+
"id": "vector.blueprint",
|
|
30
|
+
"version": "1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"expect": {
|
|
33
|
+
"outcome": "error",
|
|
34
|
+
"category": "conflict",
|
|
35
|
+
"retryable": false,
|
|
36
|
+
"revision": "vector.blueprint-r1"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.envelope.malformed-context",
|
|
5
|
+
"description": "A structurally invalid request envelope is refused as invalid-request rather than partially honoured.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "load",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"id": "vector.blueprint",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "error",
|
|
33
|
+
"category": "invalid-request",
|
|
34
|
+
"retryable": false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.envelope.protocol-version",
|
|
5
|
+
"description": "A request naming a wire version the host does not support is refused as incompatible before any work.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "load",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "9.9.9",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"id": "vector.blueprint",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "error",
|
|
33
|
+
"category": "incompatible",
|
|
34
|
+
"retryable": false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.envelope.stale-generation",
|
|
5
|
+
"description": "A request carrying a superseded session generation is refused; a permission or context change mints a new generation.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "load",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r0"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"id": "vector.blueprint",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "error",
|
|
33
|
+
"category": "invalid-request",
|
|
34
|
+
"retryable": false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.localization.messages.unknown-locale",
|
|
5
|
+
"description": "A locale the host does not carry is refused as not-found rather than answered with an empty bundle.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "localization",
|
|
8
|
+
"operation": "messages",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"locale": "zz",
|
|
29
|
+
"namespaces": ["studio.shell"]
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "error",
|
|
33
|
+
"category": "not-found",
|
|
34
|
+
"retryable": false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.abort-upload.unknown",
|
|
5
|
+
"description": "Aborting an unknown grant is refused rather than reported as a silent success.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "abort-upload",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.operation/media.abort-upload",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"uploadId": "uploads/never-granted"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "error",
|
|
32
|
+
"category": "not-found",
|
|
33
|
+
"retryable": false
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.authorize-upload.granted",
|
|
5
|
+
"description": "An upload within policy is authorized before any byte moves, returning a bounded, expiring grant.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "authorize-upload",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.operation/media.authorize-upload",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"byteSize": 1048576,
|
|
29
|
+
"filename": "photo.jpg",
|
|
30
|
+
"mediaType": "image/jpeg",
|
|
31
|
+
"purpose": "studio.media/content"
|
|
32
|
+
},
|
|
33
|
+
"expect": {
|
|
34
|
+
"outcome": "result",
|
|
35
|
+
"value": "upload-grant"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.authorize-upload.path-filename",
|
|
5
|
+
"description": "A declared filename carrying a path separator is refused: a filename is display metadata, never a storage path.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "authorize-upload",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.operation/media.authorize-upload",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"byteSize": 1024,
|
|
29
|
+
"filename": "../../etc/passwd",
|
|
30
|
+
"mediaType": "image/jpeg",
|
|
31
|
+
"purpose": "studio.media/content"
|
|
32
|
+
},
|
|
33
|
+
"expect": {
|
|
34
|
+
"outcome": "error",
|
|
35
|
+
"category": "validation-failed",
|
|
36
|
+
"retryable": false,
|
|
37
|
+
"messageMustNotContain": ["../../etc/passwd"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.authorize-upload.too-large",
|
|
5
|
+
"description": "An upload larger than the host bound is refused at authorization, so no transfer is ever started.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "authorize-upload",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.operation/media.authorize-upload",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"byteSize": 1073741824,
|
|
29
|
+
"filename": "huge.bin",
|
|
30
|
+
"mediaType": "image/jpeg",
|
|
31
|
+
"purpose": "studio.media/content"
|
|
32
|
+
},
|
|
33
|
+
"expect": {
|
|
34
|
+
"outcome": "error",
|
|
35
|
+
"category": "limit-exceeded",
|
|
36
|
+
"retryable": false
|
|
37
|
+
}
|
|
38
|
+
}
|