The outbox is discovered through the outbox property of an actor's profile. The outbox MUST be an OrderedCollection.
This is a Test Case describing a rule to determine whether an ActivityPub object has an outbox property that meets this requirement to 'be an OrderedCollection', meeting requirement 3b925cdf-89fe-4f51-b41f-26df23f58e0c
The identifier of this test is urn:uuid:4af549f4-3797-4d99-a151-67c3d8feaa46
.
The subject of this test is any data claiming to conform to the specification of an ActivityPub Actor Object.
This test is not inherently applicable to an ActivityPub Server. An ActivityPub Server serves 0 or more Actor Objects. An ActivityPub Server for a big community might serve hundreds of ActivityPub Actor Objects. An ActivityPub Server for a single human may serve only that person's ActivityPub Actor Object.
This test is not inherently applicable to a URL of an Actor Object. The URL is not the same as the Actor Object. The URL may resolve to different Actor Objects in different contexts.
This test requires the following inputs:
object
- the object whose outbox
property will be tested
time
- amount of time allowed to run test. This is meant to configure the limit for how long this test will wait for network requests.
T0.0021S
dur-time
This test applies to outbox objects linked to from the object
input. Usually an actor will have one outbox, but there may be multiple.
This test does not apply to objects with more than one outbox . If the input object
has an outbox property whose value is an array of length >= 2, outcome is inapplicable
.
(See issue #5102 below to track expanding the applicability)
If object
is not parseable as JSON to a JSON object, outcome is inapplicable
.
If object
is a JSON object, but it does not contain a property named outbox
, outcome is inapplicable
. The rationale is that there is already a test acaacb5f-8f7e-4f28-8d81-c7955070a767
that can be used to determine if input object
has an outbox property at all.
outbox
- the value of the outbox
property in the input object
object
object
object must be JSON for this test's applicability, the value of JSON.parse(actor).outbox
must also be JSONoutbox
from inputs
outboxValue
be
inputs.actor.outbox
is a JSON string, outboxValue
is that stringinputs.actor.outbox
is a JSON object, outboxValue
is that objectinputs.actor.outbox
is an Array of length 1, outboxValue
is the item in that arrayinputs.actor.outbox
is an Array of length greater than 1, the test outcome is inapplicable
(covered in 'Applicability' above)
outboxObject
be
outboxValue
is a JSON object, outboxObject
is that objectoutboxValue
is a JSON string, outboxObject
is the result of interpreting that string as an ActivityPub Object Identifier and fetching the corresponding ActivityPub Object (e.g. GET https://...
).outbox
is outboxObject
outbox
is a JSON objectoutbox
has a property named `type``type
property must contain "OrderedCollection"
, as determined by
outbox
's type
property is a string, it MUST be "OrderedCollection"
outbox
's type
property is an Array, it MUST contain an entry identical to "OrderedCollection"
Revisiting the background from above, ActivityPub says
The outbox is discovered through the outbox property of an actor's profile. The outbox MUST be an OrderedCollection.
"MUST be an OrderedCollection" is open to some interpretation here.
This test chose to interpret 'be an' to include 'indicate its type as'. The rationale is that it's easy to check and easy to implement.
inputs
object
{
"outbox": {
"id": "http://example.org/blog/",
"type": "OrderedCollection",
"name": "Martin's Blog"
}
}
test targets
outbox
value:
{
"id": "http://example.org/blog/",
"type": "OrderedCollection",
"name": "Martin's Blog"
}
outcome: passed
inputs
object
{
"outbox": null
}
test targets
outbox
value:
null
outcome: failed
inputs
object
{
"outbox": {
"type": ["Person"]
}
}
test targets
outbox
value:
{
"type": ["Person"]
}
outcome: failed
inputs
object
{
"outbox": ["https://example.com", "https://example.com"]
}
test targest
outbox
value:
["https://example.com", "https://example.com"]
outcome: inapplicable
result
inapplicable
inputs
object
{}
result
inapplicable
inputs
object
\0x123abc_intentionallyNotJson
result
inapplicable
outcome
An outcome is a conclusion that comes from evaluating a test on a test subject. An outcome can be one of the three following types:
inapplicable
: No part of the test subject matches the applicabilitypassed
: A test target meets all expectationsfailed
: A test target does not meet all expectationsoutbox
has outcome passed
, requirement is satisfiedoutbox
has outcome failed
, requirement is not satisfiedoutbox
has outcome inapplicable
, further testing is needed to determine requirement satisfactionRequired
outbox
test target stubbed out so at least that part could be checkedNice to Have